trying to implement the Hi-Lo method - what's wrong

You need a sell rule as well. My series formula is a bit different, but your formula also works with a trigger value of 4.7%. With daily rebalancing and no trading costs the performance is shown in the picture and is the same as for my model.


And here is a nice performance of the healthcare ETFs. Uses FXH and prior to FXH inception uses XLV. When not in the healthcare ETFs it switches to IEF. Return is 15% with max drawdown of -12%. Anybody should be happy with this performance seeing there were only 45 trades over the last 15.7 years.


Thanks George, very nice and simple system.
But I still cannot get P123 to go back beyond 2011 with the custom series, I wonder why. With my series P123 reverts the start date back to 2011 whenever I try entering an earlier date. Do you have your series set to 1999 and P123 accepts that, else how do you get the backtest to go all the way to 1999?

Sell rule: Since your article suggests simply using a fixed threshold, then a P123 Screen should do it, Screens have an implicit sell and just rescreen every week. Of course a sim has more options and require explicit rules but I am not there yet, I just want to see the general response curve.

Best… Z.

Your buy rule is wrong. I am using your custom series with trigger value= 5%.
Here is my screen with transaction costs set to zero and weekly rebalance. Return is the same as for the sim.


Hi George,
Nop, my result from 2011 and onwards are pretty much identical, pixel for pixel on the image, to the image you posted so the buy rule is probably correct. You can try it by copying and pasting the images (with some scaling) into a good pixel editor. The problem has to be related to P123 not providing access to data prior to 2011 for whatever reason, maybe something wrong with my use of custom series, or maybe an account setting or another error. Perhaps Marc Gerstein or Marco can offer an answer here.

BTW to everyone who is following this interesting take on timing: Changing the custom series to SP1500 and using EMA (with some adjustments) seem to be even better, but they are all good. Indeed this indicator, which can be called “general stock market mood” is a powerful one. It makes sense that a breakdown will be proceeded by an extended deterioration of the general mood. That doesn’t cover all possible instances of a breakdown but it is useful nevertheless. Nice work.

Best… Z.

o.k. I have to contribute something here.
Use this buy rule:
ticker(“spy”) and Eval(SMA(40,0,GetSeries(“Hi_Lo_3m”))> 5 ,1,na)

Thanks George, but the buy rule above is functionally identical to the screen I posted at the start of this thread. It (naturally) also produces the exact same result to the last digit. The problem must be in the series, hopefully Marco or one of his team mates can shed some light on why I am only getting a series that starts in 2011, not before. Maybe I am doing something wrong, or maybe because I have one of the old gold accounts, it may have some inherent limitation, or a bug …

Still, your timer is simple and powerful, thanks for that idea. And even if there is an account problem to some users, that only limits past back-testing. We have a signal since 2011 and moving forward the indicator can be used regardless of such limitation.

Cheers,
Z.

Hi Georg,

in the below screen capture is my XLV-IEF sim on the left compared to the one on the website to the right. As you can see, my performance and winner rate is lower than the one published on the website.

In my sim I used 0.1% slippage, 5% trigger, minimum two weeks holding (nobars>10) and next open price, and my last trigger occured on 20 April 2015.

My questions:

  1. Why is my performance so much lower?
  2. How do you replace XLV with FXH? I used the following buy rules, but the sim only picks up XLV…
    Rule 1: Ticker(“FXH,XLV,IEF”)
    Rule 2: Eval(SMA(40,0,getseries(“SP5003moHL”))>0.05, Eval(Ticker(“FXH”),Ticker(“FHX”),Ticker(“XLV”)), Ticker(“IEF”))
  3. This high-low timing strategy did not work well for 1999. How robust do you think it is for the future?

Best regards,
Florian


Z. - Does your P123 membership allow you to backtest to 1999? If so you should be able to get the same results in the screener as I did. If not, then this is something for the P123 team to sort out for you.

Florian,
I used average of high and low as the transaction price.
The series starts in Jan-2-1999, but I am not sure that P123 has data from Oct-1-1998 available to calculate the 3-mo series. Also the 40-day moving average is equivalent to an 8-week average. Therefore the earliest date that you can have reliable data is from June 1999 onward. Actually it performed o.k. during those early years as one can see from the screen shot.


Thanks Georg, my mistake!

