I Installed the "AI Hedge Fund" With 56K GitHub Stars. Here's What Happened.
I
dailytechai-agentstrading

I Installed the "AI Hedge Fund" With 56K GitHub Stars. Here's What Happened.

A deep dive into virattt's viral ai-hedge-fund repo — 19 AI investor agents, LangGraph orchestration, real financial analysis under the hood, and why the personas mostly don't matter.

AK
Aniket Karne
Senior DevOps Engineer
· 3 min read

Disclaimer: This is not financial advice. I am not a financial advisor. Everything here is for educational and entertainment purposes only. I have no positions in any of the stocks mentioned. Do your own research.

It started with a GitHub notification. One of those repos that somehow crosses your feed at the right time — 56,000 stars, updated four days ago, a one-person project called “AI Hedge Fund” by a developer named virattt.

The premise is audacious: 19 AI agents, each modeled after a legendary investor, voting on whether to buy or sell a stock. Warren Buffett agents. Nassim Taleb agents. Cathie Wood agents. Michael Burry. Bill Ackman. Charlie Munger. Peter Lynch. Stanley Druckenmiller. Plus a roster of functional analysts — technical, fundamental, sentiment, valuation — feeding data into the decision.

And then there’s the disclaimer, front and center: “The system does not actually make any trades.”

I installed it anyway. Here’s what I found.

The Setup

The project lives at github.com/virattt/ai-hedge-fund. Clone it, set up a .env file, and you’re off.

Two API keys are recommended: one for the LLM (OpenAI, Anthropic, Groq, or DeepSeek) and one for financial data. The financial data key costs money — roughly $20-50/month depending on how much you query. I used Groq for the LLM (free tier) and yfinance as a fallback for data.

git clone https://github.com/virattt/ai-hedge-fund.git
cd ai-hedge-fund
poetry install
cp .env.example .env
# Edit .env with your API keys
poetry run python src/main.py --ticker AAPL,MSFT,NVDA

The project uses LangGraph for orchestrating the agent workflow. Each investor agent is a node in the graph. The graph state carries analyst signals forward until a Portfolio Manager node makes the final call.

What Each Agent Actually Does

The code is revealing. Each investor agent follows the same pattern: fetch financial data, run quantitative analysis, stuff everything into a compact prompt that says “You are Warren Buffett,” ask for JSON. Here’s what the Warren Buffett agent’s DCF calculation actually does:

# Three-stage DCF model
stage1_growth = min(conservative_growth, 0.08)  # Stage 1: cap at 8%
stage2_growth = min(conservative_growth * 0.5, 0.04)  # Stage 2: cap at 4%
terminal_growth = 0.025  # Long-term GDP growth rate
discount_rate = 0.10  # Conservative 10%
intrinsic_value = stage1_pv + stage2_pv + terminal_pv
# Apply 15% additional margin of safety
conservative_intrinsic_value = intrinsic_value * 0.85

The margin of safety calculation — a Buffett signature — is baked in. That’s actually thoughtful. For the Taleb agent, the logic flips: it uses a “barbell strategy” — either extremely bullish or extremely bearish, avoiding anything in between.

The Output

Running against AAPL, MSFT, and NVDA took about 8 minutes. Here’s roughly what came out:

  • Warren Buffett: “bullish, confidence 72%. Wonderful business, strong moat, fair price.”
  • Nassim Taleb: “bearish, confidence 61%. Fragile structure, tail risk from iPhone cycle saturation.”
  • Cathie Wood: “bullish, confidence 68%. AI-driven disruption of healthcare and finance will multiply revenue.”
  • Michael Burry: “bearish, confidence 55%. Overvalued relative to intrinsic value.”
  • Portfolio Manager: “hold. Mixed signals — no consensus.”

The interesting part: Taleb and Burry were both bearish. Buffett and Cathie Wood were both bullish. Two completely different worldviews arriving at opposite conclusions from the same data.

The Real Cost

