Editorial verdict Use itchecked 05.12.2026
What it is good at
Lean is the open-source engine behind the QuantConnect cloud: event-driven backtesting and live trading for equities, options, futures, forex and crypto. The core is C#, and strategies can be written in C# or Python. For local work there is the Lean CLI (pip install lean): lean backtest, lean optimize, lean live and lean research with Jupyter all run inside Docker without building the solution yourself. The engine is modular, so fee, slippage, fill and brokerage models are swappable. A standout strength is careful handling of market calendars, splits, dividends and expirations, details home-grown backtesters usually skip. Development is very active: commits and build tags appear almost daily, and the CLI on PyPI updates just as often.
Weak spots
No historical data ships with the engine: for local backtests you gather it yourself or pull it with lean data download, where some datasets cost QuantConnect credits or need subscriptions with vendors such as Polygon and ThetaData. Building from source requires .NET 10 and comfort with the C# ecosystem. Open issues and PRs number in the hundreds, and recent ones include live crypto bugs: GTD and DAY orders on Binance, Bybit and Bitfinex stay open as GTC. There is also a fresh bug in total-return normalization with dividends. The GitHub Releases page has been idle since 2017, so versions are visible only through tags.
Who it is for
Traders working beyond crypto: equities, options and futures through brokers, with correct handling of corporate actions. A fit for QuantConnect users who want to run the same algorithms locally and for teams comfortable with C# or Python in Docker.
Versus alternatives
Against NautilusTrader, Lean wins on asset-class coverage, ready data and the cloud, but models order books and ticks in less detail. Against backtrader it is heavier to install, yet alive and connected to current brokers. For a pure candle-based crypto bot, Freqtrade is simpler and quicker to set up.
Security
Keep broker and exchange keys in a local config or environment variables and issue them without withdrawal rights. Before lean live, run paper mode and check how your exchange handles order types, given the GTD and DAY bugs. Install the CLI only from PyPI and use official QuantConnect Docker images. Set --data-purchase-limit so a backtest cannot spend more credits than you intend.
Alternatives
- Latest build tag 18315 on 4 December 2026; GitHub Releases idle since 2017
- Lean CLI on PyPI: 1.0.235 from 4 December 2026
- License: Apache-2.0
- C# on .NET 10, strategies in C# or Python
Stars by day
GitHub dataGitHub ↗
| Topic | Algo trading & backtesting |
| Language | C# |
| Created | 28.11.2014 |
| Last release | 08.08.2017 |
| Releases / tags | 8 / — |
| Contributors | 247 |
| Commits total / 90d | 14k / 199 |
| Watchers | 490 |
AlgoScore breakdownmethodology →
Comparisons
Topic neighboursAlgo trading & backtesting →
| # | Repository | AlgoScore | ★ | 30d growth | Push | Label |
|---|---|---|---|---|---|---|
| 1 | nautechsystems/nautilus_traderProduction-grade Rust-native trading engine with deterministic event-driven architecture | 90 | 32k | — | today | Use it |
| 2 | vnpy/vnpy基于Python的开源量化交易平台开发框架 | 87 | 47k | — | 24 d | |
| 3 | coding-kitties/investing-algorithm-frameworkFramework for quantitative trading. Complete framework for development, backtesting, and deploying automated trading algorithms and trading bots. | 87 | 2.3k | — | 1 d | |
| 4 | microsoft/qlibQlib is an AI-oriented Quant investment platform that aims to use AI tech to empower Quant Research, from exploring ideas to implementing productions. Qlib supports diverse ML modeling paradigms, including supervised learning, market dynamics modeling, and RL, and is now equipped with https://github | 85 | 51k | — | today | For research |
| 5 | pst-group/pysystemtradeSystematic Trading in python | 85 | 3.7k | — | 33 d | |
| 6 | stefan-jansen/machine-learning-for-tradingCode for Machine Learning for Trading, 3rd edition — from data sourcing to live execution. | 84 | 22k | — | today | |
| 7 | polakowo/vectorbtThe research engine that gives you an unfair advantage. Run thousands of trading ideas before others finish one. | 84 | 10k | — | 6 d | Use it |
| 8 | skfolio/skfolioPython library for portfolio optimization and risk models, built on scikit-learn | 84 | 2.7k | — | 1 d |