Base class

To allow for a newly created Python class to gain the functionality of the SigTech Framework, it needs to inherit from a base class. There are two base classes in the SigTech Framework:

  • Strategy: used for intraday strategies—actions taken during multiple occasions during a trading day.

  • DailyStrategy: used for actions taken at one point during the trading day. The default action is taken at the end of the day.

When inheriting from either the Strategy or DailyStrategy class, it is a hard requirement to implement the strategy_initialization method. If not, an exception will occur at runtime.

The following examples display how to inherit from each of the base classes. They also display how to implement the strategy_initialization method, although the implementation only uses the the keyword pass—these strategies will not perform any actions.

import sigtech.framework as sig

class CustomIntradayStrategy(sig.Strategy):
    def __init__(self):
        super().__init__()
    
    def strategy_initialization(self):
        pass

The following is an example of inheriting from the DailyStrategy class:

import sigtech.framework as sig

class CustomDailyStrategy(sig.DailyStrategy):
    def __init__(self):
        super().__init__()
    
    def strategy_initialization(self):
        pass

Last updated