Libraries

Third-Party Libraries

Introduction

Libraries are third-party software repositories that you can use in your projects. You can use many of the available open-source libraries to complement the classes and methods that you create. Libraries reduce your development time because it's faster to use a pre-built, open-source library than to write the functionality. Libraries can be used in backtesting, research, and live trading.

Supported Libraries

We support various libraries for machine learning, plotting, and data processing. As members often request new libraries, we frequently add new libraries to the underlying docker image that runs the Lean engine. The following list comes directly from the underlying docker image and is the exhaustive set of libraries that we support. To use these libraries, add the relevant usingimport statement at the top of your file.

// Name                               Version
Accord                               3.6.0
Accord.Audio                         3.6.0
Accord.Fuzzy                         3.6.0
Accord.Genetic                       3.6.0
Accord.MachineLearning               3.6.0
Accord.MachineLearning.GPL           3.6.0
Accord.Math                          3.6.0
Accord.Statistics                    3.6.0
CNTK.CPUOnly                         2.8.0-rc0.dev20200201
Catalyst                             1.0.16767
Catalyst.Models.English              1.0.17127
CloneExtensions                      1.3.0
CoinAPI.WebSocket.V1                 1.6.7
Common.Logging                       3.4.1
Common.Logging.Core                  3.4.1
CsvHelper                            19.0.0
Deedle                               2.1.0
DotNetZip                            1.16.0
DynamicInterop                       0.9.1
FSharp.Core                          4.5.2
IQFeed.CSharpApiClient               2.5.1
LaunchDarkly.EventSource             3.3.2
LibTopoART                           0.94.0
MathNet.Filtering                    0.7.0
MathNet.Filtering.Kalman             0.7.0
MathNet.Numerics                     4.15.0
MathNet.Spatial                      0.6.0
McMaster.Extensions.CommandLineUtils 2.6.0
Microsoft.IO.RecyclableMemoryStream  2.2.0
Microsoft.ML                         1.5.5
Microsoft.NET.Test.Sdk               16.9.4
Microsoft.TestPlatform.ObjectModel   16.9.4
Moq                                  4.16.1
NUnit                                3.13.3
NUnit3TestAdapter                    4.2.1
NetMQ                                4.0.1.6
Newtonsoft.Json                      12.0.3
NodaTime                             3.0.5
NumSharp                             0.30.0
QLNet                                1.11.3
QuantConnect.pythonnet               2.0.16
R.NET                                1.9.0
RestSharp                            106.12.0
SharpLearning.AdaBoost               0.31.8
SharpLearning.Common.Interfaces      0.31.8
SharpLearning.Containers             0.31.8
SharpLearning.CrossValidation        0.31.8
SharpLearning.DecisionTrees          0.31.8
SharpLearning.Ensemble               0.31.8
SharpLearning.FeatureTransformations 0.31.8
SharpLearning.GradientBoost          0.31.8
SharpLearning.InputOutput            0.31.8
SharpLearning.Metrics                0.31.8
SharpLearning.Neural                 0.31.8
SharpLearning.Optimization           0.31.8
SharpLearning.RandomForest           0.31.8
SharpNeatLib                         2.4.4
SharpZipLib                          1.3.3
System.ComponentModel.Composition    6.0.0
System.Reflection.Emit.Lightweight   4.7.0
fasterflect                          3.0.0
protobuf-net                         3.0.29
# Name                   Version
_libgcc_mutex            0.1
absl-py                  1.0.0
alembic                  1.7.7
algopy                   0.5.7
anyio                    3.5.0
appdirs                  1.4.4
arch                     4.14
argon2-cffi              21.3.0
argon2-cffi-bindings     21.2.0
arviz                    0.9.0
ase                      3.22.1
asn1crypto               1.4.0
astor                    0.8.1
astropy                  4.0.1.post1
async-generator          1.10
async-timeout            4.0.2
atari-py                 0.2.9
attrs                    21.4.0
auto-ks                  0.1
autograd                 1.4
autopage                 0.5.0
babel                    2.10.1
backcall                 0.2.0
backports-zoneinfo       0.2.1
bayesian-optimization    1.2.0
beautifulsoup4           4.9.0
binutils_impl_linux-64   2.35.1
binutils_linux-64        2.35
blas                     1.0
blaze                    0.11.3
bleach                   4.1.0
blis                     0.7.7
blosc                    1.21.0
bokeh                    2.3.2
boto3                    1.22.5
botocore                 1.25.5
bottleneck               1.3.4
bzip2                    1.0.8
c-ares                   1.18.1
ca-certificates          2022.4.26
cached-property          1.5.2
catalogue                2.0.7
catboost                 0.23.2
certifi                  2021.5.30
cffi                     1.14.0
cftime                   1.6.0
chardet                  4.0.0
charset-normalizer       2.0.4
click                    8.0.4
cliff                    3.10.1
cloudpickle              1.3.0
cmaes                    0.8.2
cmd2                     2.4.1
cmdstanpy                0.4.0
cntk                     2.7
colorama                 0.4.4
colorlog                 6.6.0
colorlover               0.3.0
conda                    4.10.3
conda-env                2.6.0
conda-package-handling   1.7.3
contextvars              2.4
convertdate              2.4.0
copulae                  0.3.1
copulalib                1.1.0
copulas                  0.3.3
coverage                 5.5
creme                    0.5.1
cryptography             35.0.0
cudatoolkit              10.2.89
cufflinks                0.17.3
cvxopt                   1.2.0
cvxpy                    1.1.15
cycler                   0.11.0
cymem                    2.0.6
cython                   0.29.17
cytoolz                  0.11.0
dask                     2021.3.0
dask-core                2021.3.0
dataclasses              0.8
datashape                0.5.4
deap                     1.3.1
debugpy                  1.5.1
decorator                4.4.2
defusedxml               0.7.1
deprecated               1.2.13
dgl                      0.6.1
dill                     0.3.1.1
distributed              2.20.0
docutils                 0.14
dtw-python               1.0.5
dx                       0.1.2
ecos                     2.0.10
entrypoints              0.4
ephem                    3.7.7.1
fastai                   1.0.61
fastai2                  0.0.17
fastcore                 1.4.0
fastprogress             1.0.2
fasttext                 0.9.2
fbprophet                0.6
feature-selector         1.0.0
featuretools             0.14.0
filelock                 3.4.1
findiff                  0.8.5
flask                    1.1.2
flask-cors               3.0.10
flatbuffers              2.0
freetype                 2.10.4
frozendict               2.3.2
fsspec                   2022.1.0
future                   0.18.2
gast                     0.2.2
gcc_impl_linux-64        7.5.0
gcc_linux-64             7.5.0
gensim                   3.8.0
gluonts                  0.4.3
google-pasta             0.2.0
googledrivedownloader    0.4
gplearn                  0.4.1
greenlet                 1.1.2
grpcio                   1.44.0
gxx_impl_linux-64        7.5.0
gxx_linux-64             7.5.0
gym                      0.17.2
h2o                      3.34.0.7
h5py                     3.1.0
hdf5                     1.10.4
heapdict                 1.0.1
hijri-converter          2.2.3
hmmlearn                 0.2.3
holidays                 0.9.12
hopcroftkarp             1.2.5
hyperopt                 0.2.5
icu                      67.1
idna                     3.3
immutables               0.17
importlib-metadata       4.8.3
importlib-resources      5.4.0
iniconfig                1.1.1
intel-openmp             2022.0.1
ipykernel                5.5.6
ipython                  7.16.3
ipython-genutils         0.2.0
ipywidgets               7.5.1
isodate                  0.6.1
itsdangerous             2.0.1
jax                      0.1.68
jaxlib                   0.1.69
jedi                     0.17.2
jinja2                   3.0.3
jmespath                 0.10.0
joblib                   1.1.0
jpeg                     9e
json5                    0.9.6
jsonschema               3.2.0
jupyter-client           7.1.2
jupyter-core             4.9.2
jupyter-server           1.13.1
jupyterlab               3.2.6
jupyterlab-pygments      0.1.2
jupyterlab-server        2.10.3
keras                    2.3.1
keras-applications       1.0.8
keras-preprocessing      1.1.2
keras-rl                 0.4.2
kernel-headers_linux-64  2.6.32
kiwisolver               1.3.1
kmapper                  2.0.1
korean_lunar_calendar    0.2.1
langcodes                3.3.0
lcms2                    2.12
ld_impl_linux-64         2.35.1
libedit                  3.1.20170329
libffi                   3.2.1
libgcc-devel_linux-64    7.5.0
libgcc-ng                9.1.0
libgfortran-ng           7.5.0
libgfortran4             7.5.0
libgomp                  9.3.0
libllvm10                10.0.1
libpng                   1.6.37
libprotobuf              3.17.2
libstdcxx-devel_linux-64 7.5.0
libstdcxx-ng             8.2.0
libtiff                  4.2.0
libuuid                  1.0.3
libwebp-base             1.2.2
lightgbm                 2.3.0
littleutils              0.2.2
llvmlite                 0.34.0
locket                   1.0.0
lunarcalendar            0.0.9
lxml                     4.5.0
lz4-c                    1.9.3
lzo                      2.10
mako                     1.1.6
markdown                 3.3.6
markupsafe               2.0.1
matplotlib               3.2.1
mistune                  0.8.4
mkl                      2020.2
mkl-service              2.3.0
mkl_fft                  1.3.0
mkl_random               1.1.1
mmh3                     2.5.1
mock                     4.0.3
mpi                      1.0
mpi4py                   3.0.3
mplfinance               0.12.4a0
mpmath                   1.2.1
msgpack                  1.0.0
msgpack-numpy            0.4.7.1
msgpack-python           1.0.2
multipledispatch         0.6.0
murmurhash               1.0.7
mxnet                    1.6.0
nbclassic                0.3.5
nbclient                 0.5.9
nbconvert                6.0.7
nbformat                 5.1.3
ncurses                  6.3
nest-asyncio             1.5.5
netcdf4                  1.5.8
networkx                 2.5.1
neural-tangents          0.2.1
ninja                    1.10.2
ninja-base               1.10.2
nltk                     3.4.5
notebook                 6.4.10
numba                    0.46.0
numdifftools             0.9.40
numexpr                  2.8.1
numpy                    1.18.1
numpy-base               1.18.1
nvidia-ml-py3            7.352.0
oauthlib                 3.2.0
odo                      0+unknown
olefile                  0.46
opencv-python            4.5.5.64
openjpeg                 2.4.0
openmpi                  4.0.3
openssl                  1.1.1n
opt_einsum               3.3.0
optuna                   2.3.0
osqp                     0.6.2.post5
outdated                 0.2.1
packaging                21.3
pandas                   0.25.3
pandas-flavor            0.2.0
pandas-market-calendars  1.7
pandocfilters            1.5.0
parso                    0.7.1
partd                    1.2.0
pathy                    0.6.1
patsy                    0.5.2
pbr                      5.8.1
pennylane                0.9.0
persim                   0.3.1
pexpect                  4.8.0
pickleshare              0.7.5
pillow                   8.4.0
pingouin                 0.3.8
pip                      21.2.2
plotly                   4.7.1
pluggy                   1.0.0
pomegranate              0.11.1
ppscore                  0.0.2
preshed                  3.0.6
prettytable              2.5.0
prometheus-client        0.14.1
prompt-toolkit           3.0.29
property-cached          1.6.4
protobuf                 3.19.4
psutil                   5.9.0
ptvsd                    4.3.2
ptyprocess               0.7.0
pulp                     1.6.8
py                       1.11.0
pyaml                    21.10.1
pybind11                 2.9.2
pycosat                  0.6.3
pycparser                2.21
pydantic                 1.8.2
pydevd-pycharm           201.8538.36
pyflux                   0.4.15
pyglet                   1.5.0
pygments                 2.12.0
pykalman                 0.9.5
pymc3                    3.8
pymeeus                  0.5.10
pyopenssl                22.0.0
pyparsing                3.0.8
pyperclip                1.8.2
pyportfolioopt           1.2.2
pyramid-arima            0.9.0
pyrb                     1.0.1
pyro-api                 0.1.2
pyro-ppl                 1.3.1
pyrsistent               0.18.0
pysocks                  1.7.1
pystan                   2.17.1.0
pytables                 3.6.1
pytest                   7.0.1
python                   3.6.8
python-dateutil          2.8.0
python-graphviz          0.8.4
python-louvain           0.16
python_abi               3.6
pytorch                  1.5.0
pytz                     2021.3
pytz-deprecation-shim    0.1.0.post0
pywavelets               1.1.1
pyyaml                   6.0
pyzmq                    22.3.0
qdldl                    0.1.5.post2
quadprog                 0.1.11
quantecon                0.4.8
quantlib                 1.24
quantlib-python          1.18
rauth                    0.7.3
ray                      1.9.1
rdflib                   5.0.0
readline                 7.0
redis                    4.2.2
requests                 2.27.1
requests-oauthlib        1.3.1
retrying                 1.3.3
ripser                   0.6.1
riskparityportfolio      0.2
rpy2                     3.3.6
ruamel_yaml              0.15.100
ruptures                 1.1.3
scikit-learn             0.23.2
scikit-learn-extra       0.2.0
scikit-multiflow         0.4.1
scikit-optimize          0.7.4
scikit-posthocs          0.6.7
scikit-tda               0.0.3
scipy                    1.5.4
scs                      3.2.0
sdeint                   0.2.1
seaborn                  0.11.0
semantic-version         2.6.0
send2trash               1.8.0
setuptools               58.0.4
setuptools-git           1.2
simpy                    4.0.1
six                      1.16.0
sklearn-contrib-py-earth 0.1.0
sklearn-json             0.1.0
sktime                   0.3.0
sktime-dl                0.1.0
smart-open               5.2.1
sniffio                  1.2.0
sortedcontainers         2.4.0
soupsieve                2.3.2.post1
spacy                    3.3.0
spacy-legacy             3.0.9
spacy-loggers            1.0.2
sqlalchemy               1.4.36
sqlite                   3.26.0
srsly                    2.4.3
ssm                      0.0.1
stable-baselines         2.10.0
statistics               1.0.3.5
statsmodels              0.11.1
stevedore                3.5.0
sympy                    1.9
sysroot_linux-64         2.12
ta                       0.5.25
ta-lib                   0.4.18
tabulate                 0.8.9
tadasets                 0.0.4
tbb                      2021.6.0
tblib                    1.7.0
tensorboard              1.15.0
tensorflow               1.15.2
tensorflow-base          1.15.0
tensorflow-estimator     1.15.1
tensorforce              0.5.5
termcolor                1.1.0
terminado                0.12.1
testpath                 0.6.0
theano                   1.0.4
thinc                    8.0.15
threadpoolctl            3.1.0
tigramite                4.1.0
tk                       8.6.11
toml                     0.10.2
tomli                    1.2.3
toolz                    0.11.2
torch                    1.10.1
torch-cluster            1.5.7
torch-geometric          1.7.0
torch-scatter            2.0.5
torch-sparse             0.6.7
torch-spline-conv        1.2.0
torchvision              0.11.2
tornado                  6.1
tqdm                     4.63.0
trading-calendars        2.1.1
traitlets                4.3.3
tsfresh                  0.15.1
tslearn                  0.3.1
tweepy                   3.8.0
typer                    0.4.1
typing-extensions        3.10.0.2
typing_extensions        4.1.1
tzdata                   2022.1
tzlocal                  4.2
ujson                    1.35
umap-learn               0.4.3
urllib3                  1.25.8
wasabi                   0.9.1
wcwidth                  0.2.5
webencodings             0.5.1
websocket-client         1.3.1
werkzeug                 2.0.3
wheel                    0.37.1
widgetsnbextension       3.5.2
wrapt                    1.12.1
xarray                   0.15.1
xgboost                  1.1.0
xz                       5.2.5
yaml                     0.2.5
zict                     2.1.0
zipp                     3.6.0
zlib                     1.2.12
zstd                     1.4.9

Add New Libraries

To request a new library, contact us. We will add the library to the queue for review and deployment. Since the libraries run on our servers, we need to ensure they are secure and won't cause harm. The process of adding new libraries takes 2-4 weeks to complete. View the list of libraries currently under review on the Issues list of the Lean GitHub repository.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: