Multi Straddle 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 show how to create a systematic strategy involving multiple straddle strategies. ## Environment This section will import relevant internal and external libraries, as well as setting up the platform environment.

[ ]:
import sigtech.framework as sig

import datetime as dtm
import seaborn as sns

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

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

Strategy#

[ ]:
class ExampleDynamicMultiOptionsStrategy(sig.DynamicMultiOptionsStrategy):
    def roll_options(self, dt):
        size_date = self.size_date_from_decision_dt(dt)

        eurusd = sig.FXOTCOptionsGroup.get_group('EURUSD')
        eurusd_maturity_date = eurusd.convert_maturity_tenor_to_date(size_date, '3M')
        eurusd_atm = eurusd.atm_from_type('Put', size_date, eurusd_maturity_date, 'DN')
        eurusd_call = eurusd.get_option('Put', eurusd_atm, size_date, eurusd_maturity_date)

        gbpusd = sig.FXOTCOptionsGroup.get_group('GBPUSD')
        gbpusd_maturity_date = gbpusd.convert_maturity_tenor_to_date(size_date, '3M')
        gbpusd_atm = gbpusd.atm_from_type('Put', size_date, gbpusd_maturity_date, 'DN')
        gbpusd_call = gbpusd.get_option('Put', gbpusd_atm, size_date, gbpusd_maturity_date)

        self.set_option_positions(dt, ((eurusd_call, 1e3), (gbpusd_call, 1e3)))
[ ]:
rs = ExampleDynamicMultiOptionsStrategy(
    currency='USD',
    start_date=dtm.date(2013, 1, 3),
    end_date=dtm.date(2013, 7, 15),
    group_names=[
        sig.FXOTCOptionsGroup.get_group('EURUSD').name,
        sig.FXOTCOptionsGroup.get_group('GBPUSD').name],
    target_type='Fixed',
    roll_dates=[
        dtm.date(2013, 2, 20),
        dtm.date(2013, 3, 20),
        dtm.date(2013, 4, 16),
        dtm.date(2013, 5, 21),
        dtm.date(2013, 6, 18)
    ],
)

Performance Analytics#

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