https://github.com/wol-fi/direct_vola
Demo code for direct Black-Scholes implied-volatility calculation from normalized call prices via the inverse-Gaussian quantile representation.
https://github.com/wol-fi/direct_vola
implied-volatility
Last synced: 29 days ago
JSON representation
Demo code for direct Black-Scholes implied-volatility calculation from normalized call prices via the inverse-Gaussian quantile representation.
- Host: GitHub
- URL: https://github.com/wol-fi/direct_vola
- Owner: wol-fi
- Created: 2026-04-29T20:56:21.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-29T21:12:02.000Z (3 months ago)
- Last Synced: 2026-04-29T23:16:48.449Z (3 months ago)
- Topics: implied-volatility
- Language: Python
- Homepage: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6649499
- Size: 5.86 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-quant - direct_vola - `Python` `R` - Demo code for direct Black-Scholes implied-volatility calculation from normalized call prices via the inverse-Gaussian quantile representation. (Reproducing Works, Training & Books)
README
# Explicit Black-Scholes Implied Volatility Demo Code
This repository contains demo Python and R code accompanying the paper:
An Explicit Solution to Black-Scholes Implied Volatility
Wolfgang Schadner
[SSRN](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6649499)
## Scope
This repository contains demonstration implementations of the inverse-Gaussian implied-volatility formula.
It is **not** the fast/native implementation used for the numerical results or speed benchmark reported in the paper.
The higher-level scripts are arranged to make repeated runs and cross-checks easier while keeping the numerical method itself close to the paper.
## Files
- `example_ivol.py` - Python demo script for batched accuracy and timing comparisons against `py_vollib`
- `example_ivol.R` - R demo script for computing implied volatility from normalized inputs and saving a short summary
## Requirements
For Python:
```powershell
python -m pip install -r requirements.txt
```
For R:
The R script uses base R functions only and does not require additional packages.
## Run
Python:
```powershell
python example_ivol.py
```
This script writes `iv_accuracy_speed_summary.txt` in the working directory.
Useful options:
```powershell
python example_ivol.py --runs 5 --reps 500
python example_ivol.py --skip-lbr
python example_ivol.py --output custom_summary.txt
```
R:
```powershell
Rscript example_ivol.R
```
This script writes `iv_r_summary.txt` in the working directory.
You can also choose the R summary output path:
```powershell
Rscript example_ivol.R custom_r_summary.txt
```
## Notes
This code is provided for research and demonstration purposes only. No warranty is provided.