Struct TenorBasisLeg
pub struct TenorBasisLeg {
pub index_name: String,
pub index_code: String,
pub frequency: Frequency,
pub day_count: DayCountFraction,
pub calendar: Arc<dyn Calendar>,
pub business_day_convention: BusinessDayConvention,
pub roll: RollConvention,
pub payment_convention: Option<BusinessDayConvention>,
pub payment_lag: Period,
pub payment_calendar: Option<Arc<dyn Calendar>>,
}Expand description
One leg of a single-currency tenor-basis swap (a floating leg projecting one index). Carries the index name (the forward-curve key), the leg frequency, the day-count, and the schedule conventions needed to generate the leg to a maturity.
Fields§
§index_name: StringThe index name — the forward-curve key this leg projects (e.g. "EURIBOR").
index_code: StringThe index’s registry code ("EUR-EURIBOR-3M") — the key a market stores
the projection curve under, and the one a swap declares.
frequency: FrequencyCoupon frequency.
day_count: DayCountFractionAccrual day-count.
calendar: Arc<dyn Calendar>Schedule calendar.
business_day_convention: BusinessDayConventionBusiness-day convention.
roll: RollConventionRoll convention.
payment_convention: Option<BusinessDayConvention>Business-day convention this leg’s payment date rolls under, separate from the convention its schedule is generated with.
On the leg rather than on the template, because a basis swap is the instrument whose two sides follow different markets by construction: a fixed-versus-floating swap takes one payment convention and a float-float one takes two.
None — every registered template — leaves the payment on the
unadjusted accrual end. That is this library’s stance everywhere, rather
than falling back to the leg’s own schedule convention.
payment_lag: PeriodPayment lag: accrual end → pay date, in business days on the payment calendar. Zero pays at the accrual end.
payment_calendar: Option<Arc<dyn Calendar>>Calendar the payment lag rolls on; None defaults to this leg’s
schedule calendar.
Implementations§
§impl TenorBasisLeg
impl TenorBasisLeg
pub fn payment_calendar_or_schedule(&self) -> Arc<dyn Calendar>
pub fn payment_calendar_or_schedule(&self) -> Arc<dyn Calendar>
The calendar this leg’s payments roll on: its own when set, else the calendar its schedule is generated over.
pub fn with_payment_convention(self, convention: BusinessDayConvention) -> Self
pub fn with_payment_convention(self, convention: BusinessDayConvention) -> Self
This leg rolling its payments under convention.
pub fn with_payment_lag(self, days: i32) -> Self
pub fn with_payment_lag(self, days: i32) -> Self
This leg paying days business days after each accrual end.
pub fn with_payment_calendar(self, calendar: Arc<dyn Calendar>) -> Self
pub fn with_payment_calendar(self, calendar: Arc<dyn Calendar>) -> Self
This leg rolling its payment lag on calendar rather than its
schedule’s.
Trait Implementations§
§impl Clone for TenorBasisLeg
impl Clone for TenorBasisLeg
§fn clone(&self) -> TenorBasisLeg
fn clone(&self) -> TenorBasisLeg
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more