Skip to content

v2.0.0-beta.2

Choose a tag to compare

@dancixx dancixx released this 27 Apr 17:07
· 202 commits to main since this release
3d7f64b

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] to ArrayView<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::traitscallable, distribution, float
    • stochastic-rs-copulas::traitsbivariate, multivariate
    • stochastic-rs-quant::traitscalibration, pricing, time
    • stochastic-rs-stochastic::traitsprocess, malliavin
  • Naming conventions — standardized identifiers across benches and modules.

Post-beta.1 audit additions

  • stochastic-rs-copulas — new process_coupling.rs for 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-level types.rs.
  • stochastic-rs-stats — fixes in fou_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.toml exposes 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] or Vec<f64>. Call sites that pass owned arrays should use .view(); slice call sites should use ArrayView1::from(&slice).
  • Trait import paths inside sub-crates changed (the public re-exports via stochastic_rs::prelude::* and stochastic_rs::traits::* are unchanged).

Known issues

  • tests/mc_comparison.rs still requires the openblas feature (uses lsm::Lsm); run with cargo test --features openblas.

Full Changelog: v2.0.0-beta.1...v2.0.0-beta.2