Skip to main content

SurfaceMarketContext

Struct SurfaceMarketContext 

pub struct SurfaceMarketContext { /* private fields */ }

Implementations§

§

impl SurfaceMarketContext

pub fn new( underlying_symbol: impl Into<String>, spot: f64, reference_forward: Option<f64>, rate: f64, dividend_yield: f64, quote_time_unix_millis: Option<u64>, ) -> Result<Self, FerroRiskError>

pub fn with_per_tenor_forward_overrides( self, overrides: SurfacePerTenorForwards, ) -> Self

pub fn per_tenor_forward_overrides(&self) -> &SurfacePerTenorForwards

pub fn underlying_symbol(&self) -> &str

pub const fn spot(&self) -> f64

pub const fn reference_forward(&self) -> Option<f64>

pub const fn rate(&self) -> f64

pub const fn dividend_yield(&self) -> f64

pub const fn quote_time_unix_millis(&self) -> Option<u64>

pub fn forward_for_expiry( &self, expiry: SurfaceTenor, ) -> Result<f64, FerroRiskError>

pub fn discount_factor_for_expiry( &self, expiry: SurfaceTenor, ) -> Result<f64, FerroRiskError>

pub fn log_moneyness_for_strike( &self, expiry: SurfaceTenor, strike: f64, ) -> Result<SurfaceLogMoneyness, FerroRiskError>

Trait Implementations§

§

impl Clone for SurfaceMarketContext

§

fn clone(&self) -> SurfaceMarketContext

1.0.0 (const: )§

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

§

impl Debug for SurfaceMarketContext

§

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

§

impl PartialEq for SurfaceMarketContext

§

fn eq(&self, other: &SurfaceMarketContext) -> bool

1.0.0 (const: )§

fn ne(&self, other: &Rhs) -> bool

§

impl StructuralPartialEq for SurfaceMarketContext

Auto Trait Implementations§

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

§

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

§

fn borrow(&self) -> &T

§

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

§

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

§

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

§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
§

impl<T> From<T> for T

§

fn from(t: T) -> T

§

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

§

fn into(self) -> U

§

impl<T> IntoEither for T

§

fn into_either(self, into_left: bool) -> Either<Self, Self>

§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

§

impl<T> Pointable for T

§

const ALIGN: usize

§

type Init = T

§

unsafe fn init(init: <T as Pointable>::Init) -> usize

§

unsafe fn deref<'a>(ptr: usize) -> &'a T

§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

§

unsafe fn drop(ptr: usize)

§

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

§

type Owned = T

§

fn to_owned(&self) -> T

§

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

§

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

§

type Error = Infallible

§

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

§

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

§

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

§

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