Struct SwaptionTemplate
pub struct SwaptionTemplate {
pub name: String,
pub underlying: SwaptionUnderlyingTemplate,
pub kind: SwaptionKind,
}Expand description
A swaption template: an option on a swap whose conventions come from an existing swap template.
Conventions only — no expiry. The option expiry is a deal term, not a
convention: a USD-SOFR swaption’s conventions are the same whether it is 1Y5Y or
5Y10Y. The spelling is a ForwardTenor, whose
<forward-start><tenor> grammar is parsed once for every builder that takes
it — so the expiry is the underlying’s forward start, one quantity rather
than two that must be kept consistent. Putting an expiry here would also make
the registry combinatorial (markets × expiries).
The underlying’s conventions are composed, not restated, so calendars, day
counts and frequencies keep one definition per market in templates::irs.
Fields§
§name: StringTemplate name (doubles as the registry code).
underlying: SwaptionUnderlyingTemplateThe underlying swap’s conventions.
kind: SwaptionKindPayer or receiver — the option’s direction.
Implementations§
§impl SwaptionTemplate
impl SwaptionTemplate
Trait Implementations§
§impl Clone for SwaptionTemplate
impl Clone for SwaptionTemplate
§fn clone(&self) -> SwaptionTemplate
fn clone(&self) -> SwaptionTemplate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more