CapFloor¶
- class quantsupport.instruments.CapFloor(identifier: str, start_date: Date | str | datetime.date, maturity_date: Date | str | datetime.date, strike: float | Mapping[str, Any] | str, notional: float, currency: Currency | str, market_index: MarketIndex | str | Mapping[str, Any], cap_floor_type: CapFloorType | str, frequency: Frequency | str | None = ...)¶
Bases:
InstrumentAn interest-rate cap or floor.- Parameters:
identifier (str) – Product identifier for the strip of interest-rate optionlets.
start_date (Date or datetime.date or str) – Start of the first covered accrual period; ISO strings are accepted.
maturity_date (Date or datetime.date or str) – End of the last covered accrual period.
strike (float) – Numeric annual decimal cap/floor rate, for example 0.04 for 4%. This wrapper does not accept ATM strings or tagged Strike dictionaries.
notional (float) – Covered principal in currency; Trade may override the amount.
currency (Currency or str) – Optionlet payment currency enum or alphabetic code.
market_index (MarketIndex or str) – Floating reference index for the covered periods, or native index representation.
cap_floor_type (CapFloorType or str) – Cap for upside rate protection or Floor for downside protection, supplied as an enum or case-insensitive name.
frequency (Frequency or str, optional) – Optionlet/accrual interval; default None resolves to Quarterly.
Methods
- __getitem__(key: str, /) Any¶
- classmethod from_dict(obj: Mapping[str, Any]) Self¶
Builds a product using the same fields and defaults as its constructor.
- Parameters:
obj (Mapping[str, Any]) – CapFloor constructor keywords: identifier, start_date, maturity_date, numeric annual decimal strike, notional, currency, market_index, cap_floor_type, and optional frequency. Direction is Cap or Floor; omitted frequency follows the constructor default.
- Returns:
Cap/floor strip constructed through cls, preserving subclasses.
- Return type:
Self
- keys() list[str]¶
- Return serialized field names; supports dict(obj).
- to_dict() dict[str, Any]¶
- Return JSON-compatible fields as a dictionary.
Properties
- property cap_floor_type: CapFloorType¶
Read-only contractual cap_floor_type. Collections are returned as copies.
- property currency: quantsupport.market.Currency¶
Read-only contractual currency. Collections are returned as copies.
- property frequency: quantsupport.time.Frequency¶
Read-only contractual frequency. Collections are returned as copies.
- property identifier: str¶
Read-only identifier assigned to this instrument.
- property market_index: quantsupport.market.MarketIndex¶
Read-only contractual market_index. Collections are returned as copies.
- property maturity_date: quantsupport.time.Date¶
Read-only contractual maturity_date. Collections are returned as copies.
- property notional: float¶
Read-only contractual notional. Collections are returned as copies.
- property start_date: quantsupport.time.Date¶
Read-only contractual start_date. Collections are returned as copies.
- property strike: float¶
Read-only contractual strike. Collections are returned as copies.