1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! Errors owned by the pricing layer.
//!
//! Each failure here is raised by a pricing model, a Greek or a volatility
//! solver. Errors of the layers below (`DecimalError`, `OptionsError`,
//! `CurveError`, …) stay with `optionstratlib-core` and `optionstratlib-math`,
//! and the variants below that wrap them carry those types unchanged.
//!
//! # Canonical paths (#550)
//!
//! Every error type is exported flat from this module, for example
//! `optionstratlib_pricing::error::PricingError`. The file module `pricing`
//! is private: it held nothing the flat paths do not, and was public only
//! because 0.21 exposed it. `GreeksResult` is flat too. `greeks` stays public
//! because its detail enums (`InputErrorKind`, …) are not flattened: kind
//! names collide across crates once the facade gathers every crate's errors
//! (see `greeks`'s module docs).
//!
//! ```rust
//! use optionstratlib_pricing::error::{GreeksError, GreeksResult, PricingError, PricingResult};
//! ```
//!
//! ```compile_fail,E0603
//! use optionstratlib_pricing::error::pricing::PricingError;
//! ```
//!
//! ```compile_fail,E0603
//! use optionstratlib_pricing::error::pricing::PricingResult;
//! ```
/// ### Greeks Errors (`GreeksError`)
/// Handles:
/// * Greeks calculations
/// * Mathematical validation
/// * Input parameter validation
/// * Numerical computations
/// ### Pricing Errors (`PricingError`)
/// Handles:
/// * Pricing method failures (Black-Scholes, Binomial, etc.)
/// * Monte Carlo simulation errors
/// * Invalid pricing engine configurations
/// * Generic pricing-related errors
/// ### Volatility Errors (`VolatilityError`)
/// Handles:
/// * Implied volatility calculation failures
/// * Historical volatility estimation issues
/// * Volatility model parameter validation
pub use ;
pub use ;
pub use VolatilityError;