Align crypto live pool authority#27
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6bcb783003
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| selected_pool = legacy_rotation.resolve_authoritative_rotation_pool( | ||
| working_state, | ||
| indicators_map, | ||
| btc_snapshot, | ||
| trend_universe_symbols=trend_universe_symbols, | ||
| trend_pool_size=config["trend_pool_size"], | ||
| build_stable_quality_pool_fn=lambda indicators, btc, previous_pool: legacy_core.build_stable_quality_pool( | ||
| indicators, | ||
| btc, | ||
| previous_pool, | ||
| pool_size=config["trend_pool_size"], | ||
| min_history_days=config["min_history_days"], | ||
| min_avg_quote_vol_180=config["min_avg_quote_vol_180"], | ||
| membership_bonus=config["membership_bonus"], | ||
| ), | ||
| allow_refresh=bool(config.get("allow_rotation_refresh", True)), |
There was a problem hiding this comment.
Keep rotated-out holdings in the sell evaluation
With the new contract, universe_snapshot is only the current artifact live pool (docs/crypto_cross_platform_strategy_spec.md:71), so a trend holding from last month that was removed from the new artifact is no longer present in trend_universe_symbols. After resolving the pool solely from that upstream list here, the later sell loop still iterates only trend_universe_symbols, meaning get_trend_sell_reason() is never called for the stale holding and no rotated_out sell reason is emitted for it; include existing non-BTC portfolio holdings in the sell evaluation even while restricting new buys to the authoritative pool.
Useful? React with 👍 / 👎.
Summary:
Tests: