Reports

Fibonacci extensions on random prices: why a high hit rate isn't evidence

By the PipYard team · 6 min read · Updated

We ran a common Fibonacci setup on 66,000 setups taken from random prices, which have no edge by construction. Trades aiming for the 161.8% extension reached it before their stop about 73% of the time, 261.8% about half the time and 423.6% about a third of the time. The average trade still lost slightly, before any costs. A hit rate like that says more about where the entry and the stop sit than about Fibonacci.

The setup

The study is the failed-retrace setup from FXEngine, the research engine PipYard grew out of. It starts from a shock: a 15-minute bar much larger than usual, on higher volume than usual for that hour.

  1. After the shock, price makes a new extreme. That extreme is the 100% level.
  2. Price pulls back by at least half an ATR. The end of that pullback is the 0% level.
  3. Within two days, a bar closes beyond 100% in the shock's direction. That close is the entry.
  4. The stop sits just beyond 0%, with a tenth of an ATR to spare. The targets are the 161.8%, 261.8% and 423.6% extensions of the 0–100 swing.
  5. A trade that reaches neither its target nor its stop within five days closes at the price then.
  6. If the entry close is already at or past a target, there is no trade for that target.

Results are in R, the distance from entry to stop. A trade that hits its stop is −1 R. A trade whose target is 0.3 times as far as the stop earns +0.3 R when it gets there.

The random prices

We used two kinds of random 15-minute prices, at gold's usual scale and volatility, with weekends removed:

  • A driftless random walk with occasional large moves and busier European and US hours. Nothing in it trends or repeats.
  • The same with trending spells that start and stop at random. This is the generator FXEngine's own tests use.

Each kind ran for ten different random seeds of eight years each: 33,449 setups on the plain walk and 32,835 on the version with trending spells. Shocks were bars of at least 2 times the ATR on 1.3 times the hour's usual volume. Those thresholds only change how many setups there are, not their shape.

The results

Failed-retrace trades on random prices, before costs (10 seeds × 8 years of M15 per column)
TargetTarget before stop: walkWith trending spellsAverage per trade: walkWith trending spells
161.8%73%74%−0.04 R−0.03 R
261.8%51%52%−0.03 R−0.02 R
423.6%33%34%−0.03 R+0.01 R

Hit rates and averages are over the same trades. When the entry close was already past a target there was no trade for it: 20% of setups for 161.8%, 3% for 261.8% and under 1% for 423.6%. That leaves about 26,500 trades per column at 161.8% and over 31,800 at the other targets.

Across the ten seeds the 161.8% hit rate stayed between 71% and 76%. The average per trade stayed within 0.04 R of zero for every target; single seeds ranged from about −0.09 R to +0.05 R. On the plain walk it was slightly below zero for all three targets. The stop's small buffer beyond 0%, and counting the stop first when one bar touches both levels, both lean slightly against the trade.

Simulated results. Past performance does not guarantee future results. Random prices, not market data.

Why the hit rate is high

Look at where the trade starts. The entry is a close beyond 100%, and across the 33,449 setups on the plain walk the median entry was at 124% of the swing. From there:

  • the stop, just beyond 0%, is about 1.32 swings away;
  • the 161.8% target is about 0.38 swings away;
  • the 261.8% target is about 1.38 swings away, and 423.6% about 3 swings away.

On prices with no drift, the chance of reaching one level before another is roughly the distance to the far level divided by the total distance between them. For 161.8% that's 1.32 ÷ (1.32 + 0.38), about 78%. For 261.8% it's about 49%, and for 423.6% about 31%. The measured 73%, 51% and 33% are close to that. The Fibonacci ratios didn't produce the hit rates; the distances did.

Why the average is still zero

The same distances set the payoff. A trade that reaches 161.8% earns about a third of what a stopped trade loses: the winners averaged +0.32 R. On the plain walk, 73% of trades won that and 27% lost 1 R: 0.73 × 0.32 − 0.27 is about −0.04 R, which is the measured average. Move the target further and you win less often but more per win; on random prices it cancels out every time. That is what having no edge looks like: any hit rate is available, but the average stays at zero, and costs then push it below.

What about gold?

What to measure instead

  • Average result per trade, in R, after costs. It's the one number that is zero on random prices whatever the target. Win rate and hit rate aren't.
  • A random baseline. Run the same rules on random prices. If a real-market number looks like the random one, it isn't telling you anything.
  • Out-of-sample trades only. Settings chosen on the same history they're judged on will look better than they are: see walk-forward testing.
  • Enough trades. A few dozen trades can show almost any average by luck. PipYard's release gate asks for at least 100 out-of-sample trades and an average above 0 R.

PipYard ranks test results by average R per trade for this reason. A strategy with a 40% win rate and an average of +0.2 R is doing better than one that wins 80% of the time at −0.05 R.

How this was run

The study uses FXEngine's own shock detection and failed-retrace code, unchanged, on generated prices. The script and its saved output are kept in PipYard's code repository, so the figures can be rerun. All results are before spreads, commission and slippage, which would lower every average above.