Skip to main content

stochastic_rs_quant/
lib.rs

1//! # stochastic-rs-quant
2//!
3//! Pricing, calibration, instruments, vol surfaces, curves, risk, microstructure.
4
5#![allow(non_snake_case)]
6#![allow(clippy::type_complexity)]
7#![allow(clippy::too_many_arguments)]
8// Doc comments use KaTeX math blocks ($$ ... $$) that clippy mis-detects as
9// list items. The actual rustdoc rendering (with `docs/katex-header.html`)
10// is correct.
11#![allow(clippy::doc_lazy_continuation)]
12#![allow(clippy::doc_overindented_list_items)]
13#![allow(clippy::needless_range_loop)]
14
15#[macro_use]
16mod macros;
17
18pub mod traits;
19
20pub use stochastic_rs_copulas as copulas;
21pub use stochastic_rs_core::simd_rng;
22pub use stochastic_rs_distributions as distributions;
23pub use stochastic_rs_stats as stats;
24pub use stochastic_rs_stochastic as stochastic;
25
26pub mod bonds;
27pub mod calendar;
28pub mod calibration;
29pub mod cashflows;
30pub mod credit;
31pub mod curves;
32/// Portfolio-analytics utilities (PCA, Fama-MacBeth, shrinkage covariance,
33/// pairs trading) that live alongside the pricing pipeline but do not feed
34/// back into it. Standalone domain — keep when pulling in `stochastic-rs-quant`
35/// for portfolio analytics; safe to ignore when only pricing.
36pub mod factors;
37/// Non-parametric Fourier-Malliavin volatility / leverage / quarticity
38/// estimators (Malliavin & Mancino). Standalone realised-variance utilities
39/// — not currently consumed by the calibration or vol-surface pipelines.
40pub mod fourier_malliavin;
41pub mod fx;
42pub mod inflation;
43pub mod instruments;
44pub mod lattice;
45pub mod loss;
46pub mod market;
47/// Market-microstructure / execution analytics — Almgren-Chriss optimal
48/// liquidation, Kyle's lambda, propagator price-impact models. Standalone
49/// domain — does not feed back into the pricing or calibration pipelines.
50pub mod microstructure;
51/// Limit-order-book data structures (`Side`, `Order`, `Trade`, `OrderBook`)
52/// with bid/ask matching and cancel. Bridged to the reactive market-data
53/// stack via [`market::book::mid_quote`] / [`market::book::half_spread_quote`].
54pub mod order_book;
55pub mod portfolio;
56pub mod pricing;
57pub mod risk;
58pub mod strategies;
59pub mod vol_surface;
60pub use portfolio::momentum;
61#[cfg(feature = "yahoo")]
62pub mod yahoo;
63
64pub mod types;
65
66pub use types::CalibrationLossScore;
67pub use types::LossMetric;
68pub use types::Moneyness;
69pub use types::OptionStyle;
70pub use types::OptionType;
71
72#[cfg(feature = "python")]
73pub mod python;