Framework & Data Pipeline

Methodology

A transparent, config-driven scoring framework that turns 12 public macro indicators into a single composite read of US dollar liquidity conditions. Updated every 6 hours from the FRED, US Treasury, and NY Fed APIs.

Indicator Universe

12 indicators across 4 scoring tiers plus a context tier. Each indicator's direction is normalized so a positive z-score always means "tighter" liquidity.

Tier A · Policy / Reserves 65%

  • Fed Balance Sheet (WALCL)
  • Treasury General Account (TGA)
  • Overnight Reverse Repo (ON RRP)

Tier B · Funding / Plumbing 10%

  • SOFR-IORB spread
  • Standing Repo Facility usage

Tier C · Credit / Intermediation 5%

  • Bank Cash Buffer (cash assets / total assets)
  • High Yield OAS spread

Tier D · Risk / Price 20%

  • VIX
  • Broad Dollar Index (DXY)
  • 10-Year Real Yield (TIPS)

Context (not scored)

  • Net Liquidity = Fed BS - TGA - ON RRP
  • M2 Money Supply

Scoring

1. Robust z-score

For each indicator, we compute a robust z-score using the median and median absolute deviation (MAD) over a rolling 10-year window:

z = (value - median) / (MAD x 1.4826)

The 1.4826 constant makes MAD comparable to standard deviation for normally distributed data. Z-scores are winsorized to [-4, +4] to prevent extreme observations from dominating the composite. We use median/MAD rather than mean/std for resilience to structural breaks (regime changes, COVID, etc.).

2. Direction normalization

Some indicators rise when liquidity tightens (TGA, ON RRP, VIX, HY Spread, etc.); others fall (Fed BS, Bank Cash Buffer). For "falling-is-tightening" indicators we negate the raw z-score so a positive z always means "tighter" across every indicator.

3. Composite

composite = sum (z_i x weight_i)

  Tier A (Policy/Reserves):       3 x (13/60) ~= 0.65
  Tier B (Funding/Plumbing):      2 x 0.05 = 0.10
  Tier C (Credit/Intermediation): 2 x 0.025 = 0.05
  Tier D (Risk/Price):            3 x (1/15) ~= 0.20
                                              ----
                                              1.00

When indicators are missing on a given day, the remaining weights are renormalized so a partial-data day still produces a comparable composite.

4. Regime classification

We rank today's composite within the rolling 5-year history of composites and assign a regime:

  • Loose - <= P20
  • Mildly Loose - P20-P50
  • Mildly Tight - P50-P80
  • Tight - >= P80

5. Momentum & concentration

  • Momentum: composite_today - composite_7d_ago. >+0.15 = deteriorating, <-0.15 = improving, else stable.
  • Concentration: top-3 |contributions| / total |contributions|. High concentration = signal driven by a few drivers.

Asset Impact Lens

For SPX, QQQ, BTC, and GOLD we precompute three relationship windows on every cron cycle (SPX/QQQ/BTC from FRED; XAU/USD from Twelve Data after FRED retired the LBMA daily series):

  • Rolling correlations (30D / 90D / 180D) between the daily DLI composite and daily log returns.
  • Lead-lag correlations (DLI leads asset returns by 10D / 20D / 60D).
  • Conditional state outcomes: average forward 20-day cumulative log return + win-rate when DLI was in the loose (<= P20) or tight (>= P80) state.

Data Sources

Implementation Notes

  • Refresh cadence: every 6 hours (00:00, 06:00, 12:00, 18:00 UTC) via Cloudflare Cron Triggers.
  • Storage: Cloudflare D1 (SQLite) for time series + scores; Cloudflare KV for hot API caching.
  • Backfill: 10 years of history populated on first run via scripts/seed.js.
  • Robustness: each external API is fetched independently with Promise.allSettled; one failed source degrades to a "partial" run rather than blocking the rest.
  • Inspired by dollarliquidity.com; this implementation is independent and uses different specific weightings.

This is not investment advice. Public Fed and Treasury data; computed every 6 hours. Past relationships do not predict future outcomes. Use at your own risk.