Best GitHub Repos for Building AI Trading Agents

The open-source projects worth your time if you want to build, backtest, and run trading agents — curated and sanity-checked from a trader's seat.

How to read this list: these are the repos we'd actually start from. Stars are a popularity signal, not a quality guarantee — we note what each is genuinely good at and who it's for. Everything here is open source; the GitHub links are not affiliate links. This is educational, not financial advice.

LLM & multi-agent frameworks

Start here if you want agents that reason — reading news, fundamentals and price action and arguing their way to a decision.

TradingAgents

Multi-agent LLM · Python

A full "trading firm" built from LLM agents — fundamental, sentiment, news and technical analysts plus trader and risk-management roles that debate to a decision. The best reference for how multi-agent trading architectures fit together.

Stars: ~89k
Best for: Learning multi-agent design
Status: Actively maintained

ai-hedge-fund

Multi-agent LLM · Python

Agents modeled on famous investors that collaborate to evaluate stocks and produce recommendations — explicitly educational, and it does not place real trades. The most approachable codebase for seeing multi-agent reasoning end to end.

Stars: ~61k
Best for: Your first read-through
Status: Actively maintained

FinRobot

LLM agent platform · Python

An AI4Finance agent platform aimed at financial analysis and automated equity-research reports. Useful if your "agent" is more analyst than trader — generating research rather than firing orders.

Best for: Research-report agents
Status: Actively maintained

FinGPT

Open financial LLMs · Python

Open financial large language models and fine-tuning recipes — the model layer many finance agents sit on top of, especially for sentiment and news understanding.

Best for: The model/sentiment layer
Status: Actively maintained
Advertisement
Ad — In-Content

Reinforcement-learning agents

For agents that learn a policy from market data rather than follow hand-written rules.

FinRL

Deep RL · Python

The first widely-used framework for financial reinforcement learning — a "train → backtest → trade" pipeline with ready-made market environments and DRL agents. The standard starting point for the RL approach, with a live-trading layer (FinRL-Trading / FinRL-X) that adds Alpaca broker integration.

Stars: ~15.5k
Best for: RL trading experiments
Status: Actively maintained

Backtesting frameworks

An agent is only as trustworthy as its backtest. Test the strategy here before you let an agent trade it.

NautilusTrader

Event-driven platform · Python/Rust

A production-grade platform with a Rust core, built to reproduce real execution faithfully — and the same strategy code runs in backtest and live. The serious choice when you intend to actually deploy.

Best for: Backtest-to-live parity
Status: Actively maintained

vectorbt

Vectorized research · Python

Blazingly fast, vectorized backtesting — sweep thousands of parameter combinations in seconds. Ideal for research and hypothesis testing before you commit a strategy to an agent.

Best for: Fast parameter sweeps
Status: Actively maintained (open-source core)

Backtesting.py

Lightweight · Python

The simplest way to get a first backtest running. Small API, clean charts — perfect for learning and quick one-off tests of a strategy idea.

Best for: Beginners & quick tests
Status: Maintained

Zipline-reloaded

Factor research · Python

The community-maintained continuation of Quantopian's Zipline — a clean pipeline that separates data, strategy and risk, with tear-sheet analytics. Strong for factor-based research.

Best for: Factor / portfolio research
Status: Community maintained

QuantConnect / LEAN

Multi-asset engine · C#/Python

An institutional-grade, open-source engine behind the QuantConnect platform — multi-asset, with a huge data ecosystem and cloud or local execution. The most "batteries-included" option.

Best for: Serious, multi-asset systems
Status: Actively maintained

Backtrader

Event-driven classic · Python

For years the go-to event-driven backtester, with excellent docs and a gentle learning curve. Honest note: active development largely stalled around 2021 — it still works well, but don't expect new features.

Best for: Learning event-driven design
Status: ⚠ Maintenance stalled (~2021)
Going deeper? A great meta-resource is awesome-ai-in-finance — a continuously updated, community-curated list of AI/LLM strategies and tools across the financial markets.

How these fit together — a build path

  1. Read an agent codebase to learn the pattern — start with ai-hedge-fund, then TradingAgents for the full multi-agent picture.
  2. Pin down a strategy and backtest it honestly with vectorbt or Backtesting.py before any agent touches it. (Our strategy guides each show how to wire the rules into an agent.)
  3. Choose your agent style — rules-plus-LLM (TradingAgents) or learned policy (FinRL).
  4. Paper-trade through a broker API before risking real money — walk through it in Build Your First AI Trading Agent.
A word from someone who lost money the hard way: I traded options in the late 2000's. The latency, the tools and my poor knowledge allowed me to lose a lot of money. The tools available now are game-changing — you can build systems that remove your emotions and let you focus on your trading style. That's the whole point of this list. Backtest everything, paper-trade first, and never deploy money you can't afford to lose. More about why AIClarity exists →

This page is for educational purposes only and is not financial advice. Open-source software is provided "as is" — review the licence and code before use. Automated trading carries substantial risk; backtest and paper-trade thoroughly before risking real capital.