Back to Community
G

G

1 response

Leverage is a hell of a drug.

Pretty much always make sure you're tracking it, with

record('Leverage', context.account.leverage)

As for the problem, looks like you're doing a ton of shorting. -shares means either you sell what you own, or you are willing to short. If you're not meaning to short, then maybe order_target instead. It just looks like you keep compounding that short over and over. You should have some sort of limit on that. Your buys would likely be the same story, you just are selling at the moment only.

Clone Algorithm
0
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: 559d39bd1ca8c0124d335ec9
There was a runtime error.