Paige Lui
All Projects

Time Series Forecasting · Full-Stack Development

Weekly Volatility Forecaster

A volatility forecasting app that predicts how far 15 major stocks and ETFs are likely to move over the next week. A walk-forward backtest compared a PyTorch LSTM with classical models, and the winning model updates daily through an automated pipeline.

PythonPyTorchLSTMscikit-learnNext.jsTypeScriptPandasGitHub Actions
Weekly Volatility Forecaster project preview

The Project

Overview

Financial markets produce large amounts of time-series data, making historical stock prices a useful setting for exploring sequence-based machine learning models.

I originally built an application that used a Long Short-Term Memory (LSTM) neural network to predict the next day's stock price. To test whether it actually worked, I built a walk-forward backtest comparing it against simple baselines across six stocks.

The backtest showed the LSTM had no real edge on price direction, but that volatility, how much a stock moves rather than which way, was genuinely forecastable. A classical HAR model beat the LSTM at it on every stock, so I rebuilt the app around weekly volatility forecasts using that model.

The final app shows each stock's likely price range for the next five trading days and reports how often past forecast ranges actually held. It updates automatically every weekday after the market closes.

Key Contributions

Project Highlights

Honest Model Comparison

Walk-forward backtested a PyTorch LSTM against naive, linear, EWMA and HAR baselines across six stocks, with no look-ahead bias.

Automated Daily Pipeline

A scheduled GitHub Actions workflow downloads prices, refits the model and publishes fresh forecasts every weekday.

Calibrated Forecast Ranges

Visualizes each stock's expected weekly range and checks how often real moves landed inside it.

Behind the Build

Technical Deep Dive