I would like to backtest a stock portfolio that has the top 10% performers in an index measured by ROC. The portfolio is rebalances every month. Are there any examples that show how this can be setup?
Size:
Color:
Of course. Take
Weak-stock rotation, for example. You have to make just a slight change to the code to invert it from rotating into the weakest stocks to rotating into the top performers:
CODE:
Please log in to see this code.
Change the number of stocks to rotate into via the param slider at the bottom.
More strategies of the same kind,
Fidelity Select Sector Fund Rotation System and
Tactical Asset Rotation, are already set to use the highest ROC or an average of ROC (different periods) for rotation.
P.S. You might also want to see the Wiki
FAQ | Strategies and WealthScript > "Rotation strategies" > "I need other rotation rule other than the built-in RSI."
Size:
Color: