# stochastic-rs > Open-source quantitative finance for Rust and Python: 120+ stochastic processes, option pricing, Heston/SABR calibration, vol surfaces, fixed income and risk. Source: https://github.com/rust-dd/stochastic-rs · Rust API: https://docs.rs/stochastic-rs · Python: https://pypi.org/project/stochastic-rs/ Full documentation as one file: https://stochastic.rust-dd.com/llms-full.txt ## Docs - [stochastic-rs](https://stochastic.rust-dd.com/docs): Simulate 131 stochastic processes, price and calibrate against them, and move any of it to a GPU by naming one — in Rust or in Python. - [AI surrogates](https://stochastic.rust-dd.com/docs/ai): Neural-network volatility surrogates — Heston, one-factor Bergomi, rough Bergomi. Trained offline, inference at sub-millisecond speeds via candle. - [API reference](https://stochastic.rust-dd.com/docs/api): The exhaustive API surface lives on docs.rs. This page summarises the trait surface and links to docs.rs per sub-crate. - [Benchmarks](https://stochastic.rust-dd.com/docs/benchmarks): Criterion bench numbers — FGN CPU vs CUDA, distribution sampling speedups, and the all-backends matrix (CPU / Metal / Accelerate). - [Comparison with QuantLib and RustQuant](https://stochastic.rust-dd.com/docs/comparison): An honest feature-coverage comparison of stochastic-rs, QuantLib and RustQuant, including where each library is the better choice. - [Sampling backends](https://stochastic.rust-dd.com/docs/concepts/backends): Compile-time device selection through `.on::()` and `with_backend(handle)` — the `Backend` marker, its capability subtraits, one fallback rule. - [Design philosophy](https://stochastic.rust-dd.com/docs/concepts/design-philosophy): Why the library is shaped the way it is — generic over float, no statrs, paper-anchored implementations, comparison-test mandatory, plus non-goals. - [DistributionExt](https://stochastic.rust-dd.com/docs/concepts/distribution-ext): Closed-form pdf, cdf, characteristic function, and moments for every distribution — 18 of 19 closed-form, with five named unimplemented moments. - [Feature flags](https://stochastic.rust-dd.com/docs/concepts/feature-flags): Cargo features in stochastic-rs — what each one pulls in, how they propagate across the workspace, and which features your crates need. - [GPU support](https://stochastic.rust-dd.com/docs/concepts/gpu-support): What runs on a GPU today, on which backend, at what precision — the fGN family, the Euler engine, and everything else on the host. - [ModelPricer](https://stochastic.rust-dd.com/docs/concepts/model-pricer): The pricing trait — the struct holds model parameters and each call carries its own (s, k, r, q, tau) query, so one model prices a whole grid. - [Prelude](https://stochastic.rust-dd.com/docs/concepts/prelude): stochastic_rs::prelude — 25 items in six groups that cover ~95% of day-to-day usage. What is in the prelude and what is intentionally kept out. - [ProcessExt](https://stochastic.rust-dd.com/docs/concepts/process-ext): The ProcessExt contract — sample, sample_map, sample_par — covering output shape, time grid, buffer reuse, and parallel determinism. - [Seeding & RNG](https://stochastic.rust-dd.com/docs/concepts/seeding): The uniform `new(args, &seed)` constructor pattern, the `SeedExt` strategies (`Unseeded` / `Deterministic`), in-place reseeding, and dual-stream RNG. - [Traits overview](https://stochastic.rust-dd.com/docs/concepts/traits): The trait surface that organises the library — RealExt, FloatExt, ProcessExt, DistributionExt, ModelPricer, Calibrator, and friends. - [Contributing](https://stochastic.rust-dd.com/docs/contributing): How to contribute to stochastic-rs — coding conventions, the SKILL system that automates per-feature recipes, and the per-PR docs/tests/bench rule. - [Copulas](https://stochastic.rust-dd.com/docs/copulas): All 15 bivariate and 8 multivariate copulas with the BivariateExt / MultivariateExt traits — Archimedean, extreme-value, elliptical, and vine families. - [Distributions](https://stochastic.rust-dd.com/docs/distributions): 26 of 36 SIMD distribution structs with full Python + closed-form parity. Bulk samplers; ziggurat, rejection, inversion. - [Installation (Python)](https://stochastic.rust-dd.com/docs/getting-started/installation-python): Install the stochastic-rs Python bindings — pre-built wheels via pip, or build locally with maturin and Bun-equivalent uv-pip workflow. - [Installation (Rust)](https://stochastic.rust-dd.com/docs/getting-started/installation-rust): Add stochastic-rs to your Rust project — umbrella crate or per-sub-crate, with the right Cargo features and CPU / SIMD / GPU options. - [Quickstart](https://stochastic.rust-dd.com/docs/getting-started/quickstart): A 5-minute end-to-end tour — simulate an OU path, price a Heston call, and run a Hurst estimator. Same code shown in Rust and Python side by side. - [Workspace layout](https://stochastic.rust-dd.com/docs/getting-started/workspace-layout): How the stochastic-rs Cargo workspace is organised — sub-crates, dependency topology, and how the umbrella re-exports preserve v1.x import paths. - [Migrating to v3](https://stochastic.rust-dd.com/docs/migration): Every breaking change between v2.6 and v3.0, grouped by crate, with the one-line replacement for each. - [Stochastic processes](https://stochastic.rust-dd.com/docs/processes): 131 stochastic processes — diffusion, jump, volatility, interest-rate, fractional / rough, and noise. Catalog organised by mathematical family. - [Python bindings](https://stochastic.rust-dd.com/docs/python): stochastic-rs-py — Python coverage for distributions, processes, pricers, calibrators, copulas, stats. NumPy in / out, 234 entries. - [Quantitative finance](https://stochastic.rust-dd.com/docs/quant): Pricing, calibration, vol surface, risk, credit, curves, bonds, instruments, portfolio, microstructure — the stochastic-rs-quant crate. - [Statistics & estimators](https://stochastic.rust-dd.com/docs/stats): Hurst estimators, MLE for 1-D diffusions with 6 transition densities, ADF/KPSS/Phillips-Perron, realized variance with BNHLS, HMM, changepoint. - [Tutorials](https://stochastic.rust-dd.com/docs/tutorials): End-to-end walkthroughs — Heston calibration, fBm Hurst estimation, vol-surface from quotes, AI surrogate training, pairs, risk, execution, interop.