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>
impl<R: Scalar> FxImpliedView<'_, R>
fn ordinate(&self, i: usize) -> R
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
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>
impl<'a, R: Clone + Scalar> Clone for FxImpliedView<'a, R>
§fn clone(&self) -> 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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl<'a, R: Debug + Scalar> Debug for FxImpliedView<'a, R>
impl<'a, R: Debug + Scalar> Debug for FxImpliedView<'a, R>
§impl<R: Scalar> YieldCurve<R> for FxImpliedView<'_, R>
impl<R: Scalar> YieldCurve<R> for FxImpliedView<'_, R>
§fn reference_date(&self) -> NaiveDate
fn reference_date(&self) -> NaiveDate
The date at which the discount factor is 1.
§fn log_discount(&self, date: NaiveDate) -> Result<R, CurveError>
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>
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>
fn log_discount_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>
§fn rate_day_count(&self) -> DayCountFraction
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>
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>
fn forward_rate( &self, start: NaiveDate, end: NaiveDate, ) -> Result<R, CurveError>
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>where
R: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more