# LLM Trading Lab: Documenting a Live AI-Managed Stock Portfolio Experiment

> LLM Trading Lab records a completed 6-month experiment in which ChatGPT managed a real-money micro-cap stock portfolio starting from $100 under strict predefined rules. The repository preserves all decision logs, trade records, and a 40-page evaluation report as a forward-only research artifact.

**LuckyOne7777/LLM-Trading-Lab** — This repo powers my experiment where ChatGPT manages a real-money micro-cap stock portfolio.

- Repository: https://github.com/LuckyOne7777/LLM-Trading-Lab
- Stars: 7,504 · Forks: 1,554
- Language: Python
- License: not declared
- Published: 2026-09-10 · Updated: 2026-09-10 · Language: en
- Canonical page: https://hysenlabs.com/projects/luckyone7777-llm-trading-lab

## What LLM Trading Lab Is and the Question It Attempts to Answer

LLM Trading Lab started as a personal experiment prompted by a simple question: can ChatGPT actually generate alpha in live trading, or is the AI trading marketing hype empty? The author began with $100 and a 6-month time horizon, using ChatGPT to select micro-cap stocks under a set of hard predefined rules. The repository preserves everything generated during that experiment: the decision logs, the daily portfolio accounting in CSV format, the weekly deep research summaries, and a completed 40-page PDF evaluation report. The README explicitly describes it as a forward-only record, meaning historical artifacts are not rewritten after the fact to look better than they were. The research question has since expanded from chasing alpha to studying how large language models behave as portfolio decision-makers more broadly, treating the trading domain as a measurable test environment for LLM decision-making.

## Repository Structure: Experiments, Logs, and Evaluation Artifacts

The top-level structure contains an Experiments/ directory where each trading experiment lives. The chatgpt_micro_cap/ directory has the following layout: a trading_script.py that ran the live experiment, a graphing/ subdirectory with scripts for generating performance charts (daily_returns.py, drawdown.py, and others), a csv_files/ directory containing Daily_Updates.csv and Trade_Log.csv for portfolio accounting, an evaluation/ directory with the evaluation report and the PDF paper, and a collected_artifacts/ directory with the decision chat logs, weekly deep research summaries, and a deep_research_index.md. The README states that historical artifacts remain unchanged and new experiments are layered on top rather than replacing earlier content. This forward-only policy is significant: it means the record cannot be retroactively improved to make the experiment look more successful than it was.

## Getting Started: Installing Dependencies and Running the Script

The repository uses Python 3.11 or later and provides a Makefile for common tasks. To set up the environment:

```bash
make venv
```

To install all dependencies:

```bash
make install
```

The requirements.txt lists the key packages: numpy, pandas, yfinance for market data, matplotlib for charts, pandas_market_calendars for trading day logic, pysentiment2 for sentiment analysis, openai and anthropic for LLM API access, and python-dotenv for environment variable handling. The LIBB research framework is also installed directly from GitHub. To run the trading script:

```bash
make trade
```

The Makefile's activate target prints the command to activate the virtual environment (source venv/bin/activate), since shell activation cannot be automated through a Makefile rule. All data is sourced from yfinance as the primary market data provider, with Stooq as a fallback when yfinance is unavailable.

## The Experiment Design: Hard Constraints and Forward-Only Decisions

The experiment's design addresses a common criticism of AI trading demonstrations: the lack of verifiable forward-only decision-making. Every trading decision was made before knowing the outcome, with the decision log preserved in real time. The setup used automated stop-loss enforcement so the model could not selectively override risk controls after the fact. Benchmark comparisons against the S&P 500 and Russell 2000 indices were included from the start, which gives a baseline for evaluating whether the micro-cap portfolio performed better or worse than passive index investing over the same period.

Analytical metrics in the evaluation include CAPM alpha, Sharpe ratio, Sortino ratio, and maximum drawdown. These are standard portfolio performance measures that allow the LLM's results to be compared against the academic literature on portfolio management. The evaluation is documented as a full PDF paper, not just a summary table.

## What the Research Scope Has Expanded To

