Back

Running Research environment on desktop

When running a Deep Reinforcement Learning algorithm on the research environment, the kernel constantly dies after some episodes using the attached notebook (or see my github):

https://github.com/localhorst87/trading_rl.git

My guess was that it's most likely a memory issue, so I tried to run it offline, using the LEAN engine.

I followed all required installation steps. Importing everythin works well, but trying to call the QuantBook there's the following error:

Exception Traceback (most recent call last)
<ipython-input-1-928c9a85d91c> in <module>
19
20 # Create an instance
---> 21 qb = QuantBook()
22
23 # Select asset data

Exception: QuantBook.Main(): System.ArgumentException: Unable to locate any exports matching the requested typeName: QuantConnect.Lean.Engine.Results.BacktestingResultHandler
Parametername: typeName
bei QuantConnect.Util.Composer.GetExportedValueByTypeName[T](String typeName) in C:\Users\Maurizio\Documents\Programming\python\finance\Lean\Common\Util\Composer.cs:Zeile 205.
bei QuantConnect.Lean.Engine.LeanEngineAlgorithmHandlers.FromConfiguration(Composer composer) in C:\Users\Maurizio\Documents\Programming\python\finance\Lean\Engine\LeanEngineAlgorithmHandlers.cs:Zeile 171.
bei QuantConnect.Jupyter.QuantBook..ctor() in C:\Users\Maurizio\Documents\Programming\python\finance\Lean\Jupyter\QuantBook.cs:Zeile 68.
bei QuantConnect.Jupyter.QuantBook..ctor() in C:\Users\Maurizio\Documents\Programming\python\finance\Lean\Jupyter\QuantBook.cs:Zeile 101.

There's another user with the problem, but the issue remained unresolved until now...See the last answer of the following thread:

https://www.quantconnect.com/forum/discussion/2847/running-a-local-research-environment/p1

Did anybody had the same issue?

Thanks, Maurizio 

 

I'm using Windows 10, Python 3.6

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.


Hi Maurizio,

Here is a solution that might help your problem:

1. In config.json under Lean/Launcher folder, uncomment line

"composer-dll-directory": ".",


2. rebuild the whole solution

If you still encounter this problem or have other issues, feel free to follow up!

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.


hey Liang,

first of all thank you for your response.

I made some progress and now my notebook runs offline! I made the dumb mistake to start the notebook from the wrong directory. not from the launcher folder...

In addition: To request history data I had to adjust the commands to request history data. Same for indicators.

# not working:
price = qb.History("EURUSD", 100, Resolution.Hour)

# working:
price = qb.History( qb.Symbol("EURUSD"), 100, Nullable[Resolution](Resolution.Hour) )

 

0

Regarding the other issue that the kernel dies: I could find out that the qb.Indicator - method massively slows down when calling repeatedly. Can you help out?

0

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