[codex] Migrate global ETF rotation to feature snapshot#147
Conversation
54e0751 to
1cc9fe1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54e0751650
ℹ️ 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".
| feature_snapshot, | ||
| get_current_holdings(ctx), | ||
| get_historical_close=market_history, | ||
| as_of_date=ctx.as_of, |
There was a problem hiding this comment.
Gate rebalance on the snapshot date
For artifact-backed runs where the feature snapshot was produced on the quarter-end but ctx.as_of is the platform run date (for example, running on 2026-04-01 with a 2026-03-31 snapshot), passing ctx.as_of makes _snapshot_rebalance_day evaluate April 1 and return daily_check, so no quarterly weights are emitted. This should use the snapshot's as_of date, or an explicit post-snapshot execution window, rather than the runtime date.
Useful? React with 👍 / 👎.
Summary
global_etf_rotationruntime input from market history tofeature_snapshot.Validation
PYTHONPATH=src .venv/bin/python -m unittest tests.test_entrypoints tests.test_catalog tests.test_global_etf_rotationgit diff --check