{"name":"Lean: The Open-Source Algorithmic Trading Engine by QuantConnect","description":"Lean is a professional-caliber, event-driven algorithmic trading engine developed by QuantConnect, supporting strategies in Python and C#. It provides a robust platform for backtesting and live trading across various financial markets. With its modular design and comprehensive features, Lean empowers quantitative developers to build and deploy sophisticated trading algorithms.","github":"https://github.com/QuantConnect/Lean","url":"https://osrepos.com/repo/quantconnect-lean","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/quantconnect-lean","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/quantconnect-lean.md","json":"https://osrepos.com/repo/quantconnect-lean.json","topics":["algorithmic-trading-engine","finance","python","c-sharp","quantconnect","trading-platform","backtesting","forex"],"keywords":["algorithmic-trading-engine","finance","python","c-sharp","quantconnect","trading-platform","backtesting","forex"],"stars":null,"summary":"Lean is a professional-caliber, event-driven algorithmic trading engine developed by QuantConnect, supporting strategies in Python and C#. It provides a robust platform for backtesting and live trading across various financial markets. With its modular design and comprehensive features, Lean empowers quantitative developers to build and deploy sophisticated trading algorithms.","content":"## Introduction\n\nLean is an advanced, open-source algorithmic trading engine crafted by QuantConnect. Designed with elegant engineering and deep quant concept modeling in mind, it offers a powerful framework for developing, backtesting, and live trading algorithms. Supporting both Python and C#, Lean is an event-driven platform that comes with out-of-the-box alternative data and live-trading capabilities, making it a versatile tool for quantitative finance.\n\nThe engine's modular architecture ensures that each component is pluggable and customizable, providing flexibility for developers to tailor the platform to their specific needs. It includes models for all major plug-in points, facilitating extensive customization and integration.\n\n## Installation\n\nFor most users, the recommended way to get started with Lean is through the LEAN CLI, which is prebuilt and runs on all platforms.\n\nTo install the CLI:\n\nbash\npip install lean\n\n\nFor local development and direct source code access, you can clone the repository:\n\nbash\ngit clone https://github.com/QuantConnect/Lean.git\ncd Lean\n\n\nDetailed installation guides for specific operating systems are available:\n\n### macOS\n\n1.  Install [Visual Studio Code for Mac](https://code.visualstudio.com/download \"Visual Studio Code for Mac\" target=\"_blank\").\n2.  Install the [C# Dev Kit extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit \"C# Dev Kit extension\" target=\"_blank\").\n3.  Install [.NET 9 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/9.0 \".NET 9 SDK\" target=\"_blank\").\n4.  Build the solution:\n    bash\ndotnet build\n    \n5.  Run the solution:\n    bash\ncd Launcher/bin/Debug\ndotnet QuantConnect.Lean.Launcher.dll\n    \n\n### Linux (Debian, Ubuntu)\n\n1.  Install [.NET 9](https://docs.microsoft.com/en-us/dotnet/core/install/linux \".NET 9\" target=\"_blank\").\n2.  Compile Lean Solution:\n    bash\ndotnet build QuantConnect.Lean.sln\n    \n3.  Run Lean:\n    bash\ncd Launcher/bin/Debug\ndotnet QuantConnect.Lean.Launcher.dll\n    \n\n### Windows\n\n1.  Install [Visual Studio](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx \"Visual Studio\" target=\"_blank\").\n2.  Open `QuantConnect.Lean.sln` in Visual Studio.\n3.  Build the solution (this should trigger NuGet package restore).\n4.  Press `F5` to run.\n\nFor comprehensive Python support details, refer to the [Algorithm.Python project](https://github.com/QuantConnect/Lean/tree/master/Algorithm.Python#quantconnect-python-algorithm-project \"Algorithm.Python project\" target=\"_blank\").\n\n## Examples\n\nThe LEAN CLI simplifies common tasks for managing and running your algorithmic trading projects. Here are some examples of commands you can use:\n\n*   **Create a new project:**\n    bash\nlean project-create\n    \n*   **Run a local Jupyter Lab environment:**\n    bash\nlean research\n    \n*   **Backtest a project locally:**\n    bash\nlean backtest\n    \n*   **Optimize a project locally:**\n    bash\nlean optimize\n    \n*   **Start live trading a project locally:**\n    bash\nlean live\n    \n\nFor a full list of commands, download the [LEAN CLI Cheat Sheet](https://cdn.quantconnect.com/i/tu/cli-cheat-sheet.pdf \"LEAN CLI Cheat Sheet\" target=\"_blank\").\n\n## Why Use Lean?\n\nLean stands out as a premier choice for algorithmic trading due to several key advantages:\n\n*   **Professional Caliber:** It's an event-driven platform built for serious quant development, offering robust features for complex strategies.\n*   **Multi-Language Support:** Develop your algorithms in either Python or C#, leveraging the strengths of both languages.\n*   **Modular and Customizable:** Its highly modular design allows for extensive customization, enabling developers to integrate custom components and data sources.\n*   **Comprehensive Functionality:** Supports backtesting, optimization, and live trading across various asset classes, including stocks, options, forex, and futures.\n*   **Active Community and Support:** Benefit from a vibrant community, extensive documentation, and dedicated forums for assistance and collaboration.\n*   **Local-Cloud Hybrid Development:** Seamlessly develop and debug strategies locally while integrating with cloud services for deployment and scaling.\n\n## Links\n\n*   **Lean Home Page:** [https://www.lean.io/](https://www.lean.io/ \"Lean Home Page\" target=\"_blank\")\n*   **Documentation:** [https://www.lean.io/docs/](https://www.lean.io/docs/ \"Lean Documentation\" target=\"_blank\")\n*   **GitHub Repository:** [https://github.com/QuantConnect/Lean](https://github.com/QuantConnect/Lean \"GitHub Repository\" target=\"_blank\")\n*   **LEAN Forum:** [https://www.quantconnect.com/forum/discussions/1/lean](https://www.quantconnect.com/forum/discussions/1/lean \"LEAN Forum\" target=\"_blank\")\n*   **Discord Chat:** [https://www.quantconnect.com/discord](https://www.quantconnect.com/discord \"Discord Chat\" target=\"_blank\")\n*   **Docker Hub:** [https://hub.docker.com/orgs/quantconnect/repositories](https://hub.docker.com/orgs/quantconnect/repositories \"Docker Hub\" target=\"_blank\")\n*   **NuGet:** [https://www.nuget.org/profiles/jaredbroad](https://www.nuget.org/profiles/jaredbroad \"NuGet\" target=\"_blank\")","metrics":{"detailViews":38,"githubClicks":21},"dates":{"published":null,"modified":"2026-06-02T12:14:06.000Z"}}