Struct ShockedSurvival
pub struct ShockedSurvival {
base: Box<Survival>,
shift: f64,
label: String,
}Expand description
A base credit curve under a named parallel hazard shock: h(t) + Δ, and so
S(t)·exp(−Δ·τ).
The shift is stated data carrying a label, not a free parameter — the same rule the discount side’s shock follows, and for the same reason: a scenario is what a report keys a row by, not something a solve moves.
Fields§
§base: Box<Survival>§shift: f64§label: StringImplementations§
§impl ShockedSurvival
impl ShockedSurvival
pub fn parallel(base: Survival, shift: f64, label: impl Into<String>) -> Self
pub fn parallel(base: Survival, shift: f64, label: impl Into<String>) -> Self
base with every hazard shifted by shift, reported under label.
The shock measures time under the base’s own day count — carrying a
second convention here would let S, h and the density disagree with
each other, since hazard_rate reports h + Δ on the base’s measure.
pub fn view<R: Scalar>(&self) -> ShockedSurvivalView<'_, R>
pub fn view<R: Scalar>(&self) -> ShockedSurvivalView<'_, R>
This transform lifted into mode R.
pub(crate) fn view_with_slice<'a, R: Scalar>(
&'a self,
rest: &mut &'a [R],
) -> ShockedSurvivalView<'a, R>
pub(crate) fn view_with_slice<'a, R: Scalar>( &'a self, rest: &mut &'a [R], ) -> ShockedSurvivalView<'a, R>
One step of a substituted walk. See
take_params.
Reaches the base only, for the same reason the seeded walk does.
pub(crate) fn view_seeding<R: Scalar + Seedable>(
&self,
seed: &mut Option<usize>,
) -> ShockedSurvivalView<'_, R>
pub(crate) fn view_seeding<R: Scalar + Seedable>( &self, seed: &mut Option<usize>, ) -> ShockedSurvivalView<'_, R>
One step of the seeded walk. The seed reaches the base only; see
ShockedSurvival’s note on why the shift is not a parameter.
Trait Implementations§
§impl Clone for ShockedSurvival
impl Clone for ShockedSurvival
§fn clone(&self) -> ShockedSurvival
fn clone(&self) -> ShockedSurvival
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more