Struct RepoTerms
pub struct RepoTerms {
pub side: RepoSide,
pub currency: Currency,
pub start: NaiveDate,
pub end: NaiveDate,
pub rate: RepoRate,
pub day_count: DayCountFraction,
pub margin_ratio: f64,
pub margin_basis: PriceBasis,
}Expand description
The terms both constructors share.
Fields§
§side: RepoSideWhich way the cash goes.
currency: CurrencyThe cash currency.
start: NaiveDateThe near date: cash and collateral change hands.
end: NaiveDateThe far date: they change back.
rate: RepoRateThe rate the cash accrues at.
day_count: DayCountFractionThe accrual day count.
margin_ratio: f64Collateral value over cash: 1.02 is 102% margin, a 1.96% haircut.
margin_basis: PriceBasisWhether the margin ratio applies to the clean or the dirty price.
Implementations§
§impl RepoTerms
impl RepoTerms
pub fn from_template(
template: &RepoTemplate,
side: RepoSide,
start: NaiveDate,
end: NaiveDate,
rate: RepoRate,
margin_ratio: f64,
) -> Result<Self, RepoError>
pub fn from_template( template: &RepoTemplate, side: RepoSide, start: NaiveDate, end: NaiveDate, rate: RepoRate, margin_ratio: f64, ) -> Result<Self, RepoError>
The terms a repo drafted on template carries: its currency, its
money-market basis and its margin basis, with the caller’s side,
dates and rate — RepoTemplate::floating
for one on the market’s overnight index.
§Errors
RepoError::Malformed if the template’s currency is not a currency.
Trait Implementations§
impl StructuralPartialEq for RepoTerms
Auto Trait Implementations§
impl Freeze for RepoTerms
impl RefUnwindSafe for RepoTerms
impl Send for RepoTerms
impl Sync for RepoTerms
impl Unpin for RepoTerms
impl UnsafeUnpin for RepoTerms
impl UnwindSafe for RepoTerms
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