{"id":"71c04c9d-9b23-4d39-8e56-7f08f1785e6b","entityType":"agent","slug":"erongcao-ai-hedge-fund-skill","name":"ai-hedge-fund","canonicalUrl":"https://www.xpersona.co/agent/erongcao-ai-hedge-fund-skill","canonicalPath":"/agent/erongcao-ai-hedge-fund-skill","generatedAt":"2026-10-09T20:00:54.426Z","source":"GITHUB_OPENCLEW","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":null},"description":"An AI-powered hedge fund team that simulates legendary investors (Buffett, Munger, Graham, etc.) to analyze stocks and provide investment recommendations using multi-agent consensus. --- name: ai-hedge-fund description: An AI-powered hedge fund team that simulates legendary investors (Buffett, Munger, Graham, etc.) to analyze stocks and provide investment recommendations using multi-agent consensus. homepage: https://github.com/virattt/ai-hedge-fund metadata: { \"openclaw\": { \"emoji\": \"📈\", \"requires\": { \"bins\": [\"python3\", \"pip3\"] }, \"install\": [ { \"id\": \"yfinance\", \"kind\": \"pip\", \"package\": \"yfi","descriptionLabel":"Technical summary","evidenceSummary":"Published capability contract available. No trust telemetry is available yet. Last updated 4/15/2026.","installCommand":"git clone https://github.com/erongcao/ai-hedge-fund-skill.git","sourceUrl":"https://github.com/erongcao/ai-hedge-fund-skill","homepage":"https://github.com/virattt/ai-hedge-fund","primaryLinks":[{"label":"View Source","url":"https://github.com/erongcao/ai-hedge-fund-skill","kind":"source"},{"label":"Homepage","url":"https://github.com/virattt/ai-hedge-fund","kind":"homepage"}],"safetyScore":89,"overallRank":41.9,"popularityScore":0,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"An AI-powered hedge fund team that simulates legendary investors (Buffett, Munger, Graham, etc.) to analyze stocks and provide investment recommendations using "},"coverage":{"evidence":{"source":"capability-contract + public-profile","verified":true,"confidence":"high","updatedAt":"2026-02-24T19:47:30.017Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[{"label":"specific","status":"self-declared"},{"label":"market","status":"self-declared"}],"verifiedCount":0,"selfDeclaredCount":3,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"},{"key":"specific","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"},{"key":"market","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile capability:specific|supported|profile capability:market|supported|profile"}},"adoption":{"evidence":{"source":"no-adoption-signals","verified":false,"confidence":"low","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":"No source adoption metrics were available."},"stars":0,"forks":0,"downloads":null,"packageName":null,"latestVersion":null,"tractionLabel":null},"release":{"evidence":{"source":"agent-index","verified":false,"confidence":"medium","updatedAt":"2026-02-25T01:46:56.152Z","emptyReason":null},"lastUpdatedAt":"2026-04-15T05:21:22.124Z","lastCrawledAt":"2026-02-25T01:46:56.152Z","lastIndexedAt":null,"nextCrawlAt":"2026-02-26T01:46:56.152Z","lastVerifiedAt":null,"highlights":[]},"execution":{"evidence":{"source":"capability-contract","verified":true,"confidence":"high","updatedAt":"2026-02-24T19:47:30.017Z","emptyReason":null},"installCommand":"git clone https://github.com/erongcao/ai-hedge-fund-skill.git","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"ready","authModes":["api_key"],"requires":["openclew","lang:typescript","streaming"],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":true,"inputSchemaRef":"https://github.com/erongcao/ai-hedge-fund-skill#input","outputSchemaRef":"https://github.com/erongcao/ai-hedge-fund-skill#output","dataRegion":"global","contractUpdatedAt":"2026-02-24T19:47:30.017Z","sourceUpdatedAt":"2026-02-24T19:47:30.017Z","freshnessSeconds":19613604},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/erongcao-ai-hedge-fund-skill/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/erongcao-ai-hedge-fund-skill/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/erongcao-ai-hedge-fund-skill/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/erongcao-ai-hedge-fund-skill/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/erongcao-ai-hedge-fund-skill/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/erongcao-ai-hedge-fund-skill/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"GITHUB_OPENCLEW","generatedAt":"2026-10-09T20:00:54.426Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/erongcao-ai-hedge-fund-skill/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/erongcao-ai-hedge-fund-skill/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/erongcao-ai-hedge-fund-skill/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/erongcao-ai-hedge-fund-skill/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":[],"safeUseWhen":["Contract is available with explicit auth and schema references.","Trust confidence is not low and verification freshness is acceptable."],"riskFlags":["trust_data_unavailable"],"operationalConfidence":"medium"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"GITHUB OPENCLEW","verified":false,"confidence":"high","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":null},"readme":"---\nname: ai-hedge-fund\ndescription: An AI-powered hedge fund team that simulates legendary investors (Buffett, Munger, Graham, etc.) to analyze stocks and provide investment recommendations using multi-agent consensus.\nhomepage: https://github.com/virattt/ai-hedge-fund\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"📈\",\n        \"requires\": { \"bins\": [\"python3\", \"pip3\"] },\n        \"install\":\n          [\n            {\n              \"id\": \"yfinance\",\n              \"kind\": \"pip\",\n              \"package\": \"yfinance\",\n              \"bins\": [],\n              \"label\": \"Install yfinance (Yahoo Finance)\",\n            },\n            {\n              \"id\": \"pandas\",\n              \"kind\": \"pip\",\n              \"package\": \"pandas\",\n              \"bins\": [],\n              \"label\": \"Install pandas\",\n            },\n            {\n              \"id\": \"numpy\",\n              \"kind\": \"pip\",\n              \"package\": \"numpy\",\n              \"bins\": [],\n              \"label\": \"Install numpy\",\n            },\n          ],\n      },\n  }\n---\n\n# AI Hedge Fund Skill\n\nAn AI-powered hedge fund team that simulates legendary investors to analyze stocks and provide investment recommendations.\n\n## Overview\n\nThis skill creates a team of AI agents, each embodying the investment philosophy of famous investors:\n\n### Classic Investment Agents (5)\n- **Warren Buffett** - Value investing, wonderful companies at fair prices\n- **Ben Graham** - Margin of safety, hidden gems\n- **Technical Analyst** - Chart patterns and indicators\n- **Risk Manager** - Risk metrics and position sizing\n- **Cathie Wood** - Innovation and disruption\n\n### Enhanced Analysis Agents (4) - NEW in v2.1\n- **Earnings Analyst** - EPS surprises, beat rates, earnings quality\n- **Wall Street Consensus** - Analyst ratings, price targets, upside\n- **Macro Strategist** - VIX, market regime, SPY/QQQ trends\n- **Dividend Investor** - Yield, payout safety, dividend growth\n\n**Total: 9 agents analyzing each stock for comprehensive coverage**\n\n## Quick Start\n\n```bash\n# Unified CLI - All features in one command\nai-hedge-fund analyze AAPL\nai-hedge-fund portfolio AAPL,MSFT,GOOGL --risk moderate\nai-hedge-fund backtest AAPL,MSFT --start 2023-01-01 --end 2024-01-01\nai-hedge-fund global analyze --ticker 0700.HK\n\n# Or use individual commands\n./ai-hedge-fund AAPL                    # Basic analysis\n./ai-hedge-fund AAPL --detailed         # Detailed agent reasoning\n./ai-hedge-fund AAPL --hot              # Include trending stocks\n./ai-hedge-fund AAPL --rumor            # Include rumor scan\n./ai-hedge-fund AAPL --hot --rumor      # Full intelligence\n\n./portfolio-build AAPL,MSFT,GOOGL       # Portfolio construction\n./backtester AAPL,MSFT --start 2023-01-01 --end 2024-01-01  # Backtest\n\n# Market Intelligence\n./scanner hot                           # Trending stocks & crypto\n./scanner rumor                         # Market-wide rumor scan\n./scanner rumor -t NVDA                 # Scan specific ticker\n./scanner scan                          # Hot + Rumor combined\n```\n\n## Data Sources\n\n### Free Tier (No API Key Required)\n- **Yahoo Finance** - Real-time prices, basic financials (via yfinance)\n- AAPL, GOOGL, MSFT, NVDA, TSLA have extended free data\n\n### Optional API Keys (for enhanced data)\n```bash\n# Add to ~/.openclaw/skills/ai-hedge-fund/.env\nFINANCIAL_DATASETS_API_KEY=your_key  # Detailed financial metrics\nALPHA_VANTAGE_API_KEY=your_key       # Alternative data source\n```\n\n## Architecture\n\n```\nUser Request\n    │\n    ▼\n┌─────────────────┐\n│  Data Fetcher   │ ← Yahoo Finance / API\n└────────┬────────┘\n         │\n    ┌────┴────┬────────┬────────┬────────┐\n    ▼         ▼        ▼        ▼        ▼\n┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐\n│Buffett│ │ Munger│ │Graham │ │Burry  │ │Cathie │ ← Parallel sub-agents\n└───┬───┘ └───┬───┘ └───┬───┘ └───┬───┘ └───┬───┘\n    │         │         │         │         │\n    └─────────┴────┬────┴─────────┴─────────┘\n                   │\n          ┌────────▼────────┐\n          │  Risk Manager   │\n          └────────┬────────┘\n                   │\n          ┌────────▼────────┐\n          │Portfolio Manager│ ← Final recommendation\n          └─────────────────┘\n```\n\n## Agent Details\n\n### Warren Buffett Agent\n**Philosophy**: \"It's far better to buy a wonderful company at a fair price than a fair company at a wonderful price.\"\n\n**Analysis Criteria**:\n- Return on Equity (ROE) > 15%\n- Debt to Equity < 0.5\n- Operating Margin > 15%\n- Consistent earnings growth\n- Durable competitive moat\n- Margin of safety calculation\n\n**Signal**: bullish/bearish/neutral with confidence (0-100)\n\n### Charlie Munger Agent\n**Philosophy**: \"The big money is not in the buying and selling, but in the waiting.\"\n\n**Analysis Criteria**:\n- Mental model checklist\n- Rational capital allocation\n- Shareholder-friendly management\n- Circle of competence\n- Long-term thinking\n\n### Ben Graham Agent\n**Philosophy**: \"In the short run, the market is a voting machine but in the long run, it is a weighing machine.\"\n\n**Analysis Criteria**:\n- Margin of safety (price < intrinsic value * 0.66)\n- P/E ratio < 15\n- P/B ratio < 1.5\n- Current ratio > 2\n- No earnings deficit in past 10 years\n\n### Technical Analyst\n**Analysis**:\n- Moving averages (20, 50, 200 day)\n- RSI (Relative Strength Index)\n- MACD\n- Support/resistance levels\n- Volume analysis\n\n### Risk Manager\n**Metrics**:\n- Volatility (standard deviation)\n- Beta vs S&P 500\n- Maximum drawdown\n- Sharpe ratio\n- Position size recommendations\n\n## Enhanced Analysis (NEW in v2.1)\n\nBased on features learned from stock-analysis skill, we've added 4 new agents:\n\n### Earnings Analyst\n**Focus**: Earnings surprises and quality\n- EPS surprise analysis (actual vs expected)\n- Historical beat rate (last 4 quarters)\n- Earnings growth trends\n- **Example**: \"Beat by +5.2%, 3/4 quarters exceeded estimates\"\n\n### Wall Street Consensus\n**Focus**: Professional analyst opinions\n- Consensus rating (strong_buy/buy/hold/sell/strong_sell)\n- Number of covering analysts\n- Price target vs current price\n- Upside/downside potential\n- **Example**: \"19 analysts, consensus HOLD, +1.2% upside to target\"\n\n### Macro Strategist\n**Focus**: Market environment context\n- VIX level (fear index)\n- Market regime (bull/bear/choppy)\n- SPY/QQQ 10-day trends\n- Risk-off/risk-on indicators\n- **Example**: \"VIX 19.6 (elevated), choppy market, SPY flat\"\n\n### Dividend Investor\n**Focus**: Income and dividend safety\n- Dividend yield analysis\n- Payout ratio safety assessment\n- Dividend growth history\n\n## Market Intelligence (NEW in v2.2)\n\n### 🔥 Hot Scanner\n**Find trending stocks and crypto before they hit mainstream**\n\n**Data Sources**:\n- CoinGecko Trending (top trending crypto)\n- Yahoo Finance Movers (gainers/losers/high volume)\n\n**Usage**:\n```bash\n# Standalone hot scanner\n./scanner hot\n\n# Include in stock analysis\n./ai-hedge-fund TSLA --hot\n```\n\n**Output Example**:\n```\n🔥 HOT SCANNER - Trending Stocks & Crypto\nFound 6 trending assets\n\n📈 STOCKS:\n  🟢 UBER    +3.18%\n  🟢 NVDA    +2.45%\n\n🪙 CRYPTO:\n  🚀 ESP-USD    +46.91%\n  📉 OP-USD     -14.47%\n```\n\n### 🔮 Rumor Scanner\n**Detect early signals, M&A rumors, and insider activity**\n\n**Detection Types**:\n- 🤝 **M&A**: Merger, acquisition, takeover rumors\n- 👤 **Insider**: Insider buying/selling activity\n- ⬆️ **Upgrade**: Analyst upgrades, price target raises\n- ⬇️ **Downgrade**: Analyst downgrades, target cuts\n- 📊 **Earnings**: Earnings surprises, guidance changes\n- 🤝 **Partnership**: New deals, collaborations\n\n**Confidence Levels**:\n- 🔴 **High**: Reputable source (Reuters, Bloomberg, CNBC)\n- 🟡 **Medium**: Confirmed keywords (\"announces\", \"SEC filing\")\n- ⚪ **Low**: Early signals, unconfirmed\n\n**Usage**:\n```bash\n# Scan specific ticker\n./scanner rumor -t TSLA\n\n# Scan market-wide\n./scanner rumor\n\n# Include in analysis\n./ai-hedge-fund NVDA --rumor\n```\n\n**Output Example**:\n```\n🔮 RUMOR SCANNER - Early Signals\nDetected rumors for 3 tickers\n\n📰 NVDA:\n  🟡 ⬆️ [UPGRADE] Goldman raises target to $850...\n     Source: MarketWatch | Confidence: medium\n\n📰 TSLA:\n  ⚪ 🤝 [PARTNERSHIP] Rumored deal with...\n     Source: Twitter | Confidence: low\n```\n- Income rating (excellent/good/moderate/poor)\n- **Example**: \"2.8% yield, safe payout at 45%, dividend aristocrat\"\n\n## Usage Examples\n\n### Basic Analysis\n```python\n# Single stock\nresult = ai_hedge_fund.analyze(\"AAPL\")\n# Returns: {\"signal\": \"bullish\", \"confidence\": 75, \"reasoning\": \"...\"}\n\n# Multiple stocks\nresults = ai_hedge_fund.analyze([\"AAPL\", \"MSFT\", \"GOOGL\"])\n```\n\n### Detailed Report\n```json\n{\n  \"ticker\": \"AAPL\",\n  \"analysis_date\": \"2025-02-18\",\n  \"agents\": {\n    \"warren_buffett\": {\n      \"signal\": \"bullish\",\n      \"confidence\": 85,\n      \"reasoning\": \"Strong ROE of 160%, excellent brand moat, consistent dividend growth\"\n    },\n    \"charlie_munger\": {\n      \"signal\": \"bullish\",\n      \"confidence\": 80,\n      \"reasoning\": \"Rational capital allocation via buybacks, strong pricing power\"\n    },\n    \"ben_graham\": {\n      \"signal\": \"neutral\",\n      \"confidence\": 50,\n      \"reasoning\": \"High P/E of 28 exceeds margin of safety threshold\"\n    },\n    \"technical\": {\n      \"signal\": \"bullish\",\n      \"confidence\": 70,\n      \"reasoning\": \"Price above 200-day MA, RSI at 55 indicates healthy momentum\"\n    },\n    \"risk_manager\": {\n      \"signal\": \"neutral\",\n      \"confidence\": 60,\n      \"reasoning\": \"Beta 1.2 indicates market correlation, moderate volatility\"\n    }\n  },\n  \"consensus\": {\n    \"signal\": \"bullish\",\n    \"confidence\": 73,\n    \"agreement\": \"4/5 agents bullish\",\n    \"key_risks\": [\"High valuation\", \"Market correlation\"],\n    \"recommendation\": \"Consider position size of 5-8% max\"\n  }\n}\n```\n\n## Configuration\n\n### Environment Variables\n```bash\n# ~/.openclaw/skills/ai-hedge-fund/.env\n\n# LLM Configuration (uses OpenClaw default if not set)\nOPENAI_API_KEY=sk-...  # Optional, falls back to kimi-k2.5\n\n# Data Sources\nFINANCIAL_DATASETS_API_KEY=...  # Optional, enhances data quality\nALPHA_VANTAGE_API_KEY=...       # Optional, alternative source\n\n# Analysis Settings\nMAX_AGENTS=12           # Number of agents to run\nPARALLEL_MODE=true      # Run agents in parallel\nCACHE_DURATION=3600     # Cache data for 1 hour\n```\n\n### Custom Agents\n\nAdd your own investment style by creating a new agent file:\n\n```python\n# ~/.openclaw/skills/ai-hedge-fund/agents/custom_agent.py\n\nfrom typing import Literal\n\nclass CustomAgentSignal(BaseModel):\n    signal: Literal[\"bullish\", \"bearish\", \"neutral\"]\n    confidence: int = Field(description=\"Confidence 0-100\")\n    reasoning: str = Field(description=\"Reasoning for the decision\")\n\ndef custom_agent(state: AgentState, ticker: str) -> CustomAgentSignal:\n    \"\"\"Your custom analysis logic\"\"\"\n    # Fetch data\n    data = fetch_financial_data(ticker)\n    \n    # Analyze\n    score = analyze_custom_metrics(data)\n    \n    # Return signal\n    return CustomAgentSignal(\n        signal=\"bullish\" if score > 70 else \"neutral\",\n        confidence=score,\n        reasoning=\"Your reasoning here\"\n    )\n```\n\n## Limitations & Disclaimers\n\n**⚠️ IMPORTANT**: This tool is for **educational and research purposes only**.\n\n- **Not investment advice**: These are AI simulations, not professional financial advice\n- **No guarantee**: Past performance analyzed by AI does not predict future results\n- **Data limitations**: Free data sources may have delays or inaccuracies\n- **Risk**: Always consult a qualified financial advisor before making investment decisions\n\n## Technical Details\n\n### Multi-Agent Coordination\nUses OpenClaw's `sessions_spawn` to run agents in parallel:\n\n```typescript\n// Parallel agent execution\nconst agentResults = await Promise.all(\n  agents.map(agent => \n    sessions_spawn({\n      task: `Analyze ${ticker} as ${agent.name}`,\n      agentId: 'investment-analyst',\n      timeoutSeconds: 60\n    })\n  )\n);\n```\n\n### Data Caching\n- Financial data cached for 1 hour to reduce API calls\n- Agent results cached for same ticker within 30 minutes\n\n### Error Handling\n- Graceful fallback if data source unavailable\n- Individual agent failures don't block other agents\n- Missing data reported in reasoning\n\n## Troubleshooting\n\n### \"No data for ticker\"\n- Check ticker symbol is correct (e.g., \"BRK-B\" not \"BRK.B\")\n- Try popular tickers first (AAPL, MSFT, GOOGL)\n- Some tickers may not be available in free tier\n\n### \"API rate limit\"\n- Wait a few minutes and retry\n- Results are cached, so retry is fast\n- Consider adding API key for higher limits\n\n### Slow analysis\n- First run fetches and caches data\n- Subsequent runs use cached data (much faster)\n- Use `--quick` flag for essential agents only\n\n## Feature Modules\n\n### 1. Portfolio Construction (`portfolio_constructor.py`)\nModern Portfolio Theory (MPT) optimization:\n- Mean-variance optimization\n- Risk parity weighting\n- Sector diversification analysis\n- Sharpe ratio maximization\n- Three risk profiles: conservative, moderate, aggressive\n\n```bash\nai-hedge-fund portfolio AAPL,MSFT,GOOGL,JPM,JNJ --risk moderate\n```\n\n### 2. Backtesting (`backtester.py`)\nBacktest strategies on historical data:\n- Multiple strategies: ai_consensus, equal_weight, momentum, value\n- Rebalancing schedules: weekly, monthly, quarterly\n- Performance metrics: Sharpe, max drawdown, alpha, beta\n- Benchmark comparison (S&P 500)\n- Trade history tracking\n\n```bash\nai-hedge-fund backtest AAPL,MSFT,GOOGL --start 2023-01-01 --end 2024-01-01 --strategy ai_consensus\n```\n\n### 3. Rebalancing Monitor (`rebalance_monitor.py`)\nMonitor portfolio drift and generate alerts:\n- Weight drift detection\n- Signal-based target weights\n- Urgency classification (HIGH/MEDIUM/LOW)\n- Health score calculation\n- Rebalancing schedule generation\n\n```bash\nai-hedge-fund rebalance AAPL:0.3,MSFT:0.2,GOOGL:0.5 --last-rebalanced 2024-01-01\n```\n\n### 4. Tax Optimization (`tax_optimizer.py`)\nTax-loss harvesting and optimization:\n- Unrealized gain/loss tracking\n- Tax-loss harvesting opportunities\n- Wash sale rule detection\n- Replacement security suggestions\n- Year-end tax strategy\n\n```bash\nai-hedge-fund tax --lots '[{\"ticker\":\"AAPL\",\"shares\":100,\"purchase_date\":\"2024-01-01\",\"purchase_price\":150}]' --year-end\n```\n\n### 5. ESG Screening (`esg_screener.py`)\nEnvironmental, Social, Governance screening:\n- ESG score calculation (0-10 scale)\n- Controversy detection\n- Sector comparison\n- Exclusion criteria checking\n- Portfolio ESG scoring\n\n```bash\nai-hedge-fund esg AAPL,MSFT,XOM,TSLA --portfolio --minimum-score 6.0\n```\n\n### 6. Global Markets (`global_markets.py`)\nInternational stock market support:\n- Market detection from ticker format\n- 15+ global exchanges\n- Currency conversion\n- Market hours and timezones\n- Index tracking\n\n```bash\n# List supported markets\nai-hedge-fund global list-markets\n\n# Analyze Hong Kong stock\nai-hedge-fund global analyze --ticker 0700.HK\n\n# Analyze China A-share\nai-hedge-fund global analyze --ticker 600519.SS\n\n# Convert currency\nai-hedge-fund global convert --amount 10000 --from-currency CNY\n```\n\n#### Supported Markets\n| Market | Code | Example Ticker |\n|--------|------|----------------|\n| US Stocks | US | AAPL, MSFT |\n| Hong Kong | HK | 0700.HK, 9988.HK |\n| Shanghai | SS | 600519.SS |\n| Shenzhen | SZ | 000858.SZ |\n| Tokyo | T | 7203.T |\n| London | L | SHEL.L |\n| Frankfurt | DE | SAP.DE |\n| India NSE | NS | RELIANCE.NS |\n| Australia | AU | CBA.AX |\n| Korea | KS | 005930.KS |\n| Singapore | SI | D05.SI |\n\n## File Structure\n\n```\nai-hedge-fund/\n├── SKILL.md                      # This documentation\n├── QUICKSTART.md                 # Quick start guide\n├── ADVANCED.md                   # Advanced architecture\n├── ai_hedge_fund.py             # Basic rule-based analysis\n├── ai_hedge_fund_advanced.py    # AI-powered sub-agent analysis\n├── portfolio_constructor.py     # Portfolio optimization\n├── backtester.py                # Strategy backtesting\n├── rebalance_monitor.py         # Rebalancing alerts\n├── tax_optimizer.py             # Tax-loss harvesting\n├── esg_screener.py              # ESG screening\n├── global_markets.py            # Global market support\n├── ai-hedge-fund-cli            # Unified CLI\n├── ai-hedge-fund                # Basic CLI wrapper\n├── ai-hedge-fund-advanced       # Advanced CLI wrapper\n├── portfolio-build              # Portfolio CLI wrapper\n└── .env                         # API keys\n```\n\n## Related Resources\n\n- [Original Project](https://github.com/virattt/ai-hedge-fund)\n- [Value Investing](https://www.investopedia.com/terms/v/valueinvesting.asp)\n- [Technical Analysis](https://www.investopedia.com/terms/t/technicalanalysis.asp)\n- [Modern Portfolio Theory](https://www.investopedia.com/terms/m/modernportfoliotheory.asp)\n- [ESG Investing](https://www.investopedia.com/terms/e/environmental-social-and-governance-esg-criteria.asp)\n\n---\n\n**Version**: 2.0.0  \n**Author**: OpenClaw Community  \n**License**: MIT\n","readmeExcerpt":"--- name: ai-hedge-fund description: An AI-powered hedge fund team that simulates legendary investors (Buffett, Munger, Graham, etc.) to analyze stocks and provide investment recommendations using multi-agent consensus. homepage: https://github.com/virattt/ai-hedge-fund metadata: { \"openclaw\": { \"emoji\": \"📈\", \"requires\": { \"bins\": [\"python3\", \"pip3\"] }, \"install\": [ { \"id\": \"yfinance\", \"kind\": \"pip\", \"package\": \"yfi","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"# Unified CLI - All features in one command\nai-hedge-fund analyze AAPL\nai-hedge-fund portfolio AAPL,MSFT,GOOGL --risk moderate\nai-hedge-fund backtest AAPL,MSFT --start 2023-01-01 --end 2024-01-01\nai-hedge-fund global analyze --ticker 0700.HK\n\n# Or use individual commands\n./ai-hedge-fund AAPL                    # Basic analysis\n./ai-hedge-fund AAPL --detailed         # Detailed agent reasoning\n./ai-hedge-fund AAPL --hot              # Include trending stocks\n./ai-hedge-fund AAPL --rumor            # Include rumor scan\n./ai-hedge-fund AAPL --hot --rumor      # Full intelligence\n\n./portfolio-build AAPL,MSFT,GOOGL       # Portfolio construction\n./backtester AAPL,MSFT --start 2023-01-01 --end 2024-01-01  # Backtest\n\n# Market Intelligence\n./scanner hot                           # Trending stocks & crypto\n./scanner rumor                         # Market-wide rumor scan\n./scanner rumor -t NVDA                 # Scan specific ticker\n./scanner scan                          # Hot + Rumor combined"},{"language":"bash","snippet":"# Add to ~/.openclaw/skills/ai-hedge-fund/.env\nFINANCIAL_DATASETS_API_KEY=your_key  # Detailed financial metrics\nALPHA_VANTAGE_API_KEY=your_key       # Alternative data source"},{"language":"text","snippet":"User Request\n    │\n    ▼\n┌─────────────────┐\n│  Data Fetcher   │ ← Yahoo Finance / API\n└────────┬────────┘\n         │\n    ┌────┴────┬────────┬────────┬────────┐\n    ▼         ▼        ▼        ▼        ▼\n┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐\n│Buffett│ │ Munger│ │Graham │ │Burry  │ │Cathie │ ← Parallel sub-agents\n└───┬───┘ └───┬───┘ └───┬───┘ └───┬───┘ └───┬───┘\n    │         │         │         │         │\n    └─────────┴────┬────┴─────────┴─────────┘\n                   │\n          ┌────────▼────────┐\n          │  Risk Manager   │\n          └────────┬────────┘\n                   │\n          ┌────────▼────────┐\n          │Portfolio Manager│ ← Final recommendation\n          └─────────────────┘"},{"language":"bash","snippet":"# Standalone hot scanner\n./scanner hot\n\n# Include in stock analysis\n./ai-hedge-fund TSLA --hot"},{"language":"text","snippet":"🔥 HOT SCANNER - Trending Stocks & Crypto\nFound 6 trending assets\n\n📈 STOCKS:\n  🟢 UBER    +3.18%\n  🟢 NVDA    +2.45%\n\n🪙 CRYPTO:\n  🚀 ESP-USD    +46.91%\n  📉 OP-USD     -14.47%"},{"language":"bash","snippet":"# Scan specific ticker\n./scanner rumor -t TSLA\n\n# Scan market-wide\n./scanner rumor\n\n# Include in analysis\n./ai-hedge-fund NVDA --rumor"}],"parameters":{},"dependencies":[],"permissions":[],"extractedFiles":[],"languages":["typescript"],"docsSourceLabel":"GITHUB OPENCLEW","editorialOverview":"An AI-powered hedge fund team that simulates legendary investors (Buffett, Munger, Graham, etc.) to analyze stocks and provide investment recommendations using multi-agent consensus. --- name: ai-hedge-fund description: An AI-powered hedge fund team that simulates legendary investors (Buffett, Munger, Graham, etc.) to analyze stocks and provide investment recommendations using multi-agent consensus. homepage: https://github.com/virattt/ai-hedge-fund metadata: { \"openclaw\": { \"emoji\": \"📈\", \"requires\": { \"bins\": [\"python3\", \"pip3\"] }, \"install\": [ { \"id\": \"yfinance\", \"kind\": \"pip\", \"package\": \"yfi","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":389,"uniquenessScore":64,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-04-15T05:21:22.124Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T20:00:54.426Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/github_openclew","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}