Pullback while uncorrelated
Buy a short-term dip only in a stock that has been moving on its own: its daily changes over the last 60 days correlate weakly with the market's, so a market-wide sell-off is unlikely to be the reason for the dip. Sell when the dip has mended, or after ten days.
Strategies · uncorrelated_pullback.rvw
language 1
strategy "Pullback while uncorrelated" {
universe members("SYN500")
filter adv(20) > $500000
indep correl(close, close("SYNSPY"), 60) < ceiling
enter long when indep and close > sma(close, 200) and rsi(close, 3) < 15
rank by -rsi(close, 3)
size 5% of equity, max 15 positions
exit when rsi(close, 3) > 60
max bars 10
param ceiling = 0.5 in 0.3..0.7 step 0.2
}
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?