ButterflySwaps#
-
class sigtech.framework.strategies.structure_basket_strategies.ButterflySwaps
Baseclasses:
StructureBasketBase
Subclasses:
Butterfly
Strategy buying spot starting IR receiver swap with medium-term tenor (
tenor_medium
) and selling same ccy swaps with short-term tenor (tenor_short
) and long-term tenor (tenor_long
) ifdirection
is long, else other way around. All other characteristics take default values. The strategy aims to benefit from changing curvature of the curve.currency
.quantity_type
:notional
orpv01
.quantity
: Notional or PV01 (depending onquantity_type
) of the medium swap, defaults to1
.tenor_short
: Tenor of the short-term swap (e.g. ‘2Y’).tenor_medium
: Tenor of the medium-term swap (e.g. ‘5Y’).tenor_long
: Tenor of the long-term swap (e.g. ‘10Y’).direction
:long
orshort
, defaults tolong
.start_date
: Start date.weights
: Swap weights calculation (equal or delta_neutral based on PV01), defaults to equal.
Example object creation:
strat = sig.ButterflySwaps(currency='USD', tenor_short='2Y', tenor_medium='5Y', tenor_long='10Y', direction='long', start_date=dtm.date(2018, 2, 15), quantity=100, weights='delta_neutral')
-
quantity: Optional[float]
-
quantity_type: Optional[Literal['notional', 'pv01']]
-
swap_type: Optional[Literal['OIS', 'IBOR']]
-
tenor_long: str
-
tenor_medium: str
-
tenor_short: str
-
weights: Optional[Literal['equal', 'delta_neutral']]
-
strategy_initialization(dt)
Initial decision run on the start date of the strategy.
- Parameters:
dt – Reference datetime.
-
structure_instruments() list[tuple[str, float]]
Return swaps’ weights.