Trait InflationCurve
pub trait InflationCurve<R: Scalar> {
// Required methods
fn reference_date(&self) -> NaiveDate;
fn index_level(&self, date: NaiveDate) -> Result<R, CurveError>;
}Expand description
What an inflation pricer sees. One question, one mode.
Required Methods§
fn reference_date(&self) -> NaiveDate
fn reference_date(&self) -> NaiveDate
The curve’s reference date.
fn index_level(&self, date: NaiveDate) -> Result<R, CurveError>
fn index_level(&self, date: NaiveDate) -> Result<R, CurveError>
The projected price-index level at date, seasonally adjusted where the
curve carries seasonality.
A date before the reference is served from the curve’s history: an index level has no unit anchor, so nodes may precede the reference.
§Errors
CurveError from the curve’s own checks.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".