Rough volatility experiments and rBergomi-based simulation and calibration.
Note: Version 1.1 is the last human-only version.
The canonical version is stored in RoughVol1/init.py as __version__.
- Simulates rBergomi paths and prices options.
- Computes implied vol surfaces and distances to market surfaces.
- Supports bulk runs from spreadsheet inputs and writes results to Excel.
- Core logic: RoughVol1/RFSV_functions.py
- Helpers and I/O: RoughVol1/RFSV_helpers.py
- Entry point: RoughVol1/RFSV_main.py
- Error metrics: RoughVol1/RFSV_functions_Error.py
- Python 3.10+ (tested with Python 3.12)
- Install dependencies:
python -m pip install -r requirements.txtRun the main script (expects input files in the configured location):
python RoughVol1/RFSV_main.py --log-level INFOThe default input file is RFSV_input.xlsx (override with -x). It must include:
- A main sheet with the request table (read with
header=0,skiprows=1). - Columns for shared configuration and per-request parameters.
- Tenor and forward/variance series columns.
- Two additional sheets:
VolGridandWeightsGrid.
Minimum expected columns on the main sheet:
Destination(output folder prefix)Row,Date,Spot,UnderlyingSimulations,SeedRoughness(Hurst),VolVol(Eta),Correlation(Rho)FullDiagnostic,FullOutputTenor1..TenorNFwd1..FwdNImpvar1..ImpvarN
Row selection notes:
- Positional arguments are 1-based row numbers.
- Passing
0runs the last row in the sheet.
- Prepare an input Excel file with the columns and sheets above.
- Run a single request row:
python RoughVol1/RFSV_main.py -x RFSV_input.xlsx 1- Run multiple rows and write outputs to the
Destinationpath:
python RoughVol1/RFSV_main.py -f C:\path\to\inputs -x RFSV_input.xlsx 1 2 3Run unit tests:
python -m pytest -qRun type checks:
python -m mypy --config-file mypy.ini RoughVol1Pre-commit hooks are configured for black, isort, and mypy.
python -m pre_commit install
python -m pre_commit run --all-filesOn Windows, if you see long-path errors during hook setup, set a short cache:
setx PRE_COMMIT_HOME C:\pccache- 1.0.0: brute-force rBergomi simulation.
- 1.1.0: improved inputs/outputs, bulk runs, and distance metrics.
- 1.1 is the last human-only version.