import React from 'react'; import { Settings, X } from 'lucide-react'; interface MacroBlueprintModalProps { isOpen: boolean; onClose: () => void; } export default function MacroBlueprintModal({ isOpen, onClose }: MacroBlueprintModalProps) { React.useEffect(() => { const handleKeyDown = (e: KeyboardEvent) => { if (e.key === 'Escape') { onClose(); } }; if (isOpen) { window.addEventListener('keydown', handleKeyDown); } return () => { window.removeEventListener('keydown', handleKeyDown); }; }, [isOpen, onClose]); if (!isOpen) return null; return (
{/* Modal Header */}

FRED Macro - Operational Blueprint

System User Manual & Interface Mechanics

{/* Modal Body */}

Macro Ingestion & Thresholds

Operational details of Federal Reserve Economic Data (FRED) integration.

{/* Core Mechanics */}

1. FRED Ingestion channels

Queries Federal Reserve API endpoints to ingest 21 distinct macro credit, inflation, labor, and housing vectors. Bypasses external calls in `DEV_MODE` to read from local cache backups.

2. Z-Score Normalization

Applies rolling historical mean and standard deviation scaling to convert raw indicators (e.g. housing starts, Delinquencies) into standardized Z-scores, indicating how far the current economy drifts from historical norms.

3. Cockpit Alerts System

Standardizes warnings into green (safe), amber (watch), and flashing red (recession risk) lights. Evaluates interest rate curves, inflation velocity, credit delinquencies, and housing contractions.

{/* Interface Specifications */}

Cockpit Status Alert Rationale

Inflation & Consumer Health Card: Sets off a `RED` trigger if CPI inflation YoY climbs above 3.0%, credit card delinquencies exceed 4.5%, or personal savings fall below 3.0%.

Valuation & Liquidity Card: Sets off `RED` if S&P 500-to-GDP ratio (Buffett Indicator) rises past 150%, or the M2 money supply growth rate turns negative.

Yield Curve & Credit Spread Card: Sets off `RED` if the 10Y-2Y yield curve spread inverts (spread < 0.0%) or high-yield credit spreads rise past 5.0%.

); }