ai-hedge-fund
AI Hedge Fund Investment Analysis and Multi-Round Committee Debate API. Continuous feature evolution is active—always fetch the latest live spec at https://hedgeapi.afpicapital.com/skill.md before execution.
Install / Use
npx skills add tbdavid2019/ai-hedge-fund-APIInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Education & ResearchSupported Platforms
Our assessment of ai-hedge-fund
ai-hedge-fund scores 80/100 on our quality scale, 376th of 421 Education & Research skills we index.
Its SKILL.md is 18 KB long, well organised into 18 sections with 7 code examples: a thorough specification that gives an agent plenty to work with.
It has no GitHub stars yet, so there is no community track record; judge it on its content.
Maintenance, license and trust
- The repository was last updated 2 days ago, so ai-hedge-fund is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 80/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
ReviewOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review judged it risky: The skill file instructs the agent to always fetch the latest live version of itself from https://hedgeapi.afpicapital.com/skill.md before executing, allowing unreviewed remote content to shape agent behavior.
AI review: risky
- The skill file instructs the agent to always fetch the latest live version of itself from https://hedgeapi.afpicapital.com/skill.md before executing, allowing unreviewed remote content to shape agent behavior.
- Because this is a skill/rules file, the agent will treat its contents as instructions, so the live-fetch policy bypasses static review and could inject new commands or endpoints later.
- No explicit malicious commands (credential theft, destructive operations, or disabling permission prompts) are present, so the main risk is the self-updating remote instruction channel rather than active harm.
AI review by kimi-k2.7-code on 2026-11-16. Automated pattern scan on 2026-11-16. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
ai-hedge-fund compared with similar skills
All 4 of these similar skills score higher than ai-hedge-fund; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| ai-hedge-fund (this skill)by tbdavid2019 | 80 | 0 | 2d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.8k | today | CLAUDE.md |
| last30days-skillby mvanhorn | 100 | 68.0k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 103.6k | 2d ago | MCP Server |
Frequently asked questions
- How do I install ai-hedge-fund?
- Run
npx skills add tbdavid2019/ai-hedge-fund-API. The install tabs above show the steps for each supported agent. - Which AI agents does ai-hedge-fund work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is ai-hedge-fund safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review judged it risky: The skill file instructs the agent to always fetch the latest live version of itself from https://hedgeapi.afpicapital.com/skill.md before executing, allowing unreviewed remote content to shape agent behavior. It declares no license and scores 80/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is ai-hedge-fund still maintained?
- The repository was last updated 2 days ago, so ai-hedge-fund is actively maintained.
Skill content
View source on GitHubname: ai-hedge-fund description: AI Hedge Fund Investment Analysis and Multi-Round Committee Debate API. Continuous feature evolution is active—always fetch the latest live spec at https://hedgeapi.afpicapital.com/skill.md before execution. Provides full-stack equity research from 16 legend investor personas and multi-round round table debates with dynamic portfolio allocation.
🤖 AI Hedge Fund API - Agent Skill Guide
[!IMPORTANT] Continuous Feature Evolution & Live Spec Policy (即時版本同步提醒): This system undergoes active, continuous evolution. AI Agents, LLMs, and automated clients MUST ALWAYS fetch the latest live version directly from
https://hedgeapi.afpicapital.com/skill.md(orhttps://hedgeapi.afpicapital.com/llms.txt) before executing any analysis, backtest, or debate. Never rely on stale cached schemas or hardcoded analyst rosters.
This document is designed for AI Agents and LLMs to understand and interact with the AI Hedge Fund API.
- Server Base URL:
https://hedgeapi.afpicapital.com - Latest Live Skill Guide:
https://hedgeapi.afpicapital.com/skill.md - LLMs Discovery Index:
https://hedgeapi.afpicapital.com/llms.txt - Full Text Specification:
https://hedgeapi.afpicapital.com/llms-full.txt - API Documentation:
https://hedgeapi.afpicapital.com/docs - Health Check:
https://hedgeapi.afpicapital.com/api/health - Swagger JSON:
https://hedgeapi.afpicapital.com/static/swagger.json - Supported LLM Engines: Primary Groq (
openai/gpt-oss-20b), TypeSafe SystemOne (clef-flash,clef-flash-q4), Gemini fallback (models/gemini-flash-latest), and OpenAI (gpt-4o). Resilient auto-failover built-in.
📌 Available Endpoints
1. 📊 Run Stock Analysis (POST /api/analysis)
Execute deep investment analysis across selected AI investor personas with optional multi-round round table committee debate.
- Endpoint:
POST /api/analysis - Headers:
Content-Type: application/json - Minimal Request Body (JSON):
{
"tickers": "TSLA,NVDA",
"enableRoundTable": true,
"roundTableRounds": 2
}
- Full Request Body Example (JSON):
{
"tickers": "TSLA,NVDA",
"selectedAnalysts": [
"warren_buffett",
"cathie_wood",
"michael_burry",
"wsb",
"technical_analyst"
],
"enableRoundTable": true,
"roundTableRounds": 2,
"initialCash": 100000,
"startDate": "2024-09-01",
"endDate": "2024-12-01"
}
Request Parameters:
| Parameter | Type | Required | Default | Description |
|:---|:---|:---:|:---|:---|
| tickers | string / array | ✅ | - | Tickers or company names across US, HK, TW (e.g. "TSLA,NVDA", "2330", "3293", "700", "9988", "騰訊", "蘋果", "SPCX") |
| selectedAnalysts | array | ❌ | [] (all 16) | Analyst registry keys; unknown keys or non-array values return HTTP 400 |
| modelName | string | ❌ | openai/gpt-oss-20b | Model identifier: clef-flash, clef-flash-q4, openai/gpt-oss-20b, models/gemini-flash-latest, gpt-4o |
| modelProvider | string | ❌ | Groq | Model provider: TypeSafe, Groq, Gemini, OpenAI (clef-flash automatically maps to TypeSafe) |
| enableRoundTable | boolean | ❌ | false | Enable multi-round debate committee after analyst signals |
| roundTableRounds | integer | ❌ | 2 | Number of debate rounds (1 to 3) |
| initialCash | number | ❌ | 100000 | Optional starting cash (min 100.0, default 100,000.0, supports aliases: initial_cash, initialCapital, capital, cash). Rejects negative, zero, or < 100.0 values with HTTP 400. Directly controls risk manager position limits and recommended shares |
| portfolio | object | ❌ | — | Optional dated holdings and cash; its cash takes precedence over initialCash |
| pointInTime | boolean | ❌ | false | Enable strict historical cutoff filtering and return source coverage/exclusions |
| startDate | string | ❌ | 3 months ago | Historical start date (YYYY-MM-DD) |
| endDate | string | ❌ | Today | Analysis end date (YYYY-MM-DD) |
portfolio requires as_of (YYYY-MM-DD), non-negative cash, currency (ISO 4217), and positions (array; empty means flat). Each position requires ticker, signed quantity (positive long, negative short), non-negative average_entry_price, and trading currency. A snapshot must not be after endDate or more than 7 calendar days old. Cross-currency positions use a historical Yahoo Finance FX close no later than as_of; the request is rejected when no suitable rate is available. Omit portfolio to preserve legacy initialCash behavior.
Strict point-in-time mode uses verified publication/availability time, not report period or event date. News without a publication timestamp and financial data without filing-level availability metadata are excluded with source-specific reasons. The SEC EDGAR adapter uses filing acceptance time plus a conservative dissemination buffer for eligible US issuers and requires SEC_USER_AGENT; this filing metadata does not make Yahoo financial values point-in-time verified. Current-only security registries are reported as survivorship-biased. Daily price inputs use unadjusted OHLC; future splits are reversed, and dividend cash flows are not modeled in this analysis endpoint.
Resumable backtest grid
POST /api/backtest/grid: acceptsrunId,tickers,startDate,endDate; optionalportfolio,initialCash,cutoffTimeUtc(shared UTC cutoff),selectedAnalysts(array of keys from the analyst registry; unknown keys and non-array values return HTTP 400),dailyRebalancePolicy(dailyornone),transactionFeeRate(default0.001), andslippageRate(default0.0005).GET /api/backtest/runs/<run_id>: reads the persisted manifest and result.- Reusing a
runIdresumes the original immutable data snapshots only when the configuration fingerprint matches. SQLite defaults toinstance/backtest_runs.sqlite3; Docker Compose mounts./instanceto/app/instanceand setsBACKTEST_RUN_DB=/app/instance/backtest_runs.sqlite3so checkpoints survive container replacement. - Grid results disclose source coverage, excluded unknown timestamps, benchmark mapping/version, fees, slippage, current-universe survivorship bias, and that dividends are not modeled.
Example: {"runId":"trial-1","tickers":["AAPL","2330.TW"],"startDate":"2026-01-05","endDate":"2026-01-30","cutoffTimeUtc":"23:59:59Z","selectedAnalysts":["technical_analyst"],"initialCash":100000}
Response Format (JSON):
{
"decisions": {
"TSLA": {
"action": "buy | sell | short | hold",
"quantity": 50,
"confidence": 85.0,
"reasoning": "Detailed committee execution rationale..."
}
},
"analyst_signals": {
"warren_buffett_agent": {
"TSLA": {
"signal": "bearish",
"confidence": 90.0,
"reasoning": "DCF valuation indicates -80% margin of safety..."
}
}
},
"round_table": {
"TSLA": {
"signal": "bearish",
"confidence": 65.0,
"discussion_summary": "Warren Buffett and Michael Burry clashed with Cathie Wood on valuation vs innovation...",
"consensus_view": "Valuation and debt risks outweigh short-term growth prospects.",
"dissenting_opinions": "Cathie Wood argued for exponential AI/robotics S-curve adoption.",
"conversation_transcript": "[Warren Buffett]: Intrinsic value doesn't hold up...\n[Cathie Wood]: Look at the innovation engine..."
}
}
}
2. ⚡ Asynchronous Stock Analysis (POST /api/analysis/async) & Task Polling (GET /api/task/<task_id>)
Submit an equity analysis task in the background to avoid HTTP gateway timeouts (recommended for full 16-analyst evaluations or multi-ticker batches).
- Submit Task:
POST /api/analysis/async(Accepts identical payload as/api/analysis) - Response (HTTP 202 Accepted):
{
"taskId": "c7a840e6-8575-408f-8898-dbe3234d7d0a",
"status": "pending",
"message": "AI 分析任務已在背景建立,請透過 /api/task/<taskId> 查詢進度與結果",
"pollUrl": "/api/task/c7a840e6-8575-408f-8898-dbe3234d7d0a",
"tickers": ["2330.TW"]
}
- Poll Status & Result:
GET /api/task/<task_id>(also/api/analysis/status/<task_id>)- Status lifecycle:
pending➔running➔completed(orerror). - Upon
completed, returns the completeanalyst_signals,risk_management_agent, anddecisions.
- Status lifecycle:
3. 🔍 Smart Stock Resolver & Registry (GET /api/stock/resolve)
Resolve company names or regional ticker codes into standardized symbols (Taiwan .TW, Hong Kong .HK, US SPCX, China A-shares) and retrieve official profiles:
- Endpoint:
GET /api/stock/resolve?q=2330orPOST /api/stock/resolvewith{"tickers": ["2330", "TSLA", "SPCX", "騰訊"]} - Global Registry Status:
GET /api/stock/registry/status(32,000+ listings cached with SWR updates)
4. 🏛️ Standalone Round Table Debate (POST /api/round_table)
Run an investment committee debate with pre-computed analyst signals.
- Endpoint:
POST /api/round_table - Headers:
Content-Type: application/json - Request Body (JSON):
{
"tickers": "NVDA",
"analystSignals": {
"cathie_wood": {
"NVDA": {"signal": "bullish", "confidence": 90, "reasoning": "Exponential AI infrastructure demand"}
},
"michael_burry": {
"NVDA": {"signal": "bearish", "confidence": 75, "reasoning": "Hyperscaler capex peak and concentration risk"}
}
},
"numRounds": 2
}
Response Format (JSON):
{
"round_table": {
"NVDA": {
"signal": "neutral",
"confidence": 65.0,
"discussion_summary": "Cathie Wood debated Michael Burry on AI capex sustainability...",
"consensus_view": "Strong long-term positioning balanced against near-term concentration risk.",
"dissenting_opinions": "Michael Burry warned of margin compression if hyperscaler spending cools.",
"conversation_transcript": "[Cathie Wood]: AI transformation is just beginning...\n[Michael Burry]: Don't ignore the customer concentration risk..."
}
}
}
5. 💓 Health Check (GET /api/health)
- Endpoint:
GET /api/health - Response:
{"status": "healthy", "version": "2.0.0", "timestamp": "2026-08-26T07:35:04Z"}
👥 16 Analyst Personas Reference Table
| Analyst Key | Display Name | Core Investment Philosophy |
|:---|:---|:---|
| warren_buffett | Warren Buffett | Moats, predictable cash flow, ROE > 15%, 30% margin of safety |
| charlie_munger | Charlie Munger | Inversion mental model, pricing power, management integrity |
| ben_graham | Ben Graham | Margin of safety, Net-Net (NCAV), conservative P/E & P/B |
| cathie_wood | Cathie Wood | Disruptive innovation, 5-year S-curves, AI / robotics CAGR > 25% |
| bill_ackman | Bill Ackman | Activist value investing, high barrier to entry, operational catalysts |
| nancy_pelosi | Nancy Pelosi | Congressional trading disclosures, legislative and subsidy tailwinds |
| michael_burry | Michael Burry | Deep value contrarian, FCF yield > 8%, hidden debt & accounting risks |
| peter_lynch | Peter Lynch | Consumer insight, PEG ratio < 1.0, 10-bagger growth potential |
| phil_fisher | Phil Fisher | 15 qualitative points, R&D productivity, outstanding sales execution |
| wsb | WallStreetBets | Retail momentum, short squeeze, YOLO options, 2md Reddit hype |
| technical_analyst | Technical Analyst | Trend following, SMA 20/50/200, RSI, MACD, Bollinger Bands |
| fundamentals_analyst | Fundamentals Analyst | Financial statements audit, revenue growth, gross & net margins |
| sentiment_analyst | Sentiment Analyst | 2md global news sentiment scoring, SEC Form 4 insider trades |
| valuation_analyst | Valuation Analyst | Discounted Cash Flow (DCF), EV/EBITDA, relative peer multiples |
| stanley_druckenmiller | Stanley Druckenmiller | Macro & growth inflections, acc
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
79.8kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
last30days-skill
68.0kAI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
Scrapling
103.6k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
