Back

Live trading vs backtesting gives different results

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?

Update Backtest







0

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.


Overfitting? Data snooping bias?

0

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.

0

Hi Ivan. I suspected data snooping but I don't think I have that issue. My algo just uses simple MAs from History().

0

So, you are running quantconnect paper trading and Alpaca paper trade simultaneously but getting different results? Am I correct?

0

The Alpaca API, unfortunately, does not return accurate values. It is pending an investigation and fix. 

0

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.


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.

0

Thanks Sameer, please subscribe to this GitHub issue for updates.

0

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.


Update Backtest





0

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.


Loading...

This discussion is closed