SizeVaryingBasketStrategy

SizeVaryingBasketStrategy#

class sigtech.framework.strategies.basket_strategies.SizeVaryingBasketStrategy

Baseclasses: BasketStrategy

Extension of BasketStrategy that a series of cash flows to and from the strategy.

The flows are defined in a dictionary subs_reds_data.

If use_subs_reds_to_rebalance is True the strategy will rebalance the day following any flows.

Example of getting equally weighted exposure, rebalancing daily and after two flows:

import datetime as dtm
from sigtech.framework.default_strategy_objects.rolling_futures import es_index_front, vg_index_front

sig.SizeVaryingBasketStrategy(
     currency='USD',
     start_date=dtm.date(2010, 1, 6),
     constituents=[
         es_index_front(),
         vg_index_front()
     ],
     weights=[0.5, 0.5],
     rebalance_frequency='EOM',
     subs_reds_data={
         dtm.date(2010, 2, 10): 2000,
         dtm.date(2010, 3, 10): -2000,
     },
     use_subs_reds_to_rebalance=True
)
subs_reds_data: Optional[dict[datetime.date, Union[int, float]]]
use_subs_reds_to_rebalance: Optional[bool]
strategy_initialization(dt)

Add rebalance process methods.