Struct ShockedView
pub struct ShockedView<'a, R: Scalar> {
base: Box<CurveView<'a, R>>,
shock: Box<CurveView<'a, R>>,
label: &'a str,
}Expand description
Shocked lifted into one pricing mode.
Fields§
§base: Box<CurveView<'a, R>>§shock: Box<CurveView<'a, R>>§label: &'a strImplementations§
§impl<R: Scalar> ShockedView<'_, R>
impl<R: Scalar> ShockedView<'_, R>
Trait Implementations§
§impl<'a, R: Clone + Scalar> Clone for ShockedView<'a, R>
impl<'a, R: Clone + Scalar> Clone for ShockedView<'a, R>
§fn clone(&self) -> ShockedView<'a, R>
fn clone(&self) -> ShockedView<'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 ShockedView<'a, R>
impl<'a, R: Debug + Scalar> Debug for ShockedView<'a, R>
§impl<R: Scalar> YieldCurve<R> for ShockedView<'_, R>
impl<R: Scalar> YieldCurve<R> for ShockedView<'_, R>
§fn rate_day_count(&self) -> DayCountFraction
fn rate_day_count(&self) -> DayCountFraction
The base’s measure. A transform of a curve is the same curve read differently, so it reports rates in the measure the curve it wraps was given; inheriting the default instead would make a shocked curve disagree with the curve it shocks about what a rate means.
§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 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> !RefUnwindSafe for ShockedView<'a, R>
impl<'a, R> !Sync for ShockedView<'a, R>
impl<'a, R> Freeze for ShockedView<'a, R>
impl<'a, R> Send for ShockedView<'a, R>
impl<'a, R> Unpin for ShockedView<'a, R>
impl<'a, R> UnsafeUnpin for ShockedView<'a, R>
impl<'a, R> UnwindSafe for ShockedView<'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