Swaption Delta Hedging Strategy#

New user? The best way to learn SigTech is to follow the steps in our user guide.

Restricted data: You will only have access to the data used in this notebook if your organisation has specifically purchased it. To check your current data access, view Data. If you would like to access more data, please contact sales@sigtech.com.

Changes will not be saved: Edits made to SigTech’s example notebooks like this will only persist for the duration of your session. When you restart the research environment, this notebook will have been restored to its original state, and any changes you have made will have been lost. To make permanent changes, copy and paste the content to a new notebook in one of your workspaces.

Introdution#

This notebook showcases how to delta hedge a Swaptions Strategy.

Environment#

This section imports the relevant internal and external libraries, and sets up the platform environment.

[ ]:
import sigtech.framework as sig
from sigtech.framework.strategies.rolling_swaption_baskets import RollingSwaptionStrategy

import datetime as dtm
import seaborn as sns
import pandas as pd

sns.set(rc={'figure.figsize':(18, 6)})

env = sig.init(env_date=dtm.date(2024, 2, 22))

Universe#

A USD Payer 6 month 30 year swaption rolling every 3M instrument will be created using the platform’s building blocks.

[ ]:
swaption = RollingSwaptionStrategy(
    start_date=dtm.date(2016, 3, 5),
    maturity='6M',
    currency='USD',
    group_name=sig.SwaptionGroup.get_group('USD').name,
    rolling_frequencies=["3M"],
    swaption_type='Payer',
    target_type='Fixed',
    target_quantity=1,
    include_trading_costs=False,
    total_return=False,
    end_date=dtm.datetime(2021, 4, 4),
    swap_tenor='30Y',
    ticker='Rolling Swaption'
)

swaption.history().plot();
[ ]:
swaption.greeks().tail()

Creating DeltaHedgingStrategy objects#

We can now wrap our rolling swaption in the DeltaHedingStrategy building block. hedging_instrument_type="UNDERLYING" is specified to delta hedge using the actual underlying of the option. The delta_threshold is the minimum difference between held delta and current delta (in delta terms) needed to trigger a rebalance.

[ ]:
delta_hedged_swaption = sig.DeltaHedgingStrategy(
    option_strategy_name=swaption.name,
    option_group_name=swaption.group.name,
    currency=swaption.group.currency,
    hedging_instrument_type='UNDERLYING',
    start_date=swaption.start_date,
    end_date=swaption.end_date,
    include_option_strategy=True,
    delta_threshold=0.0005,
    total_return=False,
    ticker='Delta Hedged Swaptionv'
)
[ ]:
pd.DataFrame({'Swaption':swaption.history(),
              'Delta Hedged': delta_hedged_swaption.history()}).plot();
[ ]:
delta_hedged_swaption.plot.portfolio_table(

)
[ ]:
sig.PerformanceReport([delta_hedged_swaption, swaption]).report()