Back to portfolio

Case Study

Hybrid LSTM-GARCH Option Pricing

Volatility-aware option pricing under regime shifts

PyTorchstatsmodelsPandasNumPyFastAPI

Problem

Pure deep learning models captured nonlinear dependencies but underperformed during volatility spikes and market regime shifts.

System Architecture

High-level component flow.

Component

Market Data Stream

Market Data Stream is an internal service layer responsible for transformation, scoring, or orchestration.

Connected To

  • Sends output to Feature Pipeline

Key Engineering Decisions

  • Paired LSTM trend modeling with GARCH residual volatility to improve robustness.
  • Decoupled feature pipeline to enable independent retraining and diagnostics.
  • Used vectorized Monte Carlo simulation for real-time pricing constraints.

Implementation Details

  • Engineered rolling window feature store with strict train-validation temporal splits.
  • Implemented modular pricing service exposing scenario analysis endpoints.
  • Deployed model calibration jobs with monitoring for drift in implied volatility bands.

Results

Pricing Error (RMSE)

-23%

Volatility Forecast Lift

+18%

Simulation Throughput

20k/s

  • Lowered pricing RMSE by 23% compared with standalone sequence baselines.
  • Improved volatility forecasts during high-variance intervals.
  • Reached simulation throughput suitable for intraday evaluation workflows.

Code Snippet

Hybrid Forecast

def hybrid_volatility(lstm_sigma, garch_sigma, alpha=0.65):
    return alpha * lstm_sigma + (1 - alpha) * garch_sigma

# Feed hybrid sigma into Monte Carlo pricing paths
price = mc_option_price(spot, strike, rate, hybrid_sigma, maturity)

Lessons Learned

  • Hybrid models can outperform single-family models when regimes change quickly.
  • Strict temporal validation is non-negotiable in financial ML systems.
  • Serving constraints should shape model architecture choices early.