Skip to main content

FxImpliedView

Struct FxImpliedView 

pub struct FxImpliedView<'a, R: Scalar> {
    data: &'a FxImplied,
    base: Box<CurveView<'a, R>>,
    spot: R,
    anchor: OnceCell<R>,
}
Expand description

FxImplied lifted into one pricing mode.

Fields§

§data: &'a FxImplied§base: Box<CurveView<'a, R>>§spot: R§anchor: OnceCell<R>

The base’s log discount at the anchor, evaluated once per lift on first use: constant across every query this view answers.

Implementations§

§

impl<R: Scalar> FxImpliedView<'_, R>

pub fn spot(&self) -> &R

This mode’s FX spot.

fn ordinate(&self, i: usize) -> R

The strip ordinate at node i. Node 0 is the spot — the one active ordinate — and the rest are the passive outrights, converted on demand so that a query costs two conversions rather than a strip-length lift.

fn forward_at(&self, tau: f64) -> R

The interpolated forward outright F(τ): linear between strip nodes, flat beyond the last.

Trait Implementations§

§

impl<'a, R: Clone + Scalar> Clone for FxImpliedView<'a, R>

§

fn clone(&self) -> FxImpliedView<'a, R>

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<'a, R: Debug + Scalar> Debug for FxImpliedView<'a, R>

§

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

Formats the value using the given formatter. Read more
§

impl<R: Scalar> YieldCurve<R> for FxImpliedView<'_, R>

§

fn reference_date(&self) -> NaiveDate

The date at which the discount factor is 1.
§

fn discount(&self, date: NaiveDate) -> Result<R, CurveError>

The discount factor to date. Read more
§

fn log_discount(&self, date: NaiveDate) -> Result<R, CurveError>

The log discount factor to date. Read more
§

fn discount_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>

The discount factor to the proleptic-Gregorian day number ordinal. Read more
§

fn log_discount_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>

The log discount factor at ordinal; see discount_at_ordinal. Read more
§

fn rate_day_count(&self) -> DayCountFraction

The day count this curve forms a rate under. Read more
§

fn zero_rate(&self, date: NaiveDate) -> Result<R, CurveError>

The continuously-compounded zero rate to date. Read more
§

fn forward_rate( &self, start: NaiveDate, end: NaiveDate, ) -> Result<R, CurveError>

The continuously-compounded forward rate between start and end. Read more

Auto Trait Implementations§

§

impl<'a, R> !Freeze for FxImpliedView<'a, R>

§

impl<'a, R> !RefUnwindSafe for FxImpliedView<'a, R>

§

impl<'a, R> !Sync for FxImpliedView<'a, R>

§

impl<'a, R> Send for FxImpliedView<'a, R>

§

impl<'a, R> Unpin for FxImpliedView<'a, R>
where R: Unpin,

§

impl<'a, R> UnsafeUnpin for FxImpliedView<'a, R>
where R: UnsafeUnpin,

§

impl<'a, R> UnwindSafe for FxImpliedView<'a, R>

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.