Enum CurveView
#[non_exhaustive]pub enum CurveView<'a, R: Scalar> {
Piecewise(PiecewiseView<'a, R>),
Step(StepView<'a, R>),
Flat(FlatView<'a, R>),
NelsonSiegel(NelsonSiegelView<'a, R>),
Svensson(SvenssonView<'a, R>),
ExponentialSplines(ExponentialSplinesView<'a, R>),
FlatSpread(FlatSpreadView<'a, R>),
PiecewiseSpread(PiecewiseSpreadView<'a, R>),
RepoSpread(RepoSpreadView<'a, R>),
Shocked(ShockedView<'a, R>),
Rebased(RebasedView<'a, R>),
FxImplied(FxImpliedView<'a, R>),
}Expand description
A Curve lifted into one pricing mode.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Piecewise(PiecewiseView<'a, R>)
See Curve::Piecewise.
Step(StepView<'a, R>)
See Curve::Step.
Flat(FlatView<'a, R>)
See Curve::Flat.
NelsonSiegel(NelsonSiegelView<'a, R>)
See Curve::NelsonSiegel.
Svensson(SvenssonView<'a, R>)
See Curve::Svensson.
ExponentialSplines(ExponentialSplinesView<'a, R>)
FlatSpread(FlatSpreadView<'a, R>)
See Curve::FlatSpread.
PiecewiseSpread(PiecewiseSpreadView<'a, R>)
RepoSpread(RepoSpreadView<'a, R>)
See Curve::RepoSpread.
Shocked(ShockedView<'a, R>)
See Curve::Shocked.
Rebased(RebasedView<'a, R>)
See Curve::Rebased.
FxImplied(FxImpliedView<'a, R>)
See Curve::FxImplied.
Trait Implementations§
§impl<R: Scalar> YieldCurve<R> for CurveView<'_, R>
impl<R: Scalar> YieldCurve<R> for CurveView<'_, 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 CurveView<'a, R>
impl<'a, R> !RefUnwindSafe for CurveView<'a, R>
impl<'a, R> !Sync for CurveView<'a, R>
impl<'a, R> Send for CurveView<'a, R>
impl<'a, R> Unpin for CurveView<'a, R>where
R: Unpin,
impl<'a, R> UnsafeUnpin for CurveView<'a, R>where
R: UnsafeUnpin,
impl<'a, R> UnwindSafe for CurveView<'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