A CLI aimed at making it easier to run QuantConnect's LEAN engine locally and in the cloud
Project description
Lean CLI
This CLI is still in development. Bugs may still occur and breaking changes may still happen before the 1.0.0 release. Use with caution.
The Lean CLI is a CLI aimed at making it easier to run the LEAN engine locally and in the cloud.
Installation
The CLI can be installed and updated by running pip install -U lean.
After installing the CLI, simply cd into an empty directory and run lean init to set up a Lean CLI project.
Usage
A workflow with the CLI may look like this:
cdinto the Lean CLI project.- Run
lean create-project -l python "RSI Strategy"to create a new project with some basic code to get you started. - Work on your strategy in
./RSI Strategy. - Run a backtest with
lean backtest "RSI Strategy". This runs your backtest in a Docker container containing the same packages as the ones used on QuantConnect.com, but with your own data.
Development
To work on the Lean CLI, clone the repository, enter an environment containing Python 3.6+ and run pip install -r requirements.txt. This command will install the required dependencies and installs the CLI in editable mode. This means you'll be able to edit the code and immediately see the results the next time you run lean.
If you need to add dependencies, first update setup.py (if it is a production dependency) or requirements.txt (if it is a development dependency) and then re-run pip install -r requirements.txt.
The tests can be ran by running pytest. Because a lot of commands interact with the filesystem, the filesystem is mocked before running each test to ensure your local files won't be modified.
Maintainers can publish new releases by pushing a Git tag containing the new version to GitHub. This will trigger a GitHub Actions workflow which releases the current main branch to PyPI with the value of the tag as version. Make sure the version is not prefixed with "v".
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lean-0.1.2.tar.gz.
File metadata
- Download URL: lean-0.1.2.tar.gz
- Upload date:
- Size: 49.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7b039d5a79a11a49c693d3fe99841e8ff6cb9c3d6e3b201b3fad7a8dd21ff00
|
|
| MD5 |
79a12e8f9d1c3c6865f25859a41e92d1
|
|
| BLAKE2b-256 |
9b1499b4f13f471ce0a4b1640eeaf64fe3416afd9408f183fc94116e4406913c
|
File details
Details for the file lean-0.1.2-py3-none-any.whl.
File metadata
- Download URL: lean-0.1.2-py3-none-any.whl
- Upload date:
- Size: 54.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23abf131366e0d601cc5409cc7ddd3501d08b36792107800d23f7e9d60ba1597
|
|
| MD5 |
a87f274273d17fd4759df5270b1d3206
|
|
| BLAKE2b-256 |
e1d802ae9ddef03e8fff63a3cefb09c48b3fe4e8290c9e94d007ec0cb09f215c
|