pub struct FRA {
pub start_date: NaiveDate,
pub maturity_date: NaiveDate,
pub valuation_date: NaiveDate,
pub notional: f64,
pub currency: String,
pub fix_rate: f64,
pub day_count: DayCountConvention,
pub business_day_adjustment: i8,
pub term_structure: Option<TermStructure>,
}Fields§
§start_date: NaiveDate§maturity_date: NaiveDate§valuation_date: NaiveDate§notional: f64§currency: String§fix_rate: f64§day_count: DayCountConvention§business_day_adjustment: i8§term_structure: Option<TermStructure>Implementations§
Source§impl FRA
impl FRA
pub fn new( start_date: NaiveDate, maturity_date: NaiveDate, valuation_date: NaiveDate, notional: f64, fix_rate: f64, day_count: DayCountConvention, business_day_adjustment: i8, ) -> FRA
pub fn builder( start_date: String, maturity_date: String, notional: f64, fix_rate: f64, day_count: String, ) -> FRA
pub fn get_year_fraction(&self, date: NaiveDate) -> f64
pub fn get_discount_factor(&self, df_start_date: f64) -> f64
Trait Implementations§
Source§impl Rates for FRA
impl Rates for FRA
fn get_implied_rates(&self) -> f64
fn get_maturity_date(&self) -> NaiveDate
fn get_rate(&self) -> f64
fn get_maturity_discount_factor(&self) -> f64
fn get_day_count(&self) -> &DayCountConvention
fn set_term_structure(&mut self, term_structure: TermStructure)
Auto Trait Implementations§
impl Freeze for FRA
impl RefUnwindSafe for FRA
impl Send for FRA
impl Sync for FRA
impl Unpin for FRA
impl UnsafeUnpin for FRA
impl UnwindSafe for FRA
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