modular_trader.framework.signal_generation.base#
Classes#
Abstract base class for signal generation. |
Module Contents#
- class modular_trader.framework.signal_generation.base.BaseSignalGeneration#
Bases:
abc.ABC
Abstract base class for signal generation.
- Attributes:
- context: Context
The framework context.
- universe: AssetUniverse
The asset universe to generate signals for.
- Methods:
- run(context: Context, universe: AssetUniverse) -> Iterable[Signal]:
Must be implemented by subclasses. Called by __call__() to generate signals.
- __call__(context: modular_trader.context.Context, universe: modular_trader.universe.AssetUniverse)#
Generate signals.
- Args:
- context: Context
The framework context.
- universe: AssetUniverse
The asset universe to generate signals for.
- Returns:
- Iterable[Signal]:
An iterable of signals.
- Parameters:
context (modular_trader.context.Context)
universe (modular_trader.universe.AssetUniverse)
- abstract run(context: modular_trader.context.Context, universe: modular_trader.universe.AssetUniverse) Iterable[modular_trader.signal.Signal] #
Must be implemented by subclasses.
Called by __call__() to generate signals.
- Parameters:
context (modular_trader.context.Context)
universe (modular_trader.universe.AssetUniverse)
- Return type:
Iterable[modular_trader.signal.Signal]