trader.ranking package¶
Ranking approved entry candidates against each other.
Capital is finite and was previously handed out in watchlist order, which carries no information. These components decide who goes first; they never decide how many entries fit or how large each is — that stays in Guardrails.
Deliberately no re-exports. Every consumer imports from the submodule it needs — trader.ranking.base, trader.ranking.comparables, trader.ranking.llm_ranker — which is what every other package in this codebase does: strategies, brokers, marketdata, news, persistence and llm have empty __init__.py files, and discovery, execution and risk carry a docstring and nothing else. LlmStrategy, the direct analogue, is imported as from trader.strategies.llm_strategy import LlmStrategy.
It is also load-bearing rather than merely conventional. A re-export here imports llm_ranker, which imports trader.llm.rank_prompt, which imports trader.ranking.base — re-entering this package while it is still initializing. Measured 2026-08-05: that is a hard ImportError on import trader.llm.rank_prompt, and the only fixes are a lazy module import inside llm_ranker or not re-exporting at all. Not re-exporting is the one that needs no workaround.