Coder Social home page Coder Social logo

quantconnect / lean-cli Goto Github PK

View Code? Open in Web Editor NEW
191.0 16.0 101.0 2.56 MB

CLI for running the LEAN engine locally and in the cloud

Home Page: https://www.lean.io/cli

License: Apache License 2.0

Python 100.00%
cli cloud-backtesting cloud-optimization quantconnect lean-data

lean-cli's People

Contributors

alexcatarino avatar c-sellers avatar derekmelchin avatar gaviles avatar ivanrdgc avatar jakethesnake3p0 avatar jaredbroad avatar jhonabreul avatar jmerle avatar louisszeto avatar marinovsky avatar martin-molinero avatar movy avatar plazadeloslagartos avatar rjra2611 avatar romazes avatar wayneadams avatar willforan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lean-cli's Issues

LEAN CLI's Demo "My Project" Makes 0 Trades?

Confused as to why changing the date range of the "My Project" code LEAN CLI gives 0 trades. My code is identical to the LEAN CLI demo except for a different date range and warm up.

from AlgorithmImports import *


class MyProject(QCAlgorithm):
    def Initialize(self):
        self.SetStartDate(2020, 1, 7)  # Set Start Date
        self.SetEndDate(2020, 10, 11)  # Set End Date
        self.SetCash(100000)  # Set Strategy Cash
        self.AddEquity("SPY", Resolution.Minute)
        self.SetWarmUp(360, Resolution.Daily)
    def OnData(self, slice):
        """OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
            Arguments:
                data: Slice object keyed by symbol containing the stock data
        """
        if self.IsWarmingUp:
            return
        
        if not slice.ContainsKey("SPY"):
            return
        
        if not self.Portfolio.Invested:
            self.SetHoldings("SPY", 1)
            self.Debug("Purchased Stock")

Running the code prints:

$ lean backtest "My Project"

20211105 12:46:58.362 TRACE:: Config.Get(): Configuration key
not found. Key: plugin-directory - Using default value:
20211105 12:46:58.375 TRACE:: Composer(): Loading Assemblies from 
/Lean/Launcher/bin/Debug
20211105 12:46:58.476 TRACE:: Python for .NET Assembly: 
Python.Runtime, Version=2.0.10.0, Culture=neutral, 
PublicKeyToken=5000fea6cba702dd
20211105 12:46:58.559 TRACE:: Config.Get(): Configuration key not 
found. Key: data-directory - Using default value: ../../../Data/
20211105 12:46:58.566 TRACE:: Config.Get(): Configuration key not 
found. Key: version-id - Using default value:
20211105 12:46:58.567 TRACE:: Config.Get(): Configuration key not 
found. Key: cache-location - Using default value: /Lean/Data
20211105 12:46:58.569 TRACE:: Engine.Main(): LEAN ALGORITHMIC 
TRADING ENGINE v2.5.0.0 Mode: DEBUG (64bit) Host: d-macbookpro
20211105 12:46:58.578 TRACE:: Engine.Main(): Started 12:46 PM
20211105 12:46:58.583 TRACE:: Config.Get(): Configuration key not 
found. Key: lean-manager-type - Using default value: 
LocalLeanManager
20211105 12:46:58.610 TRACE:: JobQueue.NextJob(): Selected 
/LeanCLI/main.py
20211105 12:46:58.710 TRACE:: Config.GetValue(): 
scheduled-event-leaky-bucket-capacity - Using default value: 120
20211105 12:46:58.711 TRACE:: Config.GetValue(): 
scheduled-event-leaky-bucket-time-interval-minutes - Using default 
value: 1440
20211105 12:46:58.712 TRACE:: Config.GetValue(): 
scheduled-event-leaky-bucket-refill-amount - Using default value: 18
20211105 12:46:58.716 TRACE:: Config.Get(): Configuration key not 
found. Key: job-organization-id - Using default value:
20211105 12:46:58.718 TRACE:: Config.Get(): Configuration key not 
found. Key: data-permission-manager - Using default value: 
DataPermissionManager
20211105 12:46:58.733 TRACE:: AlgorithmManager.CreateTokenBucket(): 
Initializing LeakyBucket: Capacity: 120 RefillAmount: 18 
TimeInterval: 1440
20211105 12:46:58.736 TRACE:: Config.GetValue(): 
algorithm-manager-time-loop-maximum - Using default value: 20
20211105 12:46:58.755 TRACE:: 
TextSubscriptionDataSourceReader.SetCacheSize(): Setting cache size 
to 71582788 items
20211105 12:46:59.094 TRACE:: Config.GetValue(): 
algorithm-creation-timeout - Using default value: 90
20211105 12:46:59.100 TRACE:: PythonInitializer.Initialize(): 
start...
PythonEngine.Initialize(): Runtime.Initialize()...
Runtime.Initialize(): Py_Initialize...
Runtime.Initialize(): PyEval_InitThreads...
Runtime.Initialize(): Initialize types...
Runtime.Initialize(): Initialize types end.
Runtime.Initialize(): AssemblyManager.Initialize()...
Runtime.Initialize(): AssemblyManager.UpdatePath()...
PythonEngine.Initialize(): GetCLRModule()...
PythonEngine.Initialize(): clr GetManifestResourceStream...
20211105 12:47:00.137 TRACE:: PythonInitializer.Initialize(): ended
20211105 12:47:00.143 TRACE:: AlgorithmPythonWrapper(): Python 
version 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:25:33)
[GCC 7.3.0]: Importing python module main
20211105 12:47:02.757 TRACE:: AlgorithmPythonWrapper(): main 
successfully imported.
20211105 12:47:02.768 TRACE:: AlgorithmPythonWrapper(): Creating 
IAlgorithm instance.
20211105 12:47:02.778 TRACE:: Config.GetValue(): 
api-data-update-period - Using default value: 1
20211105 12:47:02.933 TRACE:: Config.GetValue(): 
mute-python-library-logging - Using default value: True
20211105 12:47:02.966 TRACE:: LocalObjectStore.Initialize(): Storage
Root: /Storage/QCAlgorithm. StorageFileCount 100. StorageLimitMB 5
20211105 12:47:02.986 TRACE:: BacktestingSetupHandler.Setup(): 
Setting up job: Plan: Free, UID: 79669, PID: 949503058, Version: 
2.5.0.0, Source: WebIDE
20211105 12:47:02.993 TRACE:: Config.Get(): Configuration key not 
found. Key: security-data-feeds - Using default value:
20211105 12:47:03.170 TRACE:: 
BaseSetupHandler.SetupCurrencyConversions():
Symbol      Quantity    Conversion = Value in USD
USD: $      100000.00 @       1.00 = $100000.0
-------------------------------------------------
CashBook Total Value:                $100000.0

