Hi all,
I am very new to LEAN and quantconnect.com itself. I have read up through the documentation and I was wondering what mechanism would be best suited to implement an circuit breaker / emergency button for a local LEAN server. That is, is there a way to inject external signals into LEAN to make it liquidate all positions in case of an "emergency" that is not detected by the algorithm. For example, implement a light-weight REST API on a webserver that runs locally in a docker, and that can signal LEAN whenever a specific POST is made to that REST API. Or, can that be done by implementing a light-weight webserver in C# that is compiled with LEAN, and that can set some global/strategy variable that is picked up by the algorithm ?
Derek Melchin
Hi Karel,
The only way to inject external signals into LEAN is to set up a custom data source. When the algorithm receives data from the external data source, we can instruct the algorithm to Liquidate and halt trading.
Best,
Derek Melchin
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.
Karel Goderis
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!