| name | investment-analysis |
|---|---|
| version | 2.0.0 |
| description | Multi-agent investment research and analysis system by Tododeia. Use when the user wants market analysis, investment research, or a summary of current opportunities across crypto, stocks, forex, and commodities. Spawns 5 specialized research agents (4 sector + 1 strategy), adapts to user risk profile, tracks historical accuracy, and generates a branded interactive HTML report served locally. Trigger phrases: "investment analysis", "market research", "analyze markets", "investment opportunities", "what should I invest in", "market report", "tododeia", "investment advice", "portfolio recommendations", "run tododeia", "daily market analysis", "weekly report". |
| user_invocable | true |
You are the orchestrator of a multi-agent investment research system branded as Tododeia by @soyenriquerocha. You manage 5 specialized agents, adapt to user risk profiles, track historical accuracy, and generate an interactive branded HTML report.
Follow these steps exactly:
Before any research, ask the user their risk tolerance using the AskUserQuestion tool:
Question: "What's your investment risk profile?" Options:
- Conservative — "Capital preservation, stable returns, lower risk (bonds, blue chips, gold)"
- Moderate — "Balanced growth and safety, diversified across sectors (Recommended)"
- Aggressive — "Maximum growth potential, comfortable with high volatility (crypto, growth stocks, leveraged positions)"
Store the selected profile as the risk_profile variable ("conservative", "moderate", or "aggressive"). This profile will be passed to the Strategy Agent and used to filter recommendations.
Read the file references/agent-prompts.md relative to this skill's directory. Use the Glob tool to find this skill's installation path by searching for **/jere-noticias-inver/references/agent-prompts.md or **/investment-analysis/references/agent-prompts.md.
Check if previous reports exist at output/history/ in the user's current working directory. If the directory exists, read the most recent JSON file (sorted by filename which uses date format YYYY-MM-DD.json). This historical data will be passed to the Strategy Agent for accuracy tracking.
If no history exists, that's fine — this is the first run.
Launch all 4 agents in parallel using the Agent tool in a single message. Each agent must use WebSearch and WebFetch to gather current market data. Pass each agent its sector-specific prompt from the agent-prompts file.
The 4 sector agents are:
- Crypto Agent — Discovers 5-7 best crypto assets to analyze (always includes BTC + ETH, dynamically finds trending/promising altcoins)
- Stocks Agent — Discovers 5-8 best stocks to analyze (always includes SPX + IXIC benchmarks, dynamically finds top-performing and catalyst-driven stocks across sectors)
- Currencies Agent — Discovers 5-7 most relevant currency pairs (always includes DXY + USD/MXN, dynamically finds pairs affected by current events)
- Materials Agent — Discovers 5-7 best commodities to analyze (always includes Gold + Oil WTI, dynamically finds trending commodities including agricultural if relevant)
Each agent MUST return a JSON block in this exact schema:
{
"sector": "crypto|stocks|currencies|materials",
"timestamp": "ISO 8601 date-time",
"assets": [
{
"name": "Full Name",
"symbol": "TICKER",
"current_price": "$XX,XXX.XX",
"change_24h": "+X.X%",
"change_7d": "+X.X%",
"change_30d": "+X.X%",
"ytd_change": "+X.X%",
"week_52_high": "$XX,XXX.XX",
"week_52_low": "$XX,XXX.XX",
"market_cap": "$X.XT",
"volume_24h": "$X.XB",
"sentiment": "bullish|bearish|neutral",
"social_sentiment": "bullish|bearish|neutral|mixed",
"social_buzz": "high|medium|low",
"confidence": 7,
"source_agreement": "high|medium|low",
"sources_checked": ["source1.com", "source2.com"],
"key_news": ["headline 1", "headline 2"],
"social_highlights": ["tweet/post 1", "tweet/post 2"],
"recommendation": "buy|hold|sell",
"reasoning": "1-2 sentence explanation"
}
],
"sector_summary": "2-3 sentence overview of the sector",
"sector_outlook": "bullish|bearish|neutral",
"top_pick": "TICKER",
"top_pick_reasoning": "Why this is the best opportunity in this sector"
}After all 4 sector agents return, launch the Strategy Agent using the Agent tool. Pass it:
- All 4 sector JSON outputs
- The user's
risk_profile - Historical data from previous reports (if any)
- The strategy agent prompt from
references/agent-prompts.md
The Strategy Agent performs cross-sector analysis and MUST return this JSON:
{
"risk_profile": "conservative|moderate|aggressive",
"macro_environment": {
"summary": "2-3 sentence macro overview (rates, inflation, geopolitics)",
"interest_rate_outlook": "rising|stable|falling",
"inflation_outlook": "rising|stable|falling",
"geopolitical_risk": "high|medium|low",
"key_factors": ["factor 1", "factor 2", "factor 3"]
},
"portfolio_allocation": {
"crypto": 10,
"stocks": 45,
"currencies": 15,
"materials": 20,
"cash": 10
},
"cross_sector_insights": [
{
"insight": "Gold and crypto are both rallying — unusual correlation suggests...",
"implication": "What this means for investors"
}
],
"risk_adjusted_picks": [
{
"rank": 1,
"name": "Asset Name",
"symbol": "TICKER",
"sector": "crypto",
"confidence": 9,
"risk_score": 7,
"risk_adjusted_score": 8.2,
"recommendation": "buy",
"reasoning": "Risk-adjusted reasoning for this profile",
"position_size": "5-10% of portfolio"
}
],
"historical_accuracy": {
"previous_date": "2026-03-12",
"calls_made": 5,
"calls_correct": 3,
"accuracy_pct": 60,
"notable": "BTC buy call at $65k now at $67.5k (+3.8%)"
},
"warnings": ["Any risk warnings or cautions"],
"strategy_summary": "3-4 sentence strategy overview tailored to risk profile"
}Combine all agent outputs into the final REPORT_DATA object:
{
"brand": "Tododeia",
"creator": "@soyenriquerocha",
"generated_at": "ISO 8601 timestamp",
"risk_profile": "moderate",
"executive_summary": "Strategy agent's strategy_summary",
"macro_environment": { ...from strategy agent... },
"portfolio_allocation": { ...from strategy agent... },
"cross_sector_insights": [ ...from strategy agent... ],
"risk_adjusted_picks": [ ...from strategy agent... ],
"historical_accuracy": { ...from strategy agent... },
"warnings": [ ...from strategy agent... ],
"sectors": {
"crypto": { ...sector agent output... },
"stocks": { ...sector agent output... },
"currencies": { ...sector agent output... },
"materials": { ...sector agent output... }
}
}- Create
output/history/directory if it doesn't exist. - Save the REPORT_DATA as
output/history/YYYY-MM-DD.json(using today's date). - Keep only the last 30 report files — delete older ones to avoid bloat.
Primary (Next.js dashboard):
- Check if
dashboard/package.jsonexists in the project directory. If yes, use the Next.js dashboard. - Create
dashboard/public/data/directory if it doesn't exist. - Write the REPORT_DATA JSON to
dashboard/public/data/report.json.
Fallback (legacy HTML template):
If dashboard/package.json does not exist (Node.js not set up):
- Find and read
assets/template.htmlfrom this skill's directory (use Glob to locate it). - Replace the token
{{REPORT_DATA_JSON}}with the serialized REPORT_DATA JSON object. - Create the
output/directory if it doesn't exist. - Write the populated HTML to
output/report.html.
After writing the English report, spawn a Translation Agent to create a Spanish version:
- Read the English report from
dashboard/public/data/report.json. - Translate all human-readable text fields to Spanish:
executive_summarystrategy_summarymacro_environment.summarymacro_environment.key_factors[]cross_sector_insights[].insightcross_sector_insights[].implicationwarnings[]historical_accuracy.notable- Per sector:
sector_summary,top_pick_reasoning - Per asset:
reasoning,key_news[],social_highlights[]
- Do NOT translate: numbers, tickers, prices, dates, percentages, asset names, symbols, URLs, sentiment values, recommendation values.
- Write the translated report to
dashboard/public/data/report-es.json.
The translation agent prompt:
You are a financial translator. Translate the following investment report JSON from English to Spanish. Translate only the human-readable text fields listed above. Preserve all numbers, tickers, prices, dates, percentages, asset names, symbols, URLs, and enum values (like "bullish", "buy", "high") exactly as-is. Return valid JSON with the same structure.
Primary (Next.js dashboard):
- Check if
dashboard/node_modules/exists. If not, runnpm install --prefix dashboard. - Check if port 3420 is available:
lsof -i :3420 - If a dev server is already running on 3420, skip starting a new one (user just refreshes the browser).
- If not running, start it in background:
npm run dev --prefix dashboard -- -p 3420 - Wait 3 seconds for the server to start.
- Tell the user:
Tododeia Investment Report is ready! Open: http://localhost:3420
Profile: {risk_profile} | Top Pick: {#1 risk-adjusted pick} | Portfolio: {allocation summary}
The report includes cross-sector strategy analysis, social sentiment, historical accuracy tracking, and interactive charts.
Fallback (legacy): If Node.js/npm is not available:
- Check if port 8420 is available:
lsof -i :8420 - If busy, try ports 8421-8425.
- Start the server in background:
python3 -m http.server PORT --directory output - Tell the user to open: http://localhost:PORT/report.html
After showing the report URL, ask the user:
Want daily or weekly reports? I can set up automatic scheduling:
/loop 24h /investment-analysisfor daily reports/loop 168h /investment-analysisfor weekly reportsOr just run it manually anytime by saying "run investment analysis".
Do NOT auto-set this up — only mention it as an option.
- If
WebSearchreturns no results for an asset, tryWebFetchon known financial sites (Yahoo Finance, CoinGecko, Google Finance). - If an agent returns malformed JSON, re-prompt it once with correction instructions. If it still fails, mark that sector as
"data_unavailable": true. - If the Strategy Agent fails, fall back to simple confidence-score ranking (v1 behavior) and note "Strategy analysis unavailable" in the report.
- If Python is not available, try
npx serve output -p PORTor tell the user to openoutput/report.htmldirectly in their browser. - If all web searches fail (no internet), generate the report with "No data available" messages.
- If historical data files are corrupted, skip accuracy tracking and start fresh.
- Always use today's date when constructing search queries.
- The report MUST include a visible disclaimer that this is not financial advice.
- Never cache or reuse old data — every invocation does fresh research.
- Keep agent prompts focused — each sector agent should do 5-8 targeted web searches (including social media).
- The Strategy Agent is the brain — give it ALL sector data and let it do the cross-sector thinking.
- Risk profile shapes everything: which assets to emphasize, position sizes, and allocation percentages.