QuantNova.jlDifferentiable Quantitative Finance
High-performance derivatives pricing with automatic differentiation
High-performance derivatives pricing with automatic differentiation
using QuantNova
S0, K, T, r, σ = 100.0, 100.0, 1.0, 0.05, 0.2
price = black_scholes(S0, K, T, r, σ, :call)price = 10.4506option = EuropeanOption("AAPL", K, T, :call)
state = MarketState(
prices = Dict("AAPL" => S0),
rates = Dict("USD" => r),
volatilities = Dict("AAPL" => σ)
)
greeks = compute_greeks(option, state)Greeks:
Δ delta = 0.6179
Γ gamma = 0.0188
ν vega = 39.4478
θ theta = -6.4140
ρ rho = 53.2325# CPU: ForwardDiff (default)
gradient(f, x)
# GPU: Enzyme for large-scale
gradient(f, x; backend=EnzymeBackend())
# XLA: Reactant for acceleration
gradient(f, x; backend=ReactantBackend())Same API, different backends:
├─ ForwardDiff: 1.2ms (CPU)
├─ Enzyme: 0.3ms (GPU)
└─ Reactant: 0.1ms (XLA)Performance claims and comparisons are fully documented. See the Benchmark Methodology page for exact scripts, parameters, and run commands.
Black-Scholes, Heston, SABR models with analytical and Monte Carlo methods
First and second-order Greeks via AD — no finite differences needed
Mean-variance, Sharpe maximization, risk parity with constraints
VaR, CVaR, volatility, drawdown — all differentiable
Yield curves, bonds, caps, floors, swaptions, short-rate models
SABR and Heston calibration with gradient-based optimization