pub struct Deposit {
pub start_date: NaiveDate,
pub maturity_date: NaiveDate,
pub valuation_date: NaiveDate,
pub notional: f64,
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§fix_rate: f64§day_count: DayCountConvention§business_day_adjustment: i8§term_structure: Option<TermStructure>Implementations§
Source§impl Deposit
impl Deposit
pub fn new( start_date: NaiveDate, maturity_date: NaiveDate, valuation_date: NaiveDate, notional: f64, fix_rate: f64, day_count: DayCountConvention, business_day_adjustment: i8, ) -> Deposit
pub fn builder( start_date: String, maturity_date: String, _notional: f64, _fix_rate: f64, day_count: String, ) -> Deposit
pub fn get_start_date(&self) -> NaiveDate
pub fn get_notional(&self) -> f64
pub fn get_rate(&self) -> f64
pub fn get_business_day_adjustment(&self) -> i8
pub fn get_year_fraction(&self, date: NaiveDate) -> f64
pub fn get_discount_factor(&self) -> f64
pub fn get_remaining_interest_amount(&self) -> f64
pub fn get_value(&self) -> f64
pub fn get_pv(&self, curve: &TermStructure) -> f64
Trait Implementations§
Source§impl Rates for Deposit
impl Rates for Deposit
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 Deposit
impl RefUnwindSafe for Deposit
impl Send for Deposit
impl Sync for Deposit
impl Unpin for Deposit
impl UnsafeUnpin for Deposit
impl UnwindSafe for Deposit
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