QuantConnect

Lean: Build and Run Algorithmic Trading Strategies

QuantConnect Lean is an event-driven engine for developing, backtesting, and live trading algorithmic strategies across financial markets. It suits quantitative developers who want a modular C# engine with Python support and local or cloud-assisted workflows.

View on GitHub Compare
Stars
21.9k
Forks
5.3k
Stars, last 30 days
+507

Our take

Health score

73/100

How it is scored
Activity
53
Community
92
Issues
70
Pull requests
77

+507 stars in the last 30 days

  • Merges more pull requests than 82% of the projects we track
  • More contributors than 78% of the projects we track

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

22,535

Forks

5,421

Change since Nov 14, 2026: +14 stars·+3 forks

Overview

Lean is an event-driven algorithmic trading engine for building and running strategies across financial markets. It provides a shared platform for researching ideas, backtesting them against market data, and deploying algorithms for live trading.

The engine is designed for quantitative developers who need customizable trading components and support for both C# and Python. Its command-line interface can manage projects and run local research, backtests, optimization, and live trading workflows.

Key Features

  • Event-driven engine for algorithmic trading.
  • Supports C# and Python algorithm development.
  • Provides backtesting and live trading workflows.
  • Modular architecture with customizable components.
  • Supports alternative data and multiple financial markets.
  • LEAN CLI commands for project creation, research, backtesting, optimization, and live trading.
  • Local development with Docker-based CLI workflows and cloud-assisted development options.

Use Cases

  • Quant developers can evaluate a trading strategy locally before considering live deployment.
  • C# or Python developers can build systematic strategies using a shared trading engine.
  • Researchers can use the CLI's local Jupyter environment to explore algorithm ideas.
  • Teams can customize engine components to fit specific data or trading workflows.

Getting Started

Install the CLI with pip install lean, then use lean project-create to create a starter project. See the README for setup details and platform-specific instructions.

Alternatives

  • FinRL: FinRL focuses on reinforcement-learning trading workflows, while Lean is a general event-driven engine for backtesting and live strategies.
ProjectLanguageLicenseStarsStatus
LeanC#Apache-2.021.9kNot checked yet
FinRLJupyter NotebookMIT16.5kActive

Considerations

Running the engine locally requires the .NET SDK and a suitable development setup. The CLI's research, backtesting, optimization, and live workflows use Docker. Live trading involves additional setup beyond installing the CLI. Lean is a flexible engine rather than a ready-made strategy, so users need to supply their own algorithms and assess their risks.

Found this useful?

Share it with someone who would like Lean.

Comparisons