Rearview Download

Monthly momentum with a buffer

Monthly momentum with a buffer: on the first trading day of each month, hold the eight strongest stocks by six-month momentum, each resized to an equal share of equity. A holding keeps its place while it still ranks in the top 15, so a name hovering around eighth isn't sold one month and bought back the next. Only one that slips below 15th makes room.

Strategies · rotation_with_buffer.rvw

language 1
strategy "Monthly momentum with a buffer" {
  universe   members("SYN500")
  mom        roc(close, lookback)
  enter long when mom > 0 and close > sma(close, 200)
  rank by    mom
  size       equal weight, max 8 positions
  rebalance  monthly, band 20%, keep top 15
  param      lookback = 126 in 63..252 step 63
}

Functions it uses

roc, sma

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?