Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
I'm new to Quantopian, Algorithm over leveraging?

Hello,

I am new to Quantopian and wrote a small olmar algorithm as my first. However, after a few months in backtesting the algorithm seems to leverage itself to crazy heights. Like over 90!

I do not understand how this happens when at each trading event the algorithm buys with 50% of the portfolio value and sells with 50%. It seems like there is some positive feedback loop. How does the leverage then go to such crazy amounts?

I would appreciate any help.

Thank you,
Evan

1 response

Couple of lines added to check for open orders. Read about that with this search and then there is more to do with leverage still beyond 6.