Low beta rotation
Rank by how little each stock moves with the market: its beta to the index over a window of daily changes. Hold the least sensitive tenth while it trends up, and let a stock go when it leaves the calmer half or its trend ends.
Strategies · low_beta_rotation.rvw
language 1
strategy "Low beta rotation" {
universe members("SYN500")
calm -beta(close, close("SYNSPY"), window)
trend close > sma(close, 200)
enter long when bucket(calm, 10) == 10 and trend
exit when bucket(calm, 10) <= 5 or not trend
rank by calm
size equal weight, max 20 positions
param window = 120 in 60..240 step 60
}
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?