β‘ Stochastic Volatility Calibrator & Heston Simulator
A quantitative modeling package developed by Ramprasad Atluri for continuous-time stochastic volatility simulation and calibration.
π Model Description
This model implements the bivariate continuous-time Heston Stochastic Volatility Model with full truncation discretization. It models the joint dynamics of an underlying asset price $S_t$ and its instantaneous variance $v_t$:
Parameters:
- $\kappa$ (Mean Reversion Speed): Rate at which variance pulls back towards its long-term average $\theta$.
- $\theta$ (Long-Term Variance): Long-run variance ceiling.
- $\xi$ (Vol of Vol): Volatility of the variance diffusion process.
- $\rho$ (Leverage Correlation): Asymmetric correlation capturing the financial leverage effect ($\rho < 0$).
- $v_0$ (Initial Variance): Instantaneous starting variance.
π Quick Start
Download and run simulations directly in Python:
from huggingface_hub import hf_hub_download
import json
# Download weights
weights_file = hf_hub_download(
repo_id="At1uri/stochastic-volatility-calibrator",
filename="calibrator_weights.json"
)
with open(weights_file, "r") as f:
config = json.load(f)
print("Calibrated Parameters:", config["calibrated_parameters"])
Full Simulation using calibrator.py:
from calibrator import HestonStochasticVolatilityModel
# Initialize pre-calibrated model
model = HestonStochasticVolatilityModel.load_pretrained()
# Simulate 500 Monte Carlo price and variance paths
price_paths, var_paths = model.simulate_paths(s0=100.0, t_days=252, n_paths=500)
print(f"Mean Terminal Price: {price_paths[:, -1].mean():.2f}")
π Diagnostics & Feller Condition
The pre-calibrated parameter set guarantees the Feller Condition: Ensuring the variance process $v_t$ remains strictly positive ($v_t > 0$) almost surely.
- Feller Ratio: $2\kappa\theta / \xi^2 = 2.012$ (Strictly satisfied)
- Calibration RMSE: $0.00318$
βοΈ License
MIT License. Free for academic, proprietary, and commercial quantitative development.
- Downloads last month
- 22