Skip to content

Blake Rayvid

Menu
  • About
  • Portfolio
Menu

Compare Stock Returns

Posted on June 1, 2025May 11, 2026 by Blake

This page lets you enter multiple stock tickers (eg. AAPL, MSFT, GOOGL) and even custom portfolio expressions (eg. 0.5*NVDA, 0.25*AMZN, 0.25*KO) and compare their performance against a benchmark (eg. SPY) over any time period.

  • Fine-tune the date range with the slider and handles.
  • View normalized cumulative returns with options for logarithmic scale and smoothing.
  • Display annualized alpha and beta values with respect to your benchmark.

It’s built with Python and Flask on the backend. Data comes from Yahoo Finance via the yfinance library, pandas crunches the numbers, and matplotlib generates the plots. The front end uses basic HTML/CSS/JS with noUiSlider for the date range slider.

🔗 stocks.blakerayvid.com

View on GitHub

Tags: Flask, HTML/CSS/JS, Matplotlib, NumPy, Pandas, Pillow, Python, Railway, YFinance API
Categories: Finance, Interactive, Utilities

Post navigation

← SOAP: A New Polling Platform
Data Science CV →

Categories

  • Data Science
  • Exploration
  • Finance
  • Health
  • Interactive
  • Optimization
  • Utilities

Tags

D3.js Desmos Docker Express.js FFmpeg Flask Gemini API Google Maps API HTML/CSS/JS MATLAB Matplotlib Netlify NetworkX Next.js NLP Node.js NumPy P5.js Pandas Pillow PostgreSQL Python QuantConnect Railway React.js Scikit-Learn SciPy TensorFlow Tesseract OCR WeasyPrint YFinance API

© 2026 Blake Rayvid. All rights reserved.