Sector Rotation ... an explanation

Recently I got eMail from zestril with questions about the significance of the Factor and how to select the "best" Factor ... and I wrote back, like so:

When I first wrote the tutorial
sector-rotation.htm
I was interested in how rapidly the Weighted Moving Average changed.

If the time period was T, the Rate of Change would be:
[WMA(N+T) - WMA(N) ] / T.

For the Rate of Change over a *single* period, T = 1, and we'd have:
[WMA(N+1) - WMA(N) ] / 1 = WMA(N+1) - WMA(N)

(Dividing by WMA(N) would give the PERCENTAGE change, not the RATE of change.)

In the tutorial, the ROC turned out to be (and this surprised me!)

[1]       WMA(N+1) - WMA(N) = (2/N) { p(N+1) - [ p(1)+p(2)+...+p(N+1) }

That is: **proportional** to the deviation of the current price from the ordinary Moving Average:
p(N+1) - [ p(1)+p(2)+...+p(N+1) ]

It's this deviation which I called gMA.

I wanted to avoid switching too often, hence the restriction:
"... switch to another sector only if the gMA of that other sector is greater than our Favorite gMA by at least some Factor"

When I started playing with this switching strategy, I thought I'd switch if the gMA was, say, 20% greater,
so Factor = 1.20 (See the PS below!)

Kevin was the first to put in a Factor corresponding to 2000% !!

What I forgot about was that the Rate of Change is not EQUAL to gMA, it's only **proportional** to gMA.
It's smaller, because of that (2/N) out front, in [1].

Hence the need to increase the size of the Factor (thereby increasing the "effective" gMA) so as to get something more like the actual Rate of Change.

As to what is the "best" choice of Factor? I have no idea !!
One would have to see what worked best in the past ... and pray it works best in the future.
For this, you can borrow
this

Cheers,
Peter

PS.
One more thingy: It's silly to compare the gMA of one sector with prices near $100 with the gMA of a sector with prices near $1, so, in the spreadsheet, every price is "normalized" by dividing by its starting price. That is, all prices start off being equal to $1.00 which means we're using the CUMULATIVE GAIN to represent the sector price.

That means that gMA is the DEVIATION of the cumulative gain from its average cumulative gain.

Hence gMA(Favourite) = 0.01 really means the cumulative gain for that sector is greater than its average cumulative gain by 0.01 or 1%.

(If the time periods are measured in weeks, that's a cumulative gain over N weeks. If it's in months, it's the cumulative gain over N months.)

Suppose gMA(Favourite) = 0.01 and Factor = 21. To switch, we look for a sector whose cumulative gain DEVIATION is greater than 21 (0.01) = 0.21 and that means a sector whose cumulative gain exceeds its moving average cumulative gain by 0.21 or 21%.

Remember:
gMA(Favourite) = 0.01 means our Favourite sector had a cumulative gain which exceeds its average cumulative gain by 1%.

If the sector with the largest gMA = 0.21, this sector has a cumulative gain which exceeds its average cumulative gain by 21%.

That's 20% more than the cumulative gain DEVIATION of our Favourite sector.

Remember how I originally wanted to switch if I found a sector with a gMA 20% more than my Favourite sector? Now we got it ... and it needed a Factor of 21, eh?

Mamma mia!