Struct IsdaSurvivalView
pub struct IsdaSurvivalView<'a, R: Scalar> {
data: &'a IsdaSurvival,
params: Cow<'a, [R]>,
}Expand description
IsdaSurvival lifted into one pricing mode.
Fields§
§data: &'a IsdaSurvival§params: Cow<'a, [R]>Implementations§
§impl<R: Scalar> IsdaSurvivalView<'_, R>
impl<R: Scalar> IsdaSurvivalView<'_, R>
pub fn parameters(&self) -> &[R]
pub fn parameters(&self) -> &[R]
This mode’s parameters — the segment hazards.
fn cumulative_hazard(&self, date: NaiveDate) -> Result<R, CurveError>
fn cumulative_hazard(&self, date: NaiveDate) -> Result<R, CurveError>
The cumulative hazard ∫h from the reference date to date.
Each segment contributes h_i · (elapsed year fraction), so the integral
is one weighted sum over the whole hazard vector with the passive
elapsed times as weights — which is the fused aggregate, recording a
single n-ary statement in reverse mode rather than a chain of n.
fn cumulative_hazard_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>
fn cumulative_hazard_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>
cumulative_hazard by day ordinal: the
same prefix sum, the segment located over the stored ordinals, and the
open segment measured by integer subtraction under a fast basis — or
through the date path under any other convention.
Trait Implementations§
§impl<'a, R: Clone + Scalar> Clone for IsdaSurvivalView<'a, R>
impl<'a, R: Clone + Scalar> Clone for IsdaSurvivalView<'a, R>
§fn clone(&self) -> IsdaSurvivalView<'a, R>
fn clone(&self) -> IsdaSurvivalView<'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 IsdaSurvivalView<'a, R>
impl<'a, R: Debug + Scalar> Debug for IsdaSurvivalView<'a, R>
§impl<R: Scalar> SurvivalProbability<R> for IsdaSurvivalView<'_, R>
impl<R: Scalar> SurvivalProbability<R> for IsdaSurvivalView<'_, R>
§fn reference_date(&self) -> NaiveDate
fn reference_date(&self) -> NaiveDate
The date at which the survival probability is 1.
§fn survival_probability(&self, date: NaiveDate) -> Result<R, CurveError>
fn survival_probability(&self, date: NaiveDate) -> Result<R, CurveError>
The survival probability
S(t) = P(τ > t). Read more§fn log_survival(&self, date: NaiveDate) -> Result<R, CurveError>
fn log_survival(&self, date: NaiveDate) -> Result<R, CurveError>
The log survival
ln S(t) = −∫h — the composition seam on the credit
side. A shocked curve adds to it and exponentiates once; the families
answer it from what they store rather than ln an exp. Read more§fn survival_probability_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>
fn survival_probability_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>
The survival probability at the proleptic-Gregorian day number
ordinal — the credit side of
YieldCurve::discount_at_ordinal.
A family whose day count is actual days over a constant answers it by
integer subtraction; the default converts back to a date. Read more§fn log_survival_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>
fn log_survival_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>
§fn hazard_rate(&self, date: NaiveDate) -> Result<R, CurveError>
fn hazard_rate(&self, date: NaiveDate) -> Result<R, CurveError>
The instantaneous hazard rate
h(t) = −d/dt ln S(t). Read more§fn default_probability(&self, date: NaiveDate) -> Result<R, CurveError>
fn default_probability(&self, date: NaiveDate) -> Result<R, CurveError>
The default probability
P(t) = 1 − S(t). Read more§fn default_density(&self, date: NaiveDate) -> Result<R, CurveError>
fn default_density(&self, date: NaiveDate) -> Result<R, CurveError>
The default density
f(t) = h(t)·S(t). Read moreAuto Trait Implementations§
impl<'a, R> Freeze for IsdaSurvivalView<'a, R>
impl<'a, R> RefUnwindSafe for IsdaSurvivalView<'a, R>where
R: RefUnwindSafe,
impl<'a, R> Send for IsdaSurvivalView<'a, R>
impl<'a, R> Sync for IsdaSurvivalView<'a, R>
impl<'a, R> Unpin for IsdaSurvivalView<'a, R>where
R: Unpin,
impl<'a, R> UnsafeUnpin for IsdaSurvivalView<'a, R>
impl<'a, R> UnwindSafe for IsdaSurvivalView<'a, R>where
R: RefUnwindSafe + UnwindSafe,
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