20211105 12:47:03.177 TRACE:: SetUp Backtesting: User: 79669 
ProjectId: 949503058 AlgoId: 1958612602
20211105 12:47:03.179 TRACE:: Dates: Start: 01/07/2020 End: 
10/11/2020 Cash: ¤100,000.00
20211105 12:47:03.182 TRACE:: BacktestingResultHandler(): Sample 
Period Set: 100.44
20211105 12:47:03.184 TRACE:: Time.TradeableDates(): Security Count:
1
20211105 12:47:03.188 TRACE:: Config.GetValue(): 
forward-console-messages - Using default value: True
20211105 12:47:03.191 TRACE:: JOB HANDLERS:
20211105 12:47:03.192 TRACE::          DataFeed:     
QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed
20211105 12:47:03.193 TRACE::          Setup:        
QuantConnect.Lean.Engine.Setup.ConsoleSetupHandler
20211105 12:47:03.196 TRACE::          RealTime:     
QuantConnect.Lean.Engine.RealTime.BacktestingRealTimeHandler
20211105 12:47:03.197 TRACE::          Results:      
QuantConnect.Lean.Engine.Results.BacktestingResultHandler
20211105 12:47:03.198 TRACE::          Transactions: QuantConnect.Le
an.Engine.TransactionHandlers.BacktestingTransactionHandler
20211105 12:47:03.199 TRACE::          Alpha:        
QuantConnect.Lean.Engine.Alphas.DefaultAlphaHandler
20211105 12:47:03.200 TRACE::          ObjectStore:  
QuantConnect.Lean.Engine.Storage.LocalObjectStore
20211105 12:47:03.201 TRACE::          History Provider:     QuantCo
nnect.Lean.Engine.HistoricalData.SubscriptionDataReaderHistoryProvid
er
20211105 12:47:03.225 TRACE:: Debug: Launching analysis for 
1958612602 with LEAN Engine v2.5.0.0
20211105 12:47:03.237 TRACE:: Event Name "Daily Sampling", scheduled
to run at 1/7/2020 5:00:00 AM (UTC)...
20211105 12:47:03.237 TRACE:: AlgorithmManager.Run(): Begin 
DataStream - Start: 1/7/2020 12:00:00 AM Stop: 10/11/2020 11:59:59 
PM
20211105 12:47:03.259 TRACE:: AlgorithmManager.Stream(): 
WarmupHistoryRequest: SPY: Start: 8/1/2018 4:00:00 AM End: 1/7/2020 
5:00:00 AM Resolution: Daily
20211105 12:47:03.299 TRACE:: Config.GetValue(): 
data-feed-max-work-weight - Using default value: 400
20211105 12:47:03.300 TRACE:: Config.GetValue(): 
data-feed-workers-count - Using default value: 4
20211105 12:47:03.302 TRACE:: WeightedWorkScheduler(): will use 4 
workers and MaxWorkWeight is 400
20211105 12:47:03.325 TRACE:: Config.GetValue(): 
show-missing-data-logs - Using default value: False
20211105 12:47:03.628 TRACE:: AlgorithmManager.Stream(): Finished 
warmup
20211105 12:47:03.628 TRACE:: Debug: Algorithm warming up...
20211105 12:47:03.914 TRACE:: 
UniverseSelection.AddPendingInternalDataFeeds(): Adding internal 
benchmark data feed SPY,SPY,Hour,TradeBar,Trade,Adjusted,Internal
20211105 12:47:04.083 TRACE:: Debug: Algorithm finished warming up.
20211105 12:47:04.185 TRACE:: Debug: Purchased Stock
20211105 12:47:04.202 TRACE:: Synchronizer.GetEnumerator(): Exited 
thread.
20211105 12:47:04.203 TRACE:: AlgorithmManager.Run(): Firing On End 
Of Algorithm...
20211105 12:47:04.207 TRACE:: Engine.Run(): Exiting Algorithm 
Manager
20211105 12:47:04.211 TRACE:: FileSystemDataFeed.Exit(): Start. 
Setting cancellation token...
20211105 12:47:04.216 TRACE:: FileSystemDataFeed.Exit(): Exit 
Finished.
20211105 12:47:04.218 TRACE:: DefaultAlphaHandler.Exit(): Exiting...
20211105 12:47:04.226 TRACE:: DefaultAlphaHandler.Exit(): Ended
20211105 12:47:04.227 TRACE:: BacktestingResultHandler.Exit(): 
starting...
20211105 12:47:04.228 TRACE:: BacktestingResultHandler.Exit(): 
Saving logs...
20211105 12:47:04.236 TRACE:: Debug: Algorithm Id:(1958612602) 
completed in 1.01 seconds at 2k data points per second. Processing 
total of 2,082 data points.
20211105 12:47:04.236 TRACE:: StopSafely(): waiting for 'Result 
Thread' thread to stop...
20211105 12:47:04.236 TRACE:: Debug: Your log was successfully 
created and can be retrieved from: /Results/1958612602-log.txt
20211105 12:47:04.237 TRACE:: BacktestingResultHandler.Run(): Ending
Thread...
20211105 12:47:04.487 TRACE:: Config.GetValue(): 
regression-update-statistics - Using default value: False
20211105 12:47:04.490 TRACE::
STATISTICS:: Total Trades 0
STATISTICS:: Average Win 0%
STATISTICS:: Average Loss 0%
STATISTICS:: Compounding Annual Return 0%
STATISTICS:: Drawdown 0%
STATISTICS:: Expectancy 0
STATISTICS:: Net Profit 0%
STATISTICS:: Sharpe Ratio 0
STATISTICS:: Probabilistic Sharpe Ratio 0%
STATISTICS:: Loss Rate 0%
STATISTICS:: Win Rate 0%
STATISTICS:: Profit-Loss Ratio 0
STATISTICS:: Alpha 0
STATISTICS:: Beta 0
STATISTICS:: Annual Standard Deviation 0
STATISTICS:: Annual Variance 0
STATISTICS:: Information Ratio -0.42
STATISTICS:: Tracking Error 0.312
STATISTICS:: Treynor Ratio 0
STATISTICS:: Total Fees $0.00
STATISTICS:: Estimated Strategy Capacity $0
STATISTICS:: Lowest Capacity Asset
STATISTICS:: Fitness Score 0
STATISTICS:: Kelly Criterion Estimate 0
STATISTICS:: Kelly Criterion Probability Value 0
STATISTICS:: Sortino Ratio 79228162514264337593543950335
STATISTICS:: Return Over Maximum Drawdown 
79228162514264337593543950335
STATISTICS:: Portfolio Turnover 0
STATISTICS:: Total Insights Generated 0
STATISTICS:: Total Insights Closed 0
STATISTICS:: Total Insights Analysis Completed 0
STATISTICS:: Long Insight Count 0
STATISTICS:: Short Insight Count 0
STATISTICS:: Long/Short Ratio 100%
STATISTICS:: Estimated Monthly Alpha Value $0
STATISTICS:: Total Accumulated Estimated Alpha Value $0
STATISTICS:: Mean Population Estimated Insight Value $0
STATISTICS:: Mean Population Direction 0%
STATISTICS:: Mean Population Magnitude 0%
STATISTICS:: Rolling Averaged Population Direction 0%
STATISTICS:: Rolling Averaged Population Magnitude 0%
STATISTICS:: OrderListHash b7c0987ac8efab0b63bbb8254a8b28c5
20211105 12:47:04.492 TRACE:: 
BacktestingResultHandler.SendAnalysisResult(): Processed final 
packet
20211105 12:47:04.494 TRACE:: Engine.Run(): Disconnecting from 
brokerage...
20211105 12:47:04.496 TRACE:: Engine.Run(): Disposing of setup 
handler...
20211105 12:47:04.498 TRACE:: Engine.Main(): Analysis Completed and 
Results Posted.
Engine.Main(): Analysis Complete.
20211105 12:47:04.501 TRACE:: Engine.Main(): Packet removed from 
queue: 1958612602
20211105 12:47:04.502 TRACE:: LeanEngineSystemHandlers.Dispose(): 
start...
20211105 12:47:04.504 TRACE:: LeanEngineSystemHandlers.Dispose(): 
Disposed of system handlers.
20211105 12:47:04.506 TRACE:: LeanEngineAlgorithmHandlers.Dispose():
start...
20211105 12:47:04.512 TRACE:: LeanEngineAlgorithmHandlers.Dispose():
Disposed of algorithm handlers.
20211105 12:47:04.515 TRACE:: Program.Main(): Exiting Lean...
Successfully ran 'My Project' in the 'backtesting' environment and 
stored the output in 'My Project/backtests/2021-11-05_20-46-56'

Security Master check is hardcoded and non-specific

Currently the system of checking for "Security Master" subscription only considers "Equity Security Master". However, different datasource require different "Security Master" products.

In example:
Bulk US Equity Data -> Bulk US Equity Security Master (PID 180)
US Equity Data -> US Equity Security Master (PID 37)
Bulk US Futures Data -> Bulk US Futures Security Master (PID 179)
US Futures Data -> US Futures Security Master (PID 137)

I believe this can be addressed by a two step change. One to the API and then the CLI reflecting.

SOLUTION:

The web api response for "data/prices" under "datasources" has a field "requiresSecurityMaster" which is a simple true/false. Instead I suggest we make this a requires field as an int[] that contains the required products if any for that Product id.

EX Before

	"datasources": {
		"4": {
			"requiresSecurityMaster": true,
			"options": [],
			"paths": []
		}
        }

EX after

	"datasources": {
		"4": {
			"requires": [ 37 ],
			"options": [],
			"paths": []
		}
        }

That way in the CLI when we want to check if a product can be downloaded we can just ensure that the required product ID exists in the organization subscriptions.

This also allows us to not have to hardcode any security master product ID in the CLI as it is now.

`lean data generate` fails due to docker requiring sudo

Making docker run without sudo is a security risk - you're essentially granting root permissions to the user account.

Rootless docker installations can't do folder sharing (which I think is used by lean)

lean can't be installed in a way that sudo can find it, AFAICT.

sudo lean can't find lean
sudo conda can't find conda

Is there a reasonable workaround for lean data generate to work with a typical docker installation?

Lean init not working behind firewall

Hi,

I'm currently testing out the Lean CLI for my firm. Unfortunately I'm stuck at the very beginning:

image

I'm sure it has something to do with our IT team blocking every possible port we can think of. Is there a workaround on your end, otherwise I'm going to have to wait weeks before an internal ticket gets approved.

I went in the init.py file -> _download_repository function -> line 37 and added verify = False to the get method. I get a warning and nothing :

image

Thanks for your help,

Nicolas Voisin

Download logs of cloud tasks

I'd like to be able to download logs of either cloud backtesting or cloud live algorithm running. I haven't found any examples/hints if it is possible now, thus please consider this issue as a feature request, if it is the case indeed. I.e., if one could run

lean cloud logs [--live|--backtest] --project MyProject [--name RunName]

it would be awesome.

Lean CLI version 1.0.36 is broken when there is a solution file

Hi, after I upgraded Lean CLI to the latest version (1.0.36) I'm having some issues that I could reproduce with the following steps:

  1. Create the project under a folder and run backtest. This will work as expected.
> lean create-project MyProject/MyAlgo
> lean backtest MyProject/MyAlgo
  1. On Windows, open the project file in Visual Studio:
> devenv ./MyProject/MyAlgo/MyAlgo.csproj

Then select "File"->"Save All". It will show the dialog to save the solution file. Save the solution file as: MyProject/MyProject.sln

  1. Backtest will fail now.
> lean backtest MyProject/MyAlgo

