Spaces:
Sleeping
Sleeping
Add human-readable output format documentation
Browse filesAdded example output tables for quantitative and qualitative data
using markdown format matching mcp_test_report format.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
docs/metrics_schema_human_readable.md
CHANGED
|
@@ -181,224 +181,88 @@ Standardized output schema for financial data across ALL industries (banks, cons
|
|
| 181 |
|
| 182 |
---
|
| 183 |
|
| 184 |
-
## Output Format
|
| 185 |
-
|
| 186 |
-
### Aggregated Response (from `fetch_all_research_data`)
|
| 187 |
-
|
| 188 |
-
```json
|
| 189 |
-
{
|
| 190 |
-
"ticker": "AAPL",
|
| 191 |
-
"company_name": "Apple Inc.",
|
| 192 |
-
"sources_available": ["fundamentals", "valuation", "volatility", "macro", "news", "sentiment"],
|
| 193 |
-
"sources_failed": [],
|
| 194 |
-
"metrics": {
|
| 195 |
-
"fundamentals": { ... },
|
| 196 |
-
"valuation": { ... },
|
| 197 |
-
"volatility": { ... },
|
| 198 |
-
"macro": { ... },
|
| 199 |
-
"news": { ... },
|
| 200 |
-
"sentiment": { ... }
|
| 201 |
-
},
|
| 202 |
-
"multi_source": {
|
| 203 |
-
"fundamentals_all": { ... },
|
| 204 |
-
"valuation_all": { ... },
|
| 205 |
-
"macro_all": { ... },
|
| 206 |
-
"volatility_all": { ... }
|
| 207 |
-
},
|
| 208 |
-
"conflict_resolution": { ... },
|
| 209 |
-
"aggregated_swot": { ... },
|
| 210 |
-
"completeness": {
|
| 211 |
-
"completeness_pct": 85.0,
|
| 212 |
-
"metrics_found": 17,
|
| 213 |
-
"metrics_total": 20,
|
| 214 |
-
"missing": { ... }
|
| 215 |
-
},
|
| 216 |
-
"generated_at": "2025-01-11T21:00:00"
|
| 217 |
-
}
|
| 218 |
-
```
|
| 219 |
-
|
| 220 |
-
---
|
| 221 |
-
|
| 222 |
-
### Fundamentals Output
|
| 223 |
-
|
| 224 |
-
```json
|
| 225 |
-
{
|
| 226 |
-
"sec_edgar": {
|
| 227 |
-
"source": "SEC EDGAR XBRL",
|
| 228 |
-
"data": {
|
| 229 |
-
"revenue": {"value": 383285000000, "end_date": "2024-09-28", "fiscal_year": 2024, "form": "10-K"},
|
| 230 |
-
"net_income": {"value": 93736000000, "end_date": "2024-09-28", "fiscal_year": 2024, "form": "10-K"},
|
| 231 |
-
"net_margin_pct": {"value": 24.45, "end_date": "2024-09-28", "fiscal_year": 2024, "form": "10-K"},
|
| 232 |
-
"total_assets": {"value": 364980000000},
|
| 233 |
-
"total_liabilities": {"value": 308030000000},
|
| 234 |
-
"stockholders_equity": {"value": 56950000000}
|
| 235 |
-
}
|
| 236 |
-
},
|
| 237 |
-
"yahoo_finance": {
|
| 238 |
-
"source": "Yahoo Finance",
|
| 239 |
-
"data": {
|
| 240 |
-
"operating_margin_pct": 30.74,
|
| 241 |
-
"total_debt": 106629000000,
|
| 242 |
-
"operating_cash_flow": 118254000000,
|
| 243 |
-
"free_cash_flow": 111443000000
|
| 244 |
-
}
|
| 245 |
-
}
|
| 246 |
-
}
|
| 247 |
-
```
|
| 248 |
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
### Valuation Output
|
| 252 |
-
|
| 253 |
-
```json
|
| 254 |
-
{
|
| 255 |
-
"yahoo_finance": {
|
| 256 |
-
"source": "Yahoo Finance",
|
| 257 |
-
"data": {
|
| 258 |
-
"current_price": 229.87,
|
| 259 |
-
"market_cap": 3480000000000,
|
| 260 |
-
"enterprise_value": 3580000000000,
|
| 261 |
-
"trailing_pe": 37.12,
|
| 262 |
-
"forward_pe": 31.45,
|
| 263 |
-
"ps_ratio": 9.08,
|
| 264 |
-
"pb_ratio": 61.11,
|
| 265 |
-
"trailing_peg": 2.89,
|
| 266 |
-
"forward_peg": 2.15,
|
| 267 |
-
"earnings_growth": 0.1047,
|
| 268 |
-
"revenue_growth": 0.0204
|
| 269 |
-
}
|
| 270 |
-
},
|
| 271 |
-
"alpha_vantage": {
|
| 272 |
-
"source": "Alpha Vantage",
|
| 273 |
-
"data": { ... }
|
| 274 |
-
}
|
| 275 |
-
}
|
| 276 |
-
```
|
| 277 |
-
|
| 278 |
-
---
|
| 279 |
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
"historical_volatility": {"value": 22.5},
|
| 289 |
-
"implied_volatility": {"value": null}
|
| 290 |
-
}
|
| 291 |
-
},
|
| 292 |
-
"market_volatility_context": {
|
| 293 |
-
"vix": {"value": 15.45, "date": "2025-01-10"},
|
| 294 |
-
"vxn": {"value": 18.32, "date": "2025-01-10"}
|
| 295 |
-
}
|
| 296 |
-
}
|
| 297 |
-
```
|
| 298 |
|
| 299 |
---
|
| 300 |
|
| 301 |
-
###
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
|
| 322 |
---
|
| 323 |
|
| 324 |
-
###
|
| 325 |
-
|
| 326 |
-
```json
|
| 327 |
-
{
|
| 328 |
-
"group": "content_analysis",
|
| 329 |
-
"ticker": "AAPL",
|
| 330 |
-
"items": [
|
| 331 |
-
{
|
| 332 |
-
"title": "Apple Reports Record Q4 Earnings",
|
| 333 |
-
"content": "Apple Inc. reported...",
|
| 334 |
-
"url": "https://...",
|
| 335 |
-
"datetime": "2025-01-10",
|
| 336 |
-
"source": "Tavily"
|
| 337 |
-
}
|
| 338 |
-
],
|
| 339 |
-
"item_count": 10,
|
| 340 |
-
"sources_used": ["Tavily", "NYT", "NewsAPI"],
|
| 341 |
-
"source": "news-basket",
|
| 342 |
-
"as_of": "2025-01-11"
|
| 343 |
-
}
|
| 344 |
-
```
|
| 345 |
-
|
| 346 |
-
---
|
| 347 |
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
"content": "Just loaded up on more shares...",
|
| 358 |
-
"url": "https://reddit.com/r/wallstreetbets/...",
|
| 359 |
-
"datetime": "2025-01-10",
|
| 360 |
-
"source": "Reddit",
|
| 361 |
-
"subreddit": "r/wallstreetbets"
|
| 362 |
-
},
|
| 363 |
-
{
|
| 364 |
-
"title": "Apple Announces New Product Line",
|
| 365 |
-
"content": "Apple Inc. unveiled...",
|
| 366 |
-
"url": "https://finnhub.io/...",
|
| 367 |
-
"datetime": "2025-01-09",
|
| 368 |
-
"source": "Finnhub",
|
| 369 |
-
"subreddit": null
|
| 370 |
-
}
|
| 371 |
-
],
|
| 372 |
-
"item_count": 15,
|
| 373 |
-
"sources_used": ["Finnhub", "Reddit"],
|
| 374 |
-
"source": "sentiment-basket",
|
| 375 |
-
"as_of": "2025-01-11"
|
| 376 |
-
}
|
| 377 |
-
```
|
| 378 |
|
| 379 |
---
|
| 380 |
|
| 381 |
-
### Streamed Metrics (
|
| 382 |
-
|
| 383 |
-
During task execution, metrics are streamed
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
|
| 398 |
-
|
|
| 399 |
-
|
|
| 400 |
-
|
|
| 401 |
-
| volatility | `VIX`, `beta`, `hist_vol` |
|
| 402 |
-
| macro | `GDP_growth`, `interest_rate`, `inflation`, `unemployment` |
|
| 403 |
-
| news | `items_found` (count) |
|
| 404 |
-
| sentiment | `items_found` (count) |
|
|
|
|
| 181 |
|
| 182 |
---
|
| 183 |
|
| 184 |
+
## Output Format (Example: Apple Inc.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
|
| 186 |
+
### Summary
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
|
| 188 |
+
| S/N | MCP | Status | Expected | Actual | Source |
|
| 189 |
+
|-----|-----|--------|----------|--------|--------|
|
| 190 |
+
| 1 | fundamentals | PASS | 9 | 9 | SEC EDGAR + Yahoo Finance |
|
| 191 |
+
| 2 | valuation | PASS | 11 | 11 | Yahoo Finance |
|
| 192 |
+
| 3 | volatility | PASS | 5 | 5 | FRED + Yahoo Finance |
|
| 193 |
+
| 4 | macro | PASS | 4 | 4 | BEA + BLS + FRED |
|
| 194 |
+
| 5 | news | PASS | - | 10 | Tavily + NYT + NewsAPI |
|
| 195 |
+
| 6 | sentiment | PASS | - | 15 | Finnhub + Reddit |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
|
| 197 |
---
|
| 198 |
|
| 199 |
+
### Quantitative Data
|
| 200 |
+
|
| 201 |
+
| S/N | Metric | Value | Data Type | As Of | Source | Category |
|
| 202 |
+
|-----|--------|-------|-----------|-------|--------|----------|
|
| 203 |
+
| 1 | revenue | 383,285,000,000 | FY | 2024-09-28 | SEC EDGAR | Fundamentals |
|
| 204 |
+
| 2 | net_income | 93,736,000,000 | FY | 2024-09-28 | SEC EDGAR | Fundamentals |
|
| 205 |
+
| 3 | net_margin_pct | 24.45 | FY | 2024-09-28 | SEC EDGAR | Fundamentals |
|
| 206 |
+
| 4 | total_assets | 364,980,000,000 | FY | 2024-09-28 | SEC EDGAR | Fundamentals |
|
| 207 |
+
| 5 | total_liabilities | 308,030,000,000 | FY | 2024-09-28 | SEC EDGAR | Fundamentals |
|
| 208 |
+
| 6 | stockholders_equity | 56,950,000,000 | FY | 2024-09-28 | SEC EDGAR | Fundamentals |
|
| 209 |
+
| 7 | operating_margin_pct | 30.74 | TTM | 2025-01-11 | Yahoo Finance | Fundamentals |
|
| 210 |
+
| 8 | total_debt | 106,629,000,000 | TTM | 2025-01-11 | Yahoo Finance | Fundamentals |
|
| 211 |
+
| 9 | free_cash_flow | 111,443,000,000 | TTM | 2025-01-11 | Yahoo Finance | Fundamentals |
|
| 212 |
+
| 10 | current_price | 229.87 | - | 2025-01-11 | Yahoo Finance | Valuation |
|
| 213 |
+
| 11 | market_cap | 3,480,000,000,000 | - | 2025-01-11 | Yahoo Finance | Valuation |
|
| 214 |
+
| 12 | enterprise_value | 3,580,000,000,000 | - | 2025-01-11 | Yahoo Finance | Valuation |
|
| 215 |
+
| 13 | trailing_pe | 37.12 | - | 2025-01-11 | Yahoo Finance | Valuation |
|
| 216 |
+
| 14 | forward_pe | 31.45 | - | 2025-01-11 | Yahoo Finance | Valuation |
|
| 217 |
+
| 15 | ps_ratio | 9.08 | - | 2025-01-11 | Yahoo Finance | Valuation |
|
| 218 |
+
| 16 | pb_ratio | 61.11 | - | 2025-01-11 | Yahoo Finance | Valuation |
|
| 219 |
+
| 17 | trailing_peg | 2.89 | - | 2025-01-11 | Yahoo Finance | Valuation |
|
| 220 |
+
| 18 | forward_peg | 2.15 | - | 2025-01-11 | Yahoo Finance | Valuation |
|
| 221 |
+
| 19 | earnings_growth | 0.1047 | - | 2025-01-11 | Yahoo Finance | Valuation |
|
| 222 |
+
| 20 | revenue_growth | 0.0204 | - | 2025-01-11 | Yahoo Finance | Valuation |
|
| 223 |
+
| 21 | vix | 15.45 | Daily | 2025-01-10 | FRED | Volatility |
|
| 224 |
+
| 22 | vxn | 18.32 | Daily | 2025-01-10 | FRED | Volatility |
|
| 225 |
+
| 23 | beta | 1.24 | 1Y | 2025-01-11 | Yahoo Finance | Volatility |
|
| 226 |
+
| 24 | historical_volatility | 22.50 | 30D | 2025-01-11 | Yahoo Finance | Volatility |
|
| 227 |
+
| 25 | implied_volatility | 30.00 | Forward | 2025-01-11 | Market Average | Volatility |
|
| 228 |
+
| 26 | gdp_growth | 4.30 | Quarterly | 2024-Q3 | BEA | Macro |
|
| 229 |
+
| 27 | interest_rate | 3.72 | Monthly | 2025-01-09 | FRED | Macro |
|
| 230 |
+
| 28 | cpi_inflation | 2.74 | Monthly | 2024-12-01 | BLS | Macro |
|
| 231 |
+
| 29 | unemployment | 4.40 | Monthly | 2024-12-01 | BLS | Macro |
|
| 232 |
|
| 233 |
---
|
| 234 |
|
| 235 |
+
### Qualitative Data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
|
| 237 |
+
| S/N | Title | Date | Source | Subreddit | URL | Category |
|
| 238 |
+
|-----|-------|------|--------|-----------|-----|----------|
|
| 239 |
+
| 1 | Apple Reports Record Q4 Earnings | 2025-01-10 | Tavily | - | [Link](https://...) | News |
|
| 240 |
+
| 2 | Apple Stock Rises on Strong iPhone Sales | 2025-01-09 | NYT | - | [Link](https://...) | News |
|
| 241 |
+
| 3 | AAPL Analysis: Buy or Hold? | 2025-01-08 | NewsAPI | - | [Link](https://...) | News |
|
| 242 |
+
| 4 | Apple Announces New Product Line | 2025-01-10 | Finnhub | - | [Link](https://...) | Sentiment |
|
| 243 |
+
| 5 | Apple's AI Strategy Impresses Analysts | 2025-01-09 | Finnhub | - | [Link](https://...) | Sentiment |
|
| 244 |
+
| 6 | AAPL to the moon! | 2025-01-10 | Reddit | r/wallstreetbets | [Link](https://...) | Sentiment |
|
| 245 |
+
| 7 | Why I'm bullish on Apple for 2025 | 2025-01-09 | Reddit | r/stocks | [Link](https://...) | Sentiment |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 246 |
|
| 247 |
---
|
| 248 |
|
| 249 |
+
### Streamed Metrics (Real-time)
|
| 250 |
+
|
| 251 |
+
During task execution, these metrics are streamed to the frontend:
|
| 252 |
+
|
| 253 |
+
| S/N | Source | Metric | Example Value | Temporal Info |
|
| 254 |
+
|-----|--------|--------|---------------|---------------|
|
| 255 |
+
| 1 | fundamentals | revenue | 383,285,000,000 | FY 2024 |
|
| 256 |
+
| 2 | fundamentals | net_margin | 24.45 | FY 2024 |
|
| 257 |
+
| 3 | valuation | P/E | 37.12 | - |
|
| 258 |
+
| 4 | valuation | P/B | 61.11 | - |
|
| 259 |
+
| 5 | valuation | P/S | 9.08 | - |
|
| 260 |
+
| 6 | volatility | VIX | 15.45 | - |
|
| 261 |
+
| 7 | volatility | beta | 1.24 | - |
|
| 262 |
+
| 8 | volatility | hist_vol | 22.50 | - |
|
| 263 |
+
| 9 | macro | GDP_growth | 4.30 | - |
|
| 264 |
+
| 10 | macro | interest_rate | 3.72 | - |
|
| 265 |
+
| 11 | macro | inflation | 2.74 | - |
|
| 266 |
+
| 12 | macro | unemployment | 4.40 | - |
|
| 267 |
+
| 13 | news | items_found | 10 | - |
|
| 268 |
+
| 14 | sentiment | items_found | 15 | - |
|
|
|
|
|
|
|
|
|
|
|
|