Struct Fee
pub struct Fee {
pub currency: Currency,
pub payment_date: NaiveDate,
pub amount: f64,
pub collateral: CollateralSpec,
}Expand description
One dated payment of a known amount, positive when received.
Fields§
§currency: CurrencyThe payment currency.
payment_date: NaiveDateThe payment date.
amount: f64The amount, positive received and negative paid.
collateral: CollateralSpecThe discounting collateral.
Implementations§
Trait Implementations§
§impl<R: Scalar> Priceable<R> for Fee
impl<R: Scalar> Priceable<R> for Fee
§fn npv(&self, view: &PricingView<'_, R>) -> Result<R, PricingError>
fn npv(&self, view: &PricingView<'_, R>) -> Result<R, PricingError>
amount · P(payment); nothing once the payment date has passed.
§fn par_rate(&self, _view: &PricingView<'_, R>) -> Result<R, PricingError>
fn par_rate(&self, _view: &PricingView<'_, R>) -> Result<R, PricingError>
The par rate — the fixed rate at which the product is worth nothing. Read more
§fn par_spread(&self, _view: &PricingView<'_, R>) -> Result<R, PricingError>
fn par_spread(&self, _view: &PricingView<'_, R>) -> Result<R, PricingError>
The par (breakeven) floating-leg spread. Zero for a product with no
floating leg. Read more
§impl PricingRiskFactors for Fee
impl PricingRiskFactors for Fee
§fn risk_factors(&self) -> Result<RiskFactors<'_>, PricingError>
fn risk_factors(&self) -> Result<RiskFactors<'_>, PricingError>
The collateral’s discount curve alone.
§impl Product for Fee
impl Product for Fee
§fn currency(&self) -> Currency
fn currency(&self) -> Currency
The currency the product pays in. An FX product values in its quote
currency; a book converts.
§fn contract_dates(&self) -> Vec<(&'static str, NaiveDate)>
fn contract_dates(&self) -> Vec<(&'static str, NaiveDate)>
The contract dates the product resolved to, as
(name, date) pairs —
exactly the dates its stated constructor takes, so a product built
through a derived form can be read back and rebuilt through the stated
one. Empty for a product with no stated form. No default: every
product states which it is — see AnyInstrument::contract_dates.§fn legs(&self) -> Option<Vec<&Leg>>
fn legs(&self) -> Option<Vec<&Leg>>
The legs the product itself holds, in a declared order, or
None
for a product that holds none — see AnyInstrument::legs. No
default: every product states which it is.§fn final_payment_date(&self) -> Option<NaiveDate>
fn final_payment_date(&self) -> Option<NaiveDate>
The date of the product’s final payment, where a calibration rung can
be built on it;
None for a product no ladder is built from.§fn restruck_at_rate(&self, _rate: f64) -> Option<AnyInstrument>
fn restruck_at_rate(&self, _rate: f64) -> Option<AnyInstrument>
This product re-struck at the par rate
rate — the scalar a par
calibration rung on it is quoted in — or None for a product that
carries no such scalar. What a quote scenario moves a rung to.§fn restruck_at_spread(&self, _spread: f64) -> Option<AnyInstrument>
fn restruck_at_spread(&self, _spread: f64) -> Option<AnyInstrument>
This product re-struck at the basis spread
spread on its spread
leg, or None for a product that quotes none.impl StructuralPartialEq for Fee
Auto Trait Implementations§
impl Freeze for Fee
impl RefUnwindSafe for Fee
impl Send for Fee
impl Sync for Fee
impl Unpin for Fee
impl UnsafeUnpin for Fee
impl UnwindSafe for Fee
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