pub trait RiskVolOracle: Send + Sync {
// Required methods
fn get_iv(
&self,
underlying: &str,
strike: f64,
expiry_ts: i64,
) -> Result<f64, VolLookupError>;
fn statuses(&self) -> Vec<VolOracleStatus>;
// Provided methods
fn get_surface_snapshot(
&self,
_underlying: &str,
) -> Option<VolSurfaceSnapshot> { ... }
fn supports_surface_snapshots(&self) -> bool { ... }
}Required Methods§
fn get_iv( &self, underlying: &str, strike: f64, expiry_ts: i64, ) -> Result<f64, VolLookupError>
fn statuses(&self) -> Vec<VolOracleStatus>
Provided Methods§
Sourcefn get_surface_snapshot(&self, _underlying: &str) -> Option<VolSurfaceSnapshot>
fn get_surface_snapshot(&self, _underlying: &str) -> Option<VolSurfaceSnapshot>
Return a full snapshot of the vol surface for the given underlying.
Sourcefn supports_surface_snapshots(&self) -> bool
fn supports_surface_snapshots(&self) -> bool
Whether this oracle can produce surface snapshots once its feeds are ready.
This is capability, not current readiness. Startup wiring must not depend on whether a feed has already populated a surface at builder time.