Do LSTMs retain their predictive superiority when forced to rely solely on the exact same data as classical econometric models?
The primary objective of this project is to construct a mathematically sound backtesting framework to systematically evaluate whether deep learning architectures genuinely outperform classical econometric models for short-horizon equity volatility forecasting under proxy-robust conditions.
Comparative Analysis of GARCH-family Econometric Models vs LSTM Models for Volatility Forecasting: A Proxy-Robust Approach in US EquitiesDarrance Beh Heng Shek · BSc (Hons) in Computer Science · Sunway University
There is no direct or definitive way to observe volatility at all.
Volatility clustering
Large price movements tend to be followed by further large movements of either sign, while calm periods tend to persist. Documented by Mandelbrot in 1963, and visible in the lower panel above.
Leptokurtosis
Asset returns feature fat-tailed distributions, meaning extreme market events occur far more frequently than a standard normal distribution predicts. Kurtosis here is 17.54 against a Gaussian benchmark of three.
The leverage effect
Negative returns tend to raise future volatility more than positive returns of equal magnitude. EGARCH and GJR-GARCH exist to model this asymmetry explicitly.
| Series | N | Mean | Std. dev. | Min | Max | Skewness | Kurtosis | JB p |
|---|---|---|---|---|---|---|---|---|
| Return (%) | 2,765 | 0.0501 | 1.1233 | -11.5875 | 9.9869 | -0.5829 | 17.5353 | < 0.001 |
| Squared return (%²) | 2,765 | 1.2639 | 5.1151 | 0.0001 | 134.2711 | 15.2987 | 308.5924 | < 0.001 |
The return distribution is negatively skewed at −0.58, indicating that extreme negative returns occur more frequently than positive ones, which is a common phenomenon in equity markets. The kurtosis of 17.54 is far above the Gaussian benchmark of three, confirming the heavy-tailed nature of the return distribution. The squared returns exhibit strong positive skewness of 15.30, reflecting extreme volatility spikes and persistent clustering. The Jarque-Bera test rejects normality for both series at any conventional significance level.
Volatility forecasting is a critical foundational task in quantitative finance.
Classical frameworks assume what markets do not supply
The Black-Scholes-Merton model relies on the assumption that asset returns follow a constant volatility and a normal distribution. In reality, conditional volatility is a latent, unobservable variable that must be statistically inferred from historical price fluctuations.
Undercapitalised systems trigger liquidity crises
Accurate volatility forecasting is essential for the stability of financial institutions, as undercapitalized systems can trigger severe liquidity crises during market downturns. Forecasting errors are highly asymmetric: under-predicting volatility leads to dangerous under-capitalization, whereas over-predicting merely results in marginally reduced leverage.
Value-at-Risk is backtested, not asserted
Variance forecasts map to a Value-at-Risk threshold, and the resulting exception sequence is subjected to regulatory backtesting under the Kupiec proportion-of-failures and Christoffersen conditional coverage frameworks. Only one model in this study would satisfy a standard regulatory backtest at the 95 per cent level.
Five regimes, fixed in advance from documented macroeconomic events
The boundaries are used to separate genuinely different conditions based on real-world events and exogenous shocks rather than dividing the sample arbitrarily. The COVID band is narrow but contains the only stretch in seven years where the 21-day average rises above 75 per cent, roughly six times the level of the calm periods before or after it. The rate-hike band is elevated but sustained, peaking near 30 per cent without any single dramatic spike, showing a slower, more persistent kind of market stress rather than an abrupt shock like the COVID crash.
The post-hike period returns to something close to the calm bull market, aside from a brief spike in April 2025. The pale daily readings behind the moving average also give an early sense of how noisy the squared-return proxy is at the daily frequency, which is the measurement problem the rest of the study works around.
Claims that deep learning outperforms classical volatility models are common. The evaluation practices are not.
Frequently statistically inappropriate
As true volatility can never be directly observed, forecast accuracy must be measured against a proxy, which typically refers to squared returns. However, it has been shown that MSE-based rankings can be distorted, even reversed, under such proxy noise. The QLIKE loss function, which is robust to a much broader class of proxy noise, remains comparatively underused in applied and practitioner-facing work.
In this study the ranking does reverse: both networks record the lowest MAE values and the highest QLIKE values in the same table.
Claims of superiority are rarely tested
A numerically lower error score for one model is frequently treated as conclusive evidence of superiority, without any formal test such as the Diebold-Mariano test to establish whether the difference is genuine or attributable to sampling variation within a single, finite backtest.
None of the four full-sample differences against GARCH(1,1) reach significance at the 5 per cent level.
Comparisons are almost never conditioned
A single aggregated performance score across an entire historical sample can conceal sharply different behavior in calm versus turbulent periods, which is a critical blind spot, since volatility forecasts are arguably most valuable precisely when markets are under stress, such as during a liquidity crisis or a sudden macroeconomic shock.
Three of the five regime-conditional tests are significant, in opposing directions. The full-sample figure reports none of it.
QLIKE inside the optimisation graph, not only around it
Standard PyTorch functions inherently minimize Mean Squared Error, which mathematically distorts model rankings when evaluated against noisy proxies. To enforce the LSTM to respect the nature of financial risk being asymmetric, a custom nn.Module is engineered to compute the QLIKE loss dynamically during backpropagation. By replacing standard MSE with this metric, the optimization algorithm computes gradients that heavily penalize under-predictions of volatility, directly aligning the deep learning model’s objective with econometric reality.
There is a distinct lack of research that natively forces a deep learning architecture to learn under proxy-robust, econometrically sound conditions while restricted exclusively to daily OHLCV data. This project fills that void by integrating the asymmetrically penalizing QLIKE loss function directly into an LSTM network’s optimization graph and evaluating it against classical models under strictly identical daily-data constraints and market regime segmentations.
Translating parametric econometrics and non-linear deep learning into a unified programmatic interface.
- 01
Ingest
loader.pyReconcile the feed against a reconstructed NYSE session calendar, reject malformed bars, forward-fill genuine gaps, emit a data-quality report.
clean OHLCV + quality report - 02
Engineer
features.pyLog returns, the floored squared-return proxy, and 15 predictors, all measurable at the close of day t.
Dataset(prices, returns, proxy, features) - 03
Backtest
engine.pyFor each out-of-sample date, compute the information boundary, refit if due, produce a one-day-ahead variance forecast.
results/forecasts/*.parquet - 04
Evaluate
scorecard.pyQLIKE, RMSE, MAE, R², Diebold-Mariano with HAC variance, Kupiec and Christoffersen coverage — all segmented by regime.
results/tables/*.csv - 05
Present
summarise.pyCondense seventeen audit tables into the six report tables and render the six figures.
results/summary/ · results/figures/
The information boundary
backtest/engine.pyfit(dataset, train_end)Estimate using data up to and including train_end, the last session strictly before the target date.
predict(dataset, target_date)Forecast the target date, formed at the previous close. Nothing after the boundary is reachable.
The engine decides the boundary, not the model. Keeping the loop outside the models is what makes the comparison fair: no model can widen its own information set, because it never chooses its own boundary.
The look-ahead audit
max difference 0.00This is verified rather than asserted. audit_no_lookahead re-estimates each model at sampled checkpoints against a dataset that has been physically truncated at the boundary, and checks the forecast is unchanged. The audit runs as part of the standard pipeline and raises if any forecast moves. The committed run passes at exactly zero difference for all five models.
| Model | Target date | Full dataset | Truncated | |Δ| |
|---|---|---|---|---|
| garch | 2019-01-02 | 3.3983933127 | 3.3983933127 | 0.0 |
| garch | 2022-06-29 | 3.5467773098 | 3.5467773098 | 0.0 |
| egarch | 2020-09-29 | 1.7327762464 | 1.7327762464 | 0.0 |
| gjr_garch | 2024-04-01 | 0.3090760356 | 0.3090760356 | 0.0 |
| lstm_qlike | 2019-01-02 | 1.9825425148 | 1.9825425148 | 0.0 |
| lstm_mse | 2025-12-31 | 0.2028047889 | 0.2028047889 | 0.0 |
Six of twenty audited checkpoints shown. The audit runs as part of the standard pipeline.
The five contenders
GARCH(1,1)
Bollerslev, 1986ω represents the baseline variance, α dictates the short-term reaction to the previous period's squared market shock, and β captures the long-term persistence of past volatility. Hansen and Lunde concluded that GARCH(1,1) is highly robust, though it remains structurally limited when applied to equity returns because it cannot accommodate the asymmetric leverage effect.
EGARCH(1,1)
Nelson, 1991Nelson's model shifts the estimation target to the natural logarithm of the conditional variance, mathematically guaranteeing positive volatility estimates without imposing restrictive non-negativity constraints. The parameter γ explicitly measures the asymmetric response; a negative coefficient captures the leverage effect.
GJR-GARCH(1,1,1)
Glosten, Jagannathan & Runkle, 1993Asymmetry is introduced via a Boolean indicator function that activates exclusively during negative shock events. Under this specification, a negative shock amplifies the variance by a combined factor of (α + γ)ε²ₜ₋₁, and the nested structure keeps the specification highly interpretable.
LSTM · QLIKE and MSE
Hochreiter & Schmidhuber, 1997Selected via random search optimization, evaluated exclusively on a 2018 holdout set residing entirely within the initial in-sample window, so no information from 2019–2025 influenced the model design. Longer lookbacks were tested but consistently degraded out-of-sample performance; deeper and wider configurations consistently resulted in severe overfitting on the noisy squared-return proxy. Softplus is used rather than ReLU because ReLU admits exactly zero forecasts, where the QLIKE loss and its gradient become mathematically undefined.
Fifteen predictors, all measurable at the close of day t
As true volatility is unobservable, the pipeline must derive a target proxy from the raw OHLCV feed. To optimize neural network convergence, the feature space is standard-scaled, with the scaler strictly fit only on the expanding training window to maintain chronological integrity. Both model families access the same daily OHLCV dataset, though by design the GARCH specifications consume closing returns alone.
returnabs_returnproxylog_proxynegative_shockrealised_vol_5realised_vol_10realised_vol_21realised_vol_63vol_ratioewma_varianceparkinson_variancegarman_klass_varianceovernight_gapvolume_ratioThe proxy floor. QLIKE contains ln(proxy), undefined on the eight sessions where SPY closed exactly unchanged. The proxy is floored once at source at 1×10⁻⁴ squared percentage points — one basis point of daily movement — so those sessions stay in the evaluation sample instead of being silently discarded. Every model and the evaluator see the identical target. The floor binds on 36 of 2,765 sessions.
95 tests, 88% statement coverage
~15 stest_data_pipeline.pyCalendar edge cases, ingestion repairs, feature causality, sequence alignment
test_models.pyGARCH estimation, LSTM determinism, information boundary, walk-forward engine, regimes
test_pipeline.pyEnd-to-end run on synthetic data, scorecard assembly, cache round-trip
test_diebold_mariano.pyHAC variance, known significant and degenerate cases, antisymmetry
test_var_backtest.pyKupiec and Christoffersen against hand-computed likelihood ratios
test_metrics.pyQLIKE, Mincer-Zarnowitz, out-of-sample R²
test_losses.pyQLIKE gradient, asymmetry, training/evaluation agreement
Three tests defend the project's central claims directly: test_features_are_causal, test_future_rows_cannot_affect_earlier_sequences and test_refitting_the_same_window_is_deterministic. The last of these matters most: the LSTM's per-refit seed is a function of the training-window end date rather than a counter, which is what makes the look-ahead audit meaningful at all.
Among the econometric models, EGARCH(1,1) achieved the lowest QLIKE at 1.4715.
QLIKE — lower is better
Both asymmetric extensions outperformed the symmetric baseline, consistent with the leverage effect documented for equity indices.
GARCH(1,1) recorded the lowest RMSE at 5.2826 and the highest R-squared. Volatility is proxied by squared daily returns, which are unbiased but very noisy. This limits the R-squared attainable by any model.
The two networks recorded the highest RMSE values and the lowest R-squared values in the study, at 0.0357 and 0.0304 respectively.
| Model | Calm Bull285d | COVID Crash50d | Recovery Rally422d | Rate-Hike Cycle251d | Post-Hike Normalisation752d | Full sample |
|---|---|---|---|---|---|---|
| GARCH(1,1) | 1.500 | 1.550 | 1.385 | 1.411 | 1.567 | 1.490 |
| EGARCH(1,1) | 1.413 | 1.635 | 1.472 | 1.389 | 1.510 | 1.472 |
| GJR-GARCH(1,1,1) | 1.442 | 1.372 | 1.450 | 1.430 | 1.522 | 1.475 |
| LSTM (QLIKE) | 1.369 | 7.072 | 1.471 | 1.306 | 1.599 | 1.645 |
| LSTM (MSE) | 1.421 | 8.116 | 1.468 | 1.364 | 1.589 | 1.686 |
A model can only forecast magnitudes its training window taught it to consider.
The window ending in December 2019 contained nothing resembling March 2020. The GARCH recursion has no such requirement, because its conditional variance is a fixed function of whatever squared return actually arrives. Scrolling through the episode on a logarithmic axis makes the separation clear.
The networks were ahead of the benchmark
Both LSTM lines decline through 2019 and into early 2020, reaching approximately −40 on the cumulative QLIKE differential, indicating that the networks were ahead of GARCH(1,1) over the first fourteen months of the evaluation. The QLIKE-trained network achieved the lowest value of any model during the calm bull market, at 1.369.
The only stretch in seven years above 75 per cent
The COVID band is narrow but contains the only stretch in the evaluation period where the 21-day average rises above 75 per cent annualised, roughly six times the level of the calm periods before or after it. On 16 March the index falls 11.59 per cent in a single session. That is the worst realised session in the sample, corresponding to 184 per cent annualised.
The GARCH lines climb above 100 per cent
They do so within days of the initial shock, and continue to track the realised level upward. Over the seven-year window the highest variance forecast issued by GARCH(1,1) corresponds to 132 per cent annualised volatility, and 151 per cent for GJR-GARCH(1,1,1). GJR-GARCH was the strongest model during the crash at 1.372: its threshold term, which amplifies the variance response specifically to negative shocks, is most valuable when large negative shocks are arriving.
Both LSTM lines rise to roughly 25 to 30 per cent, then flatten
They stay flat for the remainder of the episode. Over the entire seven-year evaluation window the highest variance forecast the QLIKE-trained network ever issued corresponds to 33.3 per cent annualised, against 184 per cent for the worst realised session. The cause is visible in the range of forecasts the network is capable of producing at all.
A softplus function applied to a tanh-bounded recurrent state
Two features of the network design produce this limit. First, standard recurrent architectures inherently cap how high they can predict: the variance forecast is generated by applying a softplus function to a recurrent state bounded by its tanh activations, physically preventing the network from outputting a number high enough to match the extreme market movements during the crash. Second, the input features are standardised using statistics from the training window, meaning inputs from a period far outside that window take extreme, out-of-distribution standardised values. Both are conventional choices in applied work, and both were recorded in Chapter 3 as design decisions rather than discovered afterwards.
Eight sessions out of 1,760
The eight largest daily loss differentials between the QLIKE-trained network and GARCH(1,1) sum to 273.8 QLIKE points, while the total accumulated across all 1,760 days is 272.8. Those eight sessions, representing less than half of one per cent of the evaluation period, account for the entire full-sample deficit. Across the remaining 1,752 days the network is marginally ahead of the benchmark. Seven of the eight occurred in 2020 and the eighth on 9 April 2025.
Highest variance forecast issued over seven years, annualised
The five best architectures from the tuning search all hit the same wall
The architecture and hyperparameters were selected via random search optimization, evaluated exclusively on a 2018 holdout set. To check whether the ceiling is a property of the selected configuration or of the model family, ceiling_check.py retrains the five highest-scoring candidates on data through 2019 and records the highest forecast each one issues. None of them clears 33 per cent annualised.
h=32, L=1, seq=10, drop=0.2h=32, L=1, seq=10, drop=0.1h=24, L=1, seq=10, drop=0.2h=64, L=1, seq=21, drop=0.1h=8, L=1, seq=21, drop=0.3Much of the applied literature reporting deep learning superiority supplies the network with information the econometric baseline never receives, such as intraday realised volatility or sentiment indicators, which makes those comparisons a statement about the data rather than about the models.
Model choice should reflect the intended operating environment.
| Scope | Challenger | DM statistic | p-value | Verdict |
|---|---|---|---|---|
| Full sample | EGARCH(1,1) | -0.754 | 0.4511 | No difference |
| Full sample | GJR-GARCH(1,1,1) | -0.797 | 0.4255 | No difference |
| Full sample | LSTM (QLIKE) | 1.597 | 0.1104 | No difference |
| Full sample | LSTM (MSE) | 1.786 | 0.0742 | No difference |
| Calm Bullby regime ↓ | LSTM (QLIKE) | -3.962 | < 0.001 | LSTM (QLIKE) better |
| COVID Crash | LSTM (QLIKE) | 2.852 | 0.0063 | GARCH(1,1) better |
| Recovery Rally | LSTM (QLIKE) | 0.685 | 0.4938 | No difference |
| Rate-Hike Cycle | LSTM (QLIKE) | -3.730 | < 0.001 | LSTM (QLIKE) better |
| Post-Hike Normalisation | LSTM (QLIKE) | 0.482 | 0.6300 | No difference |
A negative statistic favours the model named in column two; results use a 5 per cent significance level, with an autocorrelation-robust variance estimator. The observed advantage of EGARCH(1,1) over GARCH(1,1) carries a p-value of 0.4511, and the gap between GARCH(1,1) and the QLIKE-trained LSTM, despite amounting to about 10 per cent of the QLIKE value, has a p-value of 0.1104. On this evidence, the three econometric models and the two networks cannot be separated over the full evaluation period.
95% VaR exceptions over 1,760 sessions · pass requires joint p > 0.05
Computational cost
GARCH(1,1) completed 1,760 full re-estimations in 17.4 seconds, while the QLIKE-trained LSTM required 50.6 seconds for 14 retrainings. The network is therefore more expensive overall despite re-estimating far less frequently, and given the absence of a statistically significant accuracy gain, that cost is not recovered on this data.
Performance under stress is the binding requirement
- For risk management applications where performance under stress is the binding requirement, the GARCH family remains the more dependable choice.
- GJR-GARCH(1,1,1) in particular during acute market shocks, where it was the strongest model in the study at 1.372.
- GARCH(1,1) was the only model to pass the 95 per cent Value-at-Risk conditional coverage test, and was substantially cheaper to operate.
- These models remain valued because every parameter carries a clear economic interpretation, they can be estimated on relatively small datasets, and their forecasts can be explained and audited.
Typical market conditions are the operating environment
- For applications with typical market conditions, the LSTM is competitive and was significantly better in two of the five regimes examined.
- It was significantly more accurate than GARCH(1,1) during the low-volatility bull market and the 2022 rate-hike cycle.
- The loss function used to train the network mattered less than expected. The QLIKE-trained network outperformed the MSE-trained network on QLIKE, 1.6450 against 1.6862, but the difference was not statistically significant. Its clearer benefit was stability under a shorter retraining interval.
- Predicting the natural logarithm of variance, as the EGARCH formulation does, would allow the network to project unbounded positive variance without artificial Softplus saturation.
Limitations, and what the framework is for next.
Limitations
- 01
Deep learning architectures are inherently constrained by their activation functions and scaling methodologies. The use of a Softplus head applied to a tanh-bounded recurrent state artificially capped the network from outputting a number high enough to match the extreme market movements. Furthermore, static feature standardization fit on calm historical windows maps unprecedented exogenous shocks to extreme, out-of-distribution tensor values.
- 02
The study covers a single, highly liquid asset in a developed market. SPY is one of the most heavily traded, highly liquid, and structurally efficient instruments globally. Its volatility dynamics may be uniquely well-behaved compared to less liquid equities, which may create a survivorship-like bias in the findings.
- 03
Volatility is proxied by squared daily returns, which are unbiased but very noisy. This limits the R-squared values attainable by any model and is the reason no specification exceeded 0.29.
- 04
The methodology relies on a standard normal distribution assumption to map variance forecasts to VaR thresholds. However, real-world financial data is leptokurtic. Due to this mismatch, standard VaR formulas will inherently underestimate risk during market crashes, regardless of how accurate the underlying predictions are. This highlights a limitation in the standard risk-mapping equation itself, rather than a flaw in the proposed forecasting models.
- 05
Only one neural architecture family was examined, at a single forecast horizon, without hybrid or attention-based alternatives.
Future work
Redesign the output layer and normalisation pipeline
Predicting the natural logarithm of variance, similar to the EGARCH formulation, would allow the network to project unbounded positive variance without artificial Softplus saturation. Implementing dynamic, rolling-window feature standardization would prevent extreme exogenous shocks from pushing the network's inputs into dead, out-of-distribution activation zones.
Shift from daily OHLCV to high-frequency intraday data
Constructing Realized Volatility would reduce the measurement noise in the target variable, allowing deep learning models to fit on a much cleaner signal. It would also permit benchmarking against the Heterogeneous Autoregressive model of Realized Volatility, providing a definitive test of whether LSTMs can outperform the industry's strongest high-frequency econometric baseline.
Hybrid GARCH-LSTM frameworks
A hybrid architecture could use the parametric GARCH(1,1) variance forecast as an engineered input feature for the LSTM network, which would allow the network to delegate the baseline autoregressive and mean-reverting properties to the econometric formula, while the neural network focuses purely on learning the complex, non-linear residuals and regime-dependent asymmetric shocks.
Transformer-based architectures
While LSTMs are effective for sequence learning, they inherently suffer from recency bias, heavily weighting immediate historical shocks. The self-attention mechanism could theoretically learn long-term macroeconomic volatility cycles independently from short-term daily shocks, offering a more robust understanding of market regimes than a standard recurrent state cell.
Multiple assets, markets and horizons
Extending the analysis to establish whether the regime dependence observed here is general, rather than a property of one highly liquid US equity ETF at a one-day horizon.
Reproducing the run
Every source of randomness is seeded from project.random_seed. The LSTM’s per-refit seed derives from the training window boundary, so re-estimating the same window twice is bit-identical regardless of what preceded it.
git clone https://github.com/darrancebeh/ PRJ3223_CAPSTONE-PROJECT.git cd PRJ3223_CAPSTONE-PROJECT pip install -r requirements.txt
python scripts/run_pipeline.py # roughly three minutes of model time # on a laptop CPU, no GPU required
python scripts/summarise.py python scripts/make_figures.py
python -m pytest tests/ -q # 95 tests, roughly 15 seconds, covering # 88 per cent of statements in the package
After deleting every artefact and rebuilding from the raw parquet alone, every accuracy number was bit-identical to the committed run, including QLIKE, RMSE, MAE, R-squared, the regime breakdown, all Diebold-Mariano statistics and p-values, the VaR exception counts and the forecast ceilings. The only fields that changed were the wall-clock timings, which differ between runs by a few seconds.