December 17, 2014

Day of month pattern or luck for a monthly ETF rotation strategy?

From my post on Heikin-Ashi Charts, another researcher wrote Luck: The Difference Between Hired or Fired about how luck of the draw could account for the difference in returns depending on the starting date. This is a completely valid question. Are three better returns for a strategy in a particular area of the month or is it random? I do believe that luck plays a large part in our trading results, which is a future blog post. But from previous work on 5 day holds, I know that the end of the month and beginning on the month tend to be better times for ETF mean reversion.

I have been investigating monthly ETF rotation strategies lately. This would be a good time to combine two projects. A simple monthly ETF rotation strategy and comparing the results to depending on what day of the month the rotation is done on. Would the end and beginning of the month advantage be true also for monthly holds?

ETF Universe

For the ETF universe we will use the Select Sector SPDR ETFs of XLE, XLU, XLK, XLB, XLP, XLY XLI, XLV and XLF. The ETFs IEF, TLT and SHY are added for our cash position when the markets go down.

Testing Timeframe

The tests are from 1/1/2005 to 10/31/2014.

Days Before The Beginning Of The Month

The first test will be the number of trading days before the beginning of the month. For this test, the value N is the number of trading days before the beginning of the month and this day is the setup day. If one wanted to have the setup day be the last trading day of the month with entry on the first trading day of the month, then N would be 1.

Rules

  • On the Nth trading day before the beginning of the next month.
  • Rank all ETFs by their 3 month returns from high to low. This is RankA.
  • Rank all ETFs by their 6 month returns from high to low. This is RankB.
  • Add RankA+RankC and then Rank again from low to high. This is RankC
  • Buy the top two ETFs in RankC. In case of ties, buy the ETF with the lowest 21-day historical volatility
  • Entry is at the next open.
  • Each month sell all ETFs and re-rank.

Results

141217A

Already we are seeing a pattern of higher returns when entering near the end of the month. The difference in CAR between the last day of the month and the 11 days before the beginning of the month is 36%. That is huge

 

Days After The Last Of The Month

The next test will be the number of trading days after the last day of the month. For this test, the value N is the number of trading days after the last day of the month and this day is the setup day. If one wanted to have the setup day be the first trading day of the month with entry on the second trading day of the month, then N would be 1.

Rules

  • On the Nth trading day after the last day of the previous month.
  • Rank all ETFs by their 3 month returns from high to low. This is RankA.
  • Rank all ETFs by their 6 month returns from high to low. This is RankB.
  • Add RankA+RankC and then Rank again from low to high. This is RankC
  • Buy the top two ETFs in RankC. In case of ties, buy the ETF with the lowest 21-day historical volatility
  • Entry is at the next open.
  • Each month sell all ETFs and re-rank.

Results

141217B

Again the results show a pattern of the trading near the beginning of the month producing better results. Not as strong but still there.

Closing Thoughts

Is it luck that is producing better returns trading at the beginning a month? Not likely. Looking at the yearly returns the same general pattern holds. This does show if you trade a rotational strategy it is important to test all the possible days of rotation to see if there is a pattern or maybe there is a large component of luck

This will be my last post of the year. Next post in mid-January. Have a good and safe Holidays.

Backtesting platform used: AmiBroker. Data provider:Norgate Data (referral link)

Good quant trading

Fill in the form to get the spreadsheet

For a spreadsheet with yearly returns and different number of positions, fill in the form below.

 
 

Click Here to Leave a Comment Below

Thomas Musselman - December 17, 2014 Reply

Connors touts a low HV10/HV100 ratio as good for shorterm holds (as long as other factors like low rsi2 etc are present).
In my testing I see no advantage to such ratio (I think he touts .3 or .5 as good).
Would love to see you report on that factor.

Cesar Alvarez - December 17, 2014 Reply

I have done very little work on the HV10/HV100 ratio. I will add it to my long list of possible research projects for a blog post.

Cesar

Randy T - December 17, 2014 Reply

Hi

After seeing this test, have you seen the paper SSRN id 2528692, which has the title of Dash for Cash: Month-End Liquidity Needs and the Predictability of Stock Returns.

It might have an affect on when you place the buy signal on the ETF rotation system.

Randy

    Cesar Alvarez - December 17, 2014 Reply

    I will have to take a look at that paper. Thanks for pointing it out.

    Cesar

Ryan - December 17, 2014 Reply

Have you looked at segmenting the data between day and night? I suspect that a lot of the gains are made during the overnight.

https://daxgaptrading.wordpress.com/

    Cesar Alvarez - December 18, 2014 Reply

    From previous research comparing day vs overnight, I would agree that a lot of gains are made overnight. I have not looked into this for several years though.

    Cesar

The Whole Street’s Daily Wrap for 12/17/2014 | The Whole Street - December 18, 2014 Reply

[…] Day of month pattern or luck for a monthly ETF rotation strategy? [Alvarez Quant Trading] From my post on Heikin-Ashi Charts, another researcher wrote Luck: The Difference Between Hired or Fired about how luck of the draw could account for the difference in returns depending on the starting date. Th… […]

Dave R - December 18, 2014 Reply

Is this pattern still as strong during the last five years of the test, relative to the first five years of the test?

Dave

    Cesar Alvarez - December 18, 2014 Reply

    I just ran the number from 2010, and the before the beginning of the month still holds. The after the end of the month looks pretty much random. If you get the spreadsheet you can look at the yarly returns.

    Cesar

Steve - January 12, 2015 Reply

Hello Cesar,

When does the strategy exit?
Thanks

Steve

    Cesar Alvarez - January 12, 2015 Reply

    Each month you exit all and then rerank.

Osamu - March 23, 2018 Reply

Cesar,

Love your posts and thank you for sharing. I’ve generally seen similar results for a similar strategy (different universe). The peak CAR I’ve seen happens at N=2.

A few questions/comments:
1) It may be interesting to see how this extends to setup days N = 0 thru -10. If for nothing else but to see how month-end liquidity effects impact strategy results.
2) The only numbers that are relevant to calculate Rank A/B are the first and last dates of the periods. It’s clear that the last date = setup date. What about the first date? Is it 63/126 days previous, or the same numerical day minus 3/6 months, or the corresponding setup date 3/6 months ago?

Thanks,
Osamu

    Cesar Alvarez - March 23, 2018 Reply

    For (1), I did that in “Days Before The Beginning Of The Month” section of the article.
    For (2), It is the setup day minus 63/126 days.

Leave a Reply: