Hey Team,
I am trying to implement a custom fill model with universe selection and I am unable to get any Debug lines to print, meaning my custom model did not trigger. I am following these two examples:
https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/CustomPartialFillModelAlgorithm.py
https://github.com/QuantConnect/Lean/blob/ea65c61dc8911222c251243cd9e02fb92976539d/Algorithm.Python/CustomModelsAlgorithm.py
In these examples they add the fill model right after using :
self.AddEquity("SPY", Resolution.Hour)
After searching online I understood I should use `SetSecurityInitializer` however, this hasn't worked for me.
What am I doing wrong?
Thanks,
Ido
MaloKingi
I'm looking for something similar, anyone with insights on this ?
Varad Kabade
Hi Ido Elmaliah,
We ran the above algorithm with and without the custom fill model we found the difference in trades and other algorithm statistics. This confirms the fill model being used, and the Debugger does not show any message because of too many debug lines being generated so the following line appears in the console:
Your algorithm messaging has been rate-limited to prevent browser flooding.
We recommend using an indicator constructor to initialize the indicator and using a consolidator to update them to remove the subscription when they are removed from the universe. In the original algorithm, even after using the del command on the SymbolData object, the indicators keep receiving data resulting in a slower backtest. Refer to the following thread for more information.
Best,
Varad Kabade
Ido Elmaliah
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!