Video Summary

I Turned Claude Code into an AI Hedge Fund... and this happened

GreymatterAI

Main takeaways
01

Five AI agents (modeled on top investors) each receive different data feeds to create information asymmetry and diverse signals.

02

A blind experiment used only data from three months prior; picks were locked before any future prices were revealed.

03

The AI portfolio returned -2.89%, beating the S&P 500 (-3.90%) by ~1.1% but trailing established hedge‑fund indices by ~2.46 points.

04

System design prioritized deterministic CIO decisions, real‑time signal detection, a visual React dashboard, and verifiable backtests.

Key moments
Questions answered

How was the blind experiment structured to prevent hindsight bias?

The system loaded only historical data up to a chosen date three months earlier, locked the AI's picks in the database, and then compared those locked selections against future price moves—ensuring no future data influenced decisions.

What returns did the AI hedge fund achieve in the test period?

The AI portfolio returned -2.89% over the three‑month period, compared with the S&P 500 at -3.90%, so the AI outperformed the S&P by about 1.1% but still lost to the hedge‑fund benchmark index by ~2.46 points.

What does information asymmetry mean in this system and why was it used?

Information asymmetry means each agent receives distinct data feeds (e.g., macro news, market depth, sentiment), mirroring real hedge funds where specialists see different information—this increases disagreement and richer signal aggregation.

What tech stack and safeguards were used to make the system production‑like?

The build used Claude Code, Docker Compose, TimescaleDB/Postgres, Redis + Celery, FastAPI, React, and yfinance/GPT‑4o. The decision layer was deterministic (CIO) to avoid LLM hallucination and the system included real‑time signal detection and a verifiable backtest pipeline.

Did the AI protect against crashes or concentrated losses?

Yes — the model exhibited a crash protection rate of 77.5%, which limited downside exposure despite an overall negative return during the quarter.

A Personal AI Hedge Fund Initiative 00:00

"So, I decided to build my own AI hedge fund, five agents modeled after the greatest investors of all time."

  • The speaker was inspired after scanning the SEC website, where large Wall Street players must disclose their trades. This led to the realization that significant market opportunities are often kept among elites, making it difficult for the average investor to capitalize on them.

  • To challenge this status quo, the speaker created an AI hedge fund composed of five trading agents based on notable investors. The aim was to analyze data and make investment choices continually, differentiating from typical automated trading bots that provide simplistic suggestions.

  • The experiment would test whether their AI hedge fund could outperform top hedge funds on Wall Street using only three months of data without manipulating or using future knowledge.

Information Asymmetry in AI Decision-Making 00:47

"Each hedge fund manager only sees the actual data that they are good at reading and would actually have access to inside the hedge fund."

  • Unlike typical AI models where agents share the same data, this hedge fund model allows each agent to access different information types, simulating a real-world hedge fund where strategies differ.

  • Each agent's exclusivity in data access enhances the depth of their analysis, providing varied perspectives on market conditions—macro, technical, and fundamental—to reflect real trading scenarios.

  • This model allows investors to observe real-time decision-making processes, showcasing how each agent values various aspects of data differently leading to potential disagreements in trading strategies.

Designing the AI Algorithm and Architecture 03:26

"So, imagine your five agents like a team with different specialties."

  • The architecture emphasizes a modular design with separate data feeds for each agent. For example, one could focus on economic news, while another monitors market depth, all contributing signals to a centralized strategy engine.

  • Key components of the architecture involve real-time signal detection, a visual dashboard, and a blind backtest feature that operates under the assumption that past data is unknown, illustrating a more realistic trading environment.

  • The choice of technologies includes Python, Flask or FastAPI for the API, Celery for task management, and Timescale or another time-series database for storing signal data.

Building and Debugging the AI Hedge Fund System 05:14

"This is what building actual production software looks like—not a clean montage, but hours of why isn't this working?"

  • The development progressed into practical implementation, facing challenges like data ingestion, real-time signaling, and API limitations. Issues arose with the regime detection and a conservative threshold that limited the exploration of emerging sectors.

  • Despite hitting rate limits with the OpenAI API and navigating multiple bugs, the speaker remained committed to resolving these issues promptly to conduct a successful experiment.

  • The journey highlighted the often chaotic nature of software development as the team worked through persistent hiccups while striving to achieve a functional AI hedge fund capable of real-time trading analysis.

Designing a Blind Experiment 09:14

"I had to make this a scientifically proven experiment, but without wasting 3 months of my life."

  • The creator aimed to prove the effectiveness of an AI hedge fund model without the need for extensive time analysis by implementing a blind experiment.

  • A double-blind study minimizes the risk of experimenter bias. In this setup, neither the subject nor the researcher knows which treatment the subject is receiving, thus eliminating subconscious influences.

  • The first step involved selecting data from exactly three months ago and populating a database only with historical data up to that point, ensuring no future information could bias the AI's stock selections.

  • After loading the historical data, the AI scanned a watch list of 20 stocks, relying solely on the data it had access to, mimicking real-time analysis.

Experiment Execution and Results Reporting 10:56

"So, we now have the results and I promise you I’ve not looked at these yet."

  • The experimentation process proceeded to record the AI's stock picks before examining their performance over the three-month period.

  • The creator confirmed that upon review, the AI's portfolio returned -2.89%, while the S&P 500 returned -3.9%. This indicates that despite the AI experiencing a loss, it outperformed the S&P by 1.1%.

  • The AI's design showed remarkable conservatism, with a crash protection rate of 77.5%, which shielded it from significant losses during a challenging financial quarter.

  • A detailed stock performance comparison highlighted that the AI's selections included substantial wins, such as a 46% return on a stock and 11% on a nuclear-related investment, although there were also some losses.

Evaluation of Hedge Fund Performance 14:10

"This full experiment was verifiable and provable; the results are real, no matter what they were."

  • The creator noted that the AI hedge fund's overall performance was slightly behind the benchmark index of established hedge funds, losing to them by 2.46 points.

  • While the AI hedge fund did not outperform top hedge funds in this instance, it demonstrated a capacity to exceed the performance of the S&P 500, paving the way for future experiments that might yield better results.

  • The experiment showcased the potential for AI in finance, highlighting that an individual can successfully create an effective investment tool from a personal space, pointing to a significant transformation in the financial industry driven by AI capabilities.