Back

Example strategy broken out of box; UI non-responsive due to exception popups

Hi, I just signed up and decided to test the QCU Strategy Example: Complete Algorithm Framework. Unfortunately, I get several errors upon running the example code. The issue is that in the UpdateAssetProperties(string symbol, decimal close, decimal volume) method in the ModuleAssets class in ModuleAsset.cs, the _assets Dictionary does not always contain the given string symbol. So, upon backtesting, several exceptions get thrown.

Here's the stack trace:

at System.ThrowHelper.ThrowKeyNotFoundException () [0x00000] in :0
at System.Collections.Generic.Dictionary`2[System.String,QuantConnect.QCUQuantFramework+Asset].get_Item (System.String key) [0x00000] in :0
at QuantConnect.QCUQuantFramework+ModuleAssets.UpdateAssetProperties (System.String symbol, Decimal close, Decimal volume) [0x00000] in :0
at QuantConnect.QCUQuantFramework.OnEndOfDay (System.String symbol) [0x00000] in :0
at QuantConnect.Lean.Engine.RealTime.ScheduledEventFactory+<>c__DisplayClass19.b__17 (System.String name, DateTime triggerTime) [0x00000] in Lean.Engine.RealTime.ScheduledEventFactory+<>c__DisplayClass19.b__17 (System.String name, DateTime triggerTime) [0x00000] in :0


Unfortunately, the exceptions get thrown so quickly that the entire UI slows to a non-responsive crawl as well (probably due to all the notifications from the exception popping up). So there's two things to fix here, I guess. Is there any way you guys could fix the example by correctly populating the _assets Dictionary? And maybe fix the UI by limiting the number of popups due to exceptions?

I also have a couple unrelated questions that I'll sneak in here: Can I reference NuGet libraries in the Terminal? Also, can I write my strategies in Visual Studio and upload them? For example, if I download LEAN, and write my strategy with the full benefit of IntelliSense, ReSharper, etc. can I then upload the same files into my QuantConnect Terminal and run backtests?

Thanks!
Update Backtest








Hey Greg! Welcome to QuantConnect! Sorry about the bug. I'll fix the university project today,

> You can't reference NuGet libraries but let me know what they are and we'll add them to the supported list.
> You can write in Visual Studio and copy-paste across (lean.quantconnect.com). Its drop in compatible.
0

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.


Hi Jared, thanks for the speedy response. Sorry mine took so long! Thanks also for quickly fixing the QCU strategy. I've never experienced such fast and effective support, and from the CEO no less.

As for NuGet libraries, would it be possible to add Accord.NET and/or Encog? Encog would probably be easier, as it's just one NuGet package, located here: https://www.nuget.org/packages/encog-dotnet-core/. Accord is unfortunately split into several NuGet packages; you can see them all here: https://www.nuget.org/packages?q=accord.net.

I know both of those probably have limited appeal, so let me also suggest one that would be more widely used by QuantConnect users: Math.Net Numerics. It's incredibly useful for any quantitative analysis, and its NuGet package is located here: https://www.nuget.org/packages/MathNet.Numerics/.

I also have a final question that might seem a little odd. I know you're running a for-profit business, but given that you offer free backtesting (even on tick data!) and an awesome platform, support the open-source community, and have excellent support, I'd love to donate to your cause. Is this possible? I'm only a college student, but I really believe in what you guys are doing.
0

Hey @Greg! Accord.Net and Math.Net are already white listed libraries :) I'll look into Encog this week!

Thank you for the offer to donate! We really appreciate the support. There's no donate mechanism currently but you could support the project by subscribing to a plan, opening an account at Tradier (using code Quant1) or if using paypal you can send a one off payment using the button below :)

0

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.


Update Backtest





0

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.


Loading...

This discussion is closed