---
title: Macro
description: A curated snapshot of 8 key macroeconomic indicators from FRED (Federal Reserve Economic Data), an Economic Stress Index, and a macro regime read — all in one view, updated daily, so you always know the context your portfolio is operating in.
---

export const reasons = [
  {
    icon: 'VIX',
    title: 'Fear index',
    desc: 'VIX above 30 signals elevated uncertainty. Your portfolio moves more on macro news when VIX is high. Knowing the baseline helps you separate signal from noise.',
  },
  {
    icon: '10Y',
    title: 'Rate environment',
    desc: 'The 10Y Treasury yield is the discount rate for equities. A rising 10Y compresses growth stock valuations. The yield curve (10Y minus 2Y) is a reliable recession signal when inverted.',
  },
  {
    icon: 'FX',
    title: 'Currency impact',
    desc: 'If your home currency is KRW or JPY, USD strength directly affects your real returns. Firma shows the current FX rate and how it has moved over the past 30 and 90 days.',
  },
];

export const percentileRows = [
  { cmd: <span style={{ color: 'var(--red)' }}>≥ p80</span>,  desc: "Historically elevated. Today's value is higher than 80% of daily readings over the last 5 years. Shown in red." },
  { cmd: 'p60 – p80', desc: 'Above average, somewhat elevated relative to recent history.' },
  { cmd: 'p20 – p60', desc: 'Normal range, within typical historical bounds. Shown in grey.' },
  { cmd: <span style={{ color: 'var(--green)' }}>≤ p20</span>, desc: "Historically suppressed. Today's value is lower than 80% of recent readings. Shown in green." },
];

export const indicators = [
  { cmd: 'VIX',                desc: 'CBOE Volatility Index, the market fear gauge (VIXCLS)' },
  { cmd: '10Y Treasury',       desc: '10-year US Treasury yield, the equity discount rate (DGS10)' },
  { cmd: 'Yield Curve',        desc: '10Y minus 2Y spread, a recession indicator (T10Y2Y)' },
  { cmd: 'USD Index',          desc: 'Trade-weighted dollar strength (DTWEXBGS)' },
  { cmd: 'HY Credit Spread',   desc: 'High-yield over Treasury, a credit stress indicator (BAMLH0A0HYM2)' },
  { cmd: 'Breakeven Inflation',desc: 'Market-implied 10Y inflation expectation (T10YIE)' },
  { cmd: 'Fed Funds Rate',     desc: 'Effective federal funds rate (FEDFUNDS)' },
  { cmd: 'FX vs home currency',desc: <>KRW/USD, JPY/USD, EUR/USD, etc. Driven by <code>currency</code> config.</> },
];

export const stressComponents = [
  { cmd: 'Yield Curve (10Y–2Y)',  desc: 'Inversion signals recession risk (T10Y2Y)' },
  { cmd: 'Bank Spread (10Y–3M)',  desc: 'Alt inversion measure. Often leads credit tightening (T10Y3M)' },
  { cmd: 'VIX',                   desc: 'Equity market volatility / fear gauge (VIXCLS)' },
  { cmd: 'Financial Stress',      desc: 'St. Louis Fed Financial Stress Index. Composite (STLFSI4)' },
  { cmd: 'Initial Jobless Claims',desc: 'Weekly unemployment claims. Labor market stress (ICSA)' },
];

export const stressTiers = [
  { cmd: <span style={{ color: 'var(--green)'  }}>&lt; 20</span>, desc: 'Low: calm environment' },
  { cmd: <span style={{ color: 'var(--cyan)'   }}>20–40</span>,    desc: 'Moderate: watch for deterioration' },
  { cmd: <span style={{ color: 'var(--yellow)' }}>40–60</span>,    desc: 'Elevated: caution warranted' },
  { cmd: <span style={{ color: 'var(--red)'    }}>60–80</span>,    desc: 'Severe: significant macro headwinds' },
  { cmd: <span style={{ color: 'var(--red)', fontWeight: 700 }}>≥ 80</span>, desc: 'Critical: systemic stress level' },
];

export const regimeSignals = [
  { cmd: 'VIX level',           desc: 'Below 20 → risk-on · above 20 → risk-off (VIXCLS)' },
  { cmd: 'Yield curve',         desc: 'Positive (10Y > 2Y) → risk-on · inverted → risk-off (T10Y2Y)' },
  { cmd: 'HY credit spread',    desc: 'Below 4% → risk-on · above 4% → risk-off (BAMLH0A0HYM2)' },
  { cmd: 'USD trend (30d)',     desc: 'Weakening dollar → risk-on · strengthening → risk-off (DTWEXBGS)' },
  { cmd: 'Breakeven inflation', desc: '1–3% range → risk-on · outside range → risk-off (T10YIE)' },
];

