v2.0.0-beta.2
Second beta of stochastic-rs v2 — workspace migration and API consistency pass on top of v2.0.0-beta.1. 15 commits since beta.1.
Highlights
Workspace migration (PR #23)
The monolithic stochastic-rs crate has been split into 9 sub-crates while keeping the umbrella crate's public API stable. Existing imports (stochastic_rs::stochastic::diffusion::gbm::GBM, etc.) continue to work unchanged via re-exports.
stochastic-rs/ (workspace root + umbrella)
├── stochastic-rs-core/ — simd_rng (foundation)
├── stochastic-rs-distributions/ — FloatExt / SimdFloatExt + distributions
├── stochastic-rs-stochastic/ — ProcessExt + 140+ processes
├── stochastic-rs-copulas/ — BivariateExt + copulas
├── stochastic-rs-stats/ — estimators
├── stochastic-rs-quant/ — pricing / calibration / vol_surface
├── stochastic-rs-ai/ — neural surrogates (feature-gated upstream)
├── stochastic-rs-viz/ — Plotly grid plotter
└── stochastic-rs-py/ — placeholder (Phase 6 follow-up)
Users can depend on individual sub-crates for finer-grained dependency trees, or keep using the umbrella stochastic-rs crate as before.
API consistency
ArrayView-based APIs — calibration, copulas, distributions, pricing, risk, and stats surfaces migrated from&[f64]toArrayView<f64>for zero-copy, slice-friendly inputs (pricing::dupire,pricing::kirk,pricing::snell_envelope,pricing::malliavin_greeks,risk::var,calibration::cgmysv,calibration::hkde, etc.).- Trait modules split into focused files:
stochastic-rs-distributions::traits→callable,distribution,floatstochastic-rs-copulas::traits→bivariate,multivariatestochastic-rs-quant::traits→calibration,pricing,timestochastic-rs-stochastic::traits→process,malliavin
- Naming conventions — standardized identifiers across benches and modules.
Post-beta.1 audit additions
stochastic-rs-copulas— newprocess_coupling.rsfor process-level copula coupling.stochastic-rs-quant— new modules:pricing::execution_cost,risk::credit,risk::execution,lattice::equity,market::book,portfolio::covariance,vol_surface::implied, top-leveltypes.rs.stochastic-rs-stats— fixes infou_estimator,normality,econometrics::cointegration.stochastic-rs-stochastic— Merton jump module corrections.stochastic-rs-viz— Plotly grid plotter additions.
Build / CI
- CI workflow updated for the workspace layout.
- Dependency cleanup across sub-crates.
- Top-level workspace
Cargo.tomlexposes shared dependency versions to keep sub-crate Cargo files lean.
Breaking changes
- Many free-function and trait method signatures now take
ArrayView<f64, _>instead of&[f64]orVec<f64>. Call sites that pass owned arrays should use.view(); slice call sites should useArrayView1::from(&slice). - Trait import paths inside sub-crates changed (the public re-exports via
stochastic_rs::prelude::*andstochastic_rs::traits::*are unchanged).
Known issues
tests/mc_comparison.rsstill requires theopenblasfeature (useslsm::Lsm); run withcargo test --features openblas.
Full Changelog: v2.0.0-beta.1...v2.0.0-beta.2