u/HonestBacktests

If your backtest uses swing highs and lows, check when you mark them

A swing low is not a swing low until some bars have closed after it. If your code marks it on the bar it forms, every entry that references that level has already seen the future.
Mine did exactly that. Two bars. The equity curve was something I wanted to frame. Moved the marking to the bar where the swing is actually confirmed and the same rules, same data, same costs went negative.
One line. If you have never checked yours, that is where I would look first.

reddit.com
u/HonestBacktests — 7 hours ago

I tested whether prior-day high/low actually matter: 31,466 coin-days. The effect is real, but it isn't direction.

TL;DR - this is a position-sizing rule, not an entry signal.

After price touches yesterday's high or low, the average move over the NEXT HOUR is 1.28%, against 0.85% from a random moment of the same day. Same coin, same day. That is 1.5x more range.

What to do with it:

  • a stop that normally survives will get taken out near these levels. Widen it by roughly 50%, or cut position size by a third to keep the same dollar risk
  • do not enter AT the level without confirmation. Direction there is a coin flip (44.6% vs 52.1% closing higher) while volatility is 1.5x - the worst combination there is
  • if you sell premium or fade extremes, this is where the range is, so price your risk accordingly

Direction itself is not tradable: the edge is about 0.17%, smaller than round-trip costs. Anyone selling "buy the bounce off yesterday's low" is selling a coin flip.

31,466 coin-days, 60 perps, 2 years. Method and full numbers below.


"Yesterday's high and low matter" is one of those claims everyone repeats and nobody measures. I kept seeing it argued from screenshots, so I ran it.
Setup: 60 Binance perpetuals, 5-minute bars, 2024-05 to 2026-05, 31,466 coin-days. For each day I take the prior day's high (PDH) and low (PDL) in UTC terms, find the first touch of each during the next day, and measure what price does over the following 1h and 4h, from the level.
The control matters more than the result. Days that reach yesterday's high are up days - comparing their forward returns against zero would just measure that day's drift. So for every touch I also draw a random bar on the same symbol on the same day and measure the same forward window from there. Everything below is touch vs random bar, same coin, same day.
HOW OFTEN PRICE EVEN GETS THERE
- touches the prior-day high: 44.5% of days
- touches the prior-day low: 48.2%
- touches both: 10.5%
- touches neither: 17.8%
AFTER THE FIRST TOUCH OF THE PRIOR-DAY HIGH (n = 13,987)
- 1 hour: median -0.12% from the touch, versus +0.05% from a random bar. 44.6% of cases end higher, versus 52.1% random.
- 4 hours: median -0.23% versus +0.17%. 44.3% end higher, versus 54.5% random.
AFTER THE FIRST TOUCH OF THE PRIOR-DAY LOW (n = 15,177)
- 1 hour: median +0.09% versus -0.07%. 52.9% end higher, versus 45.0% random.
- 4 hours: median +0.13% versus -0.24%. 52.3% end higher, versus 43.0% random.
So the levels do something, and it's the opposite of continuation. Relative to a random moment of the same day, price is weaker after tagging yesterday's high and stronger after tagging yesterday's low. Both sides agree, which is what you'd want to see before believing it.
The size is the problem. A tenth of a percent to a third is inside round-trip costs for most retail fee tiers, before slippage. As a standalone entry trigger this is not tradable, and I'd be suspicious of anyone selling it as one.
WHAT ISN'T SMALL
Average absolute move in the hour after a touch: 1.28%, versus 0.85% from a random bar on the same day. About 50% more range.
That's the part I'd actually use. Prior-day levels aren't a direction signal, they're a "the day decides something here" signal - useful for stop placement, for sizing, and for knowing when your low-volatility assumptions stop holding.
LIMITS, SO NOBODY OVER-READS THIS
Crypto perpetuals only, so treat equity/futures conclusions as unproven. 60 symbols taken alphabetically, not a random sample. First touch per day only, so repeated touches aren't counted. Returns are measured from the level, not from a realistic fill, so a live version would be worse, not better. And no costs are applied to the numbers above - they're raw measurements, which is exactly why the size matters.
Curious whether anyone here has run the same thing on equities or index futures with point-in-time data. My guess is the volatility effect survives and the direction effect doesn't, but that's a guess.

reddit.com
u/HonestBacktests — 14 days ago