Skip to content

Add 6 features: horizon returns + overnight/intraday + dist-from-high#36

Merged
cipher813 merged 1 commit into
mainfrom
feat/reversal-overnight-horizon-features
Apr 15, 2026
Merged

Add 6 features: horizon returns + overnight/intraday + dist-from-high#36
cipher813 merged 1 commit into
mainfrom
feat/reversal-overnight-horizon-features

Conversation

@cipher813
Copy link
Copy Markdown
Owner

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.

Feature Formula Hypothesis
`return_60d` `Close_t / Close_{t-60} - 1` Momentum persists at longer horizon (Jegadeesh/Titman 1993)
`return_120d` `Close_t / Close_{t-120} - 1` Same; test 3–6 month lookback
`overnight_return_5d` 5d sum of `(Open_t / Close_{t-1} - 1)` Lou/Polk/Skouras 2019 — overnight persistent positive
`intraday_return_5d` 5d sum of `(Close_t / Open_t - 1)` Lou/Polk/Skouras 2019 — intraday noisier, often negative
`dist_from_5d_high` `(Close - rolling_max(High, 5)) / rolling_max(High, 5)` Reversal-native; always ≤ 0
`dist_from_20d_high` same with 20d window Reversal-native, longer lookback

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

  • Synthetic OHLCV smoke: all 6 compute, values in sensible ranges (`dist_from_high ≤ 0` always ✓).
  • Full suite: 43 passed.
  • Merge → re-run backfill to populate ArcticDB historical rows.
  • Predictor PR B2 (follow-up) adds features to `MOMENTUM_FEATURES` list + 21d forward IC diagnostic sidecar.

Related

  • alpha-engine-docs ROADMAP Predictor P2: training-sample range investigation + this feature experiment.
  • alpha-engine-predictor PR B2 (TBD): config + 21d IC sidecar.

🤖 Generated with Claude Code

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>
@cipher813 cipher813 merged commit ac4e769 into main Apr 15, 2026
1 check passed
@cipher813 cipher813 deleted the feat/reversal-overnight-horizon-features branch April 15, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant