Using the "Halloween effect" to choose witch sectors to pick stocks from..

There appear to be several very convincing research on the effect of remaining in the defensive (may-oct) and cyclical (nov-apr) sectors:

Then I checked through what I could discover of publicly available codes here in the Screen or Rankingsystems, but I couldn’t locate any that expressly do this:

  • For the months of May through October, only invest in companies in defensive sectors.

-From November to April, only choose stocks from cyclical sectors.

Is there anyone who has had experience trading such a system, or who can provide some of their own code for how such an approach would look in a screen or in a Ranking system?


I created a public ETF screen called ‘october Effect’. The screen has only one rule: EVAL(Between(Month,5,10),ticker(“XLP,XLV”),ticker(“XLY,XLB,XLI,XLK”)).
[url=https://www.portfolio123.com/app/screen/summary/265351?mt=9]https://www.portfolio123.com/app/screen/summary/265351?mt=9[/url]

I thought it best to use sector ETFs since we know they are a good representation of these sectors. The results of this test will determine if switching sectors in those periods does produce additional returns vs the index. If we picked individual stocks to represent each sector, then that introduces noise into the results since the results of the stock selection method is another variable. If this initial test shows this system to be promising, then you could work on the more complicated system which picks individual stocks in each sector.

Run the screen backtest weekly. It wont switch the holdings exactly on the first of the month, but I thought it was close enough for the purpose of exploring the idea. Also, it will rebalance weekly which may effect performance.

[Buy1] EVAL(portbars<10,TICKER(“XLY,XLI,XLB,XLK”) ,(TICKER(“XLP,XLV”) & (Mod(Month,12)=4 & MonthDay>=22 & MonthDay<=30) | TICKER(“XLY,XLI,XLB,XLK”) & (Mod(Month,12)=10 & MonthDay>=23 & MonthDay<=31)))

[Sell1] TICKER(“XLP,XLV”)&(Mod(Month,12)=10 & MonthDay>=23 & MonthDay<=31)
[Sell2] TICKER(“XLY,XLI,XLB,XLK”)&(Mod(Month,12)=4 & MonthDay>=22 & MonthDay<=30)

Must start beginning of a year.


Thank you both for providing me with a little more to work with in order to test out the idea.

It does not appear to outperform SPY in the last ten years, but it did so in the last twenty. I’m not sure if this means the seasonal effect is no longer working, or just that SPY has done so well since 2009 that nearly no seasonal approach trumps buy and hold.

Georg, does the one you ran in the simulator use weekly rebalancing? What would the outcome look like without weekly rebalancing?

Also did some extra testing, it seems to bee some strong seasonality in energy and IT.


You have to use weekly reconstitution (not necessarily rebalancing weekly) because you need to catch the dates specified in the buy and sell rules.

Thank you, Georg. This means that rebalancing every week yields a lower return (11.61 percent), even after I remove slippage, compared to your simulation, which yields 12.61 percent without rebalancing.


[quote]
Thank you, Georg. This means that rebalancing every week yields a lower return (11.61 percent), even after I remove slippage, compared to your simulation, which yields 12.61 percent without rebalancing.
[/quote]That is because you are using different rules and 3 positions in the screener. I used variable slippage in the sim.

Yes, you are correct in terms of the number of ETFs. Attached is the strategy from the screen, using the same six ETF`s as in your screen.

What is the distinction between the rules? , aside from the fact that I notice you selling your positions between the 22 (23) -30 (31) date range and then not rebalance every week.

Then I had a follow-up question: how can this be fitted into a ranking system?

Assume that you will give a stock more weight if it is in the defensive sector from May to October, and that you will give a stock more weight if it is in the cyclical sector from November to April.


Seasonal factors are no longer working for me.

Im getting this error in the buy rule? But I can’t see what it is?

If you did a copy/paste of Geov’s code in this thread, then the issue is probably that you need to manually replace the quote symbols. I did that and mine runs now.

EVAL(portbars<10,TICKER("XLY,XLI,XLB,XLK") ,(TICKER("XLP,XLV") & (Mod(Month,12)=4 & MonthDay>=22 & MonthDay<=30) | TICKER("XLY,XLI,XLB,XLK") & (Mod(Month,12)=10 & MonthDay>=23 & MonthDay<=31)))

Thank you! Now it works :wink:

Here are the results of my test:

EVAL(portbars<10,TICKER(“XLY,XLB,XLI,xle”) ,(TICKER(“XLP,XLV,xlu,xlk”) & (Mod(Month,12)=4 & MonthDay>=22 & MonthDay<=30) | TICKER(“XLY,XLB,XLI,xle”) & (Mod(Month,12)=10 & MonthDay>=23 & MonthDay<=31)))

Sell9 TICKER(“XLP,XLV,xlu,xlk”)&(Mod(Month,12)=10 & MonthDay>=22 & MonthDay<=31)

Sell10 TICKER(“XLY,XLB,XLI,xle”)&(Mod(Month,12)=4 & MonthDay>=23 & MonthDay<=30)

I think it’s doing OK, but I also think is overoptimized with the pick of sell and buy days and the tickers that is chosen.