Commit graph Warrior_EA/research/test_anomalies.py
Author SHA1 Message Date
AnimateDread
05c6a5c484 research: four more hypothesis families - drift is real, timing still is not
Everything tested before this asked ONE question - can recent price or flow
predict the next bar's direction - and answered no four ways. These are different
families, each with a published prior rather than a hunch.

1 TIME-SERIES MOMENTUM (Moskowitz/Ooi/Pedersen). 34 configurations across 4
  symbols x D1/H4 x 6 lookbacks. Nothing. The one rule that looks strong -
  XAUUSD H4 250-bar, p=0.0038, t+3.30, +10.32%/yr - returns essentially exactly
  buy-and-hold's +10.36%. It is not timing gold, it is being long gold. Hence the
  vs-B&H column: on a drifting asset a rule that is merely long most of the time
  looks skilful and is not.

2 SEASONALITY. The first thing in this project to survive a properly controlled
  test: 5 of 8 clear a family-wise max-statistic bar, two at p=0.0002. Split-half
  kills two of them (USDJPY dow-6 n=116 and SP500 hour-0 n=533 are thin
  off-session buckets). Two HOLD with near-identical halves:
    XAUUSD hour 1  +2.29 bp (t+6.44) / +2.43 bp (t+5.53)
    EURUSD hour 13 -1.47 bp (t-6.80) / -0.64 bp (t-3.56)
  Gold's hour 1 alone carries more than half the +4.22 bp/day drift.

  And it is still not tradeable. Widening the window to amortise the 4.92 bp
  round trip: the best of 144 windows (hour 1, 8h) nets +0.14 bp/day, t +0.23,
  and splits +1.29 / -1.00 - the sign flips between halves. Every other window is
  negative. Real, stable, well measured, and about 2x too small to cross its own
  spread. Same shape as the flow result.

3 OVERNIGHT/INTRADAY - folded into the hour analysis above.

4 VOLATILITY-MANAGED DRIFT (Moreira/Muir) - the one needing no directional edge.
  Does NOT reproduce here: flat on gold (-0.01), and it HURTS SP500 (0.71 -> 0.41
  D1, 0.77 -> 0.54 H4). Honest negative against a strong prior.

What survives all of it is drift, which is large and significant while every
timing rule is noise: XAUUSD +10.24%/yr (t 2.88), SP500 +12.25%/yr (t 2.84),
against USDJPY +1.16%/yr (t 0.59) and EURUSD ~0.

resample.py gains D1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-01 20:51:02 -04:00