modular_trader.framework.asset_selection ======================================== .. py:module:: modular_trader.framework.asset_selection Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/modular_trader/framework/asset_selection/base/index /autoapi/modular_trader/framework/asset_selection/manual/index Classes ------- .. autoapisummary:: modular_trader.framework.asset_selection.BaseAssetSelection modular_trader.framework.asset_selection.ManualAssetSelection Package Contents ---------------- .. py:class:: BaseAssetSelection Bases: :py:obj:`abc.ABC` .. autoapi-inheritance-diagram:: modular_trader.framework.asset_selection.BaseAssetSelection :parts: 1 :private-bases: Base class for asset selection. This class defines the interface for all asset selection strategies. .. py:method:: __call__(context: modular_trader.context.Context) Selects the assets to be used in the backtest. Called by the framework to select the assets to be used in the backtest. .. py:method:: run(context: modular_trader.context.Context) -> Iterable[str] :abstractmethod: Selects the assets to be used in the backtest. Must be implemented by subclasses. .. py:class:: ManualAssetSelection Bases: :py:obj:`modular_trader.framework.asset_selection.base.BaseAssetSelection` .. autoapi-inheritance-diagram:: modular_trader.framework.asset_selection.ManualAssetSelection :parts: 1 :private-bases: Selects the assets based on a predefined list of symbols. This class is used when the assets to be traded are known in advance. Attributes: symbols (list[str]): A list of symbol strings. .. py:method:: run(context: modular_trader.context.Context) -> Iterable[str] Selects the assets based on a predefined list of symbols. Args: context (Context): The framework context. Returns: Iterable[str]: An iterable of symbol strings. .. py:attribute:: symbols :type: list[str]