πŸ“‹ Model Documentation

1. Overview

This system builds an LSTM time-series model for JPMorgan Chase (JPM), using daily OHLCV data since 2010 together with live option-chain data, to forecast the direction of the next 10 trading days and generate Buy / Sell / Hold signals, with full backtesting and options-linked suggestions.

2. Model Architecture

3. Feature Engineering (19 features)

CategoryFeatures
Price / TrendMA5 / MA20 / MA60 ratios to close, Bollinger Band position, distance from 52-week high
MomentumRSI(14), MACD & signal line, 5/10/20/60-day momentum
Volatility20-day rolling volatility, 20/60-day vol ratio, ATR(14)
VolumeVolume change rate, 5/60-day volume ratio
Short-term returns1-day / 2-day lagged returns

All features are stationarized (ratios / growth rates); normalization uses training-set statistics only to prevent data leakage.

4. Data & Split

5. Signal Rules & Accuracy

Up probability > 0.60 β†’ Buy; < 0.40 β†’ Sell; otherwise β†’ Hold. Threshold 0.52 is calibrated on the validation set; 0.60/0.40 defines the high-confidence zone.

Metric (test set)Value
Overall accuracy52.5% ("always-up" baseline: 58.8%)
Strong-signal accuracy (prob>0.60, 156 samples)69.2%, avg forward 10-day return +1.74%
Precision / Recall / F158.4% / 67.1% / 0.624
Confusion matrixTP=234, FP=167, FN=115, TN=78
Yearly accuracy2024: 51.6% Β· 2025: 48.4% Β· 2026: 57.9%

Methodology note: the test period (2024–2026) was a strong uptrend for JPM, so the "always-up" baseline is naturally high and overall accuracy must be read against that baseline. What matters for trading is the accuracy in the high-confidence zone. Logistic regression (52.2%) and gradient boosting (53.7%) baselines perform on par with the LSTM, reflecting the low signal-to-noise ratio of daily equity direction prediction β€” confidence-sliced evaluation is the fairer lens.

6. Backtest Setup & Results

Limitations: the model shows a long bias learned during the bull market, sell signals rarely trigger, and backtest returns are mostly beta. Re-validation is required in bear markets. The options layer uses live chain snapshots and is not historically backtested.

7. Reproduction Files

Data fetch_data.py fetch_options.py
Training train_model_v3.py (5-seed ensemble saved in model/ensemble_seed*.pt)
Backtest backtest.py (outputs model/backtest.json / backtest_curve.csv)
Signals make_site_data.py (latest-window inference + builds web/data.json)

Disclaimer: This tool is a machine-learning research demo only and does not constitute investment advice. Past performance does not guarantee future results; options trading involves substantial leverage and risk. Use at your own risk.