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
//! # volsurf
//!
//! Production-ready volatility surface library for derivatives pricing.
//!
//! Provides the full pipeline: raw option quotes → implied vol extraction →
//! parametric surface fitting → arbitrage-free enforcement → local vol / pricing
//! engine input.
//!
//! ## Architecture
//!
//! - **`implied`** — Implied volatility extraction (Black, Bachelier, displaced diffusion)
//! - **`smile`** — Single-tenor smile models (SVI, SABR, cubic spline)
//! - **`surface`** — Multi-tenor surface construction (SSVI, eSSVI, piecewise)
//! - **`local_vol`** — Dupire local volatility extraction
//!
//! ## Design
//!
//! - **Newtypes for outputs, bare `f64` for inputs.** [`Vol`], [`Variance`],
//! [`Strike`], [`Tenor`] wrap return values to prevent accidental mixing.
//! Inputs take raw `f64` for ergonomics — validation happens inside model
//! constructors and the builder.
//! - **No panics.** Every fallible operation returns [`Result`]. Library code
//! never calls `unwrap()` or `expect()`.
//! - **Immutable surfaces.** Once constructed, a surface cannot be modified.
//! No interior mutability, no observer pattern.
//! - **Thread-safe.** All traits require `Send + Sync`. Surfaces can be shared
//! via `Arc<dyn VolSurface>` across pricing threads.
//! - **Serializable.** All value types and model structs implement Serde
//! `Serialize` / `Deserialize` with validation on deserialization where
//! invariants exist (SVI, SABR, SSVI, eSSVI parameters).
pub use ;
pub use LocalVol;
pub use SmileSection;
pub use VolSurface;
pub use ;