explaingit

luckyone7777/llm-trading-lab

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

TLDR

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
Click or tap to explore — scroll the page freely

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

Things people build with this

USE CASE 1

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

USE CASE 2

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

USE CASE 3

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

USE CASE 4

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

Tech stack

PythonyfinanceStooq

Getting it running

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.

In plain English

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.

Copy-paste 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?
Open on GitHub → Explain another repo

← luckyone7777 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.