pub struct TermStructure {
pub date: Vec<NaiveDate>,
pub discount_factor: Vec<f64>,
pub rate: Vec<f64>,
pub day_count: DayCountConvention,
}Fields§
§date: Vec<NaiveDate>§discount_factor: Vec<f64>§rate: Vec<f64>§day_count: DayCountConventionImplementations§
Source§impl TermStructure
impl TermStructure
pub fn new( date: Vec<NaiveDate>, discount_factor: Vec<f64>, rate: Vec<f64>, day_count: DayCountConvention, ) -> TermStructure
pub fn interpolate_log_linear( &self, val_date: NaiveDate, maturity_date: NaiveDate, ) -> f64
pub fn get_year_fraction(&self, val_date: NaiveDate) -> Vec<f64>
pub fn rates(&self, val_date: NaiveDate) -> Vec<f64>
pub fn build_term_structure( &self, _valuation_date: NaiveDate, deposits: Vec<Deposit>, ) -> TermStructure
Trait Implementations§
Source§impl Clone for TermStructure
impl Clone for TermStructure
Source§fn clone(&self) -> TermStructure
fn clone(&self) -> TermStructure
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 moreAuto Trait Implementations§
impl Freeze for TermStructure
impl RefUnwindSafe for TermStructure
impl Send for TermStructure
impl Sync for TermStructure
impl Unpin for TermStructure
impl UnsafeUnpin for TermStructure
impl UnwindSafe for TermStructure
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