alpheast.strategy.base_strategy module

class alpheast.strategy.base_strategy.BaseStrategy(symbol, **kwargs)[source]

Bases: ABC

Abstract base class for the trading strategy in the new event-driven backtesting engine. Strategies process MarketEvents and generate SignalEvents.

abstractmethod on_market_event(event)[source]

Called when a new MarketEvent (e.g. a new bar of data) is received. Strategies should implement their trading logic here.

set_event_queue(event_queue)[source]