School Project

University of Hong Kong

SPY(ETF) Price Forecaster

Time-series forecasting project to predict next-day SPY adjusted close with deep learning and baseline comparison.

Workflow

  • Fetched SPY market data and engineered MA10/30/90, log returns, volatility, and RSI14 features.
  • Built sequence windows (90, 30, and 10 days) so each sample gives the model recent price/indicator history.
  • Each LSTM learns temporal patterns by carrying memory from earlier timesteps and outputs a next-day price forecast.
  • Compared all models using MSE, RMSE, and MAE, then benchmarked them against a MA10 baseline.
  • Generated next-day predictions and plotted model outputs against actual prices.
  • In simple terms: the model looks at recent market behavior, learns recurring patterns, and makes an informed guess for tomorrow's price.

Forecast Charts

Script was run on 28/2/2026.