FX Option Basket 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.

Introduction#

The purpose of this notebook is to how to create a systematic strategy involving a basket of FX option strategies. ## Environment This section will import relevant internal and external libraries, as well as setting up the platform environment.

[ ]:
import sigtech.framework as sig

from uuid import uuid4
import datetime as dtm
import pandas as pd
import seaborn as sns

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

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

Universe#

The universe of the strategy consists of a number rolling RollingStraddleOptionStrategy option strategies.

[ ]:
def create_straddles(ccy: str) -> sig.RollingStraddleOptionStrategy:
    # Get the option group
    fx_option_group = sig.FXOTCOptionsGroup.get_group(ccy)

    # Create Straddle object
    s = sig.RollingStraddleOptionStrategy(
        currency=fx_option_group.over,
        start_date=dtm.date(2017, 1, 6),
        group_name=fx_option_group.name,
        strike_type='Delta',
        strike=0.5,
        maturity='3M',
        end_date=dtm.date(2019, 1, 20),
        rolling_frequencies=['1M', ],
        target_quantity=-50.0,
        target_type='Vega',
        ticker=f'{ccy} SHORT ROLLING STRADDLE {str(uuid4())[:4]}',
        total_return=False,
    )
    return s.name, s.history()
[ ]:
ccys = ['EURUSD', 'GBPUSD']

strategy_dictionary = {
   create_straddles(ccy)[0]: create_straddles(ccy)[1]
   for ccy in ccys
}

Plot the created RollingStraddleOptionStrategy objects.

[ ]:
pd.concat(strategy_dictionary, axis=1).dropna().plot();

Strategy#

All of the rolling Straddle selling strategies will be combined in a single basket. In this section we will define how the different Straddle strategies will form the overall strategy - this include the weighting and allocation between the sub-strategies.

[ ]:
# define constituent weights
constituent_names = strategy_dictionary.keys()

# The sub-strategies will be equally weighted in the strategy
constituent_weights = [1.0 / len(constituent_names)] * len(constituent_names)

Portfolio#

In this section we will create a BasketStrategy of all the different sub-strategies.

[ ]:
basket = sig.BasketStrategy(
    currency='USD',
    start_date=dtm.date(2017, 1, 6),
    end_date=dtm.date(2019, 1, 20),
    constituent_names=constituent_names,
    weights=constituent_weights,
    rebalance_frequency='EOM',
    total_return=False,
)

Performance#

[ ]:
sig.PerformanceReport(basket, cash=sig.CashIndex.from_currency('USD')).report()