Struct FlatForward
pub struct FlatForward {
reference_date: NaiveDate,
rate: f64,
convention: RateConvention,
}Expand description
A curve quoting one rate under one convention.
The rate is an exogenous input, not a calibration pillar: this family has no free parameters, so it contributes no curve risk. That is a reported empty ladder rather than a refusal — the sensitivity is genuinely zero, not unknown.
Fields§
§reference_date: NaiveDate§rate: f64§convention: RateConventionImplementations§
§impl FlatForward
impl FlatForward
pub fn new(
reference_date: NaiveDate,
rate: f64,
convention: RateConvention,
) -> Result<Self, CurveError>
pub fn new( reference_date: NaiveDate, rate: f64, convention: RateConvention, ) -> Result<Self, CurveError>
A flat curve quoting rate under convention, anchored at reference_date.
§Errors
CurveError::NonFinite if the rate is NaN or infinite.
pub fn parameters(&self) -> &[f64]
pub fn parameters(&self) -> &[f64]
This family has no free parameters, so the slice is empty.
pub(crate) fn view_with_slice<R: Scalar>(
&self,
_rest: &mut &[R],
) -> FlatView<'_, R>
pub(crate) fn view_with_slice<R: Scalar>( &self, _rest: &mut &[R], ) -> FlatView<'_, R>
One step of a substituted walk. See
take_params.
This family owns no parameters, so it consumes none and lifts plainly.
Trait Implementations§
§impl Clone for FlatForward
impl Clone for FlatForward
§fn clone(&self) -> FlatForward
fn clone(&self) -> FlatForward
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 Debug for FlatForward
impl Debug for FlatForward
§impl PartialEq for FlatForward
impl PartialEq for FlatForward
impl StructuralPartialEq for FlatForward
Auto Trait Implementations§
impl Freeze for FlatForward
impl RefUnwindSafe for FlatForward
impl Send for FlatForward
impl Sync for FlatForward
impl Unpin for FlatForward
impl UnsafeUnpin for FlatForward
impl UnwindSafe for FlatForward
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