Skip to content

Blake Rayvid

Menu
  • About
  • Portfolio
Menu

Compare Stock Returns

Posted on June 1, 2025July 6, 2025 by Blake

This page lets you enter multiple stock tickers (eg. AAPL, MSFT, GOOGL) and even portfolio expressions (eg. 1.75*NVDA+2.5*AMZN+5.5*KO) and compare their returns visually against a benchmark (like SPY).

  • Pick a date range for historical data.
  • Use a slider to fine-tune the plotted period.
  • View normalized cumulative returns on a clear chart (with a log scale option).

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 and a bit of JavaScript with noUiSlider for the date range slider.

🔗 stocks.blakerayvid.com

View on GitHub

Tags: Flask, Matplotlib, NumPy, Pandas, Python, Railway, YFinance
Categories: Finance, Interactive, Utilities

Post navigation

← SOAP: A New Polling Platform

Categories

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

Tags

D3.js Desmos Flask Gemini API JavaScript JQuery MATLAB Matplotlib Netlify NLTK NumPy P5.js Pandas PostgreSQL Python QuantConnect Railway Scikit-Learn SciPy Spacy TensorFlow YFinance

© 2025 Blake Rayvid. All rights reserved.