Hello! I'm working on an algorithm to trade based on the Larry Connors RSI strategy. Based on the research I've read, this strategy should perform very well, and yet my results are lackluster. I'm hoping it's a typo or small problem with my code. I'm least confident about the compute_target_weights function.
Entry signal:
Price > SMA(200)
RSI(2) <= 5
Exit signal:
Price > SMA(5)
Notes:
1. Connors suggests rebalancing at market close, but I'm unable to figure out how to calculate RSI at market close using Pipeline, so instead I have the algorithm rebalancing every day at market open.
2. Eventually I want to run this strategy long/short, but I want to make sure it's working properly long-only to start.
3. The backtest runs really slow! Is there some obvious optimization or refactor I can do to speed it up?