Can someone help me with the correct use of insights and the proper placement of EmitInsights? I've attached a working algorithm, but I'm still learning Python and apparently the algo is not emitting insights properly. Insights are listed in the Update() method and EmitInsights is called before placing trades (at least I thought it was). Perhaps it's more of a fundamental issue with the structure of my algorithm(?).
I'm getting the following response as part of the reason my algorithms are getting rejected:
"Additionally, all Alpha submissions need to emit Insights prior to placing trades. Insights provide funds with valuable information about the predictive power of your model. You can find more information about Insights in our documentation sections."
I've scoured the documentation and posts, but am unable to resolve this. If someone could post a properly-configured version of this algo it would be greatly appreciated.
Thanks,
Troy
Alexandre Catarino
Hi Troy B ,
When we use Algorithm Framework, the insights are emitted by the AlphaModel.Update method as it returns a list of Insight.
When we are Classic Algorithm, the insights can be emitted by QCAlgorithm.EmitInsights method. We should not call algorithm.EmitInsights from AlphaModel.Update method. We can use EmitInsights from other models or from the main class, but it breaks the separation of concerns philosophy we want to see in the Algorithm Framework.
Zach Oakes
Alexandre,
I'm trying to 'update' my strategy to utilize Insights, and was going to simply replace SetHoldings with self.EmitInsight(Insight.Price(symbol, timedelta(1), InsightDirection.Up)) or whatever -- but I see drastically different performance ? How can I include insights (for charting and logging), while keeping the SetHoldings performance?
Zach
Shile Wen
Hi Zach,
Please attach or include links to both algorithms to help us identify the cause of the difference in performance. For now, some ideas for the difference in performance are:
Best,
Shile Wen
Zach Oakes
Shile,
I changed the timedelta to basically infinite, so it is held until it is liquidated -- and got some similar performance.
Troy B
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!