Hi,
I ran my algorithm live today for the first time and it behaved very differently from backtesting. In fact, I backtested the algorithm for just today and it produced much different results than what happened live. Anybody know of reasons why the same code produces different results in backtesting vs live trading?
Ivan Baev
Overfitting? Data snooping bias?
Sameer Abdul
Just let my algorithm run another day and it seems even the balances in Alpaca and QuantConnect are different now. According to QuantConnect, I have a return of 3.41% with a portfolio value of $10,341.37. According to Alpaca, my initial $10,000 account has now reduced to $9,914.35. Not sure what's going on anymore. I am going to let it run through this week to see if QuantConnect values diverge further from the Alpaca account.
Sameer Abdul
Hi Ivan. I suspected data snooping but I don't think I have that issue. My algo just uses simple MAs from History().
Ivan Baev
So, you are running quantconnect paper trading and Alpaca paper trade simultaneously but getting different results? Am I correct?
Jared Broad
The Alpaca API, unfortunately, does not return accurate values. It is pending an investigation and fix.Â
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Sameer Abdul
Thanks for the reply Jared. Any idea when this issue will be resolved?
Ivan, I am running Alpaca paper trading live on Quantconnect. According to QuantConnect my portfolio value is $13,604.78. However according to Alpaca, it is $10,036.19.
Jared Broad
Thanks Sameer, please subscribe to this GitHub issue for updates.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Sameer Abdul
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!