I made a C# version of the G Score Factor Investing example, but it is flatlining. I am running it mainly in the web IDE because I don't have real equity data when running locally, except the few days of sample data. I converted it to C# partly so it might run faster, but mainly so I can understand what the Python version is doing.
See this for the Python version that works.
My diagnosis thus far, when I run my C# locally in Lean CLI mode I see it finding AAPL and IBM
20201119 07:12:31.296 Trace:: Debug: Fine count: 0
20201119 07:12:32.054 Trace:: Debug: Fine count: 5
Fine security: AAPL; 536.72
Fine security: IBM; 192.71
20201119 07:12:32.117 Trace:: Debug: Fine count: 0
However when I run the same code in the web IDE it finds no equities, "Fine count: 0"
11 | 10:14:31:
Launching analysis for 1dba00651430656b724a8e96ebab8b74 with LEAN Engine v2.4.0.0.9832
12 | 10:14:32:
Fine count: 0
13 | 10:15:27:
Algorithm (1dba00651430656b724a8e96ebab8b74) Completed.
If I solve it I'll post the answer here, otherwise any tips would be very helpful.
Kevin Baker
Found a blunder in my use of C# Queue. Passing in a capacity to the constructor does nothing to change the functionality. It's only for performance. So had to add code to Dequeue any excess data out of the back end of the queue if desired capacity had been exceeded.
On a B micro with 8GB of RAM it runs within 10 minutes.
Jared Broad
Nice work Kevin
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.
Kevin Baker
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!