modular_trader.trader.base#
Classes#
Abstract base class for traders. |
Module Contents#
- class modular_trader.trader.base.BaseTrader(engine: modular_trader.engine.base.BaseEngine, framework: modular_trader.framework.collection.FrameworkCollection, indicator: modular_trader.indicator.handler.base.BaseIndicatorHandler, context: modular_trader.context.Context, recorder: modular_trader.record.Recorder)#
Bases:
abc.ABC
Abstract base class for traders.
- Attributes:
engine (BaseEngine): The engine to use for running the backtest. framework (FrameworkCollection): The framework to use for running the backtest. indicator (BaseIndicatorHandler | None): The indicator to use for running the backtest. context (Context): The context to use for running the backtest. recorder (Recorder): The recorder to use for running the backtest.
- Properties:
logger (BaseLogger): The logger to use for logging.
- Methods:
- run ():
Runs the backtest.
- Parameters:
framework (modular_trader.framework.collection.FrameworkCollection)
indicator (modular_trader.indicator.handler.base.BaseIndicatorHandler)
context (modular_trader.context.Context)
recorder (modular_trader.record.Recorder)
- abstract run()#
- context#
- engine#
- framework#
- indicator#
- recorder#