gitwtfhub

wtf is llm-trading-lab?

luckyone7777/llm-trading-lab — explained in plain English

Analysis updated 2026-06-24

7,458PythonAudience · researcherComplexity · 3/5Setup · moderate

TL;DR

A six-month real-money experiment letting ChatGPT control a $100 stock portfolio on micro-cap stocks, with every trade, AI decision log, and performance metric published openly for anyone to study.

Mindmap

mindmap
  root((LLM Trading Lab))
    What it does
      Real-money AI experiment
      Trade decision logging
      Performance benchmarking
    Data sources
      yfinance
      Stooq
    Metrics tracked
      Sharpe ratio
      Drawdown
      vs S&P 500 index
    Audience
      AI researchers
      Finance hobbyists

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Study the full trade history and AI decision logs from a real ChatGPT-controlled stock portfolio experiment.

REASON 2

Use the Python framework to run your own LLM investing experiment on real or simulated stock data.

REASON 3

Benchmark a different AI model's trading decisions against the original ChatGPT results using the LLM Investor Behavior Benchmark.

REASON 4

Analyze performance metrics like Sharpe ratio and drawdown to evaluate how ChatGPT compared to index benchmarks.

What's in the stack?

PythonyfinanceStooq

How it stacks up

luckyone7777/llm-trading-labsamuelclay/newsblurbndr/pipreqs
Stars7,4587,4577,452
LanguagePythonPythonPython
Setup difficultymoderatemoderateeasy
Complexity3/54/51/5
Audienceresearchergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 1h+

Requires a brokerage account and API access for real trading, yfinance and Stooq work for historical data without accounts.

Wtf does this do

LLM Trading Lab started as a six-month experiment in which ChatGPT was given control of a real-money stock portfolio. The author funded the account with $100 and let the AI make all buy and sell decisions on micro-cap stocks, which are shares in very small companies. The goal was to test whether a large language model could make profitable trading decisions using real market data, and the results were kept completely public. The experiment was structured so that decisions could only be made going forward. No past decisions were changed or hidden, and every trade, conversation with the AI, and performance number was logged and preserved. The repository holds those logs, weekly research summaries, a full trade history in spreadsheet form, and a 40-page evaluation paper summarizing what happened over the course of the experiment. The code itself is written in Python and uses standard financial data tools. It pulls stock price data from sources called yfinance and Stooq, calculates standard investment performance metrics such as Sharpe ratio and drawdown, enforces automatic stop-loss rules to limit losses, and compares results against major indexes like the S&P 500 and Russell 2000. The author is now building a more general framework from this work, called the LLM Investor Behavior Benchmark, intended to make it easier to run similar experiments with other AI models. The project is motivated by skepticism toward the marketing claims around AI-powered investing tools. By running a real experiment with real money and publishing every decision openly, the author aimed to provide a concrete, honest answer to the question of whether AI can actually generate returns in the stock market. The repository is open to contributions and the author posts follow-up analysis on a Substack newsletter.

Yoink these prompts

Prompt 1
Using the LLM Trading Lab Python code, show me how to pull micro-cap stock data with yfinance and feed it to an LLM to get a buy or sell decision.
Prompt 2
How do I set up the stop-loss rules from luckyone7777/llm-trading-lab so the system automatically exits a position after a set percentage loss?
Prompt 3
Walk me through running the performance analysis script from this repo to compare an AI portfolio against the S&P 500 and calculate Sharpe ratio.
Prompt 4
How would I swap ChatGPT for Claude or another LLM in the LLM Trading Lab framework to run a comparison experiment?

Frequently asked questions

wtf is llm-trading-lab?

A six-month real-money experiment letting ChatGPT control a $100 stock portfolio on micro-cap stocks, with every trade, AI decision log, and performance metric published openly for anyone to study.

What language is llm-trading-lab written in?

Mainly Python. The stack also includes Python, yfinance, Stooq.

How hard is llm-trading-lab to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is llm-trading-lab for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.