Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Sliding Linear Regression based Momentum Strategy

I have tried using OLS on 90 days of historical data to predict the price of the stock 30 days in the future and use that as a guide to buy/sell stocks at the start of day. Why am I receiving insanely high returns? :-)

2 responses

Hi Harish, i just did a quick run with your code over the 8 year period from Sept 2009 to Sept 2017 and, while the returns look more-than-astronomical, I did note that the drawdown is > 300% !!! I'm not even sure how to interpret DD > 100% because (thankfully) I've never experienced that. However perhaps you could seek some advice from Mr. Kamal Prasad (and/or offer your algo to him), as I understand he is something of an expert on astronomically high returns. Cheers ;-)) TonyM.

add the line:

record(leverage=context.account.leverage)

You reach a 484.0 leverage.