UnifiedVol is a modern C++20 quantitative finance library for volatility surface construction, model calibration, and derivatives pricing.
UnifiedVol emphasizes:
- Strong emphasis on accurate replication of at-the-money market quotes during calibration
- Performance-aware design with minimal abstraction overhead
- Efficient memory access and cache-friendly data layouts suitable for production environments
- Numerical stability and reproducibility
- Explicit validation and structured error handling
- SVI parametrization
- Dupire Local Volatility (Andreasen–Huge)
- Heston stochastic volatility (Andersen–Lake pricing)
- Finite-difference PDE solvers
- Cubic Hermite interpolation
- PCHIP interpolation
- Sinh–tanh (TanH–SinH) quadrature
- Tridiagonal (Thomas) solvers
- NLopt (constrained optimization)
- Ceres Solver (nonlinear least squares)
- Parameter bounds and tolerance-controlled convergence
- Warm-start calibration support
- Calendar and butterfly arbitrage constraints
- ATM-weighted cost functions
- Support for extended floating-point precision
- Structured logging, timing, and error utilities
- Explicit input validation and invariant checks
- Explicit data-lifetime management
Below is a minimal excerpt illustrating the structure of a typical calibration pipeline.
See the examples/ directory for complete working programs.
// Read market volatility surface
VolSurface<Real> mktVolSurface{
readVolSurface<Real>(path, marketData)
};
// Calibrate SVI surface
auto sviParams =
svi::calibrate<Real>(mktVolSurface, nloptOptimizer);
VolSurface<Real> sviVolSurface =
svi::buildSurface<Real>(mktVolSurface, sviParams);
// Use the SVI surface to calibrate local volatility or Heston- Build instructions: docs/BUILD.md
- File tree: docs/TREE.md
- Data sources: docs/DATA.md
- Dependencies: docs/DEPENDENCIES.md
- Bibliography: docs/citations.bib
This repository is under active development. Interfaces, APIs, and model implementations are subject to change.
This software is provided for research and educational purposes only.
It is not investment advice and must not be used in trading systems.
All model implementations and market data used in examples and tests have been
derived from publicly available sources and are explicitly cited
where applicable (see citations.bib and DATA.md).
This project is Apache License 2.0 compliant, and all third-party dependencies are used and distributed in accordance with their respective licenses.