# LEAN

QuantConnect's engine without the cloud — your server, your data, your broker login.

**Best for:** developers who want one Python or C# algorithm to backtest and then trade US stocks, options or futures from their own server; not for anyone without a data source or patience for Docker.

*https://stockmarketstack.com/tools/lean · Backtesting Frameworks & Algo Trading Libraries*

## Also covered on

- [LEAN on CryptoMarkets.tools](https://cryptomarkets.tools/tools/lean.md) — how the same engine models perpetual funding, and which crypto exchange plugins are still maintained

## Facts

### At a glance

| Field | Value |
| --- | --- |
| Vendor | QuantConnect |
| Category | Backtesting Frameworks & Algo Trading Libraries |
| Job | live_trading |
| Website | https://www.lean.io/ |
| Pricing model | subscription |
| Free tier | true |
| Open source | true |
| Licence | Apache-2.0 |
| Self-hosted | true |
| Tested hands-on | no |
| Claimed by vendor | no |
| Last updated | 2026-10-07 |

### Pricing

| Tier | USD | Period |
| --- | --- | --- |
| Engine | 0 USD | month |
| Researcher seat (for the CLI) | 10 USD | month |
| Private Cloud Hosts | 4800 USD | year |

### Coverage

| Field | Value |
| --- | --- |
| Asset classes | stocks, etf, options, futures, indices, forex, crypto |
| Markets | us, global |
| Works outside the US | true |
| Data latency | none |
| Platforms | library, cli |
| AI features | none |

### Interfaces

| Field | Value |
| --- | --- |
| API | false |
| Webhooks | false |
| Scripting | Python, C# |
| Python | true |
| Spreadsheet add-in | false |
| MCP server | false |
| Export | json, pdf |

### Capabilities

Yes: backtesting, automation, live_trading, paper_trading, options_analysis

No: charting, screening, scanning, portfolio_tracking, broker_import, tax_reporting, alerts, news

*Verified: pricing 2026-10-07; capabilities 2026-10-07; coverage 2026-10-07.*

## What it is

The event-driven engine QuantConnect's cloud runs, published on its own under Apache-2.0. The
core is C#; algorithms are C# or Python 3.11. One algorithm class runs the backtest, the paper
session and the live deployment, so research code and trading code cannot drift apart.

This card is the engine you host. The browser IDE, cloud compute and mounted data are
[QuantConnect](https://stockmarketstack.com/tools/quantconnect), sold per seat and per node. You come here to keep the
execution, the data and the broker login on your own hardware.

As of 7 October 2026 the last commit on `master` was 6 October, which also produced build tag
18167, NuGet `QuantConnect.Lean.Engine` 2.5.18164 and a new Docker image. About 21,900 stars,
238 open issues and 22 open pull requests; not archived. Builds are numbered tags, three on
6 October alone, so the version is whichever build you pulled. The GitHub releases tab is stuck
at v2.4.0.1 of August 2017 and tells you nothing: versioning moved to continuous builds years ago.

## Pricing

Nothing in the public repository is held back. The money is around it:

- **Built from source or run from the Docker image:** free, no account.
- **The LEAN CLI** (`pip install lean`, 1.0.229 of 28 August 2026) is Apache-2.0 too, but its
  documentation says it requires a paid QuantConnect organization — from a $10/month Researcher
  seat ($96/year).
- **Private Cloud Hosts**, $4,800/year, runs a cluster of LEAN servers on your own machines.
- **LEAN Enterprise**, a proprietary build with speed improvements not pushed to the open source,
  runs on-premises only on the Institution tier.

QuantConnect's own pages disagree on local use: the CLI docs say any paid tier runs LEAN locally,
while the pricing table marks on-premises backtesting and live trading as "Cloud" below
Institution. Settle that before buying a seat for local work.

## Data & coverage

**LEAN ships no data you could trade on.** The samples cover daily bars for 21 US tickers and
minute bars for 10, mostly one week of October 2013. Data lives on disk as zipped CSV under
`/data/securityType/market/resolution/ticker/`; you fill it from a third-party feed or buy
QuantConnect's AlgoSeek-sourced files. On a Researcher seat:

- the **US Equity Security Master** (splits, dividends, ticker changes) is $600/year — $1,800 at
  Institution — and every equity download depends on it;
- bulk US equity history is $2,136/year for daily or hour bars, $11,760 for minute and $16,800 for
  tick, then $600/year for updates. Minute is 500 GB on disk, tick 1.5 TB;
- by ticker, $1 per security for daily bars and $0.05 per security-day for each minute file;
- bulk equity options at minute resolution total $46,320 in year one with prerequisites, and 6 TB.

Third-party feeds are plugins: [Massive](https://stockmarketstack.com/tools/massive) (still called Polygon in the docs) for
equities and options, [ThetaData](https://stockmarketstack.com/tools/thetadata), [IQFeed](https://stockmarketstack.com/tools/iqfeed) on Windows only, and
[Databento](https://stockmarketstack.com/tools/databento) for US futures only. The Polygon plugin serves unadjusted prices and
the docs send you to the $600 Security Master for adjustments; without it a split reads as a crash.

## Integrations

For a US stock or options account, five brokerage plugins have public source: Interactive Brokers,
Tradier, TradeStation, Alpaca and tastytrade. Charles Schwab, Webull, Public, Clear Street and Eze
are on the CLI's live-trading list, but their code is not public — the docs link a Schwab
repository that returns 404 — so they arrive as prebuilt modules for a logged-in, paid account.

With Interactive Brokers, LEAN by default starts IB Gateway inside its container, logs in, pushes
the IB Key prompt to your phone and restarts the gateway weekly at a time you set; or you run your
own gateway and pass its host and port.

The default brokerage model charges equities, options and futures at IB's schedule — $0.005 a
share, $1 minimum, capped at 0.5% of trade value — with zero slippage and a margin account; a cash
account settles stock at T+1. Results are JSON, plus an HTML or PDF tearsheet from `lean report`.

## Limitations

- **No alerts from a self-hosted live algorithm.** The engine refuses email, SMS, webhook, Telegram
  and FTP notifications and logs that sending is not implemented. If it stops, nothing tells you.
- **The config lists brokers you cannot use.** `Launcher/config.json` keeps live environments for
  FXCM, FTX, FTX US and Exante, whose plugins are archived.
- **Bought data stays in LEAN.** The CLI data agreement allows individual or internal use only and
  says the files may not be converted for other applications — a $12,360 minute-bar purchase does
  not move to another backtester.
- **The docs lag the code.** The getting-started page asks for .NET 9 on macOS and .NET 6 on Linux;
  the solution targets .NET 10. lean.io advertises T+3 settlement; the code settles stock at T+1.
- **It is heavy.** Docker Hub reports the amd64 image at 14 GB and arm64 at 5 GB.

## Alternatives

[NautilusTrader](https://stockmarketstack.com/tools/nautilus-trader) is the closest match: backtest to live unchanged,
Interactive Brokers and Databento for equities, a Rust core, LGPL. [QuantRocket](https://stockmarketstack.com/tools/quantrocket)
is the other self-hosted Docker platform wired to Interactive Brokers, built on Zipline and Moonshot.
If the backtest never becomes a live order, [Backtrader](https://stockmarketstack.com/tools/backtrader) or
[Zipline-reloaded](https://stockmarketstack.com/tools/zipline-reloaded) are a pip install rather than a .NET solution, and
[ib_async](https://stockmarketstack.com/tools/ib-async) gives you the IB connection without an engine.

## FAQ

### Can I run LEAN without a QuantConnect subscription?

Yes, but not through the CLI. Cloning the repository and building it with the .NET SDK, or running the quantconnect/lean Docker image yourself, needs no account. The pip-installable lean CLI calls the QuantConnect API from lean init onwards, and its documentation says it requires membership in an organization on a paid tier, which starts at a $10 Researcher seat.

### What does US stock data for a local LEAN cost?

Whatever your own source costs, or QuantConnect's prices. From QuantConnect on a Researcher seat, the US Equity Security Master (splits, dividends, ticker changes) is $600 a year and every equity download depends on it; bulk minute history adds $11,760 for the first year. By ticker it is $1 per security for daily bars and 5 cents per security-day for each minute file.

### Which US brokers can a self-hosted LEAN trade through?

Interactive Brokers, Tradier, TradeStation, Alpaca and tastytrade have public source in the QuantConnect GitHub organization. Charles Schwab, Webull, Public, Clear Street and Eze are listed for local live trading too, but their source is not public, so they arrive as packages the CLI downloads for a logged-in, paid organization.

### Will my algorithm send me an email when it trades?

Not from the open-source engine. Its default messaging handler refuses email, SMS, webhook, Telegram and FTP notifications and writes a Send not implemented line to the log instead. Those notifications are delivered by QuantConnect's cloud; self-hosted, you write your own sender.

## Also from QuantConnect

- [QuantConnect](https://stockmarketstack.com/tools/quantconnect.md)

## Also worth comparing

- [Lumibot](https://stockmarketstack.com/tools/lumibot.md) — One strategy class for backtest and live, plus a built-in LLM agent runtime.
- [NautilusTrader](https://stockmarketstack.com/tools/nautilus-trader.md) — Rust core, Python API, one strategy that backtests and trades live unchanged.
- [StockSharp](https://stockmarketstack.com/tools/stocksharp.md) — C#/.NET algo stack with 384 connectors; source is published but no longer open source.
- [FinRL-X](https://stockmarketstack.com/tools/finrl-x.md) — FinRL's successor, carrying one portfolio-weight vector from stock selection to Alpaca.
- [ib_async](https://stockmarketstack.com/tools/ib-async.md) — The community continuation of ib_insync — same API, new maintainers, TWS still required.
- [QuantRocket](https://stockmarketstack.com/tools/quantrocket.md) — Zipline and Moonshot in Docker on your own hardware, wired to Interactive Brokers.
