Struct ZcsTemplate
pub struct ZcsTemplate {
pub name: String,
pub fixed_day_count: DayCountFraction,
pub fixed_compounding: AccrualCompounding,
pub float_index: IborIndex,
pub float_frequency: Frequency,
pub float_day_count: DayCountFraction,
pub calendar: Arc<dyn Calendar>,
pub business_day_convention: BusinessDayConvention,
pub roll: RollConvention,
pub spot_lag: Period,
pub end_of_month: bool,
pub float_par_coupons: bool,
}Expand description
The conventions of a zero-coupon swap: a single terminal fixed accrual against a floating side that compounds one term-index reset per schedule period, both paying once at maturity.
float_frequency is the compounding frequency, not a payment frequency — a
ZCS pays once. It is what sets how many resets the floating side carries, and so
how many rows its reset ladder has.
Fields§
§name: StringTemplate name (doubles as the registry code).
fixed_day_count: DayCountFractionFixed-leg day-count.
fixed_compounding: AccrualCompoundingHow the single fixed accrual compounds over the life.
float_index: IborIndexThe term index the floating side compounds.
float_frequency: FrequencyFloating-side compounding frequency (one reset per period).
float_day_count: DayCountFractionFloating-side accrual day-count.
calendar: Arc<dyn Calendar>Schedule calendar.
business_day_convention: BusinessDayConventionBusiness-day convention.
roll: RollConventionRoll convention.
spot_lag: PeriodSpot lag: valuation → default effective date.
end_of_month: boolWhether schedule boundaries snap to month-ends.
float_par_coupons: boolWhether each floating reset forwards over its own accrual period (par
coupons) rather than its index’s window. false on every registered
template.
Implementations§
§impl ZcsTemplate
impl ZcsTemplate
pub fn with_par_coupons(self, par: bool) -> Self
pub fn with_par_coupons(self, par: bool) -> Self
This template with its floating resets forwarding over their own accrual periods (par coupons), each still fixing on its own date.
pub fn with_spot_lag(self, days: i32) -> Self
pub fn with_spot_lag(self, days: i32) -> Self
Overrides the spot lag (business days) — builder-style, as
OisTemplate::with_spot_lag does. A zero-coupon swap derives its
effective date from this lag in ZeroCouponSwap::from_template, so the
override reaches the instrument.
pub fn with_business_day_convention(
self,
convention: BusinessDayConvention,
) -> Self
pub fn with_business_day_convention( self, convention: BusinessDayConvention, ) -> Self
Generates under convention rather than the registered one. A
zero-coupon swap advances its start by the tenor under this convention
to reach its maturity, so the override reaches the instrument.
pub fn with_calendar(self, calendar: Arc<dyn Calendar>) -> Self
pub fn with_calendar(self, calendar: Arc<dyn Calendar>) -> Self
Generates on calendar rather than the registered business centres —
FpML’s businessCenters stated per trade. A payment lag with no
payment calendar of its own rolls on it too.
Trait Implementations§
§impl Clone for ZcsTemplate
impl Clone for ZcsTemplate
§fn clone(&self) -> ZcsTemplate
fn clone(&self) -> ZcsTemplate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more