All checks were successful
continuous-integration/drone/push Build is passing
Coverage: 19% → 67% of API endpoints (88/131) market-analysis: 5 → 15 endpoints (all 14 technical indicators + historical) - Added: ADX, Stochastic, Keltner, Donchian, Aroon, CCI, Fib, A/D, Cones, VWAP - Added confluence/divergence analysis guidance fundamental-analysis: 5 → 12 endpoints - Added: summary (all-in-one), CAPM, Sortino, Omega, estimates, share-statistics, institutional, dividends, calendar/earnings - Added institutional ownership and earnings catalyst flagging sentiment-analysis: 5 → 16 endpoints - Added: reddit-sentiment, social-sentiment, shorts/ftd, darkpool/otc, share-statistics, institutional, congress/trades - Restructured as smart money vs retail noise hierarchy macro-analysis: 6 → 23 endpoints - Added: treasury-rates, effr, sofr, spreads, hqm, tips-yields, pce, gdp, unemployment, money-measures, cli, sloos, nonfarm-payrolls, empire-state, central-bank-holdings, fomc-documents, sp500-multiples - Added business cycle positioning framework trade-analyze: updated data collection to use /summary endpoint AGENTS.md (all 4 debate agents): updated for sessions_spawn protocol SOUL.md (all 4): removed unavailable memory_search, REPLY_SKIP refs deploy.sh: fixed nvm loading for SSH
144 lines
4.8 KiB
Markdown
144 lines
4.8 KiB
Markdown
---
|
|
name: macro-analysis
|
|
description: Professional macro environment analysis — rates, inflation, labor, leading indicators, credit conditions, sector implications via openbb-invest-api
|
|
user-invocable: true
|
|
metadata: { "openclaw": { "emoji": "🌍", "requires": { "bins": ["curl"] } } }
|
|
---
|
|
|
|
# Macro Analysis
|
|
|
|
Generate a professional-grade macro environment report. Think like a macro strategist at a multi-asset fund.
|
|
|
|
## Data Collection
|
|
|
|
```bash
|
|
BASE=https://invest-api.k8s.home
|
|
|
|
# Headline indicators (Fed rate, yields, CPI, unemployment, GDP, VIX)
|
|
curl -sk "$BASE/api/v1/macro/overview"
|
|
|
|
# Yield curve (rate environment, inversion = recession signal)
|
|
curl -sk "$BASE/api/v1/fixed-income/yield-curve"
|
|
|
|
# Full treasury rates (4W to 30Y)
|
|
curl -sk "$BASE/api/v1/fixed-income/treasury-rates"
|
|
|
|
# Effective Federal Funds Rate with percentiles
|
|
curl -sk "$BASE/api/v1/fixed-income/effr"
|
|
|
|
# SOFR (key benchmark rate)
|
|
curl -sk "$BASE/api/v1/fixed-income/sofr"
|
|
|
|
# Credit spreads (stress indicator)
|
|
curl -sk "$BASE/api/v1/fixed-income/spreads?series=tcm"
|
|
|
|
# Corporate bond yields (credit quality)
|
|
curl -sk "$BASE/api/v1/fixed-income/hqm"
|
|
|
|
# TIPS real yields (inflation expectations)
|
|
curl -sk "$BASE/api/v1/fixed-income/tips-yields"
|
|
|
|
# CPI inflation
|
|
curl -sk "$BASE/api/v1/macro/cpi?country=united_states"
|
|
|
|
# PCE (Fed's preferred inflation measure)
|
|
curl -sk "$BASE/api/v1/macro/pce"
|
|
|
|
# GDP
|
|
curl -sk "$BASE/api/v1/macro/gdp?gdp_type=real"
|
|
|
|
# Unemployment
|
|
curl -sk "$BASE/api/v1/macro/unemployment?country=united_states"
|
|
|
|
# Money supply
|
|
curl -sk "$BASE/api/v1/macro/money-measures"
|
|
|
|
# Composite Leading Indicator (recession predictor)
|
|
curl -sk "$BASE/api/v1/macro/cli?country=united_states"
|
|
|
|
# Consumer sentiment (recession leading indicator)
|
|
curl -sk "$BASE/api/v1/economy/surveys/michigan"
|
|
|
|
# Lending conditions (strongest recession signal)
|
|
curl -sk "$BASE/api/v1/economy/surveys/sloos"
|
|
|
|
# Employment detail
|
|
curl -sk "$BASE/api/v1/economy/surveys/nonfarm-payrolls"
|
|
|
|
# Manufacturing outlook
|
|
curl -sk "$BASE/api/v1/economy/surveys/empire-state"
|
|
|
|
# Fed balance sheet
|
|
curl -sk "$BASE/api/v1/economy/central-bank-holdings"
|
|
|
|
# FOMC documents (policy direction)
|
|
curl -sk "$BASE/api/v1/economy/fomc-documents?year=2026"
|
|
|
|
# S&P 500 valuation context
|
|
curl -sk "$BASE/api/v1/index/sp500-multiples?series=pe_ratio"
|
|
|
|
# Short pressure on the specific stock
|
|
curl -sk "$BASE/api/v1/stock/{TICKER}/shorts/volume"
|
|
curl -sk "$BASE/api/v1/stock/{TICKER}/shorts/interest"
|
|
```
|
|
|
|
## Report Structure
|
|
|
|
```
|
|
## Macro Environment for {TICKER} — {date}
|
|
|
|
### Rate Environment
|
|
- Fed Funds Rate: {rate}% | EFFR: {rate}%
|
|
- SOFR: {rate}%
|
|
- 2Y: {rate}% | 10Y: {rate}% | 30Y: {rate}%
|
|
- Yield curve (10Y-2Y): {spread}bps — [normal / flat / inverted]
|
|
- Credit spreads: [tight = risk-on / widening = stress]
|
|
- TIPS real yield: {rate}% — [positive = tight policy / negative = accommodative]
|
|
- Rate outlook: [hawkish / dovish / neutral] based on FOMC tone
|
|
|
|
### Inflation
|
|
- CPI YoY: {%} — trend [rising / falling / stable]
|
|
- PCE YoY: {%} — Fed target 2%, current gap: {bps}
|
|
- Money supply (M2): [growing / contracting]
|
|
- Implication: Fed likely to [cut / hold / raise]
|
|
|
|
### Labor Market
|
|
- Unemployment: {%} — [tight <4% / balanced / loosening >5%]
|
|
- Nonfarm payrolls: {latest change}
|
|
- Avg hourly earnings: {YoY %} — wage inflation [hot / moderate / cooling]
|
|
|
|
### Business Cycle Position
|
|
- GDP growth: {%} — [expansion / slowing / contraction]
|
|
- CLI: {value} — [above 100 = expansion / below 100 = contraction / direction?]
|
|
- Michigan sentiment: {value} — [confident / cautious / pessimistic]
|
|
- Empire State: {value} — [expanding >0 / contracting <0]
|
|
- SLOOS: lending standards [tightening = recession risk / easing = expansion]
|
|
|
|
### Liquidity & Central Bank
|
|
- Fed balance sheet: [expanding (QE) / shrinking (QT) / stable]
|
|
- Corporate bond yields (HQM): AAA {%}, A {%} — credit stress level
|
|
|
|
### Market Valuation Context
|
|
- S&P 500 P/E: {value} vs historical avg (~18) — [cheap / fair / expensive]
|
|
- VIX: {level} — [complacent <15 / normal 15-20 / fearful 20-30 / panic >30]
|
|
|
|
### Implications for {TICKER}
|
|
- Sector rate sensitivity: [high / moderate / low] (e.g., REITs, banks, tech duration)
|
|
- Macro headwinds: {1-2 specific risks}
|
|
- Macro tailwinds: {1-2 specific opportunities}
|
|
- Short pressure: volume {%}, interest {days to cover}
|
|
|
|
### Signal: [FAVORABLE / UNFAVORABLE / MIXED]
|
|
### Confidence: {1-10}
|
|
### Key Risk: {one-line macro risk for this stock}
|
|
```
|
|
|
|
## Rules
|
|
|
|
- **Yield curve inversion is the strongest recession predictor** — flag it prominently
|
|
- **SLOOS tightening precedes recessions by 6-12 months** — critical leading indicator
|
|
- **CLI below 100 and falling = recession warning**
|
|
- **VIX > 30 = fear** — contrarian buy signal for quality stocks
|
|
- Contextualize for the specific stock's sector sensitivity
|
|
- Keep under 600 words (macro requires more context than other analyses)
|