mhallsmoore / qstrader

QuantStart.com - QSTrader backtesting simulation engine.
https://www.quantstart.com/qstrader/
MIT License
2.93k stars 855 forks source link

How do I run multiple Strategies? #152

Closed JamesKBowler closed 7 years ago

JamesKBowler commented 7 years ago

Is it possible to make a list of strategies for the below function?

def __init__(self, *strategies):
    self._lst_strategies = strategies

def calculate_signals(self, event):
    for strategy in self._lst_strategies:
        print(strategy)
        strategy.calculate_signals(event)