Skip to main content

Module error

Module error 

Source
Expand description

Errors raised by the math types. Errors owned by the math layer.

Each failure here is raised by a generic math type: a curve, a surface, an interpolation or a statistic extracted from them. Errors raised by core types (DecimalError, PositionError, …) stay in optionstratlib-core, 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_math::error::CurveError. The file module curves is private: it held nothing the flat paths do not, and was public only because 0.21 exposed it.

use optionstratlib_math::error::{CurveError, CurvesResult};
ⓘ
use optionstratlib_math::error::curves::CurveError;
ⓘ
use optionstratlib_math::error::curves::CurvesResult;

Enums§

CurveError
Represents different types of errors that can occur in the curves module.
InterpolationError
Represents errors that can occur during different interpolation operations.
MetricsError
Error types specifically related to financial and statistical metrics calculations.
SurfaceError
Error variants that can occur when working with surface-related operations.

Type Aliases§

CurvesResult
Type alias representing the result of operations related to curve calculations.