Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

stochastic-rs

> DevOps
Open source

High-performance quantitative finance in Rust — 120+ stochastic processes, option pricing, calibration, fixed income, risk & copulas, with SIMD/GPU acceleration

177 stars0 likes1 views
WebsiteGitHub

About

High-performance quantitative finance in Rust — 120+ stochastic processes, option pricing, calibration, fixed income, risk & copulas, with SIMD/GPU acceleration

stochastic-rs

Quantitative finance in Rust: stochastic process simulation, option pricing and calibration, volatility surfaces, fixed income and credit, risk, statistics, copulas and neural volatility surrogates. Generic over f32 / f64, SIMD on the CPU, CUDA and Metal back-ends where they pay off, and Python bindings via PyO3 that ship the same surface as the Rust crates.

Documentation

stochastic.rust-dd.com is the reference; this README only gets you installed and running.

  • Getting started — Rust and Python installation, first program
  • Concepts — the traits (ProcessExt, DistributionExt, ModelPricer), seeding, feature flags, design philosophy
  • Processes · Distributions · Copulas · Statistics · Quant · AI — the catalogues with selection guides
  • GPU support — what runs on which device today, precision, an executed T4 run
  • Python — the bindings, device=, NumPy interop
  • Benchmarks · Migrating to v3 · Tutorials

What is inside

One workspace, one umbrella crate (stochastic-rs) that re-exports the sub-crates:

Crate Contents
stochastic-rs-core the SIMD RNG and seed sources (Deterministic, Unseeded)
stochastic-rs-distributions SIMD samplers with closed-form pdf / cdf / characteristic function / moments, special functions
stochastic-rs-stochastic 131 processes behind one ProcessExt trait: diffusion, jump, stochastic and rough volatility, short rate, HJM / LMM, fractional noise, Volterra
stochastic-rs-copulas 15 bivariate and 8 multivariate copulas, vine fitting, goodness of fit
stochastic-rs-stats Hurst and diffusion estimators, unit-root and cointegration tests, realised volatility, filters, extreme values, risk measures
stochastic-rs-quant closed-form, Fourier, PDE, lattice and Monte Carlo pricers, calibrators, vol surfaces, curves, credit, XVA, market microstructure
stochastic-rs-ai neural volatility surrogates and surrogate calibration (ai feature)
stochastic-rs-py the Python module: every distribution, process, pricer, copula and estimator, NumPy in and out

Installation

The Rust crates require Rust 1.89 or newer.

The workspace declares this minimum in rust-version. Cargo's edition-2024 resolver uses it when choosing compatible dependency versions, so a fresh resolution can select an older release of a dependency. The MSRV CI job checks the workspace's libraries, tests, examples, and benchmarks with default features disabled. Optional feature combinations are checked separately on current Rust.

toml
[dependencies]
stochastic-rs = "3.0.0-rc.1"

Device back-ends and other optional parts are cargo features (cuda, metal, accelerate, ai, dual-stream-rng); the installation guide and the feature flags page list them with what each pulls in. Sub-crates can be depended on directly for lean builds.

bash
pip install stochastic-rs

The wheels are CPU-only and carry the whole surface on Linux, macOS and Windows (linear algebra is pure Rust). A source build with a device back-end: maturin develop --release --features metal (or cuda) in a checkout.

Quickstart

…
python
import stochastic_rs as srs

# Mean-reverting OU path: PyOu(theta, mu, sigma, n, x0=None, t=None, seed=None, dtype=None, device=None)
path = srs.PyOu(2.0, 0.0, 1.0, 1000, x0=0.0, t=1.0, seed=42).sample()   # numpy.ndarray, shape (1000,)

# Heston European option, closed form
pricer = srs.HestonPricer(
    s=100, v0=0.04, k=100, r=0.03, kappa=2.0, theta=0.04, sigma=0.3,
    rho=-0.5, tau=1.0, q=0.0,
)
call, put = pricer.call_put()

A process samples on a device by re-typing it: Gbm::new(...).on::() (Cuda, Accelerate), with handle.probe() to check the device first; from Python, device="metal" on the device-capable classes. The GPU support page has the support matrix, and notebooks/ a Colab notebook that runs the CUDA back-end on a free T4.

Benchmarks

Criterion suites live under benches/; the benchmarks page carries the numbers: the SIMD Normal sampler against rand_distr, fractional Gaussian noise on CPU, Accelerate, Metal and cuFFT, and the per-release speedups.

Citing

The concept DOI 10.5281/zenodo.21553307 always resolves to the latest release; CITATION.cff carries the version DOI of the current one.

Contributing

Bug reports, suggestions and pull requests are welcome on GitHub. The contributing page has the development rules; per-feature recipes (add-diffusion-process, adding-distribution, calibration-pattern, …) live under .claude/skills/.

License

MIT — see LICENSE.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustaiblack-scholescalibrationcopulas

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理