modular_trader.trader.base#

Classes#

BaseTrader

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

Inheritance diagram of modular_trader.trader.base.BaseTrader

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:
abstract run()#
context#
engine#
framework#
indicator#
logger: modular_trader.logging.base.BaseLogger#
recorder#