Changelog¶
All notable changes to this project will be documented here.
The format follows Keep a Changelog, and this project adheres to Semantic Versioning.
Only tagged public releases are recorded here. Development snapshots published
from main to TestPyPI use VCS-derived .devN versions and are not tracked as
separate changelog entries.
[0.1.3] — 2026-04-04¶
- Added backend_parity tests for torch
- Updated tutorial notebook with Mac MPS backend (for Apple silicon chips).
[Unreleased]¶
Added¶
- Opt-in shape-aware runtime type checking — pure-annotation layer
(
jaxtyping+beartype) applied to the public API (fast_black,fast_black_scholes,fast_black_scholes_merton,fast_implied_volatility,fast_implied_volatility_black,get_all_greeks,price_dataframe, thevectorized_*Greeks) and to the four backend dispatch entry points (price_*,greeks,implied_volatility).- Annotations are stored as PEP 563 strings (every annotated module uses
from __future__ import annotations) — zero runtime cost when not enabled. - Runtime checking is scoped to the public dispatch layer only via
fast_vollib._typing.enable_runtime_checks(). Innertorch.compileclosures, Triton kernels, Numba@njitfactories, and JAX@jax.jit-traced functions are never decorated or rewritten, so the hot paths are bit-identical to the un-annotated build (verified with sha256 fingerprints of thejackel_ivnumpy / torch / triton outputs before and after). - Install via the new
[typecheck]extra:pip install "fast-vollib[typecheck]"(addsjaxtyping>=0.2andbeartype>=0.18). Default installs do not pull either package intosys.modules.
- Annotations are stored as PEP 563 strings (every annotated module uses
fast_vollib.jackelmodule — full implementation of Peter Jäckel's "Let's Be Rational" (2016) algorithm with four backends:jackel_iv_black— NumPy + Numba (six parallel kernels; ~8.5 ms / 100k)jackel_iv_black_torch— PyTorch withtorch.compile(dynamic=True)(~2.7 ms GPU compute)jackel_iv_black_jax— JAXlax.fori_loop+@jax.jit(~2.4 ms GPU compute)jackel_iv_triton— single-pass Triton kernel; entire pipeline in registers (0.056 ms GPU compute / 100k)
- Dedicated test package
tests/test_jackel/with parity tests againstpy_lets_be_rational(oracle); max relative error < 10⁻⁸. py-lets-be-rationaladded to thedevdependency group so CI installs the oracle automatically.-
scripts/jackel_triton_bench.py— correctness + CUDA-event timing script for the Triton kernel. -
Numba backend (
backend="numba"): JIT-compiled CPU kernels via@numba.njit(parallel=True). Pricing, Greeks, and the full Halley+bisection IV solver run as a single native-code dispatch per batch. Enabled bypip install "fast-vollib[numba]"(requiresnumba>=0.60.0). Kernels are compiled on first call and cached to__pycache__for subsequent runs. - Isolated numba test suite under
tests/numba/(skipped automatically when numba is not installed).
Fixed¶
get_all_greeks(..., return_native=True)now returns native torch/JAX arrays instead of formatting the result back into pandas containers.- Below-intrinsic IV handling now honors
on_error=consistently across the NumPy, PyTorch, and JAX backends. - The
compare_against_py_vollib_vectorized.pyhelper now imports the current upstreamvectorized_*entry points correctly.
0.1.2 — 2026-03-26¶
Release focused on packaging automation, public release channels, and broader compatibility coverage.
Added¶
- Development and nightly-style build publishing to TestPyPI from
mainusing trusted publishing via GitHub Actions OIDC. - Additional test coverage for backend parity, packaging consistency, and release workflow support.
- Monkey-patching support for baseline replacement workflows, including
py_vollib_vectorizedcompatibility-oriented patch helpers.
Changed¶
- Versioning is now derived from Git tags via VCS-based build metadata, so
stable PyPI releases are tag-driven and development snapshots use
.devNversions automatically.
0.1.1 — 2026-03-26¶
First public release after the initial beta version. This release improves runtime correctness, tightens packaging and typing metadata, and aligns backend behaviour across NumPy, PyTorch, and JAX.
Fixed¶
price_dataframenow raises explicitValueErrorexceptions instead of relying on bareassertguards.- The JAX implied-volatility backend now returns
NaNfor below-intrinsic and zero-price inputs, matching NumPy and PyTorch behaviour. - Backend configuration is now standardized on
FAST_VOLLIB_BACKEND;
Added¶
py.typedmarker for PEP 561-compatible downstream type-checking.- Packaging metadata improvements, including explicit mypy configuration and updated Python version support metadata.
0.1.0 — 2026-03-22¶
Features¶
- Pricing —
fast_black,fast_black_scholes,fast_black_scholes_mertonwith full NumPy vectorization and broadcasting. - Implied Volatility —
fast_implied_volatilityandfast_implied_volatility_blackusing Halley's method with a compiled bisection fallback (~10 M solves / s on CPU). - Greeks —
vectorized_delta,vectorized_gamma,vectorized_theta,vectorized_rho,vectorized_vega, andget_all_greeks. - Backend routing — pluggable NumPy, PyTorch, and JAX backends with
automatic resolution (
FAST_VOLLIB_BACKENDenv var,set_backend(), per-callbackend=kwarg). - DataFrame helper —
price_dataframefor end-to-end pricing, IV solving, and Greek computation on apandas.DataFrame. - Compatibility — patch helpers for
py_vollibandpy_vollib_vectorizednamespaces at runtime.
Fixed¶
- Corrected Black-76 forward pricing formula (
q = r, notq = 0). - Added below-intrinsic NaN guard in the PyTorch IV solver.
Performance¶
- Pre-computed CDF symmetry (
N(-x) = 1 - N(x)) eliminating 5 redundant CDF evaluations per option in the Greeks hot path. - Reduced CDF calls in pricing hot path using the same symmetry identity.
- Compiled bisection fallback yields a 16× throughput improvement on large WRDS-scale datasets compared to the pure Python fallback.