Skip to main content

CalibratedSigma

Struct CalibratedSigma 

pub struct CalibratedSigma {
    pub currency: Currency,
    pub mean_reversion: f64,
    pub shape: SigmaShape,
    pub sigma: SigmaTerm<f64>,
    pub piece_ends: Vec<NaiveDate>,
    pub d_sigma_d_vol: Vec<Vec<f64>>,
    pub fits: Vec<InstrumentFit>,
    pub evaluations: usize,
    pub surface_points: Vec<StripPoint>,
}
Expand description

The calibration result: the fitted volatility, its sensitivity to every quote, and the per-instrument report.

Fields§

§currency: Currency

The currency whose parameters were fitted.

§mean_reversion: f64

The exogenous mean reversion the fit ran under.

§shape: SigmaShape

The shape the fit ran in.

§sigma: SigmaTerm<f64>

The fitted volatility: flat, or one piece per strip expiry.

§piece_ends: Vec<NaiveDate>

The date each piece ends on — the strip expiries, in order; empty for a flat fit.

§d_sigma_d_vol: Vec<Vec<f64>>

∂σ_j/∂ν_i: one row per piece (a single row for a flat fit), one column per strip quote in the order of fits.

§fits: Vec<InstrumentFit>

One row per strip instrument — in expiry order for a piecewise fit.

§evaluations: usize

How many strip pricings the fit took, for the record.

§surface_points: Vec<StripPoint>

The strip points whose vol no pinned quote supplied, read at the money off the currency’s swaption surface instead. Their columns of d_sigma_d_vol are sensitivities to a surface read, not to a quote, so no quote sensitivity is reported for them.

Implementations§

§

impl CalibratedSigma

pub fn flat(&self) -> Option<f64>

The fitted σ of a flat fit, None for a piecewise one.

pub fn labels(&self) -> Vec<String>

The exogenous label each piece is pinned under, in piece order — the flat label alone for a flat fit.

Trait Implementations§

§

impl Clone for CalibratedSigma

§

fn clone(&self) -> CalibratedSigma

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for CalibratedSigma

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.