The internal bar strength or (IBS) is an oscillating indicator which measures the relative position of the close price with respect to the low to high range for the same period.
The calculation for Internal Bar Strength is as follows…
IBS = (Close – Low) / (High – Low) * 100;
For example, on 13/01/2016 the QQQ etf had a high price of $106.23, a low price of $101.74 and a close price of $101.90.
The value of IBS would be calculated as …
(101.90 – 101.74) / (106.23 – 101.74) * 100 = 3.56
Low IBS readings show that a market has closed near the lows of the day, high IBS readings show that a market has closed near the highs of the day.
The following image shows the IBS indicator plotted beneath the price series.
The test period is between 01/01/2005 and today. $100,000 hypothetical starting balance, with 100% of available equity invested per position. Commissions are $0.01 per share and there is a minimum cost per trade of $1.00.
Tests are carried out using Amibroker and the data is provided by Norgate Premium.
These are the Strategy rules:
The monthly breakdown of returns is as follows…
One common trait among many of these types of mean-reversion systems is that they seem to perform best during volatile markets.
To illustrate the point, I added a filter to the above strategy which only allows us to buy QQQ if the VIX has closed above the value of it’s previous 10-day MA.
Adding the VIX filter improved the win-rate %, average profit % per trade, and annual % return of the strategy.
Here are the results…
The Equity curve and monthly breakdown of returns are as follows…
Finally, I wanted to see whether combining a trend-following strategy with the Internal Bar Strategy could improve the risk-adjusted returns of either stand-alone strategy.
The trend following strategy is as follows…
Since 2005, this strategy has the following performance metrics:
The Equity Curve and monthly breakdown of returns are as follows…
For the Final test, QQQ is traded using the Internal Bar Strength (IBS) strategy and SPY is traded using the above trend-following (TF) strategy.
The first test will allocate 70% of available equity to the SPY strategy and 30% of available equity to the QQQ strategy. Further tests will use different capital allocations.
Because the SPY can sometimes be held for a long period, it is necessary to periodically rebalance the size of open SPY positions. For the following tests the rebalance frequency will be monthly and the rebalance threshold will be 2%.
The above results illustrate that combining both a trend-following strategy and a mean-reversion strategy within your portfolio has been a useful method for improving risk-adjusted returns.
For context, the IBS strategy when traded alone produced a maximum draw-down of 14.83% and a CAR/MDD of 0.86.
The Trend-following strategy produced a maximum draw-down of 14.17% and a CAR/MDD of 0.52.
The combined strategy portfolio with a 30% TF and 70% IBS allocation produced a maximum draw-down of 10.87% and a CAR/MDD of 1.02. This is superior to either strategy if traded alone.
The equity curve and monthly breakdown of returns for the 30% TF / 70% IBS portfolio are as follows…
*Update: As some readers have correctly pointed out, trading on the close when an indicator requires the closing price to be calculated is not necessarily straight forward. With that said, I have included further tests below whereby the trades are executed on the open of the day which follows the signal.
The IBS strategy does not perform as well, but the main point of the article (that combining mean-reversion with trend-following can be beneficial) is still valid.
The equity curve and monthly breakdown of returns for the 70% IBS / 30% TF portfolio are as follows…
— By Llewelyn of Backtest Wizard
Llewelyn is the best-selling author of “The Honest Guide To Stock Trading” and “The Honest Guide To Candlestick Patterns”. His web site, www.backtestwizard.com, provides trading articles and programming lessons for Amibroker users.