Hello Everyone,
Can we get the same insight data output in Lean that we can when we backtest in QuantConnect IDE? I'm referring to what's in insights.json. By default, it doesn't appear to be generated by Lean, and I haven't found an option to get it yet.
If Lean won't auto-generate the same array of insight objects that QC IDE does, am I correct in that we would need to re-create it ourselves by using the Insight() class @
QuantConnect.Algorithm.Framework.Alphas.Insight()
It appears to have the properties that would allow us to recreate the insight objects.
Jasper van Merle
Hi Jose,
The file you are looking for is called alpha-results.json locally. You can find it in the backtest results directory in a subdirectory called "main" (if your algorithm is in a Python file called main.py) or "MyAlgorithm" (if your algorithm is in a C# class called MyAlgorithm). See this picture for an example if you're using the Lean CLI. Note that this file is only generated if your algorithm emits any insights.
Jose Torres
Oh wow. I'm an idiot. Thanks Jasper! I see the file.
Jose Torres
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!