Since trading is all about having a statistical edge (well, if you wanna make a living at it)...

How about we use an indicator with deeper insight than averages?

It’s called the Bollinger Band, and it’s what we’re testing today.


What the Heck Is a Bollinger Band?

Without getting all mathy on you (the formula is gnarly), imagine slicing up a regular bell curve in sections.

The middle section (first standard deviation) has about 68% of the data.

A broader chunk (2 standard deviations, which includes the first) has about 95%.

And the widest chunk (3 standard deviations, including the first 2) has 99.7%

Whenever price pierces one of the bands, we look to take a trade. We’ll test this in 3 ways, which we’ll dig into after laying out our basic setup…


The Trading Truth Test Setup

  • Market: the S&P 500 index (using SPY to trade it, assuming SPY is exactly 1/10th the S&P 500 Index price)

  • Timeframe: Jan 2, 2008 to March 28, 2023

  • Bar interval: 1 hour

  • Moving averages: 50 bars (simple moving averages, meaning every bar gets equal weight, unlike with exponential)

  • Starting Equity: $25,000

  • Max % of Equity Per Trade: 3%

  • Commissions, fees and taxes. To keep things super simple, we’re assuming these are all zero.



Our 3 Tests

Test A:

Any time a high pierces the upper band 2 standard deviations away, go short (if we’re not already in a trade).

Any time a low pierces the upper band 2 standard deviations below, go long (if we’re not already in a trade).

Take profits and losses 2 average true ranges (ATRs) away from the previous close.

Test B:

The same as Test A, except we’ll use 3 standard deviations, instead of 2.

Test C:

Any time a high pierces the 3-standard-deviations upper band, exit a long position and go short.

Any time a low pierces the 3-standard-deviations lower band, exit a short position and go long.

We’re not using ATRs to take profits and losses on this one.


The Test Results

Test A ended down at $20,810.61, down 16.8%. From equity high to equity low, this strategy had a 19.0% drawdown.

Test B ended with $22,818.73. So, we lost 8.7%, with a 9.2% peak-to-trough drawdown. Waiting for price to pierce 3 standard deviations helped reduce our loss.

Test C ended with $25,127.75, a 0.5% gain, with a 15.1% equity high-to-low drawdown.

But but but… buy and hold once again came out the winner by far, up 173.1%.

Note: I did this analysis in a spreadsheet, with exported TradingView data. If you see any errors, please let me know.


What Test Tweaks We Could Make

For Tests A and B, I’d be curious to test waiting for at least a 1-bar price reversal after a Bollinger Band is pierced.

That way, we’d have some momentum back in the trade direction before jumping in.

Test C seems to show this, since we only exit trades when a band gets pierced going in the opposite direction. Still, the results are basically breakeven, so some other rule(s) may help there.

What would you test? And what else would you like to see tested?

Comment below!
backtestbacktestingbollingerbandstrategybollingersbandMoving Averagestesting

يعمل أيضًا:

إخلاء المسؤولية