The Internal Bar Strength Indicator

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.

Internal Bar Strength Indicator

Testing the Internal Bar Strength Indicator

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:

  • If IBS < 10
  • Buy the close
  • Exit at close if price > previous day high.

QQQ Results

  • No. of trades = 199
  • % of Winners  = 72.36%
  • Average P/L% per trade = 0.62%
  • Average hold time = 4 days
  • Annualised return = 11.32%
  • Maximum drawdown = -16.14%
  • CAR/MDD = 0.70
  • Exposure = 28.47%

The monthly breakdown of returns is as follows…

Internal Bar Strength QQQ Performance

One common trait among many of these type 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…

  • No. of trades = 158
  • % of Winners  = 75.32%
  • Average P/L% per trade = 0.85%
  • Average hold time = 4 days
  • Annualised return = 12.46%
  • Maximum drawdown = -14.83%
  • CAR/MDD = 0.84
  • Exposure = 22.3%

The Equity curve and monthly breakdown of returns are as follows…

Internal Bar Strength and VIX

Combining the Internal Bar Strength Strategy with a Trend-Following Strategy

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…

  • Buy the SPY when the Close > upper Bollinger Band (C,200,1);
  • Sell the SPY when the Close < lower Bollinger Band (C,200,1);

Since 2005, this strategy has the following performance metrics:

  • No. of trades = 5
  • % of Winners  = 80%
  • Average P/L% per trade = 19.17%
  • Average hold time = 425 days
  • Annualised return = 7.37%
  • Maximum drawdown = -14.17%
  • CAR/MDD = 0.52
  • Exposure = 76.25%

The Equity Curve and monthly breakdown of returns are as follows…

SPY trend-Following

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%.

70%TF / 30%IBS. Results

  • No. of trades = 163
  • % of Winners  = 75.46%
  • Average P/L% per trade = 1.39%
  • Average hold time = 18 days
  • Annualised return = 9.01%
  • Maximum drawdown = -11.45%
  • CAR/MDD = 0.86
  • Exposure = 60.23%

60%TF / 40%IBS. Results

  • Annualised return = 9.53%
  • Maximum drawdown = -11.09%
  • CAR/MDD = 0.86
  • Exposure = 54.76%

50%TF / 50%IBS. Results

  • Annualised return = 10.04%
  • Maximum drawdown = -10.98%
  • CAR/MDD = 0.91
  • Exposure = 49.35%

40%TF / 60%IBS. Results

  • Annualised return = 10.55%
  • Maximum drawdown = -10.93%
  • CAR/MDD = 0.97
  • Exposure = 43.95%

30%TF / 70%IBS. Results

  • Annualised return = 11.05%
  • Maximum drawdown = -10.87%
  • CAR/MDD = 1.02
  • Exposure = 38.51%

The above results illustrate that combing 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…

 

Combining trend-folloiwng with Mean-Reversion

 *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.

QQQ Results (Enter on open of day which follows signal)

  • No. of trades = 197
  • % of Winners  = 70.05%
  • Average P/L% per trade = 0.49%
  • Average hold time = 4 days
  • Annualised return = 8.69%
  • Maximum drawdown = -15.99%
  • CAR/MDD = 0.54
  • Exposure = 22.04%

QQQ Results with Vix Filter (Enter on open of day which follows signal)

  • No. of trades = 157
  • % of Winners  = 73.89%
  • Average P/L% per trade = 0.64%
  • Average hold time = 4 days
  • Annualised return = 9.15%
  • Maximum drawdown = -16.10%
  • CAR/MDD = 0.57
  • Exposure = 17.26%

SPY Trend-Following Results  (Enter on open of day which follows signal)

  • No. of trades = 5
  • % of Winners  = 80%
  • Average P/L% per trade = 18.87%
  • Average hold time = 425 days
  • Annualised return = 7.24%
  • Maximum drawdown = -14.15%
  • CAR/MDD = 0.51
  • Exposure = 76.06%

Combined Portfolio (70%IBS / 30%TF)  (Enter on open of day which follows signal)

  • No. of trades = 162
  • % of Winners  = 74.07%
  • Average P/L% per trade = 1.19%
  • Average hold time = 17 days
  • Annualised return = 9.90%
  • Maximum drawdown = -11.47%
  • CAR/MDD = 0.86
  • Exposure = 35.47%

The equity curve and monthly breakdown of returns for the 70% IBS / 30% TF portfolio are as follows…

Combining trend-folloiwng with Mean-Reversion

7 Comments

  • David

    Reply Reply January 28, 2016

    You can’t use the close for IBS calculation and then trade it. Must specify that you are using 3:59:59 for calculation and sending order with latency < 1 sec at market (then discuss obvious short-comings and slippage of such).

    Nonetheless, very cool information.

    • Llewelyn

      Reply Reply January 28, 2016

      Hi David, Thanks for your comment. My initial intention when writing the article was to consider how the strategy had performed since it was widely written about in 2012. Please see here…http://qusma.com/2012/11/06/closing-price-in-relation-to-the-days-range-and-equity-index-mean-reversion/

      I therefore kept the same entry on close logic. As it turned out, I ended up wanting the article to be more about the benefit of combining mean-reversion systems with trend-following systems.

      Regardless, I have updated the article to include results if trading the system on next day open following a signal.

      All the best,

      Llewelyn

  • matt haines

    Reply Reply January 28, 2016

    Hi Llewelyn! It’s funny, I have these same indicator in my arsenal (although with a less-snappy name than you). However I never found a way to make it useful. So this is very interesting. Will have to give it a test. Have you tried it on different indexes to see if it’s something about QQQ’s ‘flavor’ of there’s a wider usefulness?

    Also, just for clarity, you’re buying at the close of the same day as the signal, so you’re not looking at an indicator after the fact. Instead, you’re calculating where the close must be within a few minutes of the closing bell, and buying if it’s under the threshold. Right?

    And the equity curve you show is not compounded?

    Thanks! Hope you’re doing well.

    • Llewelyn

      Reply Reply January 28, 2016

      Hi Matt,

      I’m doing great thanks. I hope you are too.

      To clarify, The Internal Bar Strength Indicator has been around for a long-time. I provided one example of an article which was published in 2012 in my previous comment. It’s actually just a 1 period stochastic oscillator so it’s really been around for decades!

      I’ve updated the article to include the results of trading on the next day open which follows a signal.

      The equity curve is compounded. I wouldn’t use compounding normally, but the purpose of the article wasn’t to test something I’d want to trade but rather to illustrate that combining strategies can be beneficial.

      All the best,

      Llewelyn

      • Matt haines

        Reply Reply January 28, 2016

        I’m sure I heard about it from you then!

        And yes you CAN trade at the close in some cases. It would be possible with this particular system but the results become ‘fuzzy’. Most days you’ll be sure your close is near the low or not, when you’re a few minutes before the bell. It’s only those days when it’s near the threshold that you’ll have to make a guess. But if the system is robust, a slight variation in threshold shouldn’t matter.

  • john

    Reply Reply January 28, 2016

    So you are only in one trade at the time. So if you are not in the spy trade you can trade the question correct?

    Regards

    • Llewelyn

      Reply Reply January 28, 2016

      Hi John,

      Both etfs can be held simultaneously.

Leave A Response

* Denotes Required Field