export const optionsRows = [
  { cmd: <code>firma show macro</code>,           desc: 'Use cached result if available' },
  { cmd: <code>firma show macro --refresh</code>, desc: 'Bypass cache and re-fetch from FRED' },
  { cmd: <code>firma show macro --json</code>,    desc: 'Machine-readable output' },
];

export const claudeTools = [
  { cmd: 'fetch_fred_series',  desc: <>Fetch any of the 800K+ FRED series by ID (e.g. <code>UNRATE</code>, <code>DEXKOUS</code>)</> },
  { cmd: 'search_fred_series', desc: "Search the catalog by keyword when you don't know the series ID" },
];

export const claudeExchange = [{
  user: 'Is now a good time to add more to my equity positions?',
  ai: <p>
    Macro context is broadly supportive right now. VIX at <code>19.31</code> is
    moderate, near the 5-year average of <code>19.22</code>. The yield curve is
    positive at <code>+0.53%</code> (10Y minus 2Y), HY credit spreads have tightened
    significantly (<code>−56bp over 30d</code> to <code>2.86%</code>), and the USD
    has weakened <code>2.3%</code> over 30 days.
    The stress index is at <code>4/100 (Low)</code> and all 5 regime signals are
    risk-on, historically a favorable backdrop for growth equities.
    If you're adding, macro conditions aren't the reason to hold back.
    Your main risk is single-stock concentration in TSLA, not the macro environment.
  </p>,
}];

<Section label="Why It Matters">
  <FeatureList items={reasons} />
</Section>

<Section label="firma show macro">
Pulls 8 curated FRED series and displays current value, 30-day delta,
90-day delta, 5-year average, and the current reading's historical
percentile over the past 5 years. The FX row is chosen automatically
based on your home currency (set via <code>firma config set currency KRW</code>).
The same view also renders the Economic Stress Index and the macro
regime read (sections below). Results are cached to disk, so same-day
runs are instant.

<div className="terminal">
  <div className="terminal-line">
    <span className="term-prompt">$</span>
    <span className="term-cmd">firma show macro</span>
  </div>
  <table className="term-table">
    <thead>
      <tr><th>INDICATOR</th><th>CURRENT</th><th>30d Δ</th><th>90d Δ</th><th>5y AVG</th><th>5y %ile</th></tr>
    </thead>
    <tbody>
      <tr className="sep"><td colSpan={6}/></tr>
      <tr><td className="td-bold">VIX</td><td>19.31</td><td className="td-muted">−11.74</td><td className="td-muted">+3.16</td><td className="td-muted">19.22</td><td className="td-muted">p52</td></tr>
      <tr><td className="td-bold">10Y Treasury Yield</td><td>4.34%</td><td className="td-muted">−10bp</td><td className="td-muted">+12bp</td><td className="td-muted">3.55%</td><td className="td-orange">p85</td></tr>
      <tr><td className="td-bold">Yield Curve (10y-2y)</td><td>0.53%</td><td className="td-muted">−3bp</td><td className="td-muted">−13bp</td><td className="td-muted">0.13%</td><td>p72</td></tr>
      <tr><td className="td-bold">USD Index (Broad)</td><td>118.08</td><td className="td-muted">−2.32%</td><td className="td-muted">+0.02%</td><td className="td-muted">120.36</td><td className="td-muted">p41</td></tr>
      <tr><td className="td-bold">HY Credit Spread</td><td>2.86%</td><td className="td-muted">−56bp</td><td className="td-muted">+17bp</td><td className="td-muted">3.31%</td><td className="td-muted">p31</td></tr>
      <tr><td className="td-bold">10Y Breakeven Inflation</td><td>2.42%</td><td className="td-muted">+11bp</td><td className="td-muted">+10bp</td><td className="td-muted">2.36%</td><td>p60</td></tr>
      <tr><td className="td-bold">Fed Funds Rate</td><td>3.64%</td><td className="td-muted">0</td><td className="td-muted">0</td><td className="td-muted">3.41%</td><td>p64</td></tr>
      <tr className="sep"><td colSpan={6}/></tr>
    </tbody>
    <tfoot><tr><td className="td-muted" colSpan={6}>As of 2026-04-23 · Source: FRED · Home currency: USD</td></tr></tfoot>
  </table>
</div>

  <Note>
    Requires a free FRED API key. Register at{' '}
    <a href="https://fred.stlouisfed.org/docs/api/api_key.html" target="_blank" rel="noopener noreferrer">fred.stlouisfed.org</a>{' '}
    and set it with <code>firma config set fred-key &lt;key&gt;</code>.
    Results are cached at <code>~/.firma/cache/macro-YYYY-MM-DD-&lt;currency&gt;.json</code>.
  </Note>
