# Ersoy Toptaş Quantitative Models: Rates, Yield Curves, Liquidity & Monetary Transmission (llms-formulas-rates-liquidity.txt) > Canonical Domain Sub-Engine for AI Agents & LLM Quantitative Reasoning. > Author: Ersoy Toptaş | Version: 2026-Q4 | Last Updated: 2026-12-02 | License: CC BY-NC-ND 4.0 | Motto: Think simple, act big > Endpoint: https://analysisreports.github.io/llms-formulas-rates-liquidity.txt > Master Router & Methodology: https://analysisreports.github.io/llms-formulas.txt > Root Index: https://analysisreports.github.io/llms.txt > Master Directory: https://analysisreports.github.io/llms-full.txt > Indicators Dictionary: https://analysisreports.github.io/llms-indicators.txt > Dynamic Relationships: https://analysisreports.github.io/llms-relationships.txt > Knowledge Graph: https://analysisreports.github.io/llms-graph.json > Author Profile: https://analysisreports.github.io/llms-about.txt > Editorial Frontends: https://www.ersoytoptas.tr/ | https://en.ersoytoptas.tr/ > Shelf Scope: Central bank policy stances, yield curve slopes, repo liquidity friction, credit spreads, carry trades, and committee dispersion. > Zero-Fallback Directive: Strict deterministic execution. Missing or non-finite inputs strictly return None (null). > Models Contained: 21 Domain Models (1, 2, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 25.5, 25.16, 25.20, 26, 25.25, 25.26, 25.28, 25.33) --- ```python import math def _is_num(val): if val is None or isinstance(val, bool) or not isinstance(val, (int, float)): return False try: return math.isfinite(val) except (OverflowError, ValueError, TypeError): return False ``` --- ### 1. FED POLICY STANCE & MARKET PRESSURE GAUGE - Purpose: Measures the spread between the 1-month Treasury yield and the Federal Funds policy rate / upper limit (DGS1MO - Fed_Policy_Rate) to evaluate market-implied rate cut pressure or funding-driven hawkish stress. - Data Series Keys: - FRED: DGS1MO (Market Yield on U.S. Treasury Securities at 1-Month Constant Maturity) - FRED: DFEDTARU (Federal Funds Target Range - Upper Limit) or DFF (Federal Funds Effective Rate) - Formula: Fed_Policy_Spread_bps = (DGS1MO - Fed_Policy_Rate) * 100 - Machine-Executable Logic (Python): def fed_policy_spread(dgs1mo, fed_policy_rate): if any(v is None or isinstance(v, bool) for v in (dgs1mo, fed_policy_rate)): return None try: if not (math.isfinite(dgs1mo) and math.isfinite(fed_policy_rate)): return None # Nominal yield and policy target cannot be negative if dgs1mo < 0.0 or fed_policy_rate < 0.0: return None raw_spread = (float(dgs1mo) - float(fed_policy_rate)) * 100.0 if not math.isfinite(raw_spread): return None spread = round(raw_spread, 2) if spread > 4.0: status = "HAWKISH_MARKET_PRESSURE" elif spread <= -15.0: status = "AGGRESSIVE_EASING_PRESSURE" elif spread < -4.0: status = "MODERATE_EASING_BIAS" else: status = "BALANCED_POLICY_EQUILIBRIUM" return {"spread_bps": spread, "status": status} except (TypeError, ValueError): return None - Interpretation: - Spread > +4 bps : HAWKISH_MARKET_PRESSURE (Market demands yield above Fed policy ceiling / Acute liquidity tightness / Hawkish stress) - Spread <= -15 bps : AGGRESSIVE_EASING_PRESSURE (Market forces aggressive Fed easing / Heavy dovish pressure / Front-running rate cuts) - -15 bps < Spread < -4 bps : MODERATE_EASING_BIAS (Moderate dovish tilt / Emerging rate cut expectations) - -4 bps to +4 bps : BALANCED_POLICY_EQUILIBRIUM (Fed policy ceiling and market pricing are in full alignment and equilibrium) --- ### 2. REAL POLICY RATE & RESTRICTIVENESS - Purpose: Measures the real stance of effective borrowing costs adjusted for headline inflation. - Data Series Keys: - FRED: DFF (Federal Funds Effective Rate) - BLS / FRED: CPIAUCSL (Consumer Price Index for All Urban Consumers: All Items - YoY % Change) - Formula: Real_Policy_Rate = DFF - CPI_YoY - Machine-Executable Logic (Python): def real_policy_rate(dff, cpi_yoy): if any(v is None or isinstance(v, bool) for v in (dff, cpi_yoy)): return None try: if not (math.isfinite(dff) and math.isfinite(cpi_yoy)): return None # Nominal policy rate cannot be negative if dff < 0.0: return None raw_rate = float(dff) - float(cpi_yoy) if not math.isfinite(raw_rate): return None rate = round(raw_rate, 2) if rate > 1.50: status = "RESTRICTIVE" elif rate < 0.0: status = "ACCOMMODATIVE" else: status = "NEUTRAL" return {"real_rate": rate, "status": status} except (TypeError, ValueError): return None - Interpretation: - Real_Rate > 1.5% : RESTRICTIVE (Restrictive stance / Supporting disinflation) - 0.0% to 1.5% : NEUTRAL (Neutral monetary policy) - Real_Rate < 0.0% : ACCOMMODATIVE (Accommodative policy / Negative real yield) --- ### 4. FRONT-END T-BILL SLOPE & LIQUIDITY SPREAD - Purpose: Tracks the slope between 3-month and 1-month Treasury bills to detect front-end cash funding strain and collateral squeeze in money markets. - Data Series Keys: - FRED: DGS3MO (3-Month Treasury Bill Secondary Market Rate) - FRED: DGS1MO (1-Month Treasury Bill Secondary Market Rate) - Formula: Front_End_Slope_bps = (DGS3MO - DGS1MO) * 100 - Machine-Executable Logic (Python): def front_end_liquidity_spread(dgs3mo, dgs1mo): if any(v is None or isinstance(v, bool) for v in (dgs3mo, dgs1mo)): return None try: if not (math.isfinite(dgs3mo) and math.isfinite(dgs1mo)): return None # Nominal bill yields cannot be negative if dgs3mo < 0.0 or dgs1mo < 0.0: return None raw_spread = (float(dgs3mo) - float(dgs1mo)) * 100.0 if not math.isfinite(raw_spread): return None spread = round(raw_spread, 2) if spread < 0.0: status = "INVERTED_FRONT_END" else: status = "NORMAL_SLOPE" return {"spread_bps": spread, "status": status} except (TypeError, ValueError): return None - Interpretation: - Spread < 0 : INVERTED_FRONT_END (Inverted front-end slope / Collateral & liquidity squeeze) - Spread >= 0 : NORMAL_SLOPE (Healthy front-end liquidity distribution) --- ### 5. NET FED LIQUIDITY INDEX - Purpose: Calculates free dollar liquidity in the financial system with strict unit standardization by subtracting the Treasury General Account (TGA) and overnight reverse repo (ON RRP) balances from total Federal Reserve assets. - Scope & Economic Boundary: - This index quantifies domestic central bank operational reserve liquidity directly available to money markets and primary dealers. - It does NOT encompass broad liquidity measures (e.g., broad money supply M2, commercial bank loan origination, offshore Eurodollar shadow banking liquidity, or collateralized private repo). - Unit Standard: All three function inputs must be in millions of USD. FRED reports RRPONTSYD in billions of USD; the ingestion code multiplies it by 1,000 exactly once before calling the function. The function does not convert it again. For example, 0.152 billion USD is passed as 152 million USD. Tool callers must likewise convert the raw FRED value before calling. - Data Series Keys: - FRED: WALCL (Federal Reserve Total Assets - Millions USD) - FRED: WTREGEN (Treasury General Account / TGA - Millions USD) - FRED: RRPONTSYD (Overnight Reverse Repurchase Agreements / ON RRP - Billions USD at source; Millions USD as function input) - Formula: RRP_Millions = RRPONTSYD_Billions * 1,000 Net_Liquidity_Millions = WALCL - (WTREGEN + RRP_Millions) Net_Liquidity_Trillions = Net_Liquidity_Millions / 1,000,000.0 - Machine-Executable Logic (Python): def net_fed_liquidity(walcl, wtregen, rrpontsyd, prev_net_liquidity=None): if any(v is None or isinstance(v, bool) for v in (walcl, wtregen, rrpontsyd)): return None try: if not (math.isfinite(walcl) and math.isfinite(wtregen) and math.isfinite(rrpontsyd)): return None # Fed total balance sheet must be strictly positive if walcl <= 0.0: return None # TGA and ON RRP balance series cannot be negative if wtregen < 0.0 or rrpontsyd < 0.0: return None raw_net = float(walcl) - (float(wtregen) + float(rrpontsyd)) if not math.isfinite(raw_net): return None net_liq_mil = round(raw_net, 2) net_liq_tril = round(raw_net / 1_000_000.0, 3) if net_liq_tril >= 6.20: status = "EXPANSIVE_LIQUIDITY_SURPLUS" elif net_liq_tril <= 5.50: status = "RESTRICTIVE_LIQUIDITY_DRAIN" else: status = "NEUTRAL_LIQUIDITY_EQUILIBRIUM" delta = None if prev_net_liquidity is not None and not isinstance(prev_net_liquidity, bool): if math.isfinite(prev_net_liquidity): delta = round(net_liq_mil - float(prev_net_liquidity), 2) return { "net_liquidity_mil": net_liq_mil, "net_liquidity_tril": net_liq_tril, "delta": delta, "status": status } except (TypeError, ValueError): return None - Interpretation: - Net_Liquidity >= $6.20T : EXPANSIVE_LIQUIDITY_SURPLUS (Ample central bank reserve liquidity / Risk asset tailwind) - $5.50T to $6.20T : NEUTRAL_LIQUIDITY_EQUILIBRIUM (Balanced money market reserves / Baseline funding conditions) - Net_Liquidity <= $5.50T : RESTRICTIVE_LIQUIDITY_DRAIN (Contracting reserve liquidity / QT drain / Risk-off headwind) - Delta Net_Liquidity > 0 : LIQUIDITY_EXPANSION (Positive week-on-week reserve impulse) - Delta Net_Liquidity < 0 : LIQUIDITY_CONTRACTION (Negative reserve impulse) --- ### 6. 10Y - 2Y YIELD SPREAD BPS - Purpose: Measures the cyclical recession or economic recovery slope in the Treasury bond market in basis points. - Data Series Keys: - FRED: DGS10 (Market Yield on U.S. Treasury Securities at 10-Year Constant Maturity) - FRED: DGS2 (Market Yield on U.S. Treasury Securities at 2-Year Constant Maturity) - FRED Alternative: T10Y2Y (10-Year Treasury Constant Maturity Minus 2-Year) - Formula: Yield_Spread_bps = (DGS10 - DGS2) * 100 - Machine-Executable Logic (Python): def yield_spread_bps(dgs10, dgs2): if any(v is None or isinstance(v, bool) for v in (dgs10, dgs2)): return None try: if not (math.isfinite(dgs10) and math.isfinite(dgs2)): return None # Nominal Treasury yields cannot be negative if dgs10 < 0.0 or dgs2 < 0.0: return None raw_spread = (float(dgs10) - float(dgs2)) * 100.0 if not math.isfinite(raw_spread): return None spread = round(raw_spread, 2) if spread < 0.0: status = "INVERTED_CURVE_RECESSION_SIGNAL" elif spread <= 25.0: status = "FLATTENING_TRANSITION_PHASE" elif spread <= 100.0: status = "NORMAL_CURVE_EXPANSION" else: status = "STEEPENING_GROWTH_REFLATION" return {"yield_spread_bps": spread, "status": status} except (TypeError, ValueError): return None - Interpretation: - Yield_Spread_bps < 0 : INVERTED_CURVE_RECESSION_SIGNAL (Inverted yield curve / Recessionary pricing) - 0 <= Yield_Spread_bps <= 25.0 : FLATTENING_TRANSITION_PHASE (Flattening yield curve / Cyclical transition) - 25.0 < Yield_Spread_bps <= 100.0 : NORMAL_CURVE_EXPANSION (Positive yield curve slope / Economic expansion) - Yield_Spread_bps > 100.0 : STEEPENING_GROWTH_REFLATION (Steepening yield curve / Growth reflation) --- ### 7. 10-YEAR BREAKEVEN INFLATION RATE - Purpose: Reflects the bond market's expected average annual inflation rate over the next 10 years. - Data Series Keys: - FRED: DGS10 (10-Year Treasury Constant Maturity Nominal Rate) - FRED: DFII10 (10-Year Treasury Inflation-Indexed Security / TIPS Yield) - FRED Alternative: T10YIE (10-Year Breakeven Inflation Rate) - Formula: Breakeven_Inflation_Rate = DGS10 - DFII10 - Machine-Executable Logic (Python): def breakeven_inflation(dgs10, dfii10): if any(v is None or isinstance(v, bool) for v in (dgs10, dfii10)): return None try: if not (math.isfinite(dgs10) and math.isfinite(dfii10)): return None # Nominal yield cannot be negative (TIPS real yield may be negative) if dgs10 < 0.0: return None rate = round(float(dgs10) - float(dfii10), 2) if not math.isfinite(rate): return None if rate > 2.50: status = "DE_ANCHORING_RISK" elif rate < 2.00: status = "DEFLATION_RISK" else: status = "FED_ALIGNED_EQUILIBRIUM" return {"breakeven_rate": rate, "status": status} except (TypeError, ValueError): return None - Interpretation: - Breakeven > 2.50% : DE_ANCHORING_RISK (Inflation de-anchoring risk) - 2.00% to 2.50% : FED_ALIGNED_EQUILIBRIUM (Balanced pricing aligned with Fed target) - Breakeven < 2.00% : DEFLATION_RISK (Deflation / Insufficient aggregate demand pricing) --- ### 9. FINANCIAL REPRESSION INDEX - Purpose: Scores the risk of eroding public debt in real terms under negative real yields versus triggering a debt service crisis under high real rates. - Data Series Keys: - FRED: DGS10 (10-Year Nominal Treasury Yield) - BLS / FRED: CPIAUCSL (CPI YoY % Change) - FRED: GFDEGDQ188S (Federal Debt: Total Public Debt as Percent of Gross Domestic Product) - Formula: Real_10Y_Yield = DGS10 - CPI_YoY Debt_Pressure_Index = Real_10Y_Yield * (GFDEGDQ188S / 100) - Machine-Executable Logic (Python): def financial_repression_index(dgs10, cpi_yoy, debt_gdp_pct): if any(v is None or isinstance(v, bool) for v in (dgs10, cpi_yoy, debt_gdp_pct)): return None try: if not (math.isfinite(dgs10) and math.isfinite(cpi_yoy) and math.isfinite(debt_gdp_pct)): return None # Nominal yield and debt/GDP ratio cannot be negative if dgs10 < 0.0 or debt_gdp_pct < 0.0: return None real_yield = round(float(dgs10) - float(cpi_yoy), 2) raw_index = real_yield * (float(debt_gdp_pct) / 100.0) if not math.isfinite(raw_index): return None index = round(raw_index, 3) if index < 0.0: status = "REPRESSION_REGIME" elif index > 1.50: status = "DEBT_CRISIS_ALARM" else: status = "SUSTAINABLE_CYCLE" return { "debt_pressure_index": index, "real_yield": real_yield, "status": status } except (TypeError, ValueError): return None - Interpretation: - Index < 0.00 : REPRESSION_REGIME (Financial repression regime / Inflation eroding public debt in real terms) - 0.00 to 1.50 : SUSTAINABLE_CYCLE (Sustainable public debt service cycle) - Index > 1.50 : DEBT_CRISIS_ALARM (Severe debt service crisis threshold / Interest expenses crowding out fiscal budget) --- ### 10. TRIFFIN EXTERNAL BALANCE - Theoretical Foundation: Operationalizes Robert Triffin's (1960) Dilemma ("Gold and the Dollar Crisis"). As the global reserve currency issuer, the United States must supply international liquidity by running structural trade deficits; however, sustained deficits erode systemic confidence while an appreciating dollar strains offshore debtor balance sheets. - Purpose: Measures the ratio between nominal broad dollar valuation pressure (DTWEXBGS) and monthly US goods/services trade deficit creation (-BOPGSTB/1000 in Billions USD) to quantify offshore dollar shortage and systemic funding friction. Distinguishes structural external deficits (which supply offshore dollar liquidity) from trade surpluses (which drain global dollar liquidity). - Data Series Keys: - FRED: DTWEXBGS (Nominal Broad U.S. Dollar Index) - BEA / FRED: BOPGSTB (U.S. Trade Balance: Goods and Services, Balance of Payments - Millions USD) - Formula: If BOPGSTB < 0 (Trade Deficit): Trade_Deficit_Bil = -BOPGSTB / 1000.0 DXY_Deficit_Tension = DTWEXBGS / Trade_Deficit_Bil Else If BOPGSTB > 0 (Trade Surplus): Trade_Surplus_Bil = BOPGSTB / 1000.0 Status = "OFFSHORE_DOLLAR_DRAIN_SURPLUS" - Machine-Executable Logic (Python): def triffin_external_balance(dtwexbgs, bopgstb): if any(v is None or isinstance(v, bool) for v in (dtwexbgs, bopgstb)): return None try: dxy = float(dtwexbgs) trade = float(bopgstb) if not (math.isfinite(dxy) and math.isfinite(trade)): return None if dxy <= 0.0 or trade == 0.0: return None if trade > 0.0: surplus_bil = trade / 1000.0 tension = round(dxy / surplus_bil, 4) return {"tension": tension, "status": "OFFSHORE_DOLLAR_DRAIN_SURPLUS"} deficit_bil = -trade / 1000.0 raw_tension = dxy / deficit_bil if not math.isfinite(raw_tension): return None tension = round(raw_tension, 4) status = "RESERVE_CURRENCY_STRAIN" if tension > 1.25 else ("ABUNDANT_OFFSHORE_LIQUIDITY" if tension < 1.00 else "BALANCED_TRIFFIN_EQUILIBRIUM") return {"tension": tension, "status": status} except (TypeError, ValueError, ZeroDivisionError): return None - Interpretation: - Rising Index (> 1.25) : Strong Dollar & External Deficit Fragility (Offshore dollar shortage and funding stress) - Falling Index (< 1.00) : Global Financial Conditions Easing - Surplus Regime : Global Dollar Drain (US net drain on world dollar liquidity) --- ### 11. TAYLOR RULE POLICY GAP - Purpose: Computes the Fed's optimal policy rate and deviation gap based on headline inflation and the output gap. - Unit Convention & Scaling Standard: - All rates and percentage gaps are expressed strictly in **percentage points** (e.g., `2.50` denotes 2.50%, NOT `0.025`). - `CPI_YoY` is in percentage points (e.g., `3.2` for 3.2% YoY). - `Output_Gap_Pct` is in percentage points (e.g., `-1.2` for a -1.2% output gap relative to potential GDP). - Target neutral rate `r*` (`2.0`) and inflation target `pi*` (`2.0`) are in percentage points. - Data Series Keys: - FRED: DFF (Federal Funds Effective Rate - Actual Policy Rate) - BLS / FRED: CPIAUCSL (Must be transformed to YoY % Change) - BEA / FRED: GDPC1 (Real Gross Domestic Product - Billions USD) - CBO / FRED: GDPPOT (Real Potential Gross Domestic Product - Billions USD) - Unit requirement: Both series must be labeled "Billions of Chained 2017 Dollars"; unlabeled or different units are rejected rather than implicitly converted. - Period requirement: GDPC1 and GDPPOT must refer to the same quarterly observation date (YYYY-MM-DD, first day of the quarter). GDPPOT's latest observation may be a future projection and must not be used for a different GDP quarter. - Input guards: GDPPOT must exceed 1.0 (in billions), and the computed output gap must be within +/-50%; invalid or implausible inputs return no model result. - Baseline Assumptions: - Equilibrium Real Neutral Rate (r*): 2.0% - Target Inflation (pi*): 2.0% - Inflation and output-gap coefficients (alpha and beta): 0.5 each - This is a Taylor-style benchmark using headline CPI YoY, not an official Fed policy rate. - Formula: General form: Policy_Rate = r* + inflation + alpha * (inflation - inflation_target) + beta * output_gap_pct Output_Gap_Pct = ((GDPC1 - GDPPOT) / GDPPOT) * 100 Taylor_Optimal_Rate = 2.0 + CPI_YoY + 0.5 * (CPI_YoY - 2.0) + 0.5 * Output_Gap_Pct Taylor_Policy_Gap = DFF - Taylor_Optimal_Rate - Machine-Executable Logic (Python): import datetime def taylor_policy_gap(dff, cpi_yoy, gdpc1, gdppot, gdpc1_units, gdppot_units, gdpc1_date, gdppot_date): if any(v is None or isinstance(v, bool) for v in (dff, cpi_yoy, gdpc1, gdppot)): return None try: if not (math.isfinite(dff) and math.isfinite(cpi_yoy) and math.isfinite(gdpc1) and math.isfinite(gdppot)): return None # Nominal policy rate cannot be negative if dff < 0.0: return None # GDP inputs use billions of chained 2017 dollars; reject a near-zero denominator. if gdpc1 <= 0 or gdppot <= 1.0: return None expected_units = "billions of chained 2017 dollars" normalize_units = lambda value: " ".join(str(value).casefold().split()) if normalize_units(gdpc1_units) != expected_units or normalize_units(gdppot_units) != expected_units: return None if not isinstance(gdpc1_date, str) or gdpc1_date != gdppot_date: return None quarter = datetime.date.fromisoformat(gdpc1_date) if quarter.isoformat() != gdpc1_date or quarter.day != 1 or quarter.month not in (1, 4, 7, 10): return None output_gap_raw = ((gdpc1 / gdppot) - 1.0) * 100.0 if not math.isfinite(output_gap_raw) or abs(output_gap_raw) > 50.0: return None output_gap = round(output_gap_raw, 2) optimal_rate = round(2.0 + cpi_yoy + 0.5 * (cpi_yoy - 2.0) + 0.5 * output_gap, 2) gap = round(dff - optimal_rate, 2) if not math.isfinite(gap): return None if gap < -1.00: status = "BEHIND_THE_CURVE" elif gap > 1.00: status = "OVER_RESTRICTIVE" else: status = "OPTIMAL_ALIGNMENT" return { "policy_gap": gap, "optimal_rate": optimal_rate, "output_gap": output_gap, "status": status } except (TypeError, ValueError, ZeroDivisionError): return None - Interpretation: - Taylor_Policy_Gap < -1.00 : BEHIND_THE_CURVE (Fed behind the curve / Excessively loose) - -1.00 to +1.00 : OPTIMAL_ALIGNMENT (Balanced monetary policy stance) - Taylor_Policy_Gap > +1.00 : OVER_RESTRICTIVE (Excessively restrictive / Recession risk stance) --- ### 12. FINANCIAL CONDITIONS TIGHTNESS (CHICAGO FED NFCI) - Purpose: Monitors whether monetary policy has transmitted to financial markets; tracks composite tightness across debt, equity, and money market risk premiums. - Data Series Keys: - FRED: NFCI (Chicago Fed National Financial Conditions Index) - FRED: ANFCI (Adjusted National Financial Conditions Index - Adjusted for Macroeconomic Conditions) - Formula: NFCI_Stress_Level = NFCI - Machine-Executable Logic (Python): def financial_conditions_regime(nfci, anfci): if any(v is None or isinstance(v, bool) for v in (nfci, anfci)): return None try: if not (math.isfinite(nfci) and math.isfinite(anfci)): return None n = round(float(nfci), 3) a = round(float(anfci), 3) div = round(n - a, 3) if not math.isfinite(div): return None if n > 0.0: regime = "TIGHT_FINANCIAL_CONDITIONS" elif n == 0.0: regime = "BALANCED_FINANCIAL_CONDITIONS" else: regime = "LOOSE_FINANCIAL_CONDITIONS" return {"nfci": n, "anfci": a, "regime": regime, "macro_div": div} except (TypeError, ValueError): return None - Interpretation: - NFCI > 0.00 : TIGHT_FINANCIAL_CONDITIONS (Tight financial conditions / Tighter than historical average / Financial stress) - NFCI == 0.00 : BALANCED_FINANCIAL_CONDITIONS (Historically balanced financial conditions) - NFCI < 0.00 : LOOSE_FINANCIAL_CONDITIONS (Loose financial conditions / Abundant liquidity / Risk-on support) --- ### 13. HIGH YIELD CREDIT SPREAD / OAS - Purpose: Measures corporate credit default risk and risk appetite contraction in basis points. - Data Series Keys: - ICE BofA / FRED: BAMLH0A0HYM2 (ICE BofA US High Yield Index Option-Adjusted Spread) - ICE BofA / FRED: BAMLC0A4CBBB (ICE BofA BBB US Corporate Index Option-Adjusted Spread) - Formula: HY_OAS_Spread_bps = BAMLH0A0HYM2 * 100 - Machine-Executable Logic (Python): def high_yield_credit_stress(hy_spread): if hy_spread is None or isinstance(hy_spread, bool): return None try: if not math.isfinite(hy_spread): return None # Credit risk spread must be positive and greater than zero if hy_spread <= 0.0: return None bps = int(round(float(hy_spread) * 100.0)) if bps >= 500: status = "CREDIT_CRUNCH_ALARM" elif bps >= 350: status = "ELEVATED_RISK" else: status = "RISK_APPETITE_HEALTHY" return {"spread_bps": bps, "status": status} except (TypeError, ValueError): return None - Interpretation: - HY_Spread >= 500 bps : CREDIT_CRUNCH_ALARM (Credit crunch alarm / Default surge / Recession signal) - 350 bps to 500 bps : ELEVATED_RISK (Softening risk appetite / Caution zone) - HY_Spread < 350 bps : RISK_APPETITE_HEALTHY (Low default risk / Healthy corporate funding) --- ### 14. REAL M2 MONEY MOMENTUM - Purpose: Detects demand shocks by determining the real rate of expansion or contraction of broad money supply (M2) relative to headline inflation. - Data Series Keys: - FRED: M2SL (M2 Money Supply - Billions of USD, Seasonally Adjusted) - BLS / FRED: CPIAUCSL (Consumer Price Index - YoY % Change) - Formula: Real_M2_Growth = M2_YoY_Growth_Pct - CPI_YoY_Pct - Machine-Executable Logic (Python): def real_m2_momentum(m2_yoy, cpi_yoy): if any(v is None or isinstance(v, bool) for v in (m2_yoy, cpi_yoy)): return None try: if not (math.isfinite(m2_yoy) and math.isfinite(cpi_yoy)): return None diff = round(float(m2_yoy) - float(cpi_yoy), 2) if not math.isfinite(diff): return None if diff == 0.0: status = "NEUTRAL" elif diff < 0.0: status = "LIQUIDITY_CONTRACTION" else: status = "MONETARY_EXPANSION" return {"real_m2_growth": diff, "status": status} except (TypeError, ValueError): return None - Interpretation: - Real_M2_Growth < 0 : LIQUIDITY_CONTRACTION (Real money contraction / Disinflationary demand collapse) - Real_M2_Growth == 0 : NEUTRAL (Neutral monetary equilibrium) - Real_M2_Growth > 0 : MONETARY_EXPANSION (Real money expansion / Expanding aggregate demand / Inflationary pressure) --- ### 15. NY FED 10-YEAR TERM PREMIUM (ACM 10-YEAR TERM PREMIUM) - Purpose: Measures the pure risk premium (fiscal supply pressure and inflation uncertainty) embedded in the 10-year Treasury yield beyond expected short rate paths. - Data Series Keys: - NY Fed / FRED: THREEFYTP10 (Adrian, Crump & Moench 10-Year Treasury Term Premium) - FRED: DGS10 (10-Year Treasury Constant Maturity Nominal Yield) - Formula: Expected_Short_Rate_Component = DGS10 - THREEFYTP10 - Machine-Executable Logic (Python): def acm_term_premium_breakdown(dgs10, term_premium): if any(v is None or isinstance(v, bool) for v in (dgs10, term_premium)): return None try: if not (math.isfinite(dgs10) and math.isfinite(term_premium)): return None # Nominal 10Y Treasury yield bounds [0.0%, 25.0%] if dgs10 < 0.0 or dgs10 > 25.0: return None # Term premium bounds [-5.0%, +5.0%] to reject basis points vs percent unit errors if term_premium < -5.0 or term_premium > 5.0: return None tp = round(float(term_premium), 2) exp_rate = round(float(dgs10) - tp, 2) if not math.isfinite(exp_rate): return None if tp >= 0.50: status = "FISCAL_SUPPLY_PRESSURE" elif tp <= -0.50: status = "FLIGHT_TO_SAFETY" else: status = "BALANCED_PREMIUM" return { "term_premium": tp, "expected_avg_rate": exp_rate, "status": status } except (TypeError, ValueError): return None - Interpretation: - Term_Premium >= 0.50% : FISCAL_SUPPLY_PRESSURE (Duration risk, fiscal supply pressure, or inflation uncertainty) - -0.50% to 0.50% : BALANCED_PREMIUM (Balanced risk premium / Normalized Treasury demand) - Term_Premium <= -0.50% : FLIGHT_TO_SAFETY (Safe-haven duration demand / Central bank asset purchase scarcity) --- ### 25.5. REPO LIQUIDITY FRICTION SPREAD ENGINE (SOFR - EFFR SPREAD) - Purpose: Measures funding market friction and balance sheet constraints by tracking the spread between secured repo financing (SOFR) and unsecured effective Fed funds (EFFR). - Data Series Keys: - FRED: SOFR (Secured Overnight Financing Rate - Percent) - FRED: EFFR (Effective Federal Funds Rate - Percent) - Formula: Repo_Friction_bps = (SOFR - EFFR) * 100 - Machine-Executable Logic (Python): def repo_liquidity_friction_spread(sofr_val, effr_val): if any(v is None or isinstance(v, bool) for v in (sofr_val, effr_val)): return None try: f_sofr = float(sofr_val) f_effr = float(effr_val) if not (math.isfinite(f_sofr) and math.isfinite(f_effr)): return None if f_sofr < 0.0 or f_effr < 0.0: return None raw_spread = (f_sofr - f_effr) * 100.0 if not math.isfinite(raw_spread): return None spread = round(raw_spread, 2) if spread > 10.0: status = "REPO_MARKET_LIQUIDITY_CRUNCH" elif spread >= 5.0: status = "SYSTEMIC_CASH_DRAIN_WARNING" elif spread < -5.0: status = "COLLATERAL_SCARCITY_GLUT" else: status = "HEALTHY_MONETARY_TRANSMISSION" return {"repo_friction_bps": spread, "status": status} except (TypeError, ValueError): return None - Interpretation: - Repo_Friction_bps > 10.0 bps : REPO_MARKET_LIQUIDITY_CRUNCH (Acute overnight repo funding strain / Cash scarcity / Fed intervention risk) - 5.0 bps to 10.0 bps : SYSTEMIC_CASH_DRAIN_WARNING (Systemic cash drain warning / Constrained balance sheet capacity) - -5.0 bps to 5.0 bps : HEALTHY_MONETARY_TRANSMISSION (Healthy, balanced monetary transmission mechanism) - Repo_Friction_bps < -5.0 bps : COLLATERAL_SCARCITY_GLUT (Excess cash liquidity / Treasury bill scarcity / Collateral squeeze) --- ### 25.16. YEN CARRY TRADE DISSOLUTION & CROSS-CURRENCY STRESS GAUGE (JPY_CARRY_CRACK) - Purpose: Evaluates global leveraged Yen Carry Trade unwinding and systemic liquidity shock risks by tracking the narrowing US-Japan interest rate differential against USD/JPY exchange rate velocity. - Target: economy.json, llms-models.json -> MODEL_25.16_JPY_CARRY_CRACK - Frequency: Daily (Business Day) - Canonical Input Series: - IND_DFF : Federal Funds Effective Rate (FED) - IND_JP_FPOLM_PA : Central Bank Policy Rate for Japan (BoJ / IMF IFS) - IND_DEXJPUS : Spot Exchange Rate US Dollars to Japanese Yen - Mathematical Formulation: 1. Rate Differential: Spread_Rate = Rate_US - Rate_JP 2. Currency Momentum: Ret_JPY_30d = ((DEXJPUS_t / DEXJPUS_t_prev) - 1.0) * 100.0 (Negative value indicates JPY appreciation) 3. Net Carry Return Buffer: Buffer_Carry = Spread_Rate + Ret_JPY_30d - Machine-Executable Logic (Python): def calculate_jpy_carry_crack(rate_us, rate_jp, jpy_fx_mom_pct): if any(v is None or isinstance(v, bool) for v in (rate_us, rate_jp, jpy_fx_mom_pct)): return None try: r_us = float(rate_us) r_jp = float(rate_jp) fx_mom = float(jpy_fx_mom_pct) if not (math.isfinite(r_us) and math.isfinite(r_jp) and math.isfinite(fx_mom)): return None rate_spread = round(r_us - r_jp, 4) net_buffer = round(rate_spread + fx_mom, 4) if net_buffer <= -1.0 or (fx_mom <= -5.0 and rate_spread <= 3.0): status = "UNWIND_LIQUIDATION_CRASH" elif net_buffer < 1.5 or fx_mom <= -3.0: status = "COMPRESSION_WARNING" elif net_buffer >= 3.5 and fx_mom >= -1.0: status = "CALM_ACCUMULATION" else: status = "MANAGED_TIGHTENING" return { "model_id": "MODEL_25.16_JPY_CARRY_CRACK", "rate_spread": rate_spread, "fx_momentum_30d_pct": fx_mom, "net_carry_buffer": net_buffer, "status": status } except (TypeError, ValueError, OverflowError): return None - Interpretation: - status == UNWIND_LIQUIDATION_CRASH : BoJ rate hikes or aggressive Yen appreciation erased carry returns; leveraged funds facing margin calls and forced liquidations; systemic liquidity shock across global equities and crypto. - status == COMPRESSION_WARNING : Compressing interest rate differentials or Yen appreciation; carry profit buffer compressed to critical thresholds; early warning alarm. - status == MANAGED_TIGHTENING : BoJ normalizes policy in a controlled manner; currency volatility absorbed within manageable bounds. - status == CALM_ACCUMULATION : Wide interest rate margin and stable/weak Yen; global carry trade funding flows uninterrupted. --- ### 25.20. BROAD DOLLAR SHORTAGE & OFFSHORE LIQUIDITY STRAIN INDEX (BDSI) - Purpose: Detects covert offshore US Dollar scarcity when headline DXY appears calm, by combining Trade-Weighted Broad Dollar expansion, secured funding spread anomalies (SOFR vs Fed Funds), and maritime energy chokepoint disruptions. - Target: economy.json, llms-models.json -> MODEL_25.20_BROAD_DOLLAR_SHORTAGE - Frequency: Daily (Business Day) - Canonical Input Series: - IND_DTWEXBGS : Nominal Broad U.S. Dollar Index (Trade-Weighted, 26 economies, Jan 2006=100) - IND_SOFR : Secured Overnight Financing Rate (Benchmark Secured Repo Rate, %) - IND_DFF : Federal Funds Effective Rate (Overnight Unsecured Rate, %) - CHOKE_HORMUZ : Strait of Hormuz Daily AIS Transit Contraction (%) via IMF PortWatch - Mathematical Formulation: 1. Broad Dollar Expansion Signal: S_broad = clamp((Broad_Dollar_YoY_pct - 0.0) / 5.0, 0.0, 1.0) 2. Secured Funding Friction Spread: Spread_repo_bps = (SOFR - DFF) * 100.0 S_repo = clamp(Spread_repo_bps / 15.0, 0.0, 1.0) 3. Energy Chokepoint Disruption Shock: S_choke = clamp(abs(Hormuz_AIS_drop_pct) / 100.0, 0.0, 1.0) 4. Composite Strain Index (BDSI): BDSI = (0.35 * S_broad) + (0.35 * S_repo) + (0.30 * S_choke) - Machine-Executable Logic (Python): def calculate_broad_dollar_shortage(broad_dollar_yoy_pct, sofr_rate, dff_rate, hormuz_drop_pct): if any(v is None or isinstance(v, bool) for v in (broad_dollar_yoy_pct, sofr_rate, dff_rate, hormuz_drop_pct)): return None try: yoy = float(broad_dollar_yoy_pct) sofr = float(sofr_rate) dff = float(dff_rate) choke = float(hormuz_drop_pct) if not (math.isfinite(yoy) and math.isfinite(sofr) and math.isfinite(dff) and math.isfinite(choke)): return None s_broad = max(0.0, min(1.0, yoy / 5.0)) spread_bps = round((sofr - dff) * 100.0, 2) s_repo = max(0.0, min(1.0, spread_bps / 15.0)) s_choke = max(0.0, min(1.0, abs(choke) / 100.0)) bdsi = round(0.35 * s_broad + 0.35 * s_repo + 0.30 * s_choke, 4) if bdsi >= 0.65 or (s_repo >= 0.60 and s_choke >= 0.70): status = "ACUTE_OFFSHORE_DOLLAR_DRAIN" elif bdsi >= 0.35 or s_repo > 0.0: status = "LATENT_LIQUIDITY_STRAIN" else: status = "BENIGN_GLOBAL_LIQUIDITY" return { "model_id": "MODEL_25.20_BROAD_DOLLAR_SHORTAGE", "bdsi_score": bdsi, "sofr_dff_spread_bps": spread_bps, "broad_dollar_expansion_score": round(s_broad, 4), "chokepoint_shock_score": round(s_choke, 4), "status": status } except (TypeError, ValueError, OverflowError): return None - Interpretation: - status == ACUTE_OFFSHORE_DOLLAR_DRAIN : Severe offshore USD funding crisis; energy chokepoint collapse forces dollar hoarding while repo spreads blow out; emerging market currencies and cross-border bank credit face immediate rollover shock. - status == LATENT_LIQUIDITY_STRAIN : Headline DXY remains range-bound, but positive repo friction (SOFR > DFF) or broad dollar momentum signals emerging stress in offshore trade finance. - status == BENIGN_GLOBAL_LIQUIDITY : Repo funding clears smoothly, broad dollar is stable, and maritime corridors operate without systemic dollar bottlenecks. --- ### 26. CENTRAL BANK COMMITTEE DISPERSION & HAWKISHNESS INDEX (COMMITTEE DISPERSION) - Purpose: Quantifies monetary policy committee (FOMC, ECB, BOE, TCMB) voting distributions across hawkish, dovish, and neutral members to compute directional policy stance (Hawkish/Dovish H-Index) and internal committee fracture (Blau-Simpson Dispersion Index). - Target: economy.json, llms-models.json -> MODEL_26_COMMITTEE_DISPERSION - Inputs: - n_hawkish : Number of voting members favoring rate hikes or tighter policy stance (non-negative integer) - n_dovish : Number of voting members favoring rate cuts or looser policy stance (non-negative integer) - n_neutral : Number of voting members favoring rate pause, hold, or baseline consensus (non-negative integer) - n_total : Total voting member count (optional integer; if provided, must be >= n_hawkish + n_dovish + n_neutral) - Mathematical Formulation: 1. Total Committee Votes: N_total = n_hawkish + n_dovish + n_neutral (or explicit n_total if verified >= vote sum) 2. Policy Balance Index (H-Index): H_Index = (n_hawkish - n_dovish) / N_total 3. Voting Member Shares: p_hawkish = n_hawkish / N_total p_dovish = n_dovish / N_total p_neutral = n_neutral / N_total 4. Internal Committee Diversity / Fracture (Blau-Simpson Dispersion): Dispersion = 1.0 - (p_hawkish^2 + p_dovish^2 + p_neutral^2) - Machine-Executable Logic (Python): def committee_dispersion(n_hawkish, n_dovish, n_neutral, n_total=None): if any(v is None or isinstance(v, bool) for v in (n_hawkish, n_dovish, n_neutral)): return None try: # Enforce discrete integer counts for voting committee members for val in (n_hawkish, n_dovish, n_neutral): if isinstance(val, float) and not val.is_integer(): return None if not isinstance(val, (int, float)): return None if not math.isfinite(val) or val < 0: return None h = int(n_hawkish) d = int(n_dovish) neu = int(n_neutral) tot = h + d + neu if n_total is not None and not isinstance(n_total, bool): if isinstance(n_total, float) and not n_total.is_integer(): return None if not isinstance(n_total, (int, float)) or not math.isfinite(n_total): return None f_tot = int(n_total) if f_tot >= tot and f_tot > 0: tot = f_tot elif f_tot < tot: return None if tot <= 0: return None p_h = h / tot p_d = d / tot p_neu = neu / tot h_index = round((h - d) / tot, 4) sum_sq = (p_h ** 2) + (p_d ** 2) + (p_neu ** 2) dispersion = round(1.0 - sum_sq, 4) # Directional Stance (H-Index Regime) if h_index >= 0.50: directional_stance = "STRONG_HAWKISH_TILT" elif h_index >= 0.15: directional_stance = "MODERATE_HAWKISH_BIAS" elif h_index <= -0.50: directional_stance = "STRONG_DOVISH_TILT" elif h_index <= -0.15: directional_stance = "MODERATE_DOVISH_BIAS" else: directional_stance = "BALANCED_NEUTRAL_STANCE" # Consensus / Dispersion Regime if dispersion <= 0.30: consensus_regime = "STRONG_CONSENSUS" elif dispersion <= 0.48: consensus_regime = "MODERATE_DISSENT" else: consensus_regime = "HIGH_DISPERSION" return { "model_id": "MODEL_26_COMMITTEE_DISPERSION", "n_total": int(tot), "n_hawkish": int(h), "n_dovish": int(d), "n_neutral": int(neu), "share_hawkish_pct": round(p_h * 100.0, 2), "share_dovish_pct": round(p_d * 100.0, 2), "share_neutral_pct": round(p_neu * 100.0, 2), "h_index": h_index, "dispersion": dispersion, "directional_stance": directional_stance, "consensus_regime": consensus_regime } except (TypeError, ValueError, ZeroDivisionError, OverflowError): return None - Interpretation: - Directional Stance (H-Index): * H_Index >= 0.50 : STRONG_HAWKISH_TILT (Decisive hawkish bias / Rate hike or aggressive tightening pressure) * 0.15 <= H_Index < 0.50 : MODERATE_HAWKISH_BIAS (Moderate tightening tilt) * -0.15 < H_Index < 0.15 : BALANCED_NEUTRAL_STANCE (Balanced equilibrium / Neutral policy posture) * -0.50 < H_Index <= -0.15 : MODERATE_DOVISH_BIAS (Moderate easing tilt) * H_Index <= -0.50 : STRONG_DOVISH_TILT (Decisive dovish bias / Rate cut or aggressive easing pressure) - Consensus Regime (Blau-Simpson Dispersion): * Dispersion <= 0.30 : STRONG_CONSENSUS (Low dispersion / Robust committee unity and high policy predictability) * 0.30 < Dispersion <= 0.48 : MODERATE_DISSENT (Moderate division / Emerging dissent signals) * Dispersion > 0.48 : HIGH_DISPERSION (High committee fracture / Deep institutional division and elevated policy uncertainty) --- ### 25.25. PCE-CPI FED POLICY PATH MODEL (PCE_CPI_FED_PATH) - Purpose: Cross-checks the Fed's official 2.0% inflation target (Core PCE) against Core CPI, headline inflation, 5Y market breakeven expectations, and the 2Y Treasury minus EFFR spread to forecast the Fed's forward policy path. - Target: llms-models.json -> MODEL_25.25 - Frequency: Mixed (Monthly BEA/BLS Prices + Daily Treasury/Breakeven) - Canonical Input Series: - IND_PCEPILFE : Core PCE Price Index Ex Food & Energy (YoY % & SAAR %) - IND_PCEPI : Headline PCE Price Index (YoY %) - IND_CPILFESL : Core CPI All Items Less Food & Energy (YoY %) - IND_CPIAUCSL : Headline CPI All Items (YoY %) - IND_T5YIE : 5-Year Breakeven Inflation Rate (%) - IND_DGS2 : 2-Year Treasury Constant Maturity Yield (%) - IND_DFF : Effective Federal Funds Rate (%) - Mathematical Formulation: 1. Fed_Target_Overshoot_ppt = PCEPILFE_YoY - 2.0 2. Core_Wedge_ppt = PCEPILFE_YoY - CPILFESL_YoY 3. Momentum_vs_Anchor_ppt = PCEPILFE_SAAR - T5YIE 4. Market_Path_Spread_bps = (DGS2 - DFF) * 100.0 - Temporal Integrity: - Every input must provide a valid ISO YYYY-MM-DD observation date and canonical source frequency. - The calculation fails closed when either metadata map is incomplete, malformed, or supplied without its paired map. - asynchronous_frequencies is true only when the canonical input frequencies differ; different publication dates alone do not imply mixed frequencies. - Machine-Executable Logic (Python): def calculate_pce_cpi_fed_path(pcepilfe_yoy, pcepi_yoy, cpilfesl_yoy, cpiaucsl_yoy, pcepilfe_saar, t5yie, dgs2, dff, observation_dates=None, observation_frequencies=None): vals = (pcepilfe_yoy, pcepi_yoy, cpilfesl_yoy, cpiaucsl_yoy, pcepilfe_saar, t5yie, dgs2, dff) if any(v is None or isinstance(v, bool) for v in vals): return None try: core_pce, head_pce, core_cpi, head_cpi, saar, breakeven_5y, y2, effr = [float(x) for x in vals] if not all(math.isfinite(x) for x in (core_pce, head_pce, core_cpi, head_cpi, saar, breakeven_5y, y2, effr)): return None if any(x < -20.0 or x > 50.0 for x in (core_pce, head_pce, core_cpi, head_cpi, saar)): return None if any(y < -2.0 or y > 25.0 for y in (y2, effr)): return None if breakeven_5y < -5.0 or breakeven_5y > 15.0: return None target_overshoot = round(core_pce - 2.0, 4) core_wedge = round(core_pce - core_cpi, 4) momentum_vs_anchor = round(saar - breakeven_5y, 4) market_path_bps = round((y2 - effr) * 100.0, 2) if breakeven_5y >= 2.6 and saar > breakeven_5y: status = "ANCHOR_BREAK_RISK" elif core_pce >= 2.5 and market_path_bps >= 25.0: status = "HAWKISH_REPRICING" elif core_pce >= 2.2 or core_wedge > 0.25: status = "STICKY_HOLD" elif core_pce < 2.2 and market_path_bps <= -25.0: status = "DISINFLATION_PIVOT" else: status = "NEUTRAL_TRANSITION" return { "model_id": "MODEL_25.25", "target_overshoot_ppt": target_overshoot, "core_wedge_ppt": core_wedge, "momentum_vs_anchor_ppt": momentum_vs_anchor, "market_path_spread_bps": market_path_bps, "status": status } except (TypeError, ValueError, ZeroDivisionError, OverflowError): return None - Interpretation: - T5YIE >= 2.6% & PCEPILFE_SAAR > T5YIE : ANCHOR_BREAK_RISK (Inflation expectations de-anchoring / Hawkish shock risk) - PCEPILFE_YoY >= 2.5% & 2Y_EFFR_bps >= 25 : HAWKISH_REPRICING (Rate cuts priced out / Hike or higher-for-longer repricing) - PCEPILFE_YoY >= 2.2% or Core_Wedge > 0.25 : STICKY_HOLD (Elevated core persistence / Fed hold regime) - PCEPILFE_YoY < 2.2% & 2Y_EFFR_bps <= -25 : DISINFLATION_PIVOT (Disinflation aligned with market easing path) --- ### 25.26. 2s10s30s YIELD BUTTERFLY & INFLATION SHOCK MODEL (YIELD_BUTTERFLY_INFLATION_SHOCK) - Purpose: Decomposes US Treasury curve stress into belly policy repricing, long-end fiscal steepening, front-end inversion, and transitory vs. unhinged inflation expectation shocks. - Target: llms-models.json -> MODEL_25.26 - Frequency: Daily (FRED Constant Maturity Treasury Yields & Breakeven Inflation) - Canonical Input Series: - IND_DGS2 : 2-Year Treasury Constant Maturity Rate (%) - IND_DGS10 : 10-Year Treasury Constant Maturity Rate (%) - IND_DGS30 : 30-Year Treasury Constant Maturity Rate (%) - IND_T5YIE : 5-Year Breakeven Inflation Rate (%) - IND_T10YIE : 10-Year Breakeven Inflation Rate (%) - Mathematical Formulation: 1. Butterfly_2s10s30s_bps = (2 * DGS10 - DGS2 - DGS30) * 100.0 2. Slope_2s10s_bps = (DGS10 - DGS2) * 100.0 3. Slope_10s30s_bps = (DGS30 - DGS10) * 100.0 4. Slope_2s30s_bps = (DGS30 - DGS2) * 100.0 5. Breakeven_Term_Slope_bps = (T5YIE - T10YIE) * 100.0 - Temporal Integrity: - Every input must provide a valid ISO YYYY-MM-DD observation date and canonical source frequency. - All canonical inputs for this model are daily; differing last observation dates therefore remain asynchronous by date but do not set asynchronous_frequencies=true. - Machine-Executable Logic (Python): def calculate_yield_butterfly_inflation_shock(dgs2, dgs10, dgs30, t5yie, t10yie, observation_dates=None, observation_frequencies=None): vals = (dgs2, dgs10, dgs30, t5yie, t10yie) if any(v is None or isinstance(v, bool) for v in vals): return None try: y2, y10, y30, be5, be10 = [float(x) for x in vals] if not all(math.isfinite(x) for x in (y2, y10, y30, be5, be10)): return None if any(y < -2.0 or y > 25.0 for y in (y2, y10, y30)): return None if any(b < -5.0 or b > 15.0 for b in (be5, be10)): return None butterfly_bps = round((2.0 * y10 - y2 - y30) * 100.0, 2) slope_2s10s_bps = round((y10 - y2) * 100.0, 2) slope_10s30s_bps = round((y30 - y10) * 100.0, 2) slope_2s30s_bps = round((y30 - y2) * 100.0, 2) be_term_slope_bps = round((be5 - be10) * 100.0, 2) if be10 >= 2.5 and be5 >= 2.5: status = "INFLATION_ANCHOR_UNHINGED" elif be_term_slope_bps >= 20.0: status = "SHORT_TERM_INFLATION_SHOCK" elif butterfly_bps <= -20.0 and slope_10s30s_bps >= 35.0: status = "LONG_END_FISCAL_STEEPENING" elif butterfly_bps >= 20.0: status = "BELLY_POLICY_PRESSURE" elif slope_2s10s_bps <= 0.0: status = "FRONT_END_INVERSION_STRESS" else: status = "BALANCED_CURVE_REGIME" return { "model_id": "MODEL_25.26", "butterfly_2s10s30s_bps": butterfly_bps, "slope_2s10s_bps": slope_2s10s_bps, "slope_10s30s_bps": slope_10s30s_bps, "slope_2s30s_bps": slope_2s30s_bps, "breakeven_term_slope_bps": be_term_slope_bps, "status": status } except (TypeError, ValueError, ZeroDivisionError, OverflowError): return None - Interpretation: - T10YIE >= 2.5% & T5YIE >= 2.5% : INFLATION_ANCHOR_UNHINGED (Both 5Y and 10Y inflation expectations de-anchored above target) - Breakeven_Term_Slope_bps >= 20 : SHORT_TERM_INFLATION_SHOCK (Near-term energy or supply inflation shock priced into 5Y breakevens) - Butterfly_2s10s30s_bps <= -20 & Slope_10s30s_bps >= 35 : LONG_END_FISCAL_STEEPENING (30Y long-end steepening driven by fiscal supply and term premium) - Butterfly_2s10s30s_bps >= 20 : BELLY_POLICY_PRESSURE (10Y belly cheapening vs 2Y and 30Y wings under Fed policy path repricing) - Slope_2s10s_bps <= 0 : FRONT_END_INVERSION_STRESS (2s10s yield curve inverted / Restrictive front-end tightening stress) - Otherwise : BALANCED_CURVE_REGIME (Anchored breakevens and balanced yield curve curvature) --- ### 25.28. INERTIAL CORE PCE TAYLOR RULE POLICY GAP - Purpose: Benchmarks the effective Federal Funds Rate against an Atlanta Fed / FOMC-style inertial Core PCE Taylor rule (r*=1.0%, pi*=2.0%, rho=0.85 smoothing against lagged FEDFUNDS, CBO output gap) to separate realistic Fed gradualism from static headline-CPI Taylor extremes (Model 11). - Domain: Central Bank Policy Transmission & Monetary Stance Calibration - Frequency: Mixed (Daily DFF + Monthly FEDFUNDS & PCEPILFE + Quarterly GDPC1 & GDPPOT) - Canonical Input Series: - IND_DFF : Effective Federal Funds Rate (Daily, %) - IND_FEDFUNDS : Lagged Effective Federal Funds Rate (Monthly t-3 / 1-quarter lag, %) - IND_PCEPILFE : Core PCE Price Index Ex Food and Energy YoY (Monthly, %) - IND_GDPC1 : Real Gross Domestic Product (Quarterly, Billions of Chained 2017 Dollars) - IND_GDPPOT : Real Potential Gross Domestic Product (Quarterly, Billions of Chained 2017 Dollars) - Mathematical Formulation: 1. Output_Gap_Pct = ((GDPC1 / GDPPOT) - 1.0) * 100.0 2. Static_Core_PCE_Taylor_Rate = 1.0 + Core_PCE_YoY + 0.5 * (Core_PCE_YoY - 2.0) + 0.5 * Output_Gap_Pct 3. Inertial_Core_PCE_Taylor_Rate = 0.85 * FEDFUNDS_lag + 0.15 * Static_Core_PCE_Taylor_Rate 4. Inertial_Taylor_Policy_Gap = DFF - Inertial_Core_PCE_Taylor_Rate - Temporal Integrity: - GDPC1 and GDPPOT must match on both exact units ("Billions of Chained 2017 Dollars") and exact ISO quarter-start observation date (YYYY-MM-DD with day=01 and month in {01, 04, 07, 10}). - Every input must provide a valid ISO YYYY-MM-DD observation date and canonical source frequency. Because inputs span Daily, Monthly, and Quarterly frequencies, asynchronous_frequencies is explicitly surfaced as true. - Machine-Executable Logic (Python): def calculate_inertial_core_pce_taylor_gap(dff, fedfunds_lag, core_pce_yoy, gdpc1, gdppot, gdpc1_units, gdppot_units, gdpc1_date, gdppot_date, observation_dates=None, observation_frequencies=None): vals = (dff, fedfunds_lag, core_pce_yoy, gdpc1, gdppot) if any(v is None or isinstance(v, bool) for v in vals): return None try: dff_f, lag_f, pce_f, gdp_f, pot_f = [float(x) for x in vals] if not all(math.isfinite(x) for x in (dff_f, lag_f, pce_f, gdp_f, pot_f)): return None if not (0.0 <= dff_f <= 25.0 and 0.0 <= lag_f <= 25.0 and -20.0 <= pce_f <= 50.0): return None if gdp_f <= 0.0 or pot_f <= 1.0: return None if gdpc1_date != gdppot_date: return None output_gap_raw = ((gdp_f / pot_f) - 1.0) * 100.0 if abs(output_gap_raw) > 50.0: return None static_rate_raw = 1.0 + pce_f + 0.5 * (pce_f - 2.0) + 0.5 * output_gap_raw inertial_rate_raw = 0.85 * lag_f + 0.15 * static_rate_raw output_gap = round(output_gap_raw, 2) static_rate = round(static_rate_raw, 2) inertial_rate = round(inertial_rate_raw, 2) gap = round(dff_f - inertial_rate_raw, 2) if gap < -0.50: status = "BEHIND_THE_CURVE" elif gap > 0.50: status = "OVER_RESTRICTIVE" else: status = "OPTIMAL_ALIGNMENT" return { "model_id": "MODEL_25.28", "policy_gap_ppt": gap, "inertial_taylor_rate_pct": inertial_rate, "static_core_pce_taylor_rate_pct": static_rate, "output_gap_pct": output_gap, "status": status } except (TypeError, ValueError, ZeroDivisionError, OverflowError): return None - Interpretation: - Inertial_Taylor_Policy_Gap < -0.50 : BEHIND_THE_CURVE (Fed behind inertial Core PCE Taylor path / Excessively loose) - -0.50 to +0.50 : OPTIMAL_ALIGNMENT (Balanced FOMC policy stance aligned with inertial Core PCE Taylor path) - Inertial_Taylor_Policy_Gap > +0.50 : OVER_RESTRICTIVE (Excessively restrictive vs inertial Core PCE Taylor path / Recession risk stance) --- ### 25.33. ISRAEL-US SOVEREIGN YIELD & POLICY SPREAD (ISRAEL_US_YIELD_POLICY_SPREAD) - Purpose: Decomposes Israel-US sovereign borrowing-cost divergence into pure basis-point spreads across 10Y nominal government bonds (BOI_YIELD_10Y_NOM vs. DGS10), 10Y inflation-indexed real bonds (BOI_YIELD_10Y_REAL vs. DFII10), central bank policy rates (BOI_POLICY_RATE vs. DFF), and the Fisher-identity implied breakeven inflation spread, without artificial composite weights. - Target: llms-models.json -> MODEL_25.33 - Frequency: Mixed (Monthly BOI 10Y Nominal & Real Zero-Coupon Yields + Daily BOI Policy Rate, FRED DGS10, DFII10, DFF) - Canonical Input Series: - IND_BOI_YIELD_10Y_NOM : Israel 10-Year Nominal Zero-Coupon Government Bond Yield (BOI, Monthly, % per annum) - IND_DGS10 : US 10-Year Treasury Constant Maturity Nominal Yield (FRED, Daily, %) - IND_BOI_YIELD_10Y_REAL : Israel 10-Year Real (CPI-Indexed) Zero-Coupon Government Bond Yield (BOI, Monthly, % per annum) - IND_DFII10 : US 10-Year Treasury Inflation-Indexed Real Yield (FRED, Daily, %) - IND_BOI_POLICY_RATE : Bank of Israel Monetary Policy Interest Rate (BOI, Daily, % per annum) - IND_DFF : Federal Funds Effective Rate (FRED, Daily, %) - Mathematical Formulation: 1. Nominal_10Y_Spread_bps = (BOI_YIELD_10Y_NOM - DGS10) * 100.0 2. Real_10Y_Spread_bps = (BOI_YIELD_10Y_REAL - DFII10) * 100.0 3. Policy_Spread_bps = (BOI_POLICY_RATE - DFF) * 100.0 4. IL_Implied_Breakeven_Pct = BOI_YIELD_10Y_NOM - BOI_YIELD_10Y_REAL 5. US_Implied_Breakeven_Pct = DGS10 - DFII10 6. Implied_Breakeven_Spread_bps = Nominal_10Y_Spread_bps - Real_10Y_Spread_bps - Temporal Integrity: - Every input must provide a valid ISO YYYY-MM-DD observation date (monthly BOI YYYY-MM dates are normalized to YYYY-MM-01) and canonical source frequency keyed exactly by BOI_YIELD_10Y_NOM, DGS10, BOI_YIELD_10Y_REAL, DFII10, BOI_POLICY_RATE, and DFF. - The calculation fails closed when either metadata map is incomplete, malformed, has extra keys, or is supplied without its paired map. - asynchronous_frequencies is true because Monthly BOI 10Y yields are combined with Daily BOI policy rate and Daily FRED Treasury/Fed Funds rates. - Machine-Executable Logic (Python): def calculate_israel_us_yield_policy_spread( il_yield_10y_nom, us_yield_10y_nom, il_yield_10y_real, us_yield_10y_real, il_policy_rate, us_policy_rate, observation_dates=None, observation_frequencies=None, ): vals = (il_yield_10y_nom, us_yield_10y_nom, il_yield_10y_real, us_yield_10y_real, il_policy_rate, us_policy_rate) if any(v is None or isinstance(v, bool) for v in vals): return None # Temporal metadata validation (exact 6 keys; fail-closed on missing/extra/malformed/unpaired) try: il_nom, us_nom, il_real, us_real, il_pol, us_pol = [float(x) for x in vals] if not all(math.isfinite(x) for x in (il_nom, us_nom, il_real, us_real, il_pol, us_pol)): return None if not (-5.0 <= il_nom <= 30.0 and -5.0 <= us_nom <= 30.0): return None if not (-15.0 <= il_real <= 25.0 and -15.0 <= us_real <= 25.0): return None if not (-2.0 <= il_pol <= 30.0 and -2.0 <= us_pol <= 30.0): return None nominal_10y_spread_bps = round((il_nom - us_nom) * 100.0, 2) real_10y_spread_bps = round((il_real - us_real) * 100.0, 2) policy_spread_bps = round((il_pol - us_pol) * 100.0, 2) il_implied_be_pct = round(il_nom - il_real, 4) us_implied_be_pct = round(us_nom - us_real, 4) implied_be_spread_bps = round(nominal_10y_spread_bps - real_10y_spread_bps, 2) if nominal_10y_spread_bps >= 100.0 or real_10y_spread_bps >= 100.0: status = "SOVEREIGN_RISK_PREMIUM_STRESS" elif nominal_10y_spread_bps >= 25.0: status = "MODERATE_IL_YIELD_PREMIUM" elif nominal_10y_spread_bps <= -50.0 and policy_spread_bps <= -50.0: status = "NEGATIVE_SPREAD_POLICY_DIVERGENCE" elif nominal_10y_spread_bps <= -50.0: status = "IL_YIELD_DISCOUNT_BELOW_US" else: status = "PARITY_CONVERGENCE" inputs_payload = { "il_yield_10y_nom_pct": round(il_nom, 4), "us_yield_10y_nom_pct": round(us_nom, 4), "il_yield_10y_real_pct": round(il_real, 4), "us_yield_10y_real_pct": round(us_real, 4), "il_policy_rate_pct": round(il_pol, 4), "us_policy_rate_pct": round(us_pol, 4), } # When observation_dates & observation_frequencies are provided: # inputs_payload["observation_dates"] = validated_dates # inputs_payload["observation_frequencies"] = validated_frequencies # inputs_payload["asynchronous_frequencies"] = len(set(validated_frequencies.values())) > 1 return { "model_id": "MODEL_25.33", "model_name": "Israel-US Sovereign Yield & Policy Spread", "formula_ref": "https://analysisreports.github.io/llms-formulas-rates-liquidity.txt#25.33", "primary_value": nominal_10y_spread_bps, "unit": "Basis Points (bps)", "status": status, "inputs": inputs_payload, "components": { "nominal_10y_spread_bps": nominal_10y_spread_bps, "real_10y_spread_bps": real_10y_spread_bps, "policy_spread_bps": policy_spread_bps, "implied_breakeven_spread_bps": implied_be_spread_bps, }, "metrics": { "nominal_10y_spread_bps": nominal_10y_spread_bps, "real_10y_spread_bps": real_10y_spread_bps, "policy_spread_bps": policy_spread_bps, "implied_breakeven_spread_bps": implied_be_spread_bps, "il_implied_breakeven_pct": il_implied_be_pct, "us_implied_breakeven_pct": us_implied_be_pct, }, "interpretation": "Israel-US sovereign yield & policy spread...", } except (TypeError, ValueError, ZeroDivisionError, OverflowError): return None - Interpretation: - Nominal_10Y_Spread_bps >= +100 bps or Real_10Y_Spread_bps >= +100 bps : SOVEREIGN_RISK_PREMIUM_STRESS (Elevated Israeli sovereign nominal or real 10Y risk premium over US Treasuries) - Nominal_10Y_Spread_bps >= +25 bps : MODERATE_IL_YIELD_PREMIUM (Moderate Israeli 10Y yield premium above US Treasuries) - Nominal_10Y_Spread_bps <= -50 bps & Policy_Spread_bps <= -50 bps : NEGATIVE_SPREAD_POLICY_DIVERGENCE (Israel 10Y yields trading at a discount below US Treasuries alongside a more accommodative Bank of Israel policy rate vs. Fed) - Nominal_10Y_Spread_bps <= -50 bps : IL_YIELD_DISCOUNT_BELOW_US (Israel 10Y nominal yield trading at a discount below US Treasuries without equivalent policy-rate divergence) - Otherwise : PARITY_CONVERGENCE (Israel-US 10Y sovereign yields trading near parity within the neutral corridor)