Back to Community
RSI AND OPEN Algo[250% Return in one year]

I am new to Quantopian, this is my first published backtest, any type of criticism is welcome.

Clone Algorithm
19
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 591125428e8ff361d1e77220
There was a runtime error.
3 responses

Be cautious of your leverage (ie your borrowing). I typically always record the leverage and make sure (at least in initial testing) that it never goes above one. You should always be able to adjust it later for higher returns if desired. Add a line like this in a scheduled function

   record(leverage=context.account.leverage)

Attached is your algo with this added. Note your leverage varies from 1.6 to over 7. Not really viable in live trading. The Q contest requires a max leverage of 3.

Clone Algorithm
13
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5911f56f41816f651996ed1f
There was a runtime error.

Thank you so much I was havong trouble with that.

Margin is illusory profit. Apportion the ordering, this keeps maximum intraday (all time) leverage just below 1.

            order_target_percent(stock, 1.0 / len(context.stocks))