modular_trader.context#
Classes#
The framework context. |
Module Contents#
- class modular_trader.context.Context(/, **data: Any)#
Bases:
pydantic.BaseModel
The framework context.
- Attributes:
universe (AssetUniverse): The asset universe. signals (SignalCollection): The collection of signals. allocations (AllocationCollection): The collection of allocations. indicators (BaseIndicatorHandler | None): The indicator handler, if any. engine (BaseEngine | None): The engine, if any. latest_prices (Mapping[str, float]): The latest prices of all assets.
- Parameters:
data (Any)
- allocations: modular_trader.allocation.AllocationCollection = None#
- engine: modular_trader.engine.base.BaseEngine | None = None#
- indicators: modular_trader.indicator.handler.base.BaseIndicatorHandler | None = None#
- latest_prices: Mapping[str, float] = None#
- logger#
- model_config#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- signals: modular_trader.signal.SignalCollection = None#
- universe: modular_trader.universe.AssetUniverse = None#