Releases: rust-dd/stochastic-rs
Release list
v2.5.1
This patch release corrects the Fourier–Malliavin volatility estimators and Malliavin–Thalmaier integration and Greeks, with stronger input validation and regression coverage.
Fixes
- Fourier–Malliavin volatility — corrected coefficient scaling and spot/integrated bias handling for arbitrary observation horizons, including irregular-grid optimal cutting.
- Malliavin–Thalmaier estimators — corrected Skorohod product terms, log-Euler dynamics, localization and payoff handling, and common-random-number Greeks.
- Heston2D and kernels — corrected correlation, Feller and input validation, plus Poisson/digital-kernel normalization and support.
- Validation — added targeted regression, finite-difference comparison, paper-reference, and MATLAB-parity tests across FMVol, MT, kernels, and Heston2D.
Full Changelog: v2.5.0...v2.5.1
v2.5.0
stochastic-rs v2.5.0
Process sampling now runs through a reusable per-thread sampler.
API — ProcessExt exposes sample(), sample_par(m) (returns all m paths), and sample_map(m, f) (maps each path through f and returns the results, reusing one buffer per worker — for Monte-Carlo reductions where you don't keep the paths). Call sites are unchanged; the sampler is internal.
Seeding — the auto-seed counter is block-allocated per thread, removing the global-atomic contention that serialised parallel workers. Deterministic seeding is unchanged and bit-identical.
Performance — parallel short-path Monte-Carlo is ~1.4–1.9× faster (n=64), tapering to a few percent for longer paths where the path computation dominates. Serial and single-path sampling are roughly unchanged.
Other — removed the ndarray-stats and ndarray-rand dependencies; faster distribution sampling (fewer allocations).
Full changelog: v2.4.0...v2.5.0
v2.4.0
stochastic-rs v2.4.0
Highlights
Compile-time GPU / accelerator backends. The fractional / fGN family (Fgn, Fbm, Fou, Fcir, Fgbm, FJacobi, Cfou, Cfgns, JumpFou,JumpFOUCustom, Sde) now selects its sampling backend at compile time with .on::<B>() — Cpu (default), CudaNative (cudarc + cuFFT), CubeCl (cubecl: CUDA / wgpu), MetalNative, and Accelerate (Apple vDSP). Dispatch is monomorphised with no runtime branch; an unavailable backend is a compile error.
Heston Andersen QE scheme. Heston gains a compile-time variance discretisation selector. Switch from the default Euler scheme to the Andersen (2008) Quadratic-Exponential scheme with .qe() for markedly lower discretisation bias at large kappa, high |rho|, or long maturities.
Also
- CUDA-native generation improvements and device-to-host bandwidth benchmarks.
- Metal / cubecl kernel caching and Accelerate backend fixes.
- Docs: new "Sampling backends" concept page, refreshed Heston / FGN examples, corrected feature-flag matrix.
Full Changelog: v2.3.0...v2.4.0
v2.3.0
Highlights
Copulas
- Multivariate copulas — Student-t copula (Demarta–McNeil χ²-mixer, profile-MLE for ν via Brent), Nested Archimedean Copulas (Hofert 2008: Kanter positive-stable sampling + sufficient-nesting-condition validator), and vine pair-copula constructions — D-vine / C-vine / R-vine built on Aas–Czado (2009) h-functions and inverse-h-functions. [adf1c14, 20a7b66]
- 7 new bivariate copulas — Joe, FGM, Plackett [db186e9]; AMH, Marshall–Olkin, Galambos, Hüsler–Reiss [cb48062].
Distributions
- 6 new distributions + 7 SIMD ops — Truncated (Robert 1995 rejection), Skellam (two-Poisson + modified-Bessel), Dirichlet (gamma-trick simplex), GED (Subbotin), Wishart (Bartlett decomposition), GEV (Jenkinson); plus 7 new SIMD ops (A&S 7.1.26 erf, Lanczos g=7 lgamma, …) via the
widecrate with a const-N bufferedSimdNormal. [1f67b13]
Stochastic processes
- 3 stochastic-volatility processes — multifactor Heston (Christoffersen–Heston–Jacobs 2009, const-generic K factors), Barndorff-Nielsen–Shephard (non-Gaussian OU with a compound-Poisson + Gamma subordinator), and dynamic / multifactor SABR (piecewise-constant β/ρ/ν term structure, Fernández et al 2024). [13a5849]
Calibration & estimators
- FRFT Carr–Madan pricer — fractional FFT (Bailey–Swarztrauber chirp convolution) with Lord–Kahl (2010) grid centring; matches the analytic BSM price to 1e-4. [6467ea5]
- GMM-CIR variance calibration — exact CIR conditional moments (Cox–Ingersoll–Ross 1985), two-step efficient weighting, Hansen J-test. [b6d642f]
- QMLE for OU / CIR — Kessler (1997) Gaussian quasi-likelihood; the OU fit matches the closed-form Vasicek MLE to 1e-3. [5cb33fd]
- Bayesian MCMC diffusion calibration — random-walk Metropolis with log-normal priors and 95% credible intervals. [7b1f5d6]
- Particle-filter MLE for stochastic volatility — Kitagawa (1996) bootstrap filter with common random numbers (Pitt 2002), allocation-free 1-D hot loop. [0c150dd]
Market data
- Market-data provider abstraction — a synchronous
MarketDataProvidertrait with aMockProviderand a feature-gatedYahooProvider, plusImpliedVolSurface::from_providerto build a surface straight from a quote source. [e34d77b]
Statistics
- New stationarity / specification tests — CUSUM / CUSUMQ, RESET, Andrews–Ploberger [65c4ab4]; Lo–MacKinlay variance-ratio [0100007].
Fixed income & calendars
- Holiday calendars — HKEX, ASX, SGX, B3 [f0106b5]; Joint (intersection) calendar mode, Act/365L, IMM dates [936af1b]; Nearest business-day convention, ACT/ACT ICMA, day helpers [4c2b2ee].
- Day-count-aware instruments —
TimeExt::dcc(), aBSMPricerday-count field, and calendar-aware bootstrapping that honours non-uniform δᵢ in the par equation. [8c665a2] - Curves — full Hagan–West monotone-convex four-region interpolation [c69f63d]; unified calendar date math into
date_math.rs[f90252f]; survival-curve fix [9f49272].
Python
- PyO3 calendar layer — DayCount / Calendar / ScheduleBuilder exposed to Python. [9876791]
- pytest suite + CI gate — tests across all five API surfaces, run in CI alongside the smoke test. [e52beca]
Infrastructure
- Repository-wide modularization — large source files split into responsibility-based submodules across every sub-crate (pricing, calibration, copulas, stats, viz, python), with no public-API change.
- CI on cargo-nextest — a fast workspace
testjob with a running(N/total)progress counter, a separate doctest gate, and the coverage job moved to push-to-main. The coverage run dropped from ~2h52m to ~53min. [c672cb5, 12ee6f9]
Full Changelog: v2.2.0...v2.3.0
v2.2.0
Highlights
- SIMD RNG / Ziggurat speedups — single-sample
dist.sample(rng)loops are ~2–4× faster vs the v2.1wide 1.3baseline.next_f64_array/next_f32_arraygo from 8 scalar shift+cast+mul loops to SIMD shift + magic-number bit-cast + subtract (52-bit / 23-bit precision). Newfill_uniform_f64/fill_uniform_f32direct-write APIs skip the[T; 8]return-by-value round-trip. Fused1/λscaling intoSimdExp::fill_exp_scaled. [819b1c0] - Opt-in
dual-stream-rngfeature —SimdRngDualcarries two independent Xoshiro state pairs (engine_a,engine_b) so the OoO core can interleave the Ziggurat scalar table-load chains across batches. Apple Silicon: −5% to −11% onSimdNormal::fill_sliceZiggurat sweet-spot (n = 4096). Uniform fills are not engine-bound, so no speedup there. Stream-bit-exactness changes (KS-validated). [207cb42] - Generic
R: SimdRngExtacross all 18 distributions — everySimdXxx<T, ..., R>struct is parameterised on the backing RNG (defaultSimdRng), lettingSimdNormalDual/SimdExpDual/SimdExpZigDualreuse the exact same code paths via type alias. [f886c7b, 207cb42] - Unified seed-handling API (breaking) —
with_seed(u64)andfrom_seed_source(&src)are removed; every distribution and process now exposes a single canonicalnew(args, &seed)constructor accepting anySeedExtstrategy (Unseeded,Deterministic::new(u64), or a custom source).SeedExt::reseed(u64)swaps aDeterministicsource in place for calibration sweeps. [f886c7b, d74f824] - Seed propagation fixes —
non_central_chi_squared::sampleis now generic overSeedExt(was hardcoding&Unseeded), restoring reproducibility in theSvcgmyv-path. All four FGN GPU/Accelerate backends (fgn/accelerate.rs,fgn/gpu.rs,fgn/metal.rs,fgn/cuda_native.rs) now thread&self.seedinstead of pulling from the global RNG. [88f7e0d, cf3c557] - Documentation — new
seedingconcept page covers the unified constructor,SeedExtstrategies,SimdRngExtgeneric backing RNG, and the dual-stream feature. [d74f824, f67c6ac]
Full Changelog: v2.1.0...v2.2.0
v2.1.0
Highlights
- Unified seeded sampling API (breaking) — the dedicated
*_seededfamily is removed across 144 files. All processes now use the unifiedProcessExt::sample/sample_with_rngsurface. Downstream call sites using `sample_seeded(seed)` should migrate to `sample_with_rng(&mut StdRng::seed_from_u64(seed))`. [2b95400] - Heston 2D volatility model — two-factor stochastic-volatility process (
stochastic_rs::stochastic::volatility::heston2d::Heston2D). [ac37761] - Fourier-Malliavin engine polish — extended pricing engine in
stochastic-rs-quant/src/fourier_malliavin/engine.rs. [ac37761] - MLE estimator coverage — additional process implementations and shared estimator scaffolding in
stochastic-rs-stats/src/mle/. [6e352a0] - Workspace-level versioning — all 9 sub-crates inherit `version.workspace = true`; future bumps only touch the root `Cargo.toml`. [714188f]
Full Changelog: v2.0.0...v2.1.0
v2.0.0
stochastic-rs v2.0.0
First stable 2.0 release. Six prereleases (beta.1 → beta.2 → beta.3 → rc.0 → rc.1 → rc.2) consolidated; the surface and numerics are identical to v2.0.0-rc.2. Changes since v2.0.0-rc.2 are docs-site and CI polish only (commits cd4f874 → 405f094).
What v2 brings
Workspace. Single stochastic-rs crate split into a 9-crate Cargo workspace at edition 2024 (stochastic-rs-core, -distributions, -stochastic, -copulas, -stats, -quant, -ai, -viz, -py). The umbrella stochastic-rs re-exports everything — every existing import path still works. Sub-crate-only consumers can now skip the quant/stats/ai compilation cost.
New trait surface.
preludewith 20 items in 5 groups (trait core / pricing / calibration / instrument-engine / option types).Calibrator/CalibrationResultare nowResult-based withtype Paramsandtype Error = anyhow::Error. 9Calibrator+ 12CalibrationResultimpls.GreeksExtcovers first- and second-order Greeks (vanna/charm/volga/veta), aggregated into a named-fieldGreeksstruct; MC pricers overridegreeks()for single-pass consistency.Instrument/PricingEngine(AnalyticBSEngine,AnalyticHestonEngine) — QuantLib-style decoupling between payoff and valuation.DistributionExtdefaults flipped from silent0.0tounimplemented!(). 18/19 distributions provide closed-form pdf / cdf / cf / moments.PricerExt::implied_volatilitydefault0.0→f64::NAN.
New primitives.
- Reactive market cache (
Cached<T>/MarketObserver). - FX module (delta conventions, ATM conventions, Vanna-Volga smile).
- Variance swap (Carr-Madan replication + Brockhaus-Long Heston closed form + Bernard-Cui discrete correction).
- Total Return Swap (proper TR forward
F_TR(t) = S · exp(r t)). interest::lmm::Lmm— drift-coupled LIBOR Market Model (spot-LIBOR measure, log-Euler positivity-preserving).numericsnamespace (HaltonSeq,SobolSeq,RlKernel,MarkovLift,Mlmc).HypothesisTesttrait + 8 implementations (ADF, KPSS, ERS, PhillipsPerron, LeybourneMcCabe, JarqueBera, AndersonDarling, ShapiroFrancia).
Python (stochastic-rs-py). 210-entry PyO3 surface (was 102 in rc.0): 198 classes + 12 pyfunctions across distributions, stochastic, quant pricers, Fourier engines, calibrators, vol surface, risk, microstructure, curves, factors, copulas, stats. All wrappers seed-aware via Deterministic::new(seed). AI bindings deferred to 2.x.
Silent-correctness fixes
If you held cached results from 1.x or any 2.0.0-beta.*, please re-compute:
tau * 365-vs-years bug inBSMPricer/HestonPricer/SabrPricer/HestonStochCorrPricer/AsianPricer/ Vasicek-bond implied vols (v1 IVs were understated by√365).variance_swap::fair_strike_replicationsign error onrTandln(K0/S0)correction.bonds/cir.rsclosed form:A·exp(+B·r)→A·exp(-B·r)(ZCB was increasing with the short rate).bonds/hull_white.rsrewritten against Brigo-Mercurio §3.3.2 / Hull-White (1990) extended-Vasicek using aDiscountCurve(v1 usedUtc::now().year()in the price — non-deterministic).calibration/heston_stoch_corr.rs—let _ = slsqp::minimize(...)discarded the calibrated params;HscmCalibrationResultreturned the initial guess. Now carries realconverged+final_objective.calibration/levy.rsNIG calibration wrapped NIG params inCGMYFourierwith hardcodedy = 0.5. NewNigFourier(Barndorff-Nielsen 1997 ChF) and rewired NIG path.pricing/heston_stoch_corr.rscharacteristic function usediu·rin the drift instead ofiu·(r−q). Threaded q through the ODE drift +ModelPricerimpl.pricing/rbergomi.rsdiscarded the dividend yield. Drift now uses(r-q-0.5·v)·dt;RBergomiCalibrator::with_dividend_yield(q)builder added.microstructure/kyle.rsmulti-period Kyle 1985 backward recursion was non-canonical (disagreed withsingle_period_kyleatn_periods = 1). Re-derived against Cetin-Larsen 2023 (arXiv:2307.09392).vol_surface/ssvi.rs::is_calendar_spread_freeonly checked the ATM term structure; missed off-ATM violations. Now verifies the full Gatheral & Jacquier 2014 Theorem 4.2 over a strike grid.pricing/fourier.rs::CarrMadanPricer::price_callsilently returned0.0for out-of-grid log-strikes — now returnsf64::NANso calibration objectives are poisoned and detection is forced; newstrike_in_grid()helper.portfolio/optimizers.rs::empirical_cvaralphais the tail proportion (0.05= worst 5%).assert!(alpha < 0.5)so users passing confidence-style0.95crash loudly.traits/time.rs::tau_or_from_dates/tau_with_dccreturnf64::NAN(was panic) when neither tau nor dates are set.- Heston switched to "Little Heston Trap" form (Albrecher-Mayer-Schoutens-Tistaert 2007) for long-maturity high-|ρ| principal-branch logarithm continuity.
Build & packaging
- Edition 2024 across the workspace.
- Feature flags propagate correctly:
gpu,cuda-native,metal,accelerate,openblas,python. If you previously built with--features gpuon v1 expecting GPU samplers, re-build on v2 — you'll now actually get them. docs.rsconfig pinned to["openblas", "ai", "yahoo"](all-features = truewas pulling native GPU SDKs and breaking the docs build).statrsis gone from production dependencies (closed-form rewrites instochastic-rs-distributions); kept as[dev-dependencies]for cross-validation tests only.- PyPI workflow now builds
macos-13 + x86_64alongsideaarch64— Intel Mac users canpip install stochastic-rsagain.
SKILLs
16 maintenance SKILLs shipped in .claude/skills/ to keep extensions consistent:
- Tier 1 (release-level):
release-checklist,feature-flag-management,calibration-pattern,greeks-pattern. - Tier 2 (domain):
add-diffusion-process,add-fractional-process,add-jump-process,adding-distribution,adding-python-binding,stats-estimator. - Tier 3 (niche):
copula-bivariate,add-gpu-sampler,add-mc-variance-reduction,vol-surrogate-nn,integration-test-writing,bench-writing.
Migration checklist
- Bump
stochastic-rs = "2.0"inCargo.toml. - Add
?after everycalibrator.calibrate(None)(nowResult). - Replace
pricer.derivatives()[i]reads withpricer.greeks().delta/.gamma/.vega/ etc. - Replace
iv == 0.0checks withiv.is_nan(). - If you implement
CalibrationResult: addtype Paramsandfn params(&self). - If you implement
DistributionExt: override every method you call (defaults nowunimplemented!()). - If you stored implied vols from
BSMPricer/HestonPricer/SabrPricer: recompute (v1 IVs were understated by√365).
Install
[dependencies]
stochastic-rs = "2.0"pip install stochastic-rs==2.0.0Per-rc rollup: rc.0 · rc.1 · rc.2
Full Changelog: v1.5.0...v2.0.0
v2.0.0-rc.2
stochastic-rs v2.0.0-rc.2
cargo clippy --workspace --all-targets -- -D warningsis now clean (was 3 errors: deprecatedFromPyObjectonPyNigFourier, lazyunwrap_or_elseinorder_book::add_order, negated-comparison inPyNigFourier::new).stats::fukasawa_hursttest suite (estimate_h_from_simulated_rv,rough_vs_smooth_distinguished,table1_m72_accuracy) now usesFou::seeded(...)for the volatility path so the entire RNG chain is pinned.- Python coverage gaps from §1.5 filled:
PyHscmModel,PyHscmCalibrator(+PyHscmMarketOption),PyHullWhiteBond(withHullWhiteBond.from_curve(...)taking aDiscountCurve), andempirical_cvarexposed as a top-level#[pyfunction]with the documentedalpha < 0.5precondition translated toPyValueError. portfolio::optimizers::empirical_cvaris nowpub(was a private helper) so external callers can reach it directly.
Pricing. unreachable!() cleanups, NaN-tolerant partial_cmp, regime-switching matrix ops via ndarray operators (was hand-written triple loops), document hardcoded paper maturities, fourier_malliavin canonical-window comments, heston_stoch_corr FFT-vs-quadrature doc fix.
Vol / risk. SVI butterfly arb-freeness check + Durrleman g(k); Rockafellar-Uryasev tail-share correction in historical_es; max_peak_to_recovery_duration companion to existing duration; fourier_model_surface_fft_with(...) exposes Carr-Madan grid params; try_from_quotes Result variant on ImpliedVolSurface; Sortino / momentum ScoreWeighted convention doc; mat_inverse → nalgebra::try_inverse; new strategies module: Strategy trait + Backtest driver + MarketBar / StrategyAction types; bucket_dv01 sign doc.
Rates. curves::Instrument → BootstrapInstrument (with backward-compat alias); five new day-count conventions (BUS/252, ACT/364, ACT/ACT AFB, NL/365, 30E/360 ISDA); ScheduleBuilder long-first / long-last StubConvention; observable Mutex poisoning is now logged + recovered (was panic); fx Display fallback to NaN; short-rate round-isize defensive default.
Microstructure / factors. Stray no-ops removed (shrinkage, bootstrap, migration); loss.rs metrics return NaN on zero-divisor; pca.rs to_f64 defensive; CalibrationLossScore::get → NaN + try_get; scipy.linalg.expm regression test for migration matrix expm.
SKILLs (16 written, .claude/skills/)
- Tier 1 (release-level):
release-checklist,feature-flag-management,calibration-pattern,greeks-pattern. - Tier 2 (domain):
add-diffusion-process,add-fractional-process,add-jump-process,adding-distribution,adding-python-binding,stats-estimator. - Tier 3 (niche):
copula-bivariate,add-gpu-sampler,add-mc-variance-reduction,vol-surrogate-nn,integration-test-writing,bench-writing.
Full Changelog: v2.0.0-rc.1...v2.0.0-rc.2
v2.0.0-rc.1
Second release candidate of stochastic-rs v2.
Quant module fixes
- Heston stoch-corr —
slsqp::minimizereturn value was discarded; calibrator returned the initial guess as if calibrated. Now captures the slsqp tuple;HscmCalibrationResultgainsconverged+final_objective. - Lévy / NIG —
LevyModel::Nigwrapped NIG params inCGMYFourierwith hardcodedy=0.5. NewNigFourier(Barndorff-Nielsen 1997 char fn) wired through the calibrator; round-trip test added. - HSCM / rBergomi — both pricers silently dropped
q; HSCM also usediu·rinstead ofiu·(r-q)in the ODE drift. q now threaded through; newRBergomiCalibrator::with_dividend_yield(q)builder + parity-with-q tests. - Carr-Madan —
price_callreturned0.0silently for log-strikes outside the FFT grid; now returnsNaNso calibration objectives detect the failure rather than zero-residualing the wings. - CIR ZCB — closed-form bond formula sign error (
A·exp(+B·r)→A·exp(-B·r)). Field doc-comments swappedtheta/muto match Vasicek's workspace convention. - Hull-White ZCB — used
Utc::now().year()(non-determinism) and a hardcoded flat zero curve. Rewritten against Brigo & Mercurio §3.3.2 with aDiscountCurve-projected representation;HullWhite::from_curvebuilder + no-arbitrage + determinism regression tests added. - Multi-period Kyle 1985 — backward recursion was non-canonical (
β·λ = 0.25vs canonical0.5atn_periods=1). Re-derived against Cetin-Larsen 2023 (cubic γ-recursion + forward Σ-recursion). - SSVI calendar-spread free — only checked the ATM term structure; full Gatheral-Jacquier 2014 Theorem 4.2 condition now enforced over the smile grid. ATM-only check retained as
is_atm_calendar_spread_free. - CVaR alpha-axis —
empirical_cvarnow assertsalpha < 0.5so users who pass confidence-style0.95crash loudly instead of averaging nearly the full distribution. - SABR ↔ DVector round-trip — silently forced
β=1.0;Fromimpls now use a 4-vec[α, β, ν, ρ](lossless). Internal LM solver uses a privateas_lm_vec()3-vec helper. - TimeExt panic-on-missing —
tau_or_from_dates/tau_with_dccnow returnf64::NAN(matchingGreeks::default) instead of panicking. - Heston Cui (2017) Jacobian test — tolerance tightened from
2e-1(20%) to5e-3. Cui math is correct line-for-line; loose tolerance would have masked 5–10% regressions. CgmysvCalibrator/HKDECalibrator/HscmCalibratornow implement the unifiedCalibratortrait withResult<Output, Error>so they compose with generic pipelines.
P0 release-blocker fixes
fbm.rsduplicateArray2import (E0252) on thepython+gpucombo.cargo check --workspace --all-featuresclean. CI matrix expanded with the combo.interest::bgmhonestly scoped as parallel forward-Euler multiplicative martingales (not BGM/LMM, paths can go negative). A proper drift-coupled LIBOR Market Model is nowinterest::lmm::Lmm(spot-LIBOR measure, log-Euler positivity-preserving stepping, optional Cholesky correlation).theta/mudoc-swap onOU/CIR/Vasicek:thetais mean-reversion speed,muis the long-run mean.copulas::multivariate::{Tree, Vine}scope-doc — these are Gaussian-collapsed implied-correlation copulas, not real R-vine pair-copula constructions.stats::fou_estimator::FilterType::Classicalremoved (was panic-only).tests/debug_fukasawa.rs#[ignore]-d (was a no-assertion diagnostic polluting workspace test output).
P1 fixes
- 17 production
panic!s instochastic-rs-stochasticmoved to constructor-side validation (validate_drift_args,validate_n_or_tmax). stats::fd::FractalDimreturnsResult<FdResult, FdError>(6-variant error enum) instead of panicking on degenerate input.stats::fou_estimatorV1/V2/V4 refactored from struct API to free fns overArrayView1<f64>(zero-copy boundary). 786 → 562 LoC, 2 → 11 tests, 3 bit-exact regression guards.- 12 bench-style tests
#[ignore]-d in distributions:cargo test -p stochastic-rs-distributions119s → 0.03s. - 4
rand::random::<f64>()call-sites incopulas::multivariate::{Tree, Vine}replaced withSimdNormal::fill_slice_fastso seeded usage is deterministic. - PyPI macOS x86_64 (Intel) wheels back:
macos-13builder added alongsideaarch64. - CI: 8-element feature matrix (
"",ai,openblas,yahoo,python,gpu,python,gpu,openblas,ai,yahoo) + newlintjob (cargo fmt --check+clippy --workspace -D warnings).actions-rs/toolchain@v1→dtolnay/rust-toolchain@stable. publish.shpre-publish gate (fmt + clippy + workspace test); optional--skip-gatebypass.bergomi.rs/rbergomi.rshonest scope-doc (variance-matched scaled-Brownian-motion approximations, not true Volterra integrals). Pointers tocrate::rough::MarkovLift/rl_heston::RlHeston/rl_bs::RlBs/process::volterra::Volterra.Gbm::samplex0 default0.0→1.0(0 is an absorbing fixed point).stochastic-rs-core/src/python.rsnow#[cfg(feature = "python")]-gated.
Added
interest::lmm::Lmm— drift-coupled LIBOR Market Model.examples/calibration_demo.rs— end-to-end multi-maturity calibration (BSM + Heston).Vasicek::from_fou_estimate— stats↔quant adapter fromFouEstimateResult.StochVolNn::predict_implied_vol_surface+ thin wrappers forHestonNn/OneFactorNn/RBergomiNn(gated on thequantfeature ofstochastic-rs-ai).HypothesisTesttrait + 8 implementations (ADF, KPSS, ERS, PhillipsPerron, LeybourneMcCabe, JarqueBera, AndersonDarling, ShapiroFrancia).VariableDimensional<T>+ComplexPathOutput<T>marker traits for processes returningVec<Array1<T>>and complex-valued paths.- Frank copula
compute_theta— Brent root-finding + chunked Gauss-Legendre quadrature (prior custom Newton solver had a math bug in the Frank tau formula). stochastic-rs-vizsplit intoplottable.rs+grid_plotter.rs+convenience.rs; newPlottable<T>trait +GridPlotterbuilder +plot_process/plot_distribution/plot_vol_surfaceconvenience fns.
Python bindings — 102 → 210 entries
96 new PyO3 classes + 12 pyfunctions. Every wrapper accepts seed=None routed through Deterministic::new(seed). AI bindings intentionally deferred to 2.x.
- Quant pricers (~20): BSM, Heston, Sabr, Merton1976, Asian, Barrier, Compound, Chooser, Cliquet, Gap, SuperShare, CashOrNothing, AssetOrNothing, Floating-/Fixed-Lookback, BjerksundStensland2002, DoubleBarrier, MCBarrier, VarianceSwap, KirkSpread.
- Quant Fourier (8 + Carr-Madan engine): BSM, Heston, DoubleHeston, HKDE, Bates, Kou, MertonJD, CGMY, VG.
- Bonds: Vasicek, CIR.
- Calibrators (10): BSM, Heston, Sabr, SVJ, DoubleHeston, HKDE, RBergomi, Levy, SabrCaplet, Cgmysv.
- Vol surface (5): SviRawParams, SsviParams, SviCalibrator, SsviCalibrator, ImpliedVolSurface (FFT).
- Risk (3): VaR, ExpectedShortfall, DrawdownStats.
- Microstructure (3 class + 5 fn): AlmgrenChrissPlan, KyleEquilibrium, OrderBook +
multi_period_kyle, roll/effective/corwin_schultz spread, propagator price impact. - Curves (3): DiscountCurve, NelsonSiegel, ZeroCouponInflationCurve.
- Factors (2 fn + 3 openblas-gated):
ledoit_wolf_shrinkage,sample_covariance, PCA, FamaMacBeth, PairsStrategy. - Copulas (5 class + 4 fn): Clayton, Gumbel, Frank, Independence, EmpiricalCopula2D +
kendall_tau_matrix,tau_matrix_to_corr_matrix,tau_to_corr,corr_to_tau. - Stats — Normality (3), Stationarity (5, openblas-gated), Hurst (2), Heston (2), Realised (6), Spectral/Changepoint (3), Density (3), Econometrics (4, openblas-gated), MCMC (1 fn).
Breaking from rc.0
stats::fou_estimator::FilterType::Classicalremoved (was panic-only). Enum is nowenum FilterType { Daubechies }.stats::fou_estimator::FOUParameterEstimationV{1,2,4}structs → free fnsestimate_fou_v{1,2,4}(path: ArrayView1<f64>, ...). V3 retained as a sim+est round-trip helper.stats::fd::FractalDim::estimatereturnsResult<FdResult, FdError>instead of panicking.Gbm::samplex0 default0.0→1.0.
Full Changelog: v2.0.0-rc.0...v2.0.0-rc.1
v2.0.0-rc.0
First release candidate of stochastic-rs v2. Builds on v2.0.0-beta.3 with bug fixes and tighter umbrella feature-flag propagation across the workspace. 4 commits since beta.3.
What changed since beta.3
- rc.0 blocker fixes (
c577d89) — pricing, calibration, AI volatility surrogates, distribution special functions, and several sub-cratelib.rsmodules. - Feature flag propagation fixed (
791a0ab) — umbrella crate now forwardsgpu,cuda-native,metal, andaccelerateto sub-crates in addition to the previously propagatedopenblasandpython. - Workspace bumped to
2.0.0-rc.0(24571c5) across all 9 crates. - README install snippets updated to
2.0.0-rc.0(ca13730).
Compatibility
Release candidate: public API surface is frozen. Only fixes are expected before 2.0.0. Please report regressions on the issue tracker.
Full Changelog: v2.0.0-beta.3...v2.0.0-rc.0