Rotation based on return in 2 time frames + volatility (a la ETFReplay)
Author: iwally
Creation Date: 7/12/2012 10:40 AM
profile picture

iwally

#1
Hi,
Has anyone done a strategy similar to that used by etfreplay.com .. which is, I suppose, not too uncommon? I'd like to replicate it in wealthlab.

That strategy is: rotate through top x symbols, say 3, with weighted rankings of total return in two time frames plus volatility in it's own time frame. Repeat monthly or semi-monthly.
e.g.
Var TimeFrame Weighting
RetA 3 mos 40
RetB 20 days 30
Vol 20 days 30

If not, which would be the closest existing public rotation strategy to start working from?

I am looking at FSFRotation which, of course, has a rotation but thought I'd check to see if I'm not reinventing the wheel.
Also - does use of Yahoo data include dividends?

thanks
profile picture

Eugene

#2
Hi,

Assuming Daily time frame,

* RetA is ROC.Series(Close,90)
* RetB is ROC.Series(Close,20)
* Vol is ATR.Series(Bars,20) (or Volatility; the choice is up to you)

Now if you take the canned "RSI Rotation" Strategy and massage it according to the FAQ (Strategies and WealthScript > I need other rotation rule other than the built-in RSI), it might come down to something like this:

CODE:
Please log in to see this code.
profile picture

iwally

#3
Hi,
Thanks for you help!
profile picture

Sammy_G

#4
- Its silly to use ATR for volatility since, everything else being equal, it will vary directly with the price of the underlying i.e. a higher priced security will have a higher ATR; use Std Deviation of prices instead to normalize it across securities (or use ATRP)
- If memory serves me right, the author gives a higher rating to a security with a lower volatility, so you have to use the inverse of the volatility (Std Dev) to compute the score
profile picture

Eugene

#5
Stumbled onto this old thread. So after incorporating Sammy_G's suggestion the resulting code line becomes:
CODE:
Please log in to see this code.

Or this if ATRP is replaced with the inverse of StdDev:
CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).