Hello all,
I created an alpha model to trade $O. When I add more securities to the universe, I get different results, even if I'm not trading those added securities yet. Below I'll attach two backtests, one with just $O in the universe, and then one with $O and some other securities. Those extra securities aren't being traded, but the backtest results are still different.
I.e.
self.AddUniverseSelection(ManualUniverseSelectionModel([O])) \\ vs
self.AddUniverseSelection(ManualUniverseSelectionModel([AMT, CCI, EQIX, DLR, O]))
In below examples, the difference in net profit is around ~2%, but in other backtests the difference has exceeded 15%.
Why does this occur? Is this an issue with LEAN or my implementation? Thanks.
AK M
Above was the backtest with only $O. Below is a backtest with other securities.
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.
Cole S
Hi AK,
I haven't had time to dig into it yet, but I did verify different results on backtests. This is interesting. I'll try to take a deeper look in the next day or two.
-Cole
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.
AK M
Thanks Cole, appreciate it.
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.
AK M
Gotcha, that makes sense. I guess the assets in my other strategies were liquid enough where this issue didn't occur. Glad to hear it's an issue with my code instead of with LEAN!
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!