Hello,
Is there a library available in QuantConnect that will allow me to receive emails? I'd like to accept emails with a certain subject and use them as a kill switch to liquidate all held positions and quit the algorithm. Is this possible? Any advice for how such a kill switch that liquidates everything and quits the algorithm could be accomplished otherwise?
Aaron Janeiro Stone
You can probably implement this using
Louis Szeto
Hi Matthew and Aaron
Thank you for your reply Aaron. Indeed, we provide a built-in function for email, SMS and webhook notification. Please check this doc for details.
Based on the description, we suggest using the in-built self.Quit() method to stop the algorithm:
Please make sure all other activities in the algorithm only run if stopping_condition is False, as well as uncheck the box for auto-restart before deploy.
Best
Louis Szeto
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.
Marc Daoust
Matthew et al;
If my understanding is correct, using the data store, which is shared across all your algos, could be used to store your kill switch value.
It could be manually set from 0 t o 1 in dev, or by running a simple backtest algo (in dev or live), which would set it faster.
It doesn't fit your email requirement, but allows for an “external” kill switch.
Not sure if an external data source (Dropbox or Google Sheets) works in Live. If so, that would be another technique.
Let me know what you think - good, bad?
Marc
Matthew Kobrick
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!