Here’s what the repo doesn’t tell you in the README:

  • LLM calls: Each of 19 investor agents makes at least one LLM call. That’s 19 API calls per ticker. For 3 tickers: 57 calls. At Groq rates this took 8 minutes. At OpenAI GPT-4o prices: roughly $0.15-0.30 per run.
  • Financial data: yfinance is free but unreliable for fundamentals. The paid API key runs $20-200/month.
  • Time: The LangGraph orchestration adds overhead. A cold run is 5-10 minutes.

The backtesting engine in src/backtesting/ is sophisticated — it simulates portfolio allocation, margin requirements, and computes real risk metrics. But backtesting requires historical data at scale, which means more API calls, more money.

What Surprised Me

The personas mostly don’t matter. The actual investment logic is in the quantitative analysis — ROE thresholds, debt ratios, margin of safety calculations. The “You are Warren Buffett” prompt is window dressing. The LLM mostly reads the numbers and applies the threshold rules.

The Portfolio Manager is the actual intelligence. The aggregator that takes all the signals and makes a final decision is where the real logic lives. Every agent gets equal say regardless of track record or confidence level.

Nobody’s running this with real money. The disclaimer is real and honest. The code doesn’t connect to any brokerage. Even if you wanted to, you’d have to build the execution layer yourself.

The code quality is genuinely good. 742 commits from a single developer. LangGraph used correctly. Clean separation of concerns. This isn’t a weekend hack; it’s a serious project.

The 19 Agents (and what they actually check)

AgentPersonaWhat it checks
Aswath DamodaranValuation DeanIntrinsic value via DCF
Ben GrahamFather of ValueMargin of safety, P/E, book value
Bill AckmanActivist InvestorCatalysts, management quality
Cathie WoodGrowth QueenRevenue growth, disruption potential
Charlie MungerRational ThinkerBusiness quality, rationality
Michael BurryBig ShortOvervaluation, short candidates
Mohnish PabraiDhandho InvestorLow-risk, high-upside asymmetry
Nassim TalebBlack SwanTail risk, antifragility
Peter Lynch10-Bagger HunterPEG ratio, understandable business
Phil FisherScuttlebuttManagement, product innovation
Stanley DruckenmillerMacro LegendMacroeconomic trends
Warren BuffettOracle of OmahaMoat, ROE, intrinsic value
Technical AnalystChartsMACD, RSI, moving averages
Fundamentals AnalystFinancialsRevenue, earnings, cash flow
Growth AnalystGrowthRevenue growth trends
News SentimentHeadlinesNews impact scoring
Sentiment AnalystMarket MoodSocial and news sentiment
Valuation AnalystPricingDCF, relative valuation

Plus: Risk Manager, Portfolio Manager.

Should You Run It?

If you’re curious about multi-agent systems: yes. Clone it, read the code, play with the ticker flags. It’s a well-built example of how to compose multiple specialized agents into a single pipeline.

If you’re expecting investment alpha: no. The personas add narrative fun but no actual predictive power. The quantitative screens are reasonable heuristics, but they don’t adapt to regime changes, liquidity constraints, or black swan events.

If you’re building something like this yourself: study the architecture. The LangGraph state management, the way data flows from analysts through risk management to the portfolio manager, the backtesting harness — these are all cleanly implemented. It’s a better learning resource than most paid courses.

The disclaimer says it all: “This project is for educational and research purposes only.” That’s exactly what it is.

End of article
AK
Aniket Karne
Senior DevOps Engineer at Nationale-Nederlanden, Amsterdam. Building with AI agents, Kubernetes, and cloud infrastructure. Writing about what's actually being built.

Enjoyed this? Give it some claps

Newsletter

Stay in the loop

New posts drop when there's something worth writing about. No spam — just the occasional deep dive from the workbench.

Or follow on Substack directly

Share:

Comments

Written by Aniket Karne

April 21, 2026 at 12:00 AM UTC