Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Testing effectiveness of RSI

I'm newbie to Quantopian, and recently started learning. I would like to be able to test effectiveness of RSI indicator for a particular stock. I'm not quite sure how to structure an algo to test RSI effectiveness over a span of 5 years for a particular security.

My current idea, is to buy/sell $1000 on RSI indicator, and at the same time buying and selling a benchmark index. Then compare the performance to buying or selling a benchmark index, to measure RSI effectiveness.

Would appreciate any input as to examples to start from, or flaws with the approach describe above.

3 responses

Hello Roman,

As a start, you could use the built-in set_benchmark (https://www.quantopian.com/help#overview-setbenchmark) when you run the backtest, with the particular security as the benchmark. This should give you a sense if the RSI is adding any value, or if you'd be better off just buying the security and holding it.

Also, you could consider comparing a backtest with typical trading costs to one with zero costs (see https://www.quantopian.com/help#ide-commission). Your $1000 of capital won't support very frequent trading, even at $1 per trade.

Grant

Hello Grant,

Thanks for the feedback. Do you feel that commissions are relevant, as I'm not really testing RSI as a trading strategy, as opposed to just its effectiveness? I've been playing around with RSI and I'm considering also of filtering out, or better yet lowering all daily price swings larger than 10% or any price change that is more than 2 sigma of RSI, as that probably is driven either by an earning announcement, or another fundamental, that just blows out RSI. Thanks.

Roman

You might just turn off commissions:

set_commission(commission.PerShare(cost=0, min_trade_cost=None))

Grant