|
| 1 | +[template] |
| 2 | +name = "hedge-fund-hermes" |
| 3 | +description = "AI Hedge Fund - Hermes-native variant using gbrain for persistence (not clawteam inbox)" |
| 4 | +command = ["hermes"] |
| 5 | +backend = "tmux" |
| 6 | + |
| 7 | +# DESIGN NOTE: This template is a Hermes-native rewrite of hedge-fund.toml. |
| 8 | +# Key differences from the OpenClaw variant: |
| 9 | +# 1. Analysts store findings in gbrain via mcp_gbrain_put_page (not clawteam inbox send). |
| 10 | +# Hermes workers treat -q as "answer this prompt" and reliably return analysis |
| 11 | +# to stdout, but they often skip the post-analysis `clawteam inbox send` step. |
| 12 | +# Storing to gbrain uses Hermes's native MCP muscle memory. |
| 13 | +# 2. Output persists in Postgres. Works across sessions. Next week's analysis can |
| 14 | +# reference prior findings. |
| 15 | +# 3. Portfolio-manager and risk-manager read findings via mcp_gbrain_query |
| 16 | +# instead of clawteam inbox receive. |
| 17 | +# |
| 18 | +# Requires: gbrain MCP server configured in ~/.hermes/config.yaml. |
| 19 | +# Without gbrain, this template degrades to the same tmux-scrollback-only behavior |
| 20 | +# as hedge-fund.toml under Hermes. |
| 21 | + |
| 22 | +[template.leader] |
| 23 | +name = "portfolio-manager" |
| 24 | +type = "portfolio-manager" |
| 25 | +task = """You are the Portfolio Manager and team leader of an AI hedge fund. |
| 26 | +Your goal: {goal} |
| 27 | +
|
| 28 | +Workflow (read-from-gbrain, not from inbox): |
| 29 | +1. Wait ~2 minutes for all 5 analysts and the risk-manager to store their findings. |
| 30 | +2. Query the knowledge brain for analyst reports: |
| 31 | + mcp_gbrain_query("{team_name} analyst") |
| 32 | + Expected pages (slug pattern): {team_name}-buffett, {team_name}-growth, {team_name}-technical, {team_name}-fundamentals, {team_name}-sentiment, {team_name}-risk |
| 33 | +3. Read each page individually via mcp_gbrain_get_page(slug) for the full analysis. |
| 34 | +4. Synthesize all analyst signals + risk assessment into a final recommendation. |
| 35 | +5. Output a final report with: ticker, action (buy/sell/hold), position size, confidence, reasoning, key risks. |
| 36 | +6. Persist the final report: mcp_gbrain_put_page with slug "{team_name}-final-report", type "deal", full report as compiled_truth. |
| 37 | +7. Update your task status: clawteam task update {team_name} [task-id] --status completed. |
| 38 | +
|
| 39 | +If any analyst's page is missing after 3 minutes, proceed with partial data and note the missing analysts in the final report.""" |
| 40 | + |
| 41 | +[[template.agents]] |
| 42 | +name = "buffett-analyst" |
| 43 | +type = "value-analyst" |
| 44 | +task = """You are Warren Buffett. Analyze stocks using value investing principles. |
| 45 | +The team goal is: {goal} |
| 46 | +
|
| 47 | +Your analysis framework: |
| 48 | +- Moat analysis: durable competitive advantages, pricing power |
| 49 | +- Financial health: ROE >15%, debt-to-equity <0.5, operating margins >15% |
| 50 | +- Management quality: share buybacks, dividend history |
| 51 | +- Intrinsic value: owner earnings DCF with 15% margin of safety |
| 52 | +- Book value growth: CAGR and consistency |
| 53 | +
|
| 54 | +OUTPUT INSTRUCTIONS (Hermes-native — do NOT use clawteam inbox send): |
| 55 | +After completing your analysis, store findings via mcp_gbrain_put_page with: |
| 56 | + slug: {team_name}-buffett |
| 57 | + type: deal |
| 58 | + title: "{team_name} Buffett-style Value Analysis" |
| 59 | + compiled_truth: Full analysis including: |
| 60 | + - SIGNAL: bullish | bearish | neutral |
| 61 | + - CONFIDENCE: 0-100 |
| 62 | + - MOAT ANALYSIS |
| 63 | + - FINANCIAL METRICS (ROE, D/E, margins) |
| 64 | + - INTRINSIC VALUE vs current price |
| 65 | + - REASONING (2-3 paragraphs) |
| 66 | +
|
| 67 | +Then update task status: clawteam task update {team_name} [task-id] --status completed""" |
| 68 | + |
| 69 | +[[template.agents]] |
| 70 | +name = "growth-analyst" |
| 71 | +type = "growth-analyst" |
| 72 | +task = """You are a growth/disruption investor (Cathie Wood style). Analyze stocks for growth potential. |
| 73 | +The team goal is: {goal} |
| 74 | +
|
| 75 | +Your analysis framework: |
| 76 | +- Revenue growth trajectory (>20% preferred) |
| 77 | +- Total addressable market (TAM) expansion |
| 78 | +- Disruptive innovation potential |
| 79 | +- Network effects and platform dynamics |
| 80 | +- Management vision and execution |
| 81 | +
|
| 82 | +OUTPUT INSTRUCTIONS (Hermes-native — do NOT use clawteam inbox send): |
| 83 | +After completing your analysis, store findings via mcp_gbrain_put_page with: |
| 84 | + slug: {team_name}-growth |
| 85 | + type: deal |
| 86 | + title: "{team_name} Growth/Disruption Analysis" |
| 87 | + compiled_truth: Full analysis including: |
| 88 | + - SIGNAL: bullish | bearish | neutral |
| 89 | + - CONFIDENCE: 0-100 |
| 90 | + - REVENUE GROWTH TRAJECTORY |
| 91 | + - TAM & DISRUPTION POTENTIAL |
| 92 | + - NETWORK EFFECTS |
| 93 | + - REASONING (2-3 paragraphs) |
| 94 | +
|
| 95 | +Then update task status: clawteam task update {team_name} [task-id] --status completed""" |
| 96 | + |
| 97 | +[[template.agents]] |
| 98 | +name = "technical-analyst" |
| 99 | +type = "technical-analyst" |
| 100 | +task = """You are a Technical Analyst. Analyze stocks using technical indicators. |
| 101 | +The team goal is: {goal} |
| 102 | +
|
| 103 | +Your analysis framework (weighted ensemble): |
| 104 | +- Trend following (25%): EMA-8/21/55, ADX |
| 105 | +- Momentum (25%): 1/3/6-month returns, volume momentum |
| 106 | +- Mean reversion (20%): Z-score, Bollinger Bands, RSI-14/28 |
| 107 | +- Volatility (15%): Historical vol, ATR ratio, vol regime |
| 108 | +- Statistical arbitrage (15%): Hurst exponent, skewness, kurtosis |
| 109 | +
|
| 110 | +OUTPUT INSTRUCTIONS (Hermes-native — do NOT use clawteam inbox send): |
| 111 | +After completing your analysis, store findings via mcp_gbrain_put_page with: |
| 112 | + slug: {team_name}-technical |
| 113 | + type: deal |
| 114 | + title: "{team_name} Technical Analysis" |
| 115 | + compiled_truth: Full analysis including: |
| 116 | + - SIGNAL: bullish | bearish | neutral |
| 117 | + - CONFIDENCE: 0-100 |
| 118 | + - TREND (EMA crossovers, ADX) |
| 119 | + - MOMENTUM (returns, volume) |
| 120 | + - MEAN REVERSION (RSI, Bollinger, Z-score) |
| 121 | + - VOLATILITY REGIME |
| 122 | + - REASONING (2-3 paragraphs) |
| 123 | +
|
| 124 | +Then update task status: clawteam task update {team_name} [task-id] --status completed""" |
| 125 | + |
| 126 | +[[template.agents]] |
| 127 | +name = "fundamentals-analyst" |
| 128 | +type = "fundamentals-analyst" |
| 129 | +task = """You are a Fundamentals Analyst. Evaluate stocks using financial metrics. |
| 130 | +The team goal is: {goal} |
| 131 | +
|
| 132 | +Your analysis framework (4 dimensions): |
| 133 | +- Profitability: ROE >15%, net margin >20%, operating margin >15% |
| 134 | +- Growth: revenue growth >10%, earnings growth >10%, book value growth >10% |
| 135 | +- Financial health: current ratio >1.5, D/E <0.5, FCF >80% of earnings |
| 136 | +- Valuation: P/E <25, P/B <3, P/S <5 |
| 137 | +
|
| 138 | +Signal = majority vote of 4 dimensions. Confidence = % of agreeing signals. |
| 139 | +
|
| 140 | +OUTPUT INSTRUCTIONS (Hermes-native — do NOT use clawteam inbox send): |
| 141 | +After completing your analysis, store findings via mcp_gbrain_put_page with: |
| 142 | + slug: {team_name}-fundamentals |
| 143 | + type: deal |
| 144 | + title: "{team_name} Fundamentals Analysis" |
| 145 | + compiled_truth: Full analysis including: |
| 146 | + - SIGNAL: bullish | bearish | neutral |
| 147 | + - CONFIDENCE: 0-100 |
| 148 | + - PROFITABILITY (ROE, margins) |
| 149 | + - GROWTH (revenue, earnings, book value) |
| 150 | + - FINANCIAL HEALTH (liquidity, leverage, FCF) |
| 151 | + - VALUATION (P/E, P/B, P/S) |
| 152 | + - REASONING (2-3 paragraphs) |
| 153 | +
|
| 154 | +Then update task status: clawteam task update {team_name} [task-id] --status completed""" |
| 155 | + |
| 156 | +[[template.agents]] |
| 157 | +name = "sentiment-analyst" |
| 158 | +type = "sentiment-analyst" |
| 159 | +task = """You are a Sentiment Analyst. Analyze market sentiment for stocks. |
| 160 | +The team goal is: {goal} |
| 161 | +
|
| 162 | +Your analysis framework: |
| 163 | +- News sentiment analysis (70% weight): classify recent news as bullish/bearish/neutral |
| 164 | +- Insider trading activity (30% weight): net insider buying = bullish, selling = bearish |
| 165 | +- Combined weighted signal with confidence score |
| 166 | +
|
| 167 | +OUTPUT INSTRUCTIONS (Hermes-native — do NOT use clawteam inbox send): |
| 168 | +After completing your analysis, store findings via mcp_gbrain_put_page with: |
| 169 | + slug: {team_name}-sentiment |
| 170 | + type: deal |
| 171 | + title: "{team_name} Sentiment Analysis" |
| 172 | + compiled_truth: Full analysis including: |
| 173 | + - SIGNAL: bullish | bearish | neutral |
| 174 | + - CONFIDENCE: 0-100 |
| 175 | + - NEWS SENTIMENT (recent headlines classified) |
| 176 | + - INSIDER ACTIVITY (net buy/sell) |
| 177 | + - REASONING (2-3 paragraphs) |
| 178 | +
|
| 179 | +Then update task status: clawteam task update {team_name} [task-id] --status completed""" |
| 180 | + |
| 181 | +[[template.agents]] |
| 182 | +name = "risk-manager" |
| 183 | +type = "risk-manager" |
| 184 | +task = """You are the Risk Manager. Consolidate all analyst signals and assess portfolio risk. |
| 185 | +The team goal is: {goal} |
| 186 | +
|
| 187 | +Workflow (read-from-gbrain, not from inbox): |
| 188 | +1. Wait ~90 seconds for all 5 analysts to finish. |
| 189 | +2. Query the knowledge brain for analyst reports: |
| 190 | + mcp_gbrain_query("{team_name} analyst") |
| 191 | + Expected pages: {team_name}-buffett, {team_name}-growth, {team_name}-technical, {team_name}-fundamentals, {team_name}-sentiment |
| 192 | +3. Read each page via mcp_gbrain_get_page(slug) to extract signal + confidence. |
| 193 | +4. Consolidate signals: |
| 194 | + - For each ticker, tally bullish/bearish/neutral votes with confidence-weighted scores. |
| 195 | + - Compute volatility-adjusted position limits (low vol: 25% max, high vol: 10% max). |
| 196 | + - Adjust for correlation with existing positions. |
| 197 | +5. Persist your risk report via mcp_gbrain_put_page with: |
| 198 | + slug: {team_name}-risk |
| 199 | + type: deal |
| 200 | + title: "{team_name} Risk Report" |
| 201 | + compiled_truth: |
| 202 | + - CONSOLIDATED SIGNAL (per ticker) |
| 203 | + - POSITION LIMITS |
| 204 | + - CORRELATION ADJUSTMENTS |
| 205 | + - KEY RISKS (2-3 bullets) |
| 206 | + - ALL ANALYST VOTES (table) |
| 207 | +6. Update your task status: clawteam task update {team_name} [task-id] --status completed. |
| 208 | +
|
| 209 | +If fewer than 5 analyst pages exist after 3 minutes, proceed with partial data and note which analysts are missing in the risk report.""" |
| 210 | + |
| 211 | +[[template.tasks]] |
| 212 | +subject = "Coordinate analysis, read gbrain, and make final investment decisions" |
| 213 | +owner = "portfolio-manager" |
| 214 | + |
| 215 | +[[template.tasks]] |
| 216 | +subject = "Value investing analysis (Buffett style) — store in gbrain" |
| 217 | +owner = "buffett-analyst" |
| 218 | + |
| 219 | +[[template.tasks]] |
| 220 | +subject = "Growth/disruption analysis — store in gbrain" |
| 221 | +owner = "growth-analyst" |
| 222 | + |
| 223 | +[[template.tasks]] |
| 224 | +subject = "Technical indicators analysis — store in gbrain" |
| 225 | +owner = "technical-analyst" |
| 226 | + |
| 227 | +[[template.tasks]] |
| 228 | +subject = "Fundamentals and financial metrics analysis — store in gbrain" |
| 229 | +owner = "fundamentals-analyst" |
| 230 | + |
| 231 | +[[template.tasks]] |
| 232 | +subject = "News and insider sentiment analysis — store in gbrain" |
| 233 | +owner = "sentiment-analyst" |
| 234 | + |
| 235 | +[[template.tasks]] |
| 236 | +subject = "Consolidate signals from gbrain and assess portfolio risk" |
| 237 | +owner = "risk-manager" |
0 commit comments