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 stochastic volatility models. This package implements both Fourier-based methods and Monte Carlo methods for efficient option pricing.

Features

  • Affine Characteristic Function: Solves coupled Riccati-type ODEs for VIX direct 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)}$$

Stochastic central tendency (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)} + dL_{vt}$$

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}
}

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.2.tar.gz (16.6 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.2-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vix_spike-1.0.2.tar.gz
  • Upload date:
  • Size: 16.6 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.2.tar.gz
Algorithm Hash digest
SHA256 ce82c7d1385e5ddd4768ec1971ed13a5bd4274648314b08b444787018fff2b06
MD5 7ddb326363346154c023710eca8d7e54
BLAKE2b-256 e6b05860bcbef67ce29e21f4b3f16e59117b8c5cd6d2879ba8a43901356e2c19

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vix_spike-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c6e33ab5253ca3e5f8881c471a53dbe9bbc24b0feb34a399b39c593585e1e64e
MD5 479cc630bb6d0b947e95c90bcdb7fe6e
BLAKE2b-256 70c59fa0c51f450a38d87d7cb59685056ac2ee7b88680245afe0d15270ed0ee6

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