pub enum CalibrationInstrument {
ZeroRate {
maturity: Date,
rate: f64,
},
ParSwap {
maturity: Date,
rate: f64,
frequency: u32,
},
}Expand description
A quoted instrument a curve is calibrated to.
Variants§
ZeroRate
A continuously compounded zero rate quoted directly for maturity.
ParSwap
A par swap: rate paid frequency times a year until maturity, worth zero today.
The par condition used is rate * annuity = 1 - discount(maturity), with the annuity
summed over the swap’s own payment schedule. That is the textbook single-curve
relationship: it assumes discounting and projection happen on the same curve, which is the
case this crate models. A market that discounts on a separate collateral curve needs a
second curve, and pretending otherwise here would misprice by exactly that difference.
Implementations§
Trait Implementations§
Source§impl Clone for CalibrationInstrument
impl Clone for CalibrationInstrument
Source§fn clone(&self) -> CalibrationInstrument
fn clone(&self) -> CalibrationInstrument
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 moreimpl Copy for CalibrationInstrument
Source§impl Debug for CalibrationInstrument
impl Debug for CalibrationInstrument
Source§impl<'de> Deserialize<'de> for CalibrationInstrument
impl<'de> Deserialize<'de> for CalibrationInstrument
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CalibrationInstrument
impl PartialEq for CalibrationInstrument
Source§impl Serialize for CalibrationInstrument
impl Serialize for CalibrationInstrument
impl StructuralPartialEq for CalibrationInstrument
Auto Trait Implementations§
impl Freeze for CalibrationInstrument
impl RefUnwindSafe for CalibrationInstrument
impl Send for CalibrationInstrument
impl Sync for CalibrationInstrument
impl Unpin for CalibrationInstrument
impl UnsafeUnpin for CalibrationInstrument
impl UnwindSafe for CalibrationInstrument
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