Error: 500 Server Error for
http+docker://localnpipe/v1.41/containers/2b1e943a08d2c169ff9731c202eaeab03e40fe8a7759d3641002ecfd6786185f/start:
Internal Server Error ("OCI runtime create failed: container_linux.go:380: starting container process caused:
process_linux.go:545: container init caused: rootfs_linux.go:76: mounting
"/run/desktop/mnt/host/c/Users/dvp/AppData/Local/Temp/lean-cli-2e8ke7tc/MyAlgo/MyAlgo.csproj" to rootfs at
"/LeanCLI/MyAlgo\\MyAlgo.csproj" caused: open /var/lib/docker/overlay2/6f125dc13c510204bf0181082b735079b0445f61185984f48
ea9e7e360e87eb5/merged/LeanCLI/MyAlgo\MyAlgo.csproj: read-only file system: unknown")
  1. Remove the solution file we just created.
> rm ./MyProject/MyProject.sln
  1. Run backtest again. It will run again with no error.
> lean backtest MyProject/MyAlgo

lean init fails looking for commands.gui dependency on tkinter

When starting the lean init command (Python 3.9.7) it fails to start if tkinter is not setup. Following the trace back, tkinter is a dependency of the 'gui' command. Since lean the lean init command isn't starting a gui, it shouldn't require tk.

A hack workaround is to remove the dependency on command/gui from lean/commands/init.py. The "lean init" command will startup fine after that change.

# avoid tkinter import from lean.commands.gui import gui
...
# avoid tkinter import lean.add_command(gui)

Command Output:

'lean.json' not found
Traceback (most recent call last):
  File "/usr/local/bin/lean", line 5, in <module>
    from lean.main import main
  File "/usr/local/lib/python3.9/site-packages/lean/main.py", line 95, in <module>
    from lean.commands import lean
  File "/usr/local/lib/python3.9/site-packages/lean/commands/__init__.py", line 23, in <module>
    from lean.commands.gui import gui
  File "/usr/local/lib/python3.9/site-packages/lean/commands/gui/__init__.py", line 18, in <module>
    from lean.commands.gui.start import start
  File "/usr/local/lib/python3.9/site-packages/lean/commands/gui/start.py", line 18, in <module>
    import tkinter
  File "/usr/local/Cellar/[email protected]/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 37, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'```

Invalid Backtest Url and --open Does Not Open to Backtest page

(base) PS C:\Users\Alex\Local> lean cloud backtest "RiskAverse2" --push --open
[1/1] Pushing 'RiskAverse2'
Successfully updated cloud file 'RiskAverse/main.py'
Started compiling project 'RiskAverse'
Detected parameters: none
Build Request Successful for Project ID: 10244769, with CompileID:
053f5b0cdd39550264ff5d8cc8724370-08219cfbd61c7f9e413b570308392826, Lean Version: 2.5.0.0.13520
Successfully compiled project 'RiskAverse'
Started backtest named 'Geeky Orange Snake' for project 'RiskAverse'
Backtest url: https://www.quantconnect.com/terminal/#open/10244769/922781a33f82d756c2fa67aa3b6597ab
 ---------------------------------------- 0%
Backtest id: 922781a33f82d756c2fa67aa3b6597ab
Backtest name: Geeky Orange Snake
Backtest url: https://www.quantconnect.com/terminal/#open/10244769/922781a33f82d756c2fa67aa3b6597ab

The https://www.quantconnect.com/terminal/#open/10244769/922781a33f82d756c2fa67aa3b6597ab doesn't open the backtest tab.. It opens that Terminal page instead.

400 client error from Docker running lean local backtest

Below is the verbose output I am getting when I try to run the lean local backtest command.
Can you let me know what I'm doing wrong?
Thanks.

(base) chadwick@chadwick-Satellite-S70-B:~/Desktop/QuantConnect_Lean$ lean backtest --verbose "My Project"
Traceback (most recent call last):
File "/home/chadwick/.local/lib/python3.8/site-packages/docker/api/client.py", line 268, in _raise_for_status
response.raise_for_status()
File "/home/chadwick/.local/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http+docker://localhost/v1.40/containers/create

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/chadwick/anaconda3/lib/python3.8/site-packages/lean/main.py", line 30, in main
lean.main(standalone_mode=False)
File "/home/chadwick/anaconda3/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/chadwick/anaconda3/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/chadwick/anaconda3/lib/python3.8/site-packages/lean/click.py", line 68, in invoke
result = super().invoke(ctx)
File "/home/chadwick/anaconda3/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/chadwick/anaconda3/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/chadwick/anaconda3/lib/python3.8/site-packages/lean/commands/backtest.py", line 79, in backtest
lean_runner.run_lean("backtesting", algorithm_file, output, version, debugging_method)
File "/home/chadwick/anaconda3/lib/python3.8/site-packages/lean/components/docker/lean_runner.py", line 90, in run_lean
success = self._docker_manager.run_image(ENGINE_IMAGE, version, **run_options)
File "/home/chadwick/anaconda3/lib/python3.8/site-packages/lean/components/docker/docker_manager.py", line 77, in run_image
container = docker_client.containers.run(f"{image}:{tag}", None, **kwargs)
File "/home/chadwick/.local/lib/python3.8/site-packages/docker/models/containers.py", line 811, in run
container = self.create(image=image, command=command,
File "/home/chadwick/.local/lib/python3.8/site-packages/docker/models/containers.py", line 870, in create
resp = self.client.api.create_container(**create_kwargs)
File "/home/chadwick/.local/lib/python3.8/site-packages/docker/api/container.py", line 430, in create_container
return self.create_container_from_config(config, name)
File "/home/chadwick/.local/lib/python3.8/site-packages/docker/api/container.py", line 441, in create_container_from_config
return self._result(res, True)
File "/home/chadwick/.local/lib/python3.8/site-packages/docker/api/client.py", line 274, in _result
self._raise_for_status(response)
File "/home/chadwick/.local/lib/python3.8/site-packages/docker/api/client.py", line 270, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/home/chadwick/.local/lib/python3.8/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 400 Client Error for http+docker://localhost/v1.40/containers/create: Bad Request ("invalid mount config for
type "bind": bind source path does not exist: /tmp/tmpp_7xwf_a/config.json")
Error: 400 Client Error for http+docker://localhost/v1.40/containers/create: Bad Request ("invalid mount config for type "bind":
bind source path does not exist: /tmp/tmpp_7xwf_a/config.json")

Feature request: GPU support

With reference to this community post

Since GPUs in local machines are not utilized in LEAN CLI, the support for extra computational power by GPUs for machine learning in the research environment is requested.

Cannot debug using VS 2019

I am trying to debug locally using VS 2019.
`C:\LeanCLi> lean backtest "First" --debug vsdbg
Microsoft (R) Build Engine version 16.10.1+2fd48ab73 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore...
Restored /LeanCLI/First.csproj (in 60 ms).
First -> /Compile/bin/First.dll

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:02.30
20210720 11:15:37.878 TRACE:: Config.Get(): Configuration key not found. Key: plugin-directory - Using default value:
20210720 11:15:37.888 TRACE:: Composer(): Loading Assemblies from /Lean/Launcher/bin/Debug
20210720 11:15:37.906 TRACE:: Python for .NET Assembly: QuantConnect.DataSource.ExamplePythonScriptMyCustomDataTypeDoNotUse,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
20210720 11:15:37.950 TRACE:: Python for .NET Assembly: Python.Runtime, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=5000fea6cba702dd
20210720 11:15:37.985 TRACE:: Config.Get(): Configuration key not found. Key: data-directory - Using default value:
../../../Data/
20210720 11:15:37.988 TRACE:: Config.Get(): Configuration key not found. Key: version-id - Using default value:
20210720 11:15:37.989 TRACE:: Config.Get(): Configuration key not found. Key: cache-location - Using default value: /Lean/Data
20210720 11:15:37.990 TRACE:: Engine.Main(): LEAN ALGORITHMIC TRADING ENGINE v2.5.0.0 Mode: DEBUG (64bit) Host: ROL0003
20210720 11:15:37.994 TRACE:: Engine.Main(): Started 11:15 AM
20210720 11:15:37.997 TRACE:: Config.Get(): Configuration key not found. Key: lean-manager-type - Using default value:
LocalLeanManager
20210720 11:15:38.014 TRACE:: JobQueue.NextJob(): Selected First.dll
20210720 11:15:38.076 TRACE:: Config.GetValue(): scheduled-event-leaky-bucket-capacity - Using default value: 120
20210720 11:15:38.076 TRACE:: Config.GetValue(): scheduled-event-leaky-bucket-time-interval-minutes - Using default value: 1440
20210720 11:15:38.077 TRACE:: Config.GetValue(): scheduled-event-leaky-bucket-refill-amount - Using default value: 18
20210720 11:15:38.077 TRACE:: Config.Get(): Configuration key not found. Key: algorithm-id - Using default value: First
20210720 11:15:38.078 TRACE:: Config.Get(): Configuration key not found. Key: job-organization-id - Using default value:
20210720 11:15:38.078 TRACE:: Config.GetValue(): job-project-id - Using default value: 0
20210720 11:15:38.080 TRACE:: Config.Get(): Configuration key not found. Key: data-permission-manager - Using default value:
DataPermissionManager
20210720 11:15:38.091 TRACE:: AlgorithmManager.CreateTokenBucket(): Initializing LeakyBucket: Capacity: 120 RefillAmount: 18
TimeInterval: 1440
20210720 11:15:38.093 TRACE:: Config.GetValue(): algorithm-manager-time-loop-maximum - Using default value: 20
20210720 11:15:38.105 TRACE:: TextSubscriptionDataSourceReader.SetCacheSize(): Setting cache size to 71582788 items
20210720 11:15:38.371 TRACE:: DebuggerHelper.Initialize(): waiting for debugger to attach...`

But when trying to attach to the docker container process with id 1 I keep receiving:
Initialization log:
Determining user folder on remote system...
Checking for existing installation of debugging tools...
Downloading debugger launcher...
Creating debugger installation folder: /root/.vs-debugger
Copying debugger launcher to /root/.vs-debugger/GetVsDbg.sh
Failed: Failed to copy files.
Unable to find debugger script at '/root/.vs-debugger'.
Failed: Unable to find debugger script at '/root/.vs-debugger'.
The program '[1] dotnet' has exited with code -1 (0xffffffff).

Is this environment issue or it's related to lean?
Thanks.

Unable to completed generate data

Expected Behavior

  1. Execute lean data generate --start=20210315 --symbol-count=1
  2. Data gets generated
  3. Command exits without errors

Actual Behavior

  1. Execute lean data generate --start=20210315 --symbol-count=1
  2. Data gets generated
  3. Command exits with the following error:
lean data generate --start=20210315 --symbol-count=1
20210331 04:59:42.337 TRACE:: Config.GetValue(): debug-mode - Using default value: False
20210331 04:59:42.338 TRACE:: Config.Get(): Configuration key not found. Key: results-destination-folder - Using default value:
20210331 04:59:42.339 TRACE:: Config.Get(): Configuration key not found. Key: plugin-directory - Using default value:
20210331 04:59:42.343 TRACE:: Config.Get(): Configuration key not found. Key: composer-dll-directory - Using default value: /Lean/Launcher/bin/Debug/
'market' was not specified. Using default value: ''
'quote-trade-ratio' was not specified. Using default value: '1'
'random-seed' was not specified. Using default value: ''
'ipo-percentage' was not specified. Using default value: '5.0'
'rename-percentage' was not specified. Using default value: '30.0'
'splits-percentage' was not specified. Using default value: '15.0'
'dividends-percentage' was not specified. Using default value: '60.0'
'dividend-every-quarter-percentage' was not specified. Using default value: '30.0'
Using default value of 'usa' for --market and --security-type=Equity
Selected tick types for Equity: Trade
20210331 04:59:42.605 TRACE:: Config.Get(): Configuration key not found. Key: data-directory - Using default value: ../../../Data/
20210331 04:59:42.607 TRACE:: Config.Get(): Configuration key not found. Key: version-id - Using default value:
20210331 04:59:42.607 TRACE:: Config.Get(): Configuration key not found. Key: cache-location - Using default value: ../../../Data/
Begin data generation of 1 randomly generated Equity assets...
Symbol[1]: SSE 2T Progress: 0.0% - Generating data...
Symbol[1]: SSE 2T Dividends, splits, and map files have been written to disk.
Symbol[1]: Month: March
Symbol[1]: SSE 2T Progress: 50.0% - Saving data in LEAN format
20210331 04:59:43.445 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/sse/20210315_trade.zip
20210331 04:59:43.494 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/sse/20210316_trade.zip
20210331 04:59:43.545 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/sse/20210317_trade.zip
20210331 04:59:43.621 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/sse/20210318_trade.zip
20210331 04:59:43.672 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/sse/20210319_trade.zip
20210331 04:59:43.722 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/sse/20210322_trade.zip
20210331 04:59:43.773 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/sse/20210323_trade.zip
20210331 04:59:43.829 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/sse/20210324_trade.zip
20210331 04:59:43.878 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/sse/20210325_trade.zip
20210331 04:59:43.928 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/sse/20210326_trade.zip
20210331 04:59:43.977 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/sse/20210329_trade.zip
20210331 04:59:44.036 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/sse/20210330_trade.zip
20210331 04:59:44.096 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/daily/sse.zip
Symbol[1]: SSE 2T Progress: 100.0% - Symbol data generation and output completed
Random data generation has completed.
Launching coarse data generator...
20210331 04:59:44.100 TRACE:: Config.Get(): Configuration key not found. Key: reserved-words-prefix - Using default value: quantconnect-
20210331 04:59:44.108 TRACE:: CoarseUniverseGeneratorProgram.ProcessDailyFolder(): Processing: /Lean/Data/equity/usa/daily
20210331 04:59:44.220 TRACE:: CoarseUniverseGeneratorProgram.PopulateSidContex(): Generating SID context from QuantQuote's map files.
20210331 04:59:44.277 ERROR:: CoarseUniverseGeneratorProgram.Run(): /Lean/Data/equity/usa/daily/pry.zip not found!
20210331 04:59:44.277 ERROR:: CoarseUniverseGeneratorProgram.Run(): /Lean/Data/equity/usa/daily/dgf.zip not found!
20210331 04:59:44.340 ERROR:: CoarseUniverseGeneratorProgram.Run(): /Lean/Data/equity/usa/daily/wnq.zip not found!
20210331 04:59:44.354 ERROR:: CoarseUniverseGeneratorProgram.Run(): /Lean/Data/equity/usa/daily/npo.zip not found!
20210331 04:59:44.355 TRACE:: FactorFile.HasScalingFactors(): Factor file not found: GOOAV
20210331 04:59:44.375 TRACE:: FactorFile.HasScalingFactors(): Factor file not found: VXX
20210331 04:59:44.375 ERROR:: CoarseUniverseGeneratorProgram.Run(): /Lean/Data/equity/usa/daily/vxxb.zip not found!
20210331 04:59:44.376 ERROR:: CoarseUniverseGeneratorProgram.Run(): /Lean/Data/equity/usa/daily/vxx.zip not found!
20210331 04:59:44.376 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker VXX not found!
20210331 04:59:44.376 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker VXXB not found!
20210331 04:59:44.388 ERROR:: CoarseUniverseGeneratorProgram.Run(): /Lean/Data/equity/usa/daily/vxx.zip not found!
20210331 04:59:44.388 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker VXX not found!
20210331 04:59:44.406 ERROR:: CoarseUniverseGeneratorProgram.Run(): /Lean/Data/equity/usa/daily/asg.zip not found!
20210331 04:59:44.494 ERROR:: CoarseUniverseGeneratorProgram.Run(): /Lean/Data/equity/usa/daily/aol.zip not found!
20210331 04:59:44.495 ERROR:: CoarseUniverseGeneratorProgram.Run(): /Lean/Data/equity/usa/daily/twx.zip not found!
20210331 04:59:44.495 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker TWX not found!
20210331 04:59:44.495 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker AOL not found!
20210331 04:59:44.508 TRACE:: FactorFile.HasScalingFactors(): Factor file not found: FB.1
20210331 05:00:53.595 ERROR:: CoarseUniverseGeneratorProgram.Run(): CoarseUniverseGeneratorProgram.Run(): FAILED! System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Sequence contains no
elements
at System.Linq.Enumerable.Last[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00010] in <92922d9bda2f4e1cba9242d052be6d43>:0
at QuantConnect.ToolBox.CoarseUniverseGenerator.CoarseUniverseGeneratorProgram+<PopulateSidContex>d__12.MoveNext () [0x00062] in <5fac3c9a18e44332bdae2a2dbf9cae7f>:0
at System.Collections.Concurrent.Partitioner+DynamicPartitionerForIEnumerable`1+InternalPartitionEnumerable[TSource].GrabChunk_Buffered (System.Collections.Generic.KeyValuePair`2[System.Int64,TSource][] destArray, System.Int32
requestedChunkSize, System.Int32& actualNumElementsGrabbed) [0x001c7] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Collections.Concurrent.Partitioner+DynamicPartitionerForIEnumerable`1+InternalPartitionEnumerable[TSource].GrabChunk (System.Collections.Generic.KeyValuePair`2[System.Int64,TSource][] destArray, System.Int32
requestedChunkSize, System.Int32& actualNumElementsGrabbed) [0x00026] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Collections.Concurrent.Partitioner+DynamicPartitionerForIEnumerable`1+InternalPartitionEnumerator[TSource].GrabNextChunk (System.Int32 requestedChunkSize) [0x00023] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Collections.Concurrent.Partitioner+DynamicPartitionEnumerator_Abstract`2[TSource,TSourceReader].MoveNext () [0x000ba] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Parallel+<>c__DisplayClass42_0`2[TSource,TLocal].<PartitionerForEachWorker>b__1 () [0x00287] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Task.InnerInvokeWithArg (System.Threading.Tasks.Task childTask) [0x00000] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Task+<>c__DisplayClass178_0.<ExecuteSelfReplicating>b__0 (System.Object <p0>) [0x00086] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Task.Wait () [0x00000] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal] (System.Collections.Concurrent.Partitioner`1[TSource] source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1[T] simpleBody,
System.Action`2[T1,T2] bodyWithState, System.Action`3[T1,T2,T3] bodyWithStateAndIndex, System.Func`4[T1,T2,T3,TResult] bodyWithStateAndLocal, System.Func`5[T1,T2,T3,T4,TResult] bodyWithEverything, System.Func`1[TResult] localInit,
System.Action`1[T] localFinally) [0x001fb] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal] (System.Collections.Generic.IEnumerable`1[T] source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1[T] body, System.Action`2[T1,T2]
bodyWithState, System.Action`3[T1,T2,T3] bodyWithStateAndIndex, System.Func`4[T1,T2,T3,TResult] bodyWithStateAndLocal, System.Func`5[T1,T2,T3,T4,TResult] bodyWithEverything, System.Func`1[TResult] localInit, System.Action`1[T]
localFinally) [0x0005e] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Parallel.ForEach[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1[T] body) [0x0002a] in
<b0e1ad7573a24fd5a9f2af9595e677e7>:0
at QuantConnect.ToolBox.CoarseUniverseGenerator.CoarseUniverseGeneratorProgram.Run () [0x0013b] in <5fac3c9a18e44332bdae2a2dbf9cae7f>:0
---> (Inner Exception #0) System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.Last[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00010] in <92922d9bda2f4e1cba9242d052be6d43>:0
at QuantConnect.ToolBox.CoarseUniverseGenerator.CoarseUniverseGeneratorProgram+<PopulateSidContex>d__12.MoveNext () [0x00062] in <5fac3c9a18e44332bdae2a2dbf9cae7f>:0
at System.Collections.Concurrent.Partitioner+DynamicPartitionerForIEnumerable`1+InternalPartitionEnumerable[TSource].GrabChunk_Buffered (System.Collections.Generic.KeyValuePair`2[System.Int64,TSource][] destArray, System.Int32
requestedChunkSize, System.Int32& actualNumElementsGrabbed) [0x001c7] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Collections.Concurrent.Partitioner+DynamicPartitionerForIEnumerable`1+InternalPartitionEnumerable[TSource].GrabChunk (System.Collections.Generic.KeyValuePair`2[System.Int64,TSource][] destArray, System.Int32
requestedChunkSize, System.Int32& actualNumElementsGrabbed) [0x00026] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Collections.Concurrent.Partitioner+DynamicPartitionerForIEnumerable`1+InternalPartitionEnumerator[TSource].GrabNextChunk (System.Int32 requestedChunkSize) [0x00023] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Collections.Concurrent.Partitioner+DynamicPartitionEnumerator_Abstract`2[TSource,TSourceReader].MoveNext () [0x000ba] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Parallel+<>c__DisplayClass42_0`2[TSource,TLocal].<PartitionerForEachWorker>b__1 () [0x00287] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Task.InnerInvokeWithArg (System.Threading.Tasks.Task childTask) [0x00000] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Threading.Tasks.Task+<>c__DisplayClass178_0.<ExecuteSelfReplicating>b__0 (System.Object <p0>) [0x00086] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0 <---

System Information

Windows:

[System.Environment]::OSversion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      19042  0

Python:

python --version
Python 3.8.5

Lean:

lean --version
lean, version 0.1.28

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue

Install graphviz to the docker image

I'm trying to visualize my Keras/TF model in the research environment but I receive an error:

'You must install pydot (pip install pydot) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.'

I've tried following these solutions, specifically installing pydot, pydotplus and graphviz via pip. I suspect the graphviz library would need to be installed at the os-level (via apt-get for example).

A basic reproducible error would be:

  1. from tensorflow.keras.utils import plot_model
  2. Create your TF/Keras model
  3. plot_model(model, show_shapes=True, dpi=72)

CLI doesn't prompt for Cash and Holdings State

When deploying with the Atreyu brokerage on QuantConnect.com, we can set an existing cash and holdings state. The process is documented here. When deploying with the CLI, we are not prompted to set an existing cash and holdings state.

Create Output File for Orders By Default

Sets the value for the following key in lean.json

  "transaction-log": "",

in order to create the csv file with the orders generated during the algorithm runtime.

long waiting time

Hi, I am test a simple dual average strategy.
Here is the code, it scan 5000 stocks.

'import time

class MyFirstProject(QCAlgorithm):
def Initialize(self):

    self.T = time.time()       

    self.SetStartDate(2002, 6, 1)  # Set Start Date
    self.SetEndDate(2016, 2, 8)  # Set End Date 2016, 2, 8
    self.SetCash(100000000)  # Set Strategy Cash
    
    self.stock = [] 
    for i in range(1,5001):
        self.stock.append(f"AAA{i}")

    self.Fast={}
    self.Slow={}
    for s in self.stock:
        symbol = self.AddEquity(s, Resolution.Daily).Symbol
        self.Fast[s] = self.SMA(symbol,5,Resolution.Daily)
        self.Slow[s] = self.SMA(symbol,10,Resolution.Daily)
       

    self.i=0
    self.targetpositionpct  = 1 / len(self.stock)  -0.0001/100
    self.Tolerance = 0.00015


def OnData(self, data): 
   
    self.i+=1
    if self.i<20: return

    traderBars = data.Bars
    for s in self.stock:
       
        holdings = self.Portfolio[s].Quantity        
        if holdings<=0:
            if self.Fast[s].Current.Value>self.Slow[s].Current.Value*(1+self.Tolerance):
                self.SetHoldings(s, self.targetpositionpct)
              
        else:                
            if self.Fast[s]<self.Slow[s]:
                self.Liquidate()       

        
        bar = traderBars[s]

        self.Log(f"holding {holdings} stock {s} bar info, open {round(bar.Open,2)}, volume {bar.Volume}, bar Endtime {bar.EndTime}, 'time used seconds', {time.time()-self.T}")`

When runing, it stoped every 1 minutes, waiting anothet 1 minutes, then continues. Each time it stops, it says:
TRACE:: Isolator.ExecuteWithTimeLimit(): Used: 2305, Sample: 3903, App: 4706, CurrentTimeStepElapsed: 00:32.013.

How to solve it?

This is the log:

`20220214 11:10:17.616 TRACE:: Config.Get(): Configuration key not found. Key: plugin-directory - Using default value:
20220214 11:10:17.624 TRACE:: Composer(): Loading Assemblies from /Lean/Launcher/bin/Debug
20220214 11:10:17.671 TRACE:: Python for .NET Assembly: Python.Runtime, Version=2.0.8.0, Culture=neutral, PublicKeyToken=5000fea6cba702dd
20220214 11:10:17.692 TRACE:: Config.Get(): Configuration key not found. Key: data-directory - Using default value: ../../../Data/
20220214 11:10:17.695 TRACE:: Config.Get(): Configuration key not found. Key: version-id - Using default value:
20220214 11:10:17.695 TRACE:: Config.Get(): Configuration key not found. Key: cache-location - Using default value: /Lean/Data
20220214 11:10:17.695 TRACE:: Engine.Main(): LEAN ALGORITHMIC TRADING ENGINE v2.5.0.0 Mode: DEBUG (64bit) Host: BF-202009261209
20220214 11:10:17.698 TRACE:: Engine.Main(): Started 11:10 AM
20220214 11:10:17.700 TRACE:: Config.Get(): Configuration key not found. Key: lean-manager-type - Using default value: LocalLeanManager
20220214 11:10:17.714 TRACE:: JobQueue.NextJob(): Selected /LeanCLI/main.py
20220214 11:10:17.764 TRACE:: Config.GetValue(): scheduled-event-leaky-bucket-capacity - Using default value: 120
20220214 11:10:17.765 TRACE:: Config.GetValue(): scheduled-event-leaky-bucket-time-interval-minutes - Using default value: 1440
20220214 11:10:17.765 TRACE:: Config.GetValue(): scheduled-event-leaky-bucket-refill-amount - Using default value: 18
20220214 11:10:17.767 TRACE:: Config.Get(): Configuration key not found. Key: job-organization-id - Using default value:
20220214 11:10:17.768 TRACE:: Config.Get(): Configuration key not found. Key: data-permission-manager - Using default value: DataPermissionManager
20220214 11:10:17.781 TRACE:: AlgorithmManager.CreateTokenBucket(): Initializing LeakyBucket: Capacity: 120 RefillAmount: 18 TimeInterval: 1440
20220214 11:10:17.782 TRACE:: Config.GetValue(): algorithm-manager-time-loop-maximum - Using default value: 20
20220214 11:10:17.792 TRACE:: TextSubscriptionDataSourceReader.SetCacheSize(): Setting cache size to 71582788 items
20220214 11:10:18.017 TRACE:: Config.GetValue(): algorithm-creation-timeout - Using default value: 90
20220214 11:10:18.021 TRACE:: PythonInitializer.Initialize(): start...
PythonEngine.Initialize(): Runtime.Initialize()...
Runtime.Initialize(): Py_Initialize...
Runtime.Initialize(): PyEval_InitThreads...
Runtime.Initialize(): Initialize types...
Runtime.Initialize(): Initialize types end.
Runtime.Initialize(): AssemblyManager.Initialize()...
Runtime.Initialize(): AssemblyManager.UpdatePath()...
PythonEngine.Initialize(): GetCLRModule()...
PythonEngine.Initialize(): clr GetManifestResourceStream...
20220214 11:10:18.824 TRACE:: PythonInitializer.Initialize(): ended
20220214 11:10:18.827 TRACE:: AlgorithmPythonWrapper(): Python version 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:25:33)
[GCC 7.3.0]: Importing python module main
20220214 11:10:20.345 TRACE:: AlgorithmPythonWrapper(): main successfully imported.
20220214 11:10:20.370 TRACE:: AlgorithmPythonWrapper(): Creating IAlgorithm instance.
20220214 11:10:20.376 TRACE:: Config.GetValue(): api-data-update-period - Using default value: 1
20220214 11:10:20.384 TRACE:: SecurityDefinitionSymbolResolver(): No security definitions data loaded from file: /Lean/Data/symbol-properties/security-database.csv
20220214 11:10:20.489 TRACE:: Config.GetValue(): mute-python-library-logging - Using default value: True
20220214 11:10:20.501 TRACE:: LocalObjectStore.Initialize(): Storage Root: /Storage/QCAlgorithm. StorageFileCount 100. StorageLimitMB 5
20220214 11:10:20.513 TRACE:: BacktestingSetupHandler.Setup(): Setting up job: Plan: Free, UID: 0, PID: 384237878, Version: 2.5.0.0, Source: WebIDE
20220214 11:10:20.517 TRACE:: Config.Get(): Configuration key not found. Key: security-data-feeds - Using default value:

......

holding 0.0 stock AAA4990 bar info, open 49.56, volume 1800.0, bar Endtime 2002-06-28 00:00:00, 'time used seconds', 39.728204011917114
holding 0.0 stock AAA4991 bar info, open 49.56, volume 1800.0, bar Endtime 2002-06-28 00:00:00, 'time used seconds', 39.72913837432861
holding 0.0 stock AAA4992 bar info, open 49.56, volume 1800.0, bar Endtime 2002-06-28 00:00:00, 'time used seconds', 39.730098485946655
holding 0.0 stock AAA4993 bar info, open 49.56, volume 1800.0, bar Endtime 2002-06-28 00:00:00, 'time used seconds', 39.731056213378906
holding 0.0 stock AAA4994 bar info, open 49.56, volume 1800.0, bar Endtime 2002-06-28 00:00:00, 'time used seconds', 39.731996297836304
holding 0.0 stock AAA4995 bar info, open 49.56, volume 1800.0, bar Endtime 2002-06-28 00:00:00, 'time used seconds', 39.73293852806091
holding 0.0 stock AAA4996 bar info, open 49.56, volume 1800.0, bar Endtime 2002-06-28 00:00:00, 'time used seconds', 39.73388195037842
holding 0.0 stock AAA4997 bar info, open 49.56, volume 1800.0, bar Endtime 2002-06-28 00:00:00, 'time used seconds', 39.73484182357788
holding 0.0 stock AAA4998 bar info, open 49.56, volume 1800.0, bar Endtime 2002-06-28 00:00:00, 'time used seconds', 39.73577094078064
holding 0.0 stock AAA4999 bar info, open 49.56, volume 1800.0, bar Endtime 2002-06-28 00:00:00, 'time used seconds', 39.73671269416809
20220214 11:21:01.973 TRACE:: Isolator.ExecuteWithTimeLimit(): Used: 2305, Sample: 3903, App: 4706, CurrentTimeStepElapsed: 00:32.013`

Optimize job launched from local GUI doesn't display results

When I run a very simple strategy optimization in the lean gui, no charts, job status, or results are updated in the gui.

The strategy under test is a simple ema crossover, and the parameter configuration results in only 3 backtests run. When the same job is run through the CLI, it completes successfully in under 30 seconds.

Expected Behavior

When I configure and run a local optimization from the lean gui, I expect to see the optimization results displayed in the gui in the same way as they are displayed on quantconnect.com.

Expected screenshot of the same algorithm and optimization job run on quantconnect.com:

image

Actual Behavior

Docker shows the backtest container launch, run, and complete.

GUI:

  • Status bar at the top is completely empty.
  • Status box shows running.
  • Charts show "Waiting for Chart".
  • Server Statistics show "HOST \n Local x 0".

image

Potential Solution

Seems like a callback isn't happening after the optimize job is launched. I'm guessing a network config issue between the optimize container and the gui container.

Reproducing the Problem

  1. lean gui start
  2. Run a successful backtest of a simple strategy
  3. configure an optimization job in the gui
  4. launch optimization job
  5. open Docker Desktop, see the optimize container start, run, and exit
  6. observe no results in the GUI

System Information

Lean v1.0.72
Python 3.9.7
Windows 10 Home 21H1 19043.1415
Docker Desktop 4.3.1 (72247), Engine 20.10.11, Compose 1.29.2, Kubernetes v1.22.4

Checklist

[x] I have completely filled out this template
[x] I have confirmed that this issue exists on the current master branch
[x] I have confirmed that this is not a duplicate issue by searching issues
[x] I have provided detailed steps to reproduce the issue

[Feature] log subcommand

Thanks for building the cli tool. It really reduces the efforts on the shoulders in setting up required environment for doing any backtesting.

I would really like to have a lean log command that retireves the latest log of a backtested result. Similar to how lean report
does the job.

Let me know if this interests you I can work on this small contribution.

Lean login command

When I try to login with the credentials i got from the email and following the steps the login fails. I copy pasted the user id and the even first to notepad to make sure nu extra characters/markup is being copied.
Is this a bug?

Expected Behavior

It will log in

Actual Behavior

Throws the following error:

Error: Credentials are invalid
Visit https://www.lean.io/docs/lean-cli/tutorials/authentication#02-Logging-in for more information

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue

Unable to download Forex data for local backtesting

Expected Behavior
Documentation here suggests Forex data (Oanda) can be downloaded from QC Data Library.

Actual Behavior
Fails with error message:

Error: There is no data vendor that sells 'forex/oanda/hour/eurusd.zip'

Reproducing
(Interactive mode)

$ lean data download
$ 1
$ 5
$ 4
$ EURUSD

(Non-interactive mode)

$ lean data download --product "Forex" --organization "MyOrg" --resolution "Hour" --ticker "EURUSD"

System
Lean CLI 1.0.22

Deploying algo using DLL

For security reasons, I want to deploy my algo in a .NET assembly rather than using a CS code project. Is there any way to do that? Even if I reference the DLL in the project and run it, that should be fine.

Error initializing lean CLI

Expected Behavior

Following the Lean CLI install, expected it to work

Actual Behavior

'lean.json' not found
Traceback (most recent call last):
  File "/Users/frankcastellucci/signal/lean-play/env/bin/lean", line 5, in <module>
    from lean.main import main
  File "/Users/frankcastellucci/signal/lean-play/env/lib/python3.9/site-packages/lean/main.py", line 95, in <module>
    from lean.commands import lean
  File "/Users/frankcastellucci/signal/lean-play/env/lib/python3.9/site-packages/lean/commands/__init__.py", line 23, in <module>
    from lean.commands.gui import gui
  File "/Users/frankcastellucci/signal/lean-play/env/lib/python3.9/site-packages/lean/commands/gui/__init__.py", line 18, in <module>
    from lean.commands.gui.start import start
  File "/Users/frankcastellucci/signal/lean-play/env/lib/python3.9/site-packages/lean/commands/gui/start.py", line 18, in <module>
    import tkinter
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 37, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'

Potential Solution

Just starting out with this, I could only guess without any insight

Reproducing the Problem

mkdir lean-play && cd lean-play
python3 -m venv env
source env/bin/activate
pip install lean
lean init

This produces the error above

System Information

macos BigSur 11.6.2
python: 3.9.9

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue

pywin32 issue on install

I'm trying to install lean and have come across an issue seemingly related to pywin32.

I initially installed the package simply using pip and my base anaconda3 package, but was getting an install of version 0.1.2. When I specify version 1.0.78, I get the below error...

ERROR: Cannot install lean because these package versions have conflicting dependencies.

The conflict is caused by:
    docker 4.4.4 depends on pywin32==227; sys_platform == "win32"
    docker 4.4.3 depends on pywin32==227; sys_platform == "win32"
    docker 4.4.2 depends on pywin32==227; sys_platform == "win32"
    docker 4.4.1 depends on pywin32==227; sys_platform == "win32"

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

This error states that the requirements.txt (or however pip works) requires bersion 227 of pywin32 installed. I've tried pip install pywin32==227, but apparently this version is no longer available.

Can anyone provide help on this?

f"Something went wrong while pulling {image}, see the logs above for more information")

Hi All

im getting the following error. Seems to be somthing with Docker and read write permissions

PS D:\LeanCLI> lean backtest 'Crypto DonChan' --verbose --> GET https://raw.githubusercontent.com/QuantConnect/lean-cli/master/announcements.json Error response from daemon: error creating temporary lease: write /var/lib/desktop-containerd/daemon/io.containerd.metadata.v1.bolt/meta.db: read-only file system: unknown Traceback (most recent call last): File "d:\python3.6.8\lib\site-packages\lean\main.py", line 96, in main lean.main(standalone_mode=False) File "d:\python3.6.8\lib\site-packages\click\core.py", line 782, in main rv = self.invoke(ctx) return _process_result(sub_ctx.command.invoke(sub_ctx)) File "d:\python3.6.8\lib\site-packages\lean\click.py", line 114, in invoke result = super().invoke(ctx) File "d:\python3.6.8\lib\site-packages\click\core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "d:\python3.6.8\lib\site-packages\click\core.py", line 610, in invoke return callback(*args, **kwargs) File "d:\python3.6.8\lib\site-packages\lean\commands\backtest.py", line 342, in backtest docker_manager.pull_image(engine_image) File "d:\python3.6.8\lib\site-packages\lean\components\docker\docker_manager.py", line 70, in pull_image f"Something went wrong while pulling {image}, see the logs above for more information") RuntimeError: Something went wrong while pulling quantconnect/lean:latest, see the logs above for more information Error: Something went wrong while pulling quantconnect/lean:latest, see the logs above for more information

Inconsistent inclusion of library code in local an cloud backtest (Python)

Consider the following file structure:

+
|- Library
|  |- MyLibrary
|     |- mylib.py
|- MyProject
   |- main.py

In order to make mylib from MyLibrary available in main.py from MyProject I need to use two different import statements depending on whether i run the code in a local or in a cloud backtest.

Local backtest needs:

from MyLibrary import mylib

Cloud backtest needs:

import mylib

I think this difference comes from the fact that in local backtesting the Library folder is sourced into the backtest as is. However, in cloud backtesting, QC copies the contents of the referenced libraries into the projects directly. In our case here, mylib.py would be copied next to main.py.

Cloud Push Does Not Delete Files that Were Deleted Locally

When we delete a file locally, it should be removed from the Cloud when lean cloud push is called.

How to reproduce:

  • Follow the Pushing Local Project user guide;
  • Add a new file, e.g. "example.py" (it cannot be empty)
  • Call lean cloud push "ProjectName"
  • Verify "example.py" is found on ProjectName.
  • Remove "example.py" locally
  • Call lean cloud push "ProjectName"
  • Verify "example.py" is found on ProjectName when it should not.

Is Windows Server Datacenter 2019 supported?

Hi there,

Is Windows Server Datacenter 2019 supported?

I'm attempting to run lean research and lean backtest. But lean is failing to pull both the quantconnect/research and quantconnect/lean images.

When I run lean research . in a project's directory, I'm getting the output below:

PS C:\Users\wadams19\workspace\QC\live\coin-toss> lean research .
Pulling quantconnect/research:latest...
latest: Pulling from quantconnect/research
no matching manifest for windows/amd64 10.0.17763 in the manifest list entries
Error: Something went wrong while pulling quantconnect/research:latest, see the logs above for more information

Any ideas?

probably an issue with json library

lean is initialized, i am logged in, but not able to download any data.

image

Based on my experience, this error points to a json library which is not able to handle comments in the json file.

Feature Request: Stop a running live cloud algorithm from the CLI

Hello, I would like to build an automated process to restart my live algorithm from the CLI weekly to make sure that I am running the most up-to-date version of LEAN.

Starting the algorithm from the CLI is not a problem, however, there is currently no way to stop a running algorithm, or even to force restart the algorithm. If a live node is in use, the only thing that works is to manually go in to the GUI and stop the algorithm running on it. Only then is the node available to deploy to from the CLI.

Is it possible to get this capability as a either a separate CLI API, or even as a "force" parameter to the lean cloud live API?

'NpipeHTTPAdapter' error when it needs the docker

Hi,
I've successfully installed lean-cli on windows and the coding, autocompletition and cloud backtesting are working fine.
The problem is when I need to prepare data or run a local backtest. Although my Docker is up and running, I keep receiving the Docker error:
Error: Please make sure Docker is installed and running

When I use the verbose option, it shows:

Traceback (most recent call last):
  File "d:\programs\anaconda\envs\fastai\lib\site-packages\docker\api\client.py", line 159, in __init__
    self._custom_adapter = NpipeHTTPAdapter(
NameError: name 'NpipeHTTPAdapter' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\programs\anaconda\envs\fastai\lib\site-packages\lean\components\docker\docker_manager.py", line 307, in _get_docker_client
    docker_client = docker.from_env()
  File "d:\programs\anaconda\envs\fastai\lib\site-packages\docker\client.py", line 101, in from_env
    **kwargs_from_env(**kwargs)
  File "d:\programs\anaconda\envs\fastai\lib\site-packages\docker\client.py", line 45, in __init__
    self.api = APIClient(*args, **kwargs)
  File "d:\programs\anaconda\envs\fastai\lib\site-packages\docker\api\client.py", line 165, in __init__
    'Install pypiwin32 package to enable npipe:// support'
docker.errors.DockerException: Install pypiwin32 package to enable npipe:// support

Pypwin32 has been installed manually with pip. Tried running other containers and docker seems to be Ok.
No other clue from the internet.

Any ideas?

Thanks
Mauricio

Unresponsive IB Gateway in Digital Ocean

This GitHub Issue is created in Lean-CLI and IBAutomater because it has not been observed in QuantConnect Cloud or locally, only within Digital Ocean environment.

  1. The algorithm crashes with a "no connected" message. the crash is raised, in general, at 5.00 AM UTC.
  2. The algorithm is unable to connect with another paper-trading account. IB Gateway gets frozen for 15 mins and crashes because it is not able to connect.

Based on the syslog, it looks like the IBGateway process is still running but not responding, because, after the countdown popups, no other events are received (especially the usual Shutdown/OnExited message, which triggers the restart).

We can see the countdown starting after 2021-09-27T23:41:01.1807775Z:

2021-09-27T23:41:01.1924755Z TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): Content: Set Auto Restart Time (HH:MM) The application will automatically restart in 4 minutes 30 seconds EXIT SESSION SETTING

After connected to the docker instance about 23.47 UTC, we confirmed that the java process which contains the IBGateway was running. In fact, the memory consumption of that process on top command was about 35% of the 1GB.

IB Gateway's launcher.log, we can verify that IBGateway did actually restart:

2021-09-29 23:45:22.662 [WR] INFO  [JTS-Main] - ------------------------------- IB GATEWAY RESTART --------------------------------
2021-09-29 23:45:22.702 [WR] INFO  [JTS-Main] - installer version: 2.82, installer type: standalone, install dir: '/root/ibgateway/', Jts dir: '/root/Jts', VM options file: '/root/ibgateway/ibgateway.vmoptions'

Ref.: QuantConnect/IBAutomater#62

Does it work on macos?

Does it work on a mac?
I set up an example like in this tutorial: https://www.youtube.com/watch?v=yAVjsFdtpEY
but I ended up with an error like this:

20210527 10:31:21.764 ERROR:: Failed to assign conversion rates for the following cash: EUR. Attempting to request daily resolution history to resolve conversion rate
2021-05-27T09:27:12.7093632Z ERROR:: AUSUSD 0 not found in portfolio. Request this data when initializing the algorithm.

So I also downloaded EURUSD, still no joy.
My example was first written/run in the QC cloud, so it wasn't a coding issue I think.

Then I made another example using SPY and the default EMA cross from the QC builder I ended up with this error when run locally:
20210527 09:50:47.300 ERROR:: SPY: The security does not have an accurate price as it has not yet received a bar of data. Before placing a trade (or using SetHoldings) warm up your algorithm with SetWarmup

It seems it doesn't run the same locally as the cloud, at least on a mac

error with evdev

  • running Ubuntu 1804
  • docker running / no issues using lean
  • Anaconda running with python 3.6.8

when I run the command "pip install lean" (tried it with --user too). I get the following error.

side-note : yes I ran "apt-get install linux-headers-$(uname -r)" and yes I confirmed that the headers were there.

`
Building wheels for collected packages: evdev
Building wheel for evdev (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /root/anaconda3/envs/quant/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sjlw86xr/evdev_7a53e6c97716423e80e6b94c800dce28/setup.py'"'"'; file='"'"'/tmp/pip-install-sjlw86xr/evdev_7a53e6c97716423e80e6b94c800dce28/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-zhmty0s0
cwd: /tmp/pip-install-sjlw86xr/evdev_7a53e6c97716423e80e6b94c800dce28/
Complete output (37 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/evdev
copying evdev/device.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/evtest.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/genecodes.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/events.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/eventio.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/uinput.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/ff.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/init.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/util.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/ecodes.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/eventio_async.py -> build/lib.linux-x86_64-3.6/evdev
running build_ext
running build_ecodes
The 'linux/input.h' and 'linux/input-event-codes.h' include files
are missing. You will have to install the kernel header files in
order to continue:

  yum install kernel-headers-$(uname -r)
  apt-get install linux-headers-$(uname -r)
  emerge sys-kernel/linux-headers
  pacman -S kernel-headers

In case they are installed in a non-standard location, you may use
the '--evdev-headers' option to specify one or more colon-separated
paths. For example:

  python setup.py \
    build \
    build_ecodes --evdev-headers path/input.h:path/input-event-codes.h \
    build_ext --include-dirs  path/ \
    install

ERROR: Failed building wheel for evdev
Running setup.py clean for evdev
Failed to build evdev
Installing collected packages: evdev, cycler, chardet, wrapt, websocket-client, typing-extensions, setuptools-scm, requests, pynput, pygments, pandas, matplotlib, dataclasses, commonmark, colorama, rich, quantconnect-stubs, python-certifi-win32, pyshortcuts, pydantic, maskpass, lxml, json5, joblib, docker, dependency-injector, click, lean
Running setup.py install for evdev ... error
ERROR: Command errored out with exit status 1:
command: /root/anaconda3/envs/quant/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sjlw86xr/evdev_7a53e6c97716423e80e6b94c800dce28/setup.py'"'"'; file='"'"'/tmp/pip-install-sjlw86xr/evdev_7a53e6c97716423e80e6b94c800dce28/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-dm4o0nha/install-record.txt --single-version-externally-managed --compile --install-headers /root/anaconda3/envs/quant/include/python3.6m/evdev
cwd: /tmp/pip-install-sjlw86xr/evdev_7a53e6c97716423e80e6b94c800dce28/
Complete output (37 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/evdev
copying evdev/device.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/evtest.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/genecodes.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/events.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/eventio.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/uinput.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/ff.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/init.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/util.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/ecodes.py -> build/lib.linux-x86_64-3.6/evdev
copying evdev/eventio_async.py -> build/lib.linux-x86_64-3.6/evdev
running build_ext
running build_ecodes
The 'linux/input.h' and 'linux/input-event-codes.h' include files
are missing. You will have to install the kernel header files in
order to continue:

    yum install kernel-headers-$(uname -r)
    apt-get install linux-headers-$(uname -r)
    emerge sys-kernel/linux-headers
    pacman -S kernel-headers

In case they are installed in a non-standard location, you may use
the '--evdev-headers' option to specify one or more colon-separated
paths. For example:

    python setup.py \
      build \
      build_ecodes --evdev-headers path/input.h:path/input-event-codes.h \
      build_ext --include-dirs  path/ \
      install
----------------------------------------

ERROR: Command errored out with exit status 1: /root/anaconda3/envs/quant/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sjlw86xr/evdev_7a53e6c97716423e80e6b94c800dce28/setup.py'"'"'; file='"'"'/tmp/pip-install-sjlw86xr/evdev_7a53e6c97716423e80e6b94c800dce28/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-dm4o0nha/install-record.txt --single-version-externally-managed --compile --install-headers /root/anaconda3/envs/quant/include/python3.6m/evdev Check the logs for full command output.
`

Cant login to IB with local live trading

When running lean live algo , lean gets stuck on login, specifically the line Click button: [Paper Log In] .
The log says InteractiveBrokersBrokerage.CheckIbAutomaterError(): InitializationTimeout - The IBAutomater initialization timed out

lean cloud live "--notify-insights" parameter is a string, not a boolean

See: https://github.com/QuantConnect/lean-cli/blob/master/lean/commands/cloud/live.py#L192

This means when you run lean cloud live passing '--notify-insights no', it prints out in the debug output that notify insights is yes. Instead, it's necessary to pass '--notify-insights ""' in order to get it to print correctly in the debug output. This conflicts with the documentation provided here: https://www.quantconnect.com/docs/v2/lean-cli/api-reference/lean-cloud-live

Add Python 3.10 Support

  • Adjust dependencies versions
  • Retest functionality.
  • Add python 3.10 as a test target

Currently while installing it outputs:

  Using cached docker-4.4.1-py2.py3-none-any.whl (146 kB)
INFO: pip is looking at multiple versions of dependency-injector to determine which version is compatible with other requirements. This could take a while.
Collecting dependency-injector~=4.20.1
  Using cached dependency-injector-4.20.1.tar.gz (631 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: six>=1.4.0 in c:\python310\lib\site-packages (from docker~=4.4.1->lean) (1.16.0)
INFO: pip is looking at multiple versions of click to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of maskpass to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of lean to determine which version is compatible with other requirements. This could take a while.

See https://github.com/QuantConnect/lean-cli/blob/master/setup.py#L54

lean backtest command failed

Hi,

First of all, really appreciate the work you guys have been doing out there! Lean CLI is such a great tool.

When trying to run backtest locally though, I am getting the following error:

$ lean backtest "My Python Project" --verbose
Running 'quantconnect/lean:latest' with the following configuration:
{'entrypoint': ['dotnet', 'QuantConnect.Lean.Launcher.dll'],
 'mounts': [{'ReadOnly': True,
             'Source': 
'/var/folders/62/8jhxvq556zz_nj_x_d_8k9tr0000gn/T/tmpea7ns7dl/config.json',
             'Target': '/Lean/Launcher/bin/Debug/config.json',
             'Type': 'bind'}],
 'ports': {},
 'volumes': {'/Users/alex/Documents/lean/My Python Project': {'bind': 
'/LeanCLI',
                                                                      'mode': 
'ro'},
             '/Users/alex/Documents/lean/My Python 
Project/backtests/2021-05-16_01-46-37': {'bind': '/Results',
                                                                                
                    'mode': 'rw'},
             '/Users/alex/Documents/lean/My Python Project/storage': 
{'bind': '/Storage',
                                                                              'm
ode': 'rw'},
             '/Users/alex/Documents/lean/data': {'bind': '/Lean/Data',
                                                         'mode': 'rw'}}}
20210516 05:46:39.325 TRACE:: Config.GetValue(): debug-mode - Using default 
value: False
20210516 05:46:39.334 TRACE:: Config.Get(): Configuration key not found. Key: 
plugin-directory - Using default value:
20210516 05:46:39.553 TRACE:: Python for .NET Assembly: Python.Runtime, 
Version=2.0.1.0, Culture=neutral, PublicKeyToken=5000fea6cba702dd
20210516 05:46:39.578 TRACE:: Python for .NET Assembly: nPython, 
Version=3.0.0.0, Culture=neutral, PublicKeyToken=null
20210516 05:46:39.810 TRACE:: Config.Get(): Configuration key not found. Key: 
data-directory - Using default value: ../../../Data/
20210516 05:46:39.822 TRACE:: Config.Get(): Configuration key not found. Key: 
version-id - Using default value:
20210516 05:46:39.830 TRACE:: Config.Get(): Configuration key not found. Key: 
cache-location - Using default value: /Lean/Data
20210516 05:46:39.834 TRACE:: Engine.Main(): LEAN ALGORITHMIC TRADING ENGINE 
v2.5.0.0 Mode: DEBUG (64bit)
20210516 05:46:39.851 TRACE:: Engine.Main(): Started 5:46 AM
20210516 05:46:39.864 TRACE:: Config.Get(): Configuration key not found. Key: 
lean-manager-type - Using default value: LocalLeanManager
20210516 05:46:40.000 TRACE:: JobQueue.NextJob(): Selected /LeanCLI/main.py
20210516 05:46:40.401 TRACE:: Config.GetValue(): 
scheduled-event-leaky-bucket-capacity - Using default value: 120
20210516 05:46:40.413 TRACE:: Config.GetValue(): 
scheduled-event-leaky-bucket-time-interval-minutes - Using default value: 1440
20210516 05:46:40.419 TRACE:: Config.GetValue(): 
scheduled-event-leaky-bucket-refill-amount - Using default value: 18
20210516 05:46:40.431 TRACE:: Config.Get(): Configuration key not found. Key: 
algorithm-id - Using default value: main
20210516 05:46:40.447 TRACE:: Config.GetValue(): job-project-id - Using default 
value: 0
20210516 05:46:40.455 TRACE:: Config.Get(): Configuration key not found. Key: 
data-permission-manager - Using default value: DataPermissionManager
20210516 05:46:40.517 TRACE:: AlgorithmManager.CreateTokenBucket(): Initializing
LeakyBucket: Capacity: 120 RefillAmount: 18 TimeInterval: 1440
20210516 05:46:40.540 TRACE:: Config.GetValue(): 
algorithm-manager-time-loop-maximum - Using default value: 20
20210516 05:46:40.601 TRACE:: TextSubscriptionDataSourceReader.SetCacheSize(): 
Setting cache size to 71582788 items
20210516 05:46:41.617 TRACE:: Config.GetValue(): algorithm-creation-timeout - 
Using default value: 90
20210516 05:46:41.629 TRACE:: PythonInitializer.Initialize(): start...
PythonEngine.Initialize(): Runtime.Initialize()...
Runtime.Initialize(): Py_Initialize...
Runtime.Initialize(): PyEval_InitThreads...
Runtime.Initialize(): Initialize types...
Runtime.Initialize(): Initialize types end.
Runtime.Initialize(): AssemblyManager.Initialize()...
Runtime.Initialize(): AssemblyManager.UpdatePath()...
PythonEngine.Initialize(): GetCLRModule()...
PythonEngine.Initialize(): clr GetManifestResourceStream...
20210516 05:46:46.004 TRACE:: PythonInitializer.Initialize(): ended
20210516 05:46:46.016 TRACE:: AlgorithmPythonWrapper(): Python version 3.6.8 
|Anaconda, Inc.| (default, Dec 30 2018, 01:25:33)
[GCC 7.3.0]: Importing python module main
20210516 05:46:46.420 ERROR:: Loader.TryCreatePythonAlgorithm():  
System.Exception: AlgorithmPythonWrapper(): SyntaxError : invalid syntax 
(main.py, line 4) SyntaxError : invalid syntax (main.py, line 4)
at QuantConnect.AlgorithmFactory.Python.Wrappers.AlgorithmPythonWrapper..ctor(St
ring moduleName) in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Algori
thmFactory/Python/Wrappers/AlgorithmPythonWrapper.cs:line 146
at QuantConnect.AlgorithmFactory.Loader.TryCreatePythonAlgorithm(String 
assemblyPath, IAlgorithm& algorithmInstance, String& errorMessage) in /LeanCloud
/CI.Builder/bin/Debug/src/QuantConnect/Lean/AlgorithmFactory/Loader.cs:line 173
20210516 05:46:46.428 ERROR:: Engine.Run():  
QuantConnect.Lean.Engine.Setup.AlgorithmSetupException: During the algorithm 
initialization, the following exception has occurred: 
Loader.TryCreatePythonAlgorithm(): Unable to import python module 
/LeanCLI/main.py. AlgorithmPythonWrapper(): SyntaxError : invalid syntax 
(main.py, line 4) SyntaxError : invalid syntax (main.py, line 4)
at QuantConnect.Lean.Engine.Setup.BacktestingSetupHandler.CreateAlgorithmInstanc
e(AlgorithmNodePacket algorithmNodePacket, String assemblyPath) in /LeanCloud/CI
.Builder/bin/Debug/src/QuantConnect/Lean/Engine/Setup/BacktestingSetupHandler.cs
:line 104
at QuantConnect.Lean.Engine.Engine.Run(AlgorithmNodePacket job, AlgorithmManager
manager, String assemblyPath, WorkerThread workerThread) in 
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Engine/Engine.cs:line 119
20210516 05:46:46.432 TRACE:: JOB HANDLERS:
20210516 05:46:46.437 TRACE::          DataFeed:     
QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed
20210516 05:46:46.440 TRACE::          Setup:        
QuantConnect.Lean.Engine.Setup.ConsoleSetupHandler
20210516 05:46:46.442 TRACE::          RealTime:     
QuantConnect.Lean.Engine.RealTime.BacktestingRealTimeHandler
20210516 05:46:46.444 TRACE::          Results:      
QuantConnect.Lean.Engine.Results.BacktestingResultHandler
20210516 05:46:46.446 TRACE::          Transactions: 
QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler
20210516 05:46:46.457 ERROR:: Algorithm.Initialize() Error: During the algorithm
initialization, the following exception has occurred: 
Loader.TryCreatePythonAlgorithm(): Unable to import python module 
/LeanCLI/main.py. AlgorithmPythonWrapper(): SyntaxError : invalid syntax 
(main.py, line 4) SyntaxError : invalid syntax (main.py, line 4) Stack Trace: 
During the algorithm initialization, the following exception has occurred: 
Loader.TryCreatePythonAlgorithm(): Unable to import python module 
/LeanCLI/main.py. AlgorithmPythonWrapper(): SyntaxError : invalid syntax 
(main.py, line 4) SyntaxError : invalid syntax (main.py, line 4)
During the algorithm initialization, the following exception has occurred: 
Loader.TryCreatePythonAlgorithm(): Unable to import python module 
/LeanCLI/main.py. AlgorithmPythonWrapper(): SyntaxError : invalid syntax 
(main.py, line 4) SyntaxError : invalid syntax (main.py, line 4)
20210516 05:46:46.462 TRACE::          Alpha:        
QuantConnect.Lean.Engine.Alphas.DefaultAlphaHandler
20210516 05:46:46.466 TRACE::          ObjectStore:  
QuantConnect.Lean.Engine.Storage.LocalObjectStore
20210516 05:46:46.473 TRACE:: DefaultAlphaHandler.Exit(): Exiting...
20210516 05:46:46.480 TRACE:: DefaultAlphaHandler.Exit(): Ended
20210516 05:46:46.482 TRACE:: BacktestingResultHandler.Exit(): starting...
20210516 05:46:46.486 TRACE:: BacktestingResultHandler.Exit(): Saving logs...
20210516 05:46:46.510 TRACE:: Debug: Your log was successfully created and can 
be retrieved from: /Results/main-log.txt
20210516 05:46:46.512 TRACE:: BacktestingResultHandler.Run(): Ending Thread...
20210516 05:46:46.512 TRACE:: StopSafely(): waiting for 'Result Thread' thread 
to stop...
20210516 05:46:46.683 TRACE:: Config.GetValue(): regression-update-statistics - 
Using default value: False
20210516 05:46:46.688 TRACE::
STATISTICS:: Fitness Score 0
STATISTICS:: Kelly Criterion Estimate 0
STATISTICS:: Kelly Criterion Probability Value 0
STATISTICS:: Sortino Ratio 0
STATISTICS:: Return Over Maximum Drawdown 0
STATISTICS:: Portfolio Turnover 0
STATISTICS:: Total Insights Generated 0
STATISTICS:: Total Insights Closed 0
STATISTICS:: Total Insights Analysis Completed 0
STATISTICS:: Long Insight Count 0
STATISTICS:: Short Insight Count 0
STATISTICS:: Long/Short Ratio 100%
STATISTICS:: Estimated Monthly Alpha Value $0
STATISTICS:: Total Accumulated Estimated Alpha Value $0
STATISTICS:: Mean Population Estimated Insight Value $0
STATISTICS:: Mean Population Direction 0%
STATISTICS:: Mean Population Magnitude 0%
STATISTICS:: Rolling Averaged Population Direction 0%
STATISTICS:: Rolling Averaged Population Magnitude 0%
STATISTICS:: OrderListHash d41d8cd98f00b204e9800998ecf8427e
20210516 05:46:46.692 TRACE:: BacktestingResultHandler.SendAnalysisResult(): 
Processed final packet
20210516 05:46:46.699 TRACE:: Engine.Run(): Disposing of setup handler...
20210516 05:46:46.710 TRACE:: Engine.Main(): Analysis Completed and Results 
Posted.
Engine.Main(): Analysis Complete.
20210516 05:46:46.715 TRACE:: Engine.Main(): Packet removed from queue: main
20210516 05:46:46.717 TRACE:: LeanEngineSystemHandlers.Dispose(): start...
20210516 05:46:46.719 TRACE:: LeanEngineSystemHandlers.Dispose(): Disposed of 
system handlers.
20210516 05:46:46.721 TRACE:: LeanEngineAlgorithmHandlers.Dispose(): start...
20210516 05:46:46.724 TRACE:: LeanEngineAlgorithmHandlers.Dispose(): Disposed of
algorithm handlers.
20210516 05:46:46.729 TRACE:: Program.Main(): Exiting Lean...
Traceback (most recent call last):
  File "/Users/alex/opt/anaconda3/envs/lean/lib/python3.6/site-packages/
lean/main.py", line 30, in main
    lean.main(standalone_mode=False)
  File "/Users/alex/opt/anaconda3/envs/lean/lib/python3.6/site-packages/
click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/alex/opt/anaconda3/envs/lean/lib/python3.6/site-packages/
click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/alex/opt/anaconda3/envs/lean/lib/python3.6/site-packages/
lean/click.py", line 80, in invoke
    result = super().invoke(ctx)
  File "/Users/alex/opt/anaconda3/envs/lean/lib/python3.6/site-packages/
click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/alex/opt/anaconda3/envs/lean/lib/python3.6/site-packages/
click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/alex/opt/anaconda3/envs/lean/lib/python3.6/site-packages/
lean/commands/backtest.py", line 201, in backtest
    lean_runner.run_lean("backtesting", algorithm_file, output, engine_image, 
debugging_method)
  File "/Users/alex/opt/anaconda3/envs/lean/lib/python3.6/site-packages/
lean/components/docker/lean_runner.py", line 110, in run_lean
    f"Something went wrong while running '{relative_project_dir}' in the 
'{environment}' environment, the output is stored in '{relative_output_dir}'")
RuntimeError: Something went wrong while running 'My Python Project' in the 
'backtesting' environment, the output is stored in 'My Python 
Project/backtests/2021-05-16_01-46-37'
Error: Something went wrong while running 'My Python Project' in the 
'backtesting' environment, the output is stored in 'My Python 
Project/backtests/2021-05-16_01-46-37'

Can someone please help?

Pushing Files to Cloud with Invalid Names Logs Wrong Information

When we push a file to cloud with invalid name, the message is not correct:
Create new project named ShortFileTest in QuantConnect.com, and pull it:
$ lean cloud pull --project "ShortFileTest"
add lib.py file to the ShortFileTest directory and push the project
$ lean cloud push --project "ShortFileTest"

The following message is shown:
"Cannot push 'ShortFileTest 2' (failed on $HOME\Local\ShortFileTest\lib.py): Invalid credentials, please log
in using lean login"

where it should inform that the file name is too short.

Allow running in Release mode

I noticed Lean CLI always runs projects in Debug configuration. It would be useful to have an option to build and run the project in Release mode also. In a Release build we get compiler optimization and debug specific statements are left out of the output binaries. For example, I use a lot of Debug.Assert() calls that are good for testing at runtime but will also slow down the algorithm.

I suggest to also include the Release build of the Lean Engine in its Docker image. That should give some performance improvement to running the algos.

Backtest fails after building project with both Debug and Release configurations

Steps to reproduce:

lean create-project my-project
dotnet build my-project # --configuration Debug
dotnet build my-project --configuration Release
lean backtest my-project

Backtest will fail with this error:

/LeanCLI/lean-cloud/my-project/obj/Release/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs(4,12): error CS0579: Duplicate
'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute [/LeanCLI/lean-cloud/my-project/my-project.csproj]
.
.
.

I noticed the project will run again after deleting the obj directory.

rm -r my-project/obj

I think to fix it, we can get lean command to remove the obj directory before running backtest, or maybe we could use the .dockerignore file to exclude the build artifacts from going into the docker image.

Backtest not reading Generated Data

Hi,
I tried to generate random data using lean data generate, but when I run the backtest, the newly generated ticker doesn't appear in the Universe Selection nor in the OnData feed, even if I add the equity manually.

I tried reseting the lean repository and updating the lean data generate as explained in #3 (comment).

It raises an error at the end:
20210622 18:14:08.080 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/ths/20210617_trade.zip 20210622 18:14:08.104 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/ths/20210618_trade.zip 20210622 18:14:08.128 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/ths/20210621_trade.zip 20210622 18:14:08.147 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/minute/ths/20210622_trade.zip 20210622 18:14:08.172 TRACE:: LeanDataWriter.Write(): Created: ../../../Data/equity/usa/daily/ths.zip Symbol[1]: THS 2T Progress: 100.0% - Symbol data generation and output completed Random data generation has completed. Launching coarse data generator... 20210622 18:14:08.173 TRACE:: Config.Get(): Configuration key not found. Key: reserved-words-prefix - Using default value: quantconnect- 20210622 18:14:08.176 TRACE:: CoarseUniverseGeneratorProgram.ProcessDailyFolder(): Processing: /Lean/Data/equity/usa/daily 20210622 18:14:08.196 TRACE:: CoarseUniverseGeneratorProgram.PopulateSidContex(): Generating SID context from QuantQuote's map files. 20210622 18:14:08.209 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/vxxb.zip not found! 20210622 18:14:08.213 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/vxx.zip not found! 20210622 18:14:08.213 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker VXX not found! 20210622 18:14:08.213 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker VXXB not found! 20210622 18:14:08.286 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/vxx.zip not found! 20210622 18:14:08.286 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker VXX not found! 20210622 18:14:08.341 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/aol.zip not found! 20210622 18:14:08.344 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/twx.zip not found! 20210622 18:14:08.344 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker TWX not found! 20210622 18:14:08.344 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker AOL not found! 20210622 18:14:08.350 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/twx.zip not found! 20210622 18:14:08.350 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker TWX not found! 20210622 18:14:08.365 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/nb.zip not found! 20210622 18:14:08.424 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/nwsa.zip not found! 20210622 18:14:08.426 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/foxa.zip not found! 20210622 18:14:08.428 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/tfcfa.zip not found! 20210622 18:14:08.428 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker TFCFA not found! 20210622 18:14:08.428 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker FOXA not found! 20210622 18:14:08.428 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker NWSA not found! 20210622 18:14:08.441 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/spwr.zip not found! 20210622 18:14:08.442 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/spwra.zip not found! 20210622 18:14:08.442 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker SPWR not found! 20210622 18:14:08.442 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker SPWRA not found! 20210622 18:14:08.442 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker SPWR not found! 20210622 18:14:08.533 ERROR:: CoarseUniverseGeneratorProgram.Run(): ../../../Data/equity/usa/daily/qqqq.zip not found! 20210622 18:14:09.483 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker QQQQ not found! 20210622 18:14:10.415 ERROR:: CoarseUniverseGeneratorProgram.Run(): Daily data for ticker NB not found! 20210622 18:14:23.855 TRACE:: CoarseUniverseGeneratorProgram.Run(): Processed 1000 in 0:00:00.9406899 at 1063.05 files/second 20210622 18:14:24.743 TRACE:: CoarseUniverseGeneratorProgram.Run(): Processed 2000 in 0:00:01.8294276 at 1093.24 files/second 20210622 18:14:25.678 TRACE:: CoarseUniverseGeneratorProgram.Run(): Processed 3000 in 0:00:02.7642657 at 1085.28 files/second

However, when I check the minute folder, the fundamental/coarse and the map_files, the new ticker appears normally. I don't understand what is missing for Lean to find it.

Any suggestions?

Thanks

Not stopping in VSCode breakpoints (v1.10)

Hi,
My local lean was working fine in v1.05. Today, when I updated to lean 1.10 it is not stopping in the breakpoints when debugging using VSCode. I restarted the working directory and pulled all projects from the cloud again, but no changes. It connects to the port 5678 as expected and runs the code, but now it skips all breakpoints. Tried other solutions but none seems to work.
Any ideas?

Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.