Skip to main content

NoCurve

Struct NoCurve 

pub struct NoCurve;
Expand description

No projection curve at all — a leg of fixed coupons, or one whose every reset has already fixed.

Trait Implementations§

§

impl Clone for NoCurve

§

fn clone(&self) -> NoCurve

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Copy for NoCurve

§

impl<R: Scalar> CurveByIndex<R> for NoCurve

§

fn curve(&self, _index: &str) -> Option<&dyn YieldCurve<R>>

The curve a coupon naming index projects off, or None where this source holds no curve for it. Read more
§

fn curve_of(&self, index: Option<&str>) -> Option<&dyn YieldCurve<R>>

curve for a coupon’s own index, which a fixed coupon does not have.
§

fn distinguishes_indices(&self) -> bool

Whether two different indices can be answered with two different curves. A source holding one curve for every index cannot, and a stub that interpolates between two tenors must not be valued through it: it would blend one curve with itself.
§

fn cms_rate( &self, _coupon: &CmsCoupon, _as_of: NaiveDate, ) -> Option<Result<R, CashflowError>>

What a CMS coupon still to fix pays as a rate — the CMS rate its swap index fixes, convexity-adjusted off the swaption smile, geared, spread and with its payoff — or None where this source cannot replicate it: a curve source holds no discount curve and no swaption vols, and the coupon is then refused by name.
§

fn cap_vol(&self, _currency: Currency) -> Option<&RateSmileView<'_, R>>

The cap vol surface a capped or floored coupon in currency values its options off, or None where this source holds none — a curve source is not a vol source, and a coupon’s option still to fix is then refused by name rather than valued at its forward.
§

fn yoy_vol(&self, _index: &str) -> Option<&InflationVolView<'_, R>>

The year-on-year optionlet vol surface a capped, floored or digital YoY inflation coupon on index values its options off, or None where this source holds none — and the option still to fix is then refused by name.
§

fn cpi_vol(&self, _index: &str) -> Option<&InflationVolView<'_, R>>

The zero-coupon CPI option vol surface a collared CPI notional on index values its options off, or None where this source holds none — and the option still to fix is then refused by name.
§

fn index_level( &self, _index: &str, _lag_months: u32, _date: NaiveDate, ) -> Result<Option<R>, CashflowError>

The level of price index index a flow on date is scaled by, under the index’s lag and interpolation, or None where this source holds no inflation for it — a curve source is not an index source, and a CPI coupon is then refused by name. Read more
§

impl Debug for NoCurve

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl Default for NoCurve

§

fn default() -> NoCurve

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.