Commit graph Warrior_EA/research/pivot_expectancy_stock.py
Author SHA1 Message Date
AnimateDread
c85f6a3839 feat(research): stock-ZigZag live replay - the repaint measurement that answers "trade the true swings"
Faithful Python port of ADZigZag (stock MetaQuotes ZigZag 12/5/3,
verbatim rebrand) including the incremental prev_calculated branch, so
the indicator can be replayed bar by bar exactly as it draws live.

SP500 H1, 74,599 bars, fills at real M1 ask/bid:
- FINAL swings: 4,658 legs, mean 50.8 pts = 95 spreads. Perfect
  foresight +50.2 pts/leg. The user premise (swings dwarf spread) is
  fully confirmed.
- LIVE: 81% of drawn newest-pivots later repaint away entirely
  (18,805 of 23,299). Holding the drawn direction at every bar close
  grosses +0.38 pts/trade (t=0.8, zero cost charged) out of the
  50.8-pt average swing - 0.7% of the line the chart ends up showing.
- LONG +1.66 gross / SHORT -0.90 = the index drift, nothing else;
  long net +1.17 pts / 13-bar hold = ~1.5 bp, under one night financing.

The spread subtracts 0.49 pts of a swing that hands over 0.38: cost was
never the obstacle - pivot knowledge is.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 18:12:11 -04:00