提交图 Warrior_EA/research/test_retail.py
作者 SHA1 备注 提交日期
AnimateDread
c9b489e5d8 research: the retail fade DOES clear cost on EURUSD - correcting the earlier verdict
The previous commit pooled four instruments with very different spread-to-stop
ratios and concluded the edge never beats the cost. That was too broad. Per
cell (48 cells, M5 path, k=1), 8 clear - and they are not scattered:

   EURUSD  H1  pin     spread/stop 0.042   edge +0.160  cost 0.063  -> +0.097 R
   EURUSD  H1  pin                 0.045        +0.127        0.067     +0.060
   EURUSD  H1  inside              0.047        +0.123        0.060     +0.063
   EURUSD  H1  inside              0.050        +0.102        0.062     +0.040
   EURUSD M15  pin                 0.074        +0.141        0.100     +0.042
   EURUSD M15  pin                 0.072        +0.140        0.099     +0.041

Every clearing cell is on the tightest-spread instrument. XAUUSD carries the
same gross edge (+0.09 to +0.135) and never clears, because its cost is 3x.
That is the mechanism predicting where the effect should survive and being
right - the opposite of the stop-run case, which inverted.

WALK-FORWARD, 4 chronological folds: 6 of 8 hold at >=3/4. EURUSD H1 pin short
side is +0.116 / +0.061 / +0.143 / +0.067 across 23 years, 4/4.

WIDENING THE STOP still says what it said: EURUSD H1 pin goes +0.078 (m=1) ->
+0.028 -> +0.009 -> +0.017 -> -0.003 (m=5). The gross edge collapses ~15x while
the stop widens 5x, so this is NOT drift - it is reversion inside roughly one
setup-risk of a stop order filled at a local extreme. It is only tradeable at
the tight stop, which is exactly where cost bites hardest.

WHAT IS NOT MODELLED, and it decides this: commission and stop slippage. Gross
edge is ~0.139 R = ~2.4 pips on a 17.3-pip stop, against 0.75 pips of spread.
That leaves ~1.6 pips of headroom for commission plus slippage before it is
gone. A demo forward test measuring both is the next step, not more history.

Also fixes a LOOKAHEAD found in the sweep-entry test: the protective stop was
anchored to the low of the very bar that filled the limit order, which is not
known until that bar closes. It was worth ~+0.15 R - larger than any real effect
here - and it inflated the placebo equally, which is how it was caught. With it
removed, buying at retail stop levels is no better than buying at an arbitrary
level the same distance away: the 'stops are a farmable magnet' claim fails its
own control.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-01 22:33:11 -04:00
AnimateDread
c2dd9eb6aa research: retail setups ARE anti-predictive - and the edge dies with the cost
Tests the user's thesis directly: if price is unpredictable, trade against the
people predicting it badly. Implements the three mechanical setups from 'How To
Day Trade Forex For Profit' ch.5 with their DOCUMENTED stop rules, so retail
stops are located exactly rather than by proxy.

THE MIRROR TEST. Retail's trade and its exact mirror, priced under identical
rules. Both sides pay the same spread and suffer the same same-bar tie
convention, so those cancel in the difference and double in the sum:

    edge = (mirror - retail)/2      cost = -(mirror + retail)/2

  pin     EDGE +0.108 R   COST +0.143 R
  inside  EDGE +0.068 R   COST +0.140 R
  engulf  EDGE -0.001 R   COST +0.095 R

So pin-bar and inside-bar setups really are anti-predictive - the first
confirmed directional edge in this project. Engulfing is a pure coin flip whose
loss is entirely the spread, i.e. money already gone to the broker.

Stable across three conventions: H1 bars pessimistic ties, M5 path pessimistic,
M5 path optimistic. Re-walking the barriers on M5 CUT the cost (0.195 -> 0.143)
and RAISED the edge (0.078 -> 0.108), so the coarse-bar convention was masking
the effect, not manufacturing it.

THEN THE TEST THAT KILLS IT. Cost in R is spread/stop-distance, so widening the
stop divides it. If the edge is directional drift it survives. Fade expR by stop
multiple (pin, k=1, 122k trades):

    m=1.0  cost 0.146  expR -0.045     implied edge +0.101
    m=1.5  cost 0.097  expR -0.067                  +0.030
    m=2.0  cost 0.073  expR -0.065                  +0.008
    m=3.0  cost 0.049  expR -0.051                  -0.002
    m=5.0  cost 0.029  expR -0.040                  -0.011

The edge decays exactly as fast as the cost, then inverts. It was never drift:
it is reversion against a stop order filled AT a local extreme, and it lives
within one bar-range of the entry - the same short-horizon reversal the tick-flow
work already measured, meeting the same fate.

Also in this commit, the volume-profile claims from Wyckoff 2.0:
  MAGNET   all 10 tests positive vs a distance-matched placebo, z +3.0 to +7.8,
           family-wise bar 2.79 - but the effect is +0.15 to +0.59pp on a ~74%
           base rate, i.e. ~0.01 R.
  REACTION naked VPOC and VPOC reject +0.71 to +0.86pp (z to +5.65); value-area
           edges null or negative; HVN/LVN marginal.
  80% RULE dead. 27.8% traversal against a 29.0% martingale benchmark. Acceptance
           nearly DOUBLES the raw rate (14.1% -> 27.8%) and the benchmark doubles
           with it - every bit of the apparent improvement is geometry.

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