Documentation says “UniverseSettings.Asynchronous = true;” may boost backtest performance. I guess since that is not the default option - this setting has a drawbacks or requires some special handling.
When to use “async = true” and when not? What are the pros and cons?
Mia Alissi
To help 'Evgeni' understand the use of the
asynchronous=True
setting in universe selection within QuantConnect, here are the pros and cons, as well as guidelines on when to use it:Pros of Asynchronous Execution:
Cons and Considerations:
False
, enabling it requires careful consideration of your algorithm’s logic, ensuring it does not rely on sequential data processing affected by asynchronous execution.When to Use:
False
.Overall,
asynchronous=True
can be a powerful tool for improving algorithm performance but comes with the trade-off of increased complexity and potential for unexpected behavior if not used carefully. Evaluate your algorithm's specific needs and the nature of its operations before deciding to utilize asynchronous execution.Sources: Universe Settings - QuantConnect.com, Settings - QuantConnect.com, Key Concepts - QuantConnect.com, Alpaca - QuantConnect.com, Asynchronous Universe Regression Algorithm
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.
Evgeni Aizikovich
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!