gitmyhub

LLM-Trading-Lab

Python ★ 7.5k updated 12d ago

This repo powers my experiment where ChatGPT manages a real-money micro-cap stock portfolio.

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.

PythonyfinanceStooqsetup: moderatecomplexity 3/5

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.

Where it fits