TensorFlow LSTM AWS Lambda DynamoDB yfinance TorchScript

Stock Price Predictor

LSTM forecasting with Monte Carlo uncertainty bands, served serverlessly under 200ms.

Stock Price Predictor
Overview

What is this project?

A multi-layer LSTM architecture trained on 10 years of historical OHLCV data for 50+ equities. Technical indicators — RSI, MACD, Bollinger Bands, OBV — are engineered as additional features. Walk-forward validation prevents look-ahead bias, and Monte Carlo Dropout generates uncertainty quantification bands around each forecast. The entire model is packaged as an AWS Lambda function with a DynamoDB cache layer to serve repeat queries instantly.

The core challenge was keeping inference cold-start under 3 seconds while running a 4-layer LSTM on Lambda. This was solved by serialising the model to TorchScript, stripping unused weights, and using Lambda SnapStart. Cache hit rate on repeat tickers reached 78%, dropping average end-to-end latency below 200ms.