I did some backtesting a few days ago for a period from 2015/1 to 2020/4, and I got result A.
And now I did exactly the same backtesting, the result is quite different from result A.
Did Quantconnect make some changes to its price data in the database recently? Besides, there have been some inconsistency between Live & backtesting results when Universal Selection is used, is it a known problem?
Jared Broad
Hey JL! Yes, we deployed L1 quote data on Monday so backtests are filled with their actual spread.Â
There have been no changes in universe selection - please post a support ticket with the live deployment attached so we can dig into it. I have a hunch it might be caused by us using a fail-over universe provider for live trading when the primary providers have a delay. When the primary provider has a delay the options are "don't emit universe selection" or "make our best guess". We've swapped providers now (with the launch of L1) and things should be more stable going forward.
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.
JL Lord
Hi Jared BroadÂ
It's great to see you introduce L1 quote data to make back testing more accurate. Thanks for the effort and improvement.
However, I am experiencing some inconsistency between backtesting & my own result after L1 was rolled out.
Even if I changed to use Limit order, I still get different results because some of the trades would not be triggered by the platform in back testing while they would have in Live.
Therefore, is it possible to introduce a flag to make the back testing to execute Market order at the price specified? In this way, I can get a good look at an algorithm to see if it has created an edge without considering slippage. I then can improve the execution part of code to reduce slippage effect. Otherwise, the result now is quite confusing and I need to make a lot of effort to sort it out if it's the algorithm's problem or slippage's when a lot of intraday trades are made.
Thanks.
Jared Broad
Hi JL; we cannot change the market order to fill at a given price -- but you can achieve practically the same goal if you read up on the slippage models. With these models, you can control the fill price of the order, and even introduce a positive slippage to fill at the midpoint of the bid and ask.Â
Check out this example of setting all three models we have in LEAN; and the documentation for explanations of why and how it works.
https://github.com/QuantConnect/Lean/blob/master/Algorithm.CSharp/CustomModelsAlgorithm.csÂ
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.
JL Lord
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!