Create butterfly spread options trading strategies based on butterfly direction ('long' or 'short') and option type (Call or Put).
Example:
import datetime as dtmimport sigtech.framework as sigsig.init()group = sig.obj.get('USDJPY OTC OPTION GROUP')# Create a long butterfly spread with callsbutterfly = sig.RollingButterflyOptionsStrategy( start_date=dtm.date(2021, 1, 4), end_date=dtm.date(2023, 1, 4), currency=group.underlying_obj.currency, group_name=group.name, rolling_frequencies=['3M'], maturity='12M', option_type='Call', butterfly_direction='long', strike_type='SPOT', strike_1='ATM', strike_2='ATM+3%', strike_3='ATM+5%', target_type='Vega', target_quantity=10.0,)
New feature: Target the net of a target quantity
Set net_target_quantity to True to target net of target quantity in options trading strategies.
You can force target quantity by adjusting the ratio of option legs.
Example:
import datetime as dtmimport sigtech.framework as sigsig.init()# Create strangle on SPX INDEX with call strike of 4500 and put strike 5500.# Scale option legs to get net target delta of 1.group = sig.obj.get('SPX INDEX OTC OPTION GROUP')strangle = sig.Strangle( start_date=dtm.date(2023, 1, 4), end_date=dtm.date(2024, 1, 4), currency=group.underlying_obj.currency, group_name=group.name, rolling_frequencies=['1M'], maturity='3M', strike_type='Price', put_strike=4500, call_strike=5500, target_type='Delta', target_quantity=1.0, net_target_quantity=True, total_return=False)strangle.history().plot()
This change applies to strategies created with the following classes:
DynamicMultiOptionsStrategy
DynamicMultiSwaptionsStrategy
DynamicOptionsStrategy
DynamicSwaptionsStrategy
RollingButterflyOptionsStrategy
RollingOptionStrategy
RollingSpreadOptionsStrategy
RollingStraddleOptionStrategy
RollingStrangleOptionStrategy
RollingVarianceSwapStrategy
Any custom class inheriting from RollingOptionsStrategyBase
Swaps
Improved transaction cost handling for IR and OIS OTC swaps
Transaction costs for IR and OIS OTC swaps can now be handled separately from the valuation price of the swap. This is in line with market conventions for modeling transaction costs.
To use this functionality, set INCLUDE_OTC_T_COSTS_IN_CASH to True.
Get information about a swap for a specified reference date.
Example:
import sigtech.framework as sigimport datetime as dtmsig.init()ois_swap = sig.OISSwap( currency="USD", tenor="5Y", start_date=dtm.date(2020, 11, 9), trade_date=dtm.date(2020, 11, 9),)ois_swap.swap_details(d=dtm.date(2020, 11, 9), notional=10_000_000.0)
New method for discounting and projection curves: yield_curve
This change adds the yield_curve method to display forward and zero rates for a given discounting or projection curve.
Example:
import datetime as dtmimport sigtech.framework as sigfrom sigtech.framework.instruments.ir_otc import IRSwapMarketsig.init()# Get a discounting curvediscounting_curve = sig.obj.get(IRSwapMarket.discounting_curve_name('USD'))# Get the yield curve for the discounting curveyield_curve = discounting_curve.yield_curve(d=dtm.date(2024, 3, 13))
Pass a list of holiday calendars when creating a dynamic strategy
Add non-trading days to a dynamic strategy by passing the extra_holidays parameter on creation.
The extra_holidays parameter can be a string or a list of strings. It must contain the object names of the holiday calendars you want the strategy to use.