VWAP Reversion Win-Rate Backtester
The VWAP Stretch Analyzer grades one session at a time. This tool grades your history instead. Paste open, high, low, close, volume bars, one session per block with a blank line between sessions, and it runs the same cumulative session VWAP and volume-weighted sigma bands the analyzer uses (Berkowitz, Logue and Noser, 1988), flags every fresh push past 1σ that isn't riding a trend day (Brian Shannon's flat-versus-sloping rule), and races each one toward the live VWAP over your look-ahead window. The result is a win rate per sigma band on your own bars, plus a call on the stretch sitting on the last bar right now.
One session per block. Leave a blank line between sessions so VWAP resets at the open of each one. 150 bars or more per session gives every band a fair sample.
No live signal
Paste bars and run it. The chart fills in with every stretch that crossed 1σ, graded against the bars that followed it.
How it backtests. Each session gets its own cumulative VWAP and volume-weighted sigma, run bar by bar from the top of that session only, the same way the Stretch Analyzer builds it: typical price is (high + low + close) / 3, VWAP is the running volume-weighted average of it, and sigma is the running volume-weighted standard deviation around that average. A bar counts as a fresh signal the moment its close first crosses 1σ from VWAP on either side, sorted into the analyzer's own break points: 1.0σ to 1.5σ, 1.5σ to 2.0σ, 2.0σ to 2.5σ, and 2.5σ or more. A bar still riding the same push past the same side doesn't count again. Trend-day bars are skipped using the analyzer's own rule: 1 VWAP cross or fewer in the last 20 bars with 75% or more of the session's closes on one side, or 0.8σ or more of VWAP drift over the last 10 bars.
Outcome races the live VWAP, not a frozen price, against a stop 0.5σ beyond the high or low of the 3 bars into the signal, the same buffer the analyzer plans against, over your look-ahead window (default 10 bars). Win: a close reaches VWAP first. Loss: the stop goes first. Chop: neither, inside the window. A band needs 5 or more decided instances before its win rate counts as a read; fewer shows as thin. Signals in the last few bars of a session that haven't had time to play out are dropped from the count, except one: if the final bar of your last session carries a fresh signal, that becomes the live read. Keyboard: Enter runs the backtest, 1 and 2 load the examples.
Educational tool only, not financial advice. A sigma band that has paid on your pasted history can still fail on the next push. VWAP is a moving target: size for the stop, not for the backtest.