Monthly momentum rotation
Monthly momentum rotation: hold the strongest names by six-month momentum measured on month-end bars, and rotate out when a name loses its rank or turns negative.
Strategies · momentum_rotation.rvw
language 1
strategy "Monthly momentum rotation" {
universe members("SYN500")
mom monthly(roc(close, top_months))
strong mom > 0 and rank_pct(mom) >= 70
enter long when strong
rank by mom
size equal weight, max 8 positions
exit when mom < 0 or rank_pct(mom) < 40
fill next_open
param top_months = 6 in 3..9 step 3
}
Functions it uses
Try it
File ▸ New Script from Example adds it to a project. The examples read the sample’s index label, SYN500, and market ETF, SYNSPY; when your data has neither, a sheet asks what to read instead, one of your index labels (or every stock and ETF) and a ticker, so the example runs on your data as it is.
Before you trust what it does on your data, see whether it’s luck: Is this result luck?