Back

Summer Contributions - Agentic Hedge Fund

June 12, 2025 by Jeff Haynie

Agentic hedge fund

What It Does

The AI Hedge Fund Agent turns a plain-language question—"Should I buy Nvidia?"—into a fully-formed trading decision. In short, it's a pocket-sized quant desk that speaks natural language.

Github Repo

Features:

  • 🧠 Enhanced LLM Query Parsing - Single smart call extracts portfolio context, risk signals, and trade intent
  • Real-Time Market Data - Live data from stocks, crypto, and ETFs via yfinance & CoinGecko APIs
  • 📊 Multi-Modal Analysis - Technical indicators (EMA 8/21, RSI, MACD, volume) + sentiment analysis + real-time news
  • 🎯 Intelligent Routing - LangGraph workflow adapts based on query complexity and user intent
  • 💼 Portfolio Decision Engine - Makes concrete BUY/SELL/HOLD decisions with specific quantities
  • 🛡️ Risk Management - Comprehensive risk assessment with position sizing recommendations
  • 📋 Actionable Output - Concrete trading tables with entry/exit prices, stop losses, and position sizes
  • 🚀 Agentuity Native - Built for seamless deployment on Agentuity platform

How It Works

The workflow is a six-node LangGraph pipeline:

  1. Query Parsing – extracts trade intent, existing positions, risk tolerance.
  2. Asset Search – validates tickers & fetches live quotes.
  3. Trade Analysis – merges technical + sentiment signals.
  4. Risk Assessment – gauges volatility, concentration, and capital at risk.
  5. Portfolio Manager – decides BUY/SELL/HOLD, position size, targets.
  6. Response Generator – formats everything into sleek tables or insights.

Real-Time Analysis Highlights

  • Technical: EMA crossovers, RSI (14), MACD histogram, volume spikes.
  • Sentiment: News API headlines, CNN Fear/Greed, VIX, FRED macro feeds.
  • AI Insights: Correlation shocks, event calendars, emerging themes.

If trade intent ≥ 70 %, the agent surfaces a concrete order ticket. Otherwise you get research commentary only.

Example Actionable Output

High Trade Intent Query: "Should I buy Apple stock?"

┌─── 📊 TRADING DECISION ───┐
│ Symbol          │ AAPL             │
│ Action          │ BUY              │
│ Quantity        │ 25 shares        │
│ Current Price   │ $195.32          │
│ Total Cost      │ $4,883.00        │
│ Stop Loss       │ $175.50          │
│ Take Profit     │ $220.00          │
│ Position Size   │ 9.8% portfolio   │
│ Risk Level      │ MEDIUM           │
│ Confidence      │ HIGH (87.5%)     │
└─────────────────┴──────────────────┘

💡 **Action Required:**
• Execute BUY order for 25 shares
• Set stop loss at $175.50 (-10.1%)
• Target price $220.00 (+12.6%)

💭 **Key Factors:**
1. Strong EMA 8/21 bullish crossover with momentum
2. RSI at healthy 58.7 with room for upside  
3. Positive earnings sentiment and AI integration themes

🧠 **AI Insights:**
Market Themes: AI integration, services growth, Vision Pro launch
Risk Factors: Rising rates, China tensions, tech rotation risk

Medium Trade Intent Query: "How is Apple looking?"

🍎 Apple Inc (AAPL) Analysis

📈 **Technical Outlook**: BULLISH
Current Price: $195.32 | RSI: 58.7 | MACD: Bullish crossover

**Key Signals:**
✅ EMA 8/21 bullish crossover confirms uptrend
✅ Volume supporting price action  
⚠️ Approaching resistance at $200

📰 **Sentiment**: POSITIVE (78%)
Recent earnings beat expectations, strong iPhone sales in China

🎯 **Outlook**: Good technical setup for continued upside toward $220

Some Notable Things

  • Agent-per-Node Design – Each LangGraph node runs as its own Agentuity agent, so you can scale risk calculations separately from, say, news scraping.
  • Single-Call Parsing – One LLM invocation tags intent, asset list, portfolio, and risk appetite—reducing latency + cost.
  • Pro-Grade Risk Management – Position sizing obeys volatility, cash balance, and user-defined limits; prompts warn about concentration.
  • Instant Cloud Deploy – Because it's Agentuity-native, a two-command flow (agentuity project importagentuity deploy) gets you an HTTPS endpoint in minutes.

How to Use It

You can deploy it on Agentuity in one click:

Deploy on Agentuity

Or you can clone the repo and deploy it yourself:

Check the README for details on env vars and the like you'll need. To make it your own on Agentuity, it's as simple as:

  1. Clone the repo

  2. agentuity project import

  3. agentuity deploy

Example Queries

  • "I own 100 shares of TSLA—should I sell half?"
  • "Is Bitcoin overbought today?"
  • "What's my portfolio's overall risk level?"

Community Spotlight

GitHub Profile Summary

Have a cool agent? Fork this template, deploy on Agentuity, and share your project in our Discord. We might feature you next!