Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Momentum Trading Extremely Volatile

Hi,

I'm new to trading and I'm trying to create some very basic algorithms using my intuition. I've tried to code a basic momentum trading algorithm but it seems to be too volatile and gives obviously unrealistically high returns. Can anyone suggest what might be the reason?

1 response

unrealistic leverage - at one point up to 863 ... re-run by adding code below in handle_date and you will see how high the leverage is:
record (leverage=context.account.leverage)

take a look at https://www.quantopian.com/posts/quantopian-open-example-algorithm-to-control-leverage#55ed46fa50071cee15000218