Skip to main content

A Python library for pricing VIX options using shot noise models

Project description

VIX Pricer

Replication package for:

Fan, Z., Ryu, D., & Ye, Y. (2026). Valuation of VIX derivatives: Incorporating larger spikes in volatility-of-volatility dynamics.

A Python library for pricing VIX options using shot noise stochastic volatility models. This package implements both Fast Fourier Transform (FFT) and Monte Carlo methods for efficient and accurate option pricing.

Features

  • Affine Characteristic Function: Solves coupled Riccati-type ODEs for shot noise VIX models
  • FFT Pricing: Carr-Madan FFT method for fast European option pricing
  • Monte Carlo Simulation: Euler-Maruyama discretization for path simulation
  • Model Validation: Built-in framework to compare FFT and MC pricing accuracy
  • Flexible Architecture: Modular design for easy extension and customization

Installation

From PyPI

pip install VIX-Spike

Quick Start

Basic Option Pricing

from Pricer import ModelParameters, InitialConditions, FFTPricer

# Define model parameters
params = ModelParameters(
    T=0.0833,           # Time to maturity (1 month)
    kappa=5.0,          # Mean-reversion speed
    kappam=0.5,         # Long-term variance mean-reversion
    thetam=0.04,        # Long-run variance mean
    omegam=0.3,         # Variance volatility
    kappa1=3.0,         # Instantaneous variance mean-reversion
    theta1=0.04,        # Instantaneous variance long-run mean
    omega1=0.5,         # Vol-of-vol
    rho1=-0.7,          # Correlation
    bv=10.0,            # Shot noise decay rate
    lamb=5.0,           # Jump intensity
    muJV=0.02,          # Mean jump size
)

# Set initial conditions
initial = InitialConditions(
    lnS0=2.7,           # Initial log-VIX
    m0=0.04,            # Initial variance center
    v10=0.04,           # Initial instantaneous variance
    Lv0=0.01,           # Initial shot noise level
)

# Price a call option
strike = 15.0
risk_free_rate = 0.0
strikes, prices = FFTPricer.price_call_fft(
    r=risk_free_rate,
    T=params.T,
    params=params,
    initial=initial,
    K=strike
)

print(f"Call option price at K={strike}: {prices[0]:.4f}")

Monte Carlo Simulation

from Pricer import MonteCarloSimulator

# Create simulator
mc = MonteCarloSimulator()

# Generate paths
paths = mc.generate_paths(
    params=params,
    initial=initial,
    num_paths=10000,
    num_steps=100
)

# Price option using Monte Carlo
mc_price = mc.price_call_mc(
    r=risk_free_rate,
    T=params.T,
    params=params,
    initial=initial,
    K=strike,
    num_paths=100000
)

print(f"Monte Carlo price: {mc_price:.4f}")

Model Validation

from Pricer import ModelValidator

# Create validator
validator = ModelValidator()

# Compare FFT vs Monte Carlo across multiple strikes
results = validator.validate_pricing(
    params=params,
    initial=initial,
    strikes=[12, 13, 14, 15, 16, 17, 18],
    r=risk_free_rate,
    num_mc_paths=50000
)

print(results)

Model Description

The library implements a reduced VIX shot noise model with the following dynamics:

Log-VIX Process: $$d\ln S_t = \kappa(\theta_t - \ln S_t)dt + \sqrt{v_{1t}}dW_t^{(1)}$$

Long-term Variance Center (OU Process): $$dm_t = \kappa_m(\theta_m - m_t)dt + \omega_m dW_t^{(m)}$$

Instantaneous Variance (CIR-type): $$dv_{1t} = \kappa_1(\theta_1 - v_{1t})dt + \omega_1\sqrt{v_{1t}}dW_t^{(v)}$$

Variance Shot Noise: $$dL_{vt} = -b_v L_{vt}dt + dJ_t^{(v)}$$

Where:

  • $\theta_t = m_t + L_{vt}$ (time-varying target)
  • $dW_t^{(1)}$ and $dW_t^{(v)}$ have correlation $\rho_1$
  • $J_t^{(v)}$ is a compound Poisson process with exponential jump sizes

Package Structure

vix-pricer/
├── Pricer/
│   ├── __init__.py                    # Package initialization
│   ├── model_config.py                # Model parameters and initial conditions
│   ├── characteristic_function.py     # Affine characteristic function solver
│   ├── fft_pricing.py                 # FFT-based option pricing
│   ├── monte_carlo.py                 # Monte Carlo simulation
│   ├── validator.py                   # Model validation framework
│   └── solvers.py                     # Numerical ODE solvers
├── pyproject.toml                     # Modern package configuration
├── setup.py                           # Legacy setup script
├── README.md                          # This file
└── LICENSE                            # MIT License

Dependencies

  • Python ≥ 3.8
  • NumPy ≥ 1.20.0
  • SciPy ≥ 1.7.0
  • Pandas ≥ 1.3.0
  • tqdm ≥ 4.60.0

Development

Installing Development Dependencies

pip install -e ".[dev]"

Running Tests

pytest tests/ -v --cov=Pricer

Code Formatting

black Pricer/
flake8 Pricer/

Citation

If you use this library in your research, please cite:

@article{fan2026vix,
  author = {Fan, Z. and Ryu, D. and Ye, Y.},
  title = {Valuation of {VIX} derivatives: Incorporating larger spikes in volatility-of-volatility dynamics},
  year = {2026},
  journal = {Working Paper}
}

You can also cite the software package:

@software{vix_pricer_2026,
  author = {VIX Spike VolOfVol Research Team},
  title = {VIX-Spike: A Python Library for VIX Option Pricing},
  year = {2026},
  note = {Available on PyPI}
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For questions and support:

Acknowledgments

Developed by the VIX Spike VolOfVol Research Team for quantitative finance research and applications.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vix_spike-1.0.1.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vix_spike-1.0.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file vix_spike-1.0.1.tar.gz.

File metadata

  • Download URL: vix_spike-1.0.1.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for vix_spike-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dffd097f4c21fc0ac99a11fccaab9ffc8464a1f1405770f358b512c41c24f3a6
MD5 98d8298649a4c8a89cd2462198105246
BLAKE2b-256 d60b9d8fef7af7d56de9c5cfb157a71fe0df61de5dff9a60d8b132d8552e135a

See more details on using hashes here.

File details

Details for the file vix_spike-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: vix_spike-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for vix_spike-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d2f7bf5a14b2bdb51ca267c48eab215056e4d341876c96cc15d289f756edb8a
MD5 22bd53057e2a307d5fb909e5f484a264
BLAKE2b-256 a0df4dddbb5013b5e7f4ce4d073eeda1254707ba452b9d1e4461b01e7c2b1951

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page