trader.strategies.registry module¶
Build strategy instances from configuration.
The registry is the extension point: adding a strategy is one class plus one entry here, so the set of strategies stays a configuration concern rather than a code-structure one.
- trader.strategies.registry.build_all(configs, *, llm=None, news_provider=None, decision_memory=None)[source]¶
Instantiate every configured strategy, keyed by id.
- Parameters:
configs (Sequence[StrategyConfig])
llm (object | None)
news_provider (object | None)
decision_memory (object | None)
- Return type:
dict[str, Strategy]
- trader.strategies.registry.build_strategy(config, *, llm=None, news_provider=None, decision_memory=None, alias_resolver=None, analyst_provider=None, earnings_provider=None)[source]¶
Instantiate one configured strategy.
decision_memory is optional and only ever reaches an llm entry: a strategy built without one calls the model every cycle, which is the behaviour that existed before the news-fingerprint gate. Passing None is a valid, conservative configuration, not a degraded one.
- Raises:
ConfigError – unknown type, a parameter the strategy does not accept, or an llm/trailing_stop_floor entry with no provider supplied.
- Parameters:
config (StrategyConfig)
llm (object | None)
news_provider (object | None)
decision_memory (object | None)
alias_resolver (object | None)
analyst_provider (object | None)
earnings_provider (object | None)
- Return type: