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? :-)

Clone Algorithm
14
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: 59e875ae2ca0ec46054fb1fc
There was a runtime error.
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.