</Section>

<Section label="Reading the 5y %ile Column">
The **5y %ile** (5-year percentile) shows where today's reading sits relative to
the past 5 years of daily FRED observations for that series.

  <CommandTable rows={percentileRows} />

Example: **10Y Treasury at p85** means the yield is higher today than it was on
85% of trading days over the last 5 years. The rate environment is tight by
recent-history standards. **HY Credit Spread at p31** means spreads are tighter
than usual, so credit markets are relatively calm.

  <Note>
    Percentiles are computed from the same 5-year FRED series already fetched for
    the other columns, so there are no extra API calls. They are relative to *recent*{' '}
    history only. A p85 reading in a low-rate decade is different from p85 in a
    high-rate decade.
  </Note>
</Section>

<Section label="Indicators">
  <CommandTable rows={indicators} />
</Section>

<Section label="Economic Stress Index">
A single 0–100 score that summarizes the current level of economic stress,
computed from five FRED indicators. Low is calm. High means the macro
environment is under strain. Each component is scored on a 0–20 scale based
on its historical percentile and direction relative to a neutral threshold,
then summed to a total out of 100.

  <CommandTable rows={stressComponents} />

  <CommandTable rows={stressTiers} />

<div className="terminal">
  <pre className="term-pre"><span className="d">Stress Score  </span><span className="g">4 / 100  (Low)</span></pre>
  <table className="term-table">
    <thead>
      <tr><th>COMPONENT</th><th>VALUE</th><th>SCORE</th><th>WEIGHT</th></tr>
    </thead>
    <tbody>
      <tr className="sep"><td colSpan={4}/></tr>
      <tr><td className="td-bold">Yield Curve (10y-2y)</td><td>0.53</td><td>0</td><td className="td-muted">23.5%</td></tr>
      <tr><td className="td-bold">Bank Spread (10y-3m)</td><td>0.62</td><td>0</td><td className="td-muted">17.6%</td></tr>
      <tr><td className="td-bold">Volatility (VIX)</td><td>19.31</td><td>7</td><td className="td-muted">23.5%</td></tr>
      <tr><td className="td-bold">Financial Stress (STLFSI4)</td><td>−0.76</td><td>4</td><td className="td-muted">23.5%</td></tr>
      <tr><td className="td-bold">Initial Jobless Claims</td><td>214k</td><td>11</td><td className="td-muted">11.8%</td></tr>
      <tr className="sep"><td colSpan={4}/></tr>
    </tbody>
    <tfoot>
      <tr><td className="td-muted" colSpan={4}>&lt;20 Low · 20–40 Moderate · 40–60 Elevated · 60–80 Severe · ≥80 Critical</td></tr>
    </tfoot>
  </table>
</div>

  <Note>
    Pure descriptive metric. Not investment advice.
  </Note>
</Section>

<Section label="Macro Regime">
Five binary signals derived from FRED data. Each reads risk-on or risk-off.
Their balance determines the overall regime bias — a quick gut-check on
whether macro conditions favor or disfavor risk assets.

  <CommandTable rows={regimeSignals} />

<div className="terminal">
  <pre className="term-pre">{`Bias:  Risk-on bias  (5 of 5 signals risk-on)

  ✓  VIX 19.31 (moderate)
  ✓  10Y − 2Y +0.53% (normal)
  ✓  HY OAS 2.86% (very tight)
  ✓  USD -2.32% 30d (weak)
  ✓  Breakeven 2.42% (anchored)

≥70% bullish → Risk-on bias  ·  ≤40% → Risk-off bias  ·  otherwise Mixed`}</pre>
</div>

  <Note>
    Bias rule: ≥70% bullish → <span style={{ color: 'var(--green)' }}>Risk-on</span> ·
    {' '}≤40% bullish → <span style={{ color: 'var(--red)' }}>Risk-off</span> · otherwise{' '}
    <span style={{ color: 'var(--yellow)' }}>Mixed</span>. Pure descriptive
    heuristic. Not investment advice.
  </Note>
</Section>

<Section label="Options">
  <CommandTable rows={optionsRows} />
</Section>

<Section label="With Claude">
In Claude Desktop, <code>show_macro</code> returns the same view —
indicators, stress index, and regime in one payload.
Two additional MCP tools give Claude unrestricted FRED access:

  <CommandTable rows={claudeTools} />

  <ChatDemo header="Claude Desktop · firma MCP connected" exchanges={claudeExchange} />
</Section>
