homeprojectsblogcredentialsusesaboutcontact
projects/multi-stock-prediction
PythonLSTMDeep LearningFastAPIHTMLCSS

Multi-Stock Price Prediction

DL-based stock price forecasting system analyzing 5 years of market data using a 2-layer LSTM with technical indicator feature engineering.

Live demo ↗GitHub ↗
R² = 0.98Train/test gap: 0.082-layer LSTM
Live Repository Metrics:
2 stars0 forks👁 2 watchers
Model R² Score
98%
Train/Test Gap
8%
Feature Importance
75%
HTML51.3%Python48.7%
5 YrsDataset Spanhistorical market data
2LSTM Layerswith dropout regularization
14msInference TimeFastAPI endpoint speed
MultiTickers Trackeddynamic selection

Stock price prediction is notoriously noisy. Most toy implementations use raw OHLCV data without feature engineering, leading to models that memorize training patterns but fail on held-out windows.

Used Yahoo Finance API to pull 5 years of historical data for multiple tickers. Engineered technical indicators (RSI, MACD, Bollinger Bands, moving averages) as additional features. Built a 2-layer LSTM with dropout trained on sliding windows. Served via FastAPI with an interactive frontend dashboard showing historical vs. predicted prices.

PythonTensorFlow/KerasFastAPIPandasNumPyyfinanceMatplotlibHTML/CSSRender
  • R² score of 0.98 on test set with only -0.08 train/test gap (minimal overfitting)
  • Low MAE relative to price range across all tickers tested
  • Interactive dashboard with candlestick + prediction overlay visualization
  • 01Technical indicators significantly improve LSTM performance over raw OHLCV - the model learns from rate-of-change, not just absolute levels
  • 02R² is more informative than accuracy for regression; wrote about this distinction separately
  • 03FastAPI's async handling made the multi-ticker endpoint fast enough for real-time use
← Back to projects