Add 6 features: horizon returns + overnight/intraday + dist-from-high#36
Merged
Merged
Conversation
Predictor ROADMAP P2 diagnostic — test whether 5d forward is reversal
regime vs momentum regime, and whether splitting close-to-close returns
into overnight/intraday components improves signal.
New features (all technical group):
return_60d, return_120d
Longer-horizon momentum. Neutral name — meta ridge coefficient sign
determines regime. At 5d forward, short-horizon returns load negative
(reversal). If 60d/120d load positive, momentum persists at longer
lookback — a well-documented pattern (Jegadeesh/Titman 1993).
overnight_return_5d, intraday_return_5d
5d sum of (Open_t / Close_{t-1} - 1) vs (Close_t / Open_t - 1).
Lou/Polk/Skouras 2019 "A Tug of War" found overnight persists
positive (earnings, news, macro) while intraday is noisier and often
negative (microstructure, flow). Total momentum_5d ≈ overnight_5d +
intraday_5d. Decomposing lets the model learn different dynamics.
NaN when Open column is missing (no silent zero-fill per
feedback_no_silent_fails).
dist_from_5d_high, dist_from_20d_high
Reversal-native signals. Distance from recent peak as fraction:
(Close - rolling_max(High, N)) / rolling_max(High, N). Always ≤ 0.
A stock at its 5d high has no short-term reversal room; a stock
pulled back has more. Conceptually cleaner than past returns for
reversal signal.
Registry: 6 FeatureEntry rows added under "v3.1 technical additions".
FEATURES list in feature_engineer.py goes from 53 → 59. dropna still
correct — rows missing any required feature are dropped.
## Test plan
- [x] Synthetic OHLCV smoke: all 6 features compute, values in
sensible ranges (dist_from_5d_high ≤ 0 always, overnight/intraday
small magnitudes, return_60d/120d larger).
- [x] Full suite: 43 passed.
- [ ] After merge: re-run alpha-engine-data backfill to populate
historical rows in ArcticDB with the new columns.
- [ ] Predictor PR B2 (follow-up) adds features to MOMENTUM_FEATURES
list + 21d forward IC diagnostic.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ROADMAP Predictor P2 diagnostic — test whether 5d forward is reversal regime vs momentum regime, and whether splitting close-to-close returns into overnight/intraday components improves signal. Six new features under the technical group.
Neutral naming intentional — meta ridge coefficient sign determines reversal vs momentum regime per feature. No `momentum_` → `reversal_` rename (high migration cost for zero mechanical lift; defer to post-experiment cleanup if results justify).
Test plan
Related
🤖 Generated with Claude Code