pub struct MidPointCdsEngine { /* private fields */ }Expand description
Mid-point engine for credit-default swaps.
Prices each live premium period against the default probability over the period, placing the default at the period’s mid-point.
Implementations§
Source§impl MidPointCdsEngine
impl MidPointCdsEngine
Sourcepub fn new(
probability: Handle<dyn DefaultProbabilityTermStructure>,
recovery_rate: Real,
discount_curve: Handle<dyn YieldTermStructure>,
include_settlement_date_flows: Option<bool>,
settings: Shared<Settings<Date>>,
) -> MidPointCdsEngine
pub fn new( probability: Handle<dyn DefaultProbabilityTermStructure>, recovery_rate: Real, discount_curve: Handle<dyn YieldTermStructure>, include_settlement_date_flows: Option<bool>, settings: Shared<Settings<Date>>, ) -> MidPointCdsEngine
Builds the engine over the two curve handles it registers with
(midpointcdsengine.cpp:31-40).
include_settlement_date_flows overrides, when set, the settings’
flags for the settlement-date flow decision (the C++
includeSettlementDateFlows optional).
Sourcepub fn probability(&self) -> &Handle<dyn DefaultProbabilityTermStructure>
pub fn probability(&self) -> &Handle<dyn DefaultProbabilityTermStructure>
The default-probability curve handle the engine prices over.
Sourcepub fn discount_curve(&self) -> &Handle<dyn YieldTermStructure>
pub fn discount_curve(&self) -> &Handle<dyn YieldTermStructure>
The discount-curve handle the engine prices over.
Trait Implementations§
Source§impl AsObservable for MidPointCdsEngine
impl AsObservable for MidPointCdsEngine
Source§fn observable(&self) -> &Observable
fn observable(&self) -> &Observable
Access to the embedded observable for registering observers.
Source§impl PricingEngine for MidPointCdsEngine
impl PricingEngine for MidPointCdsEngine
Source§fn arguments_mut(&mut self) -> &mut dyn Arguments
fn arguments_mut(&mut self) -> &mut dyn Arguments
Mutable access to the argument bundle the instrument fills in.
Auto Trait Implementations§
impl !RefUnwindSafe for MidPointCdsEngine
impl !Send for MidPointCdsEngine
impl !Sync for MidPointCdsEngine
impl !UnwindSafe for MidPointCdsEngine
impl Freeze for MidPointCdsEngine
impl Unpin for MidPointCdsEngine
impl UnsafeUnpin for MidPointCdsEngine
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