Do you perhaps know an answer to my questions 1 and 2? Changing next open price to next avg of high & low does not affect the performance…

Interesting timer but it seems very sensitive to the SMA setting. As an exercise, I ran my version through the rolling test. With a one year holding period and weekly offsets, I get mostly 0% excess returns. Can anyone confirm?

Walter


George, yes I run all my backtests from 1999, no problems. Still, this custom series only starts from 2011 and would revert the start date to 2011 whenever I enter an earlier date. Accordingly the screen or sim using it doesn’t buy before 2011 (+SMA period). Maybe a bug with P123 for some accounts. I am sure other users have the same problem. Looking for feedback from Marco about that.
Z.

Walter, your rolling test is correct, but one would not sit about 50% of the time in cash but invest it. You got to pair this timer with an ETF.

Hi Georg,

The results are a bit better with the IEF/SPY pair and a fixed slippage of 0.25. But most of the excess returns are still around 0%. The biggest differences now is that there is a +ve skew to the excess return distribution. However, even that goes away if I run with variable slippage. I’ll play with it some more later tonight. Thanks!

Walter

Walter, even if the Hi-Lo Index model SPY-Cash has no excess return over buy&hold SPY it is still beneficial when paired with an ETF because one would avoid major drawdowns that way. I found that trigger values from 3.5 to 6% all provided higher returns. So the model is really quite robust. I think slippage of 0.25% is too high for ETFs. I used the minimum that P123 allows for ETFs, 0.1%.

Hi George, everybody,
The time limit problem with my account solved itself and I was able to investigate this timer a bit more. Bottom line is that it is a useful tool but no panacea (nothing is, as we all should know).

Its useful in the sense that you get to see long trend of sentiment deterioration in the market which usually proceeds sudden breakdowns. You see that especially well if you examine the custom series and use an SMA (or EMA) to filter out its trend. For example in case of a sudden bull market drop like what we experienced in the past 2 weeks, the negative sentiment trend should have been telling to be on the watch. Whether to reduce long positions, increase hedge or any other means it provided a useful signal for traders to consider. But keep in mind that it will often be a false positive signal, getting you out and making you miss a rally. That is why the overall 15 years return for SPY long only screen is merely ~6% annually and you miss many of the rallies.

Also important to note that this deterioration signal is far less useful in bear markets where the sentiment is already sour. For example consider the 2000 – 2003 period outlined in my screenshot below. The indicator simply vacillates around zero, it has no trend. So while the 5% threshold does produce some overall positive, there is no magic or special value in that threshold. I don’t think that any experienced trader could look at this chart and at the green SMA40 line and deduce anything useful by whether the green line is above or below any specific threshold. So where does the 5% threshold come from? Like many derived thresholds, it simply happened to produce better result during the entire test case. Call it curve-fitting or call it something else, I don’t believe one can assign too much lasting predictive power to it.

Bottom line: the indicator should be consider as another tool in our chest, a useful one but not more. Don’t build too much into the fact that a threshold value generated a nice overall curve in the past. Next crash may prove to have required different threshold(s) . But if you have several useful indicators to consider whether to be or not in the market – this one can add to the picture. Best thing to do is to look at it manually, not rely blindly on the specific threshold number that happened to do better than others couple of times before.

Please look at my two screenshots below and make your own conclusions.

Just my two cents.
Thanks, Z.



Z., a good summary. i agree with what you said. I use this timer in a combination of timers precisely for the reasons you mention. No timer is perfect on its own, if it was we would all be very rich. One can see the the combo timer is now only 23% invested in the stock market.



Hi Georg, Yes the Max DD under the rolling simulation run looks very good. Thanks for your help.

Here is an interesting backtest using the Hi-Lo Index (Date range: 1/1/2005 to 9/30/2015):
http://alvarezquanttrading.com/2015/11/11/hi-lo-index-as-a-market-timing-indicator/

He wanted to know how well would it work on a S&P500 mean reversion strategy.
All rules are listed for his model.

He shows an annualized return of 13% with a max D/D of -17% and a market exposure of only 52%. Also the average % profit/loss took a big jump up when compared to a SMA200 timing strategy, and the average of the 5 worst drawdowns, dropped dramatically. From 16.30 to 12.20, or about 25%.