Skip to main content

finance_solution/stocks/
mod.rs

1//! Ordered **price-path** analytics (equities or any positive price series).
2//!
3//! # Layers
4//!
5//! | Layer | API | Purpose |
6//! |-------|-----|---------|
7//! | Scalars | [`simple_return`], [`volatility`], [`beta`], … | One-off metrics |
8//! | Solution | [`price_path_solution`] | Summary stats + formulas for a full path |
9//! | Series | [`PricePathSolution::series`] | Period detail (return, wealth, drawdown) |
10//! | Tables | [`PricePathSeries::print_table`] | Terminal / copy-paste output |
11//!
12//! # Error handling (v0.1+)
13//!
14//! Public scalars and [`price_path_solution`] return [`crate::FinanceResult`].
15//! Empty series, non-positive prices, length mismatches, and zero volatility cases are
16//! structured [`crate::FinanceError`] values — not panics.
17//! Prefer composing with `?` when prices come from users or external data.
18pub mod path;
19pub mod returns;
20pub mod risk;
21
22#[doc(inline)]
23pub use path::*;
24#[doc(inline)]
25pub use returns::*;
26#[doc(inline)]
27pub use risk::*;