The original micro-cap experiment was a single 6-month data point. The README describes the repository as having evolved into a baseline framework for studying LLM behavior as portfolio decision-makers. The author is developing the LLM Investor Behavior Benchmark (LIBB) at github.com/LuckyOne7777/LLM-Investor-Behavior-Benchmark as a general experimental structure for future experiments. A planned next experiment involves newly listed IPOs with monthly analysis published on Substack.

This framing positions the repository as a research platform rather than a trading tool. It is not designed to run an ongoing autonomous portfolio in production; it is a controlled experiment framework where each run is bounded, documented, and evaluated. The decision logs, chat artifacts, and weekly research summaries are preserved for auditability, which makes the repository more useful as a research dataset than as operational trading software.

## Limitations: No License, Micro-Cap Scope, No Live Brokerage API

The most significant constraint for anyone wanting to reuse the code is the absence of a declared license. The repository has no LICENSE file and no license field in the README. Under copyright law, this means the code cannot be legally copied, modified, or redistributed without explicit permission from the author. The CONTRIBUTING.md (linked from the README but in the Other/ directory) documents how to contribute, but contributing to the repository is not the same as having a license to use the code independently.

The experiment is also scoped specifically to micro-cap stocks using yfinance data, which has its own reliability limitations for real-money trading applications. There is no integration with a live brokerage API. The trading_script.py ran decisions and recorded them, but the actual trade execution was performed manually. This means the script does not constitute a production-ready autonomous trading bot. Any deployment in a real-money context requires adding a brokerage API integration that is not present in the codebase.

## Does AI Trading Actually Work? What the Repository Addresses

The repository directly tackles the question that its premise raises. The author's motivation in the README is explicit: AI is being marketed as a replacement for human decision-making across industries, and trading is a domain where mistakes are measurable, irreversible, and costly. The platform tests those claims using forward-only decisions, full transparency, and publicly logged results. Whether ChatGPT can generate alpha in micro-cap equities is not a question with a universal answer, and the repository does not claim one. The 40-page evaluation report is the primary deliverable for answering that question for the specific experiment conducted.

For researchers studying which LLM performs best for trading-related decisions, this repository provides a single documented data point using ChatGPT under specific constraints. The LIBB framework extends the structure to allow comparative experiments across different models and asset classes, which would be required to draw broader conclusions about LLM trading performance.

## Conclusion

LLM Trading Lab is a useful research artifact for engineers and researchers who want to study how a large language model behaves as a portfolio decision-maker under controlled conditions. The 40-page PDF evaluation and the full decision logs make the methodology reproducible. For anyone who wants to run a similar experiment, the LIBB framework linked in the README provides the structural starting point. The repository does not have a declared license, which limits how the code can be used in derivative work. Verify the license situation before adapting trading_script.py for production use.

## FAQ

### Which LLM is best at trading according to LLM Trading Lab?

The LLM Trading Lab experiment used ChatGPT as the decision-maker for the documented micro-cap experiment. The README does not compare multiple models; the LIBB framework linked in the repository is described as the tool for running comparative experiments across different LLMs.

### Can ChatGPT code a trading bot?

The trading_script.py in this repository is a Python script that uses the OpenAI API to request trading decisions and records the results. It is not an autonomous bot with live brokerage integration; trade execution was performed manually during the experiment.

### Does AI trading really work?

The repository addresses this question directly through a 6-month forward-only experiment. The 40-page PDF evaluation report in evaluation/ documents the methodology and results. The README does not make a general claim about whether AI trading works; it provides the data from one specific experiment.

### Which AI model is best for trading?

This repository documents one experiment using ChatGPT. The README describes the companion LIBB framework as designed for running comparative experiments across different AI models and asset classes, which would be needed to compare model performance in trading contexts.

## Sources

- [Issues](https://github.com/LuckyOne7777/LLM-Trading-Lab/issues)
- [LuckyOne7777/LLM-Trading-Lab on GitHub](https://github.com/LuckyOne7777/LLM-Trading-Lab)
- [README](https://github.com/LuckyOne7777/LLM-Trading-Lab/blob/main/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/luckyone7777-llm-trading-lab
