QuantRisk is a risk management platform that bridges the gap between computational efficiency and modern machine learning.
Important
Performance Milestone: Achieved a ~400x speedup on core Monte Carlo simulations compared to native Python loops, and ~9x speedup over vectorized NumPy implementations using custom C++ SIMD kernels.
The heart of the system. Written in C++17 for maximum throughput.
- Parallelization: OpenMP-powered multi-threading across all CPU cores.
- Binding: Zero-copy memory transfer via Pybind11.
- Vectorization: Leveraging SIMD instructions for Geometric Brownian Motion (GBM) path generation.
A two-stage pipeline for capturing market stress:
- Stage 1: Classic GARCH(1,1) to model long-term variance persistence.
- Stage 2: LSTM (Recurrent Neural Network) to correct residuals and capture non-linear "fat-tail" events that standard models miss.
- Kupiec’s Proportion of Failures (POF) Test.
- Christoffersen’s Independence Test (Detecting VaR violations clustering).
| Hybrid Volatility Analysis | Institutional Risk Report (PDF) |
|---|---|
![]() |
![]() |
| Backtesting & Validation | Portfolio Optimization |
|---|---|
![]() |
![]() |
from quantrisk import MonteCarloEngine, HybridVol
# Generate 2 million paths in milliseconds
engine = MonteCarloEngine(paths=2000000, steps=252)
results = engine.run_simulation(initial_price=100.0, vol=0.2, drift=0.05)
print(f"VaR (95%): {results.calculate_var(0.95)}")


