# Ersoy Toptaş Quantitative Models: Geopolitical Tension, Alliances, Strategic Chokepoints & Intelligence (llms-formulas-geopolitics.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-geopolitics.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: Bilateral dynamic polarities, Mecca Pact dynamics, maritime chokepoints, conflict heat, market impact, and intelligence confidence. > Zero-Fallback Directive: Strict deterministic execution. Missing or non-finite inputs strictly return None (null). > Models Contained: 15 Domain Models (25.1, 25.15, 25.18, 25.19, 27, 27.1, 28, 28.1, 28.2, 28.3, 28.4, 28.5, 28.6, 28.7, 29) --- ```python import math VALID_CONFLICT_SEVERITIES = {"CRITICAL", "HIGH", "MODERATE", "LOW"} 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 ``` --- ### 25.1. DYNAMIC POLARITY & REGIME ENGINE - Purpose: Calculates bilateral geopolitical affinity by combining baseline polarity (P_baseline) with the Model 25.19 dynamic delta clamped to [-0.20, 0.20], collective defense pact deltas (Model 25.18 Mecca Pact / Regional Alliances), and Resident Embassy diplomatic mission presence (+0.05 for operational missions). Resolves deterministic bilateral regime states using schema-driven conflict severity rather than hardcoded country pairs. - Data Link: - Primary Polarity & Severity Registry: llms-relationships.txt -> Section 1 (DYNAMIC POLARITY & TRANSMISSION ENGINE) - Sovereign Dyadic Shelves (165 Dyads): llms-country-relationships.txt -> Section 2 (Conflict_Severity) - Automated Escalation Trigger: llms-formulas-geopolitics.txt -> Model 28.1 (CONFLICT HEAT SCORE) - Formula: P_net = min(1.0, max(-1.0, P_baseline + dynamic_delta + pact_bloc_delta + diplomatic_delta)) dynamic_delta is the Model 25.19 relationship transmission; pact_bloc_delta is the collective defense delta (+0.10 for BLOC_MECCA_DEFENSE / Article 5 treaties); diplomatic_delta is +0.05 when an active resident diplomatic mission (embassy) is established, and +0.00 if closed or scheduled for a future date. Legacy petrol, chip and VIX deltas are reported separately and are not added. - Conflict Severity & Kinetic War Rule: - `conflict_severity` is ingested directly from the dyad's `Conflict Severity` schema field (`CRITICAL`, `HIGH`, `MODERATE`, `LOW`) or derived deterministically from Model 28.1 (`Conflict_Heat >= 80` -> `CRITICAL`, `55 <= Conflict_Heat < 80` -> `HIGH`, `30 <= Conflict_Heat < 55` -> `MODERATE`, `Conflict_Heat < 30` -> `LOW`). - `KINETIC_WAR` requires both `P_net < -0.95` and `conflict_severity == "CRITICAL"`. Pairs with `P_net < -0.95` and non-critical severity (`HIGH`, `MODERATE`, `LOW`) remain classified as `PROXY_WAR`. - Zero-Fallback Directive: Missing, null, non-finite, or unrecognized `conflict_severity` values strictly return `None` (`UNAVAILABLE`). - Machine-Executable Logic (Python): VALID_CONFLICT_SEVERITIES = {"CRITICAL", "HIGH", "MODERATE", "LOW"} def conflict_heat_to_severity(conflict_heat): if conflict_heat is None or isinstance(conflict_heat, bool): return None try: score = float(conflict_heat) if not math.isfinite(score) or score < 0.0 or score > 100.0: return None if score >= 80.0: return "CRITICAL" elif score >= 55.0: return "HIGH" elif score >= 30.0: return "MODERATE" else: return "LOW" except (TypeError, ValueError): return None def dynamic_polarity_engine(p_baseline, dynamic_delta, conflict_severity, mecca_pact_delta=0.0, diplomatic_delta=0.0): if any(v is None or isinstance(v, bool) for v in (p_baseline, dynamic_delta, mecca_pact_delta, diplomatic_delta)): return None if conflict_severity is None or not isinstance(conflict_severity, str): return None severity = conflict_severity.strip().upper() if severity not in VALID_CONFLICT_SEVERITIES: return None try: if not all(math.isfinite(float(v)) for v in (p_baseline, dynamic_delta, mecca_pact_delta, diplomatic_delta)): return None raw_p = float(p_baseline) + float(dynamic_delta) + float(mecca_pact_delta) + float(diplomatic_delta) # Clamp to [-1.0, 1.0] interval p_net = round(min(1.0, max(-1.0, raw_p)), 2) if not math.isfinite(p_net): return None if p_net >= 0.85: regime = "ALLIANCE" elif p_net >= 0.50: regime = "STRATEGIC_ALIGNMENT" elif p_net >= 0.10: regime = "TACTICAL_COOPERATION" elif p_net >= -0.10: regime = "NEUTRAL" elif p_net >= -0.50: regime = "STRATEGIC_FRICTION" elif p_net >= -0.95: regime = "PROXY_WAR" else: regime = "KINETIC_WAR" if severity == "CRITICAL" else "PROXY_WAR" return {"p_net": p_net, "regime": regime} except (TypeError, ValueError): return None - Interpretation: - p_net >= 0.85 : ALLIANCE (Joint Defense / Integrated Military Command) - 0.50 <= p_net < 0.85 : STRATEGIC_ALIGNMENT (Strategic Partnership / Institutional Alignment) - 0.10 <= p_net < 0.50 : TACTICAL_COOPERATION (Tactical Cooperation / Economic Interdependence) - -0.10 <= p_net < 0.10 : NEUTRAL (Strict Non-Alignment / Strategic Neutrality) - -0.50 <= p_net < -0.10 : STRATEGIC_FRICTION (Strategic Friction / Managed Divergence) - -0.95 <= p_net < -0.50, or p_net < -0.95 with conflict_severity != CRITICAL : PROXY_WAR (Proxy Warfare / Sanctions Regime / Asymmetric Conflict) - p_net < -0.95 with conflict_severity == CRITICAL (Model 28.1 Conflict_Heat >= 80) : KINETIC_WAR (Active Kinetic Warfare / Total Diplomatic Breakdown) --- ### 25.15. DOMESTIC GOVERNANCE GRIDLOCK & EXTERNAL TARIFF FRICTION ENGINE (GOVERNANCE_GRIDLOCK_FRICTION) - Purpose: Quantifies how sovereign executive-legislative power balances, parliamentary seat margins, and regime structures constrain domestic policy space and systematically force executive leadership to deploy unilateral external economic leverage (Section 232/301 tariffs, IEEPA sanctions, emergency trade restrictions). - Sovereign Scope & Supported Country Sub-Engine: - This model is strictly parameterized for a closed benchmark subset of 6 key geopolitical sovereign actors: `GEO_US`, `GEO_DE`, `GEO_IL`, `GEO_JP`, `GEO_CN`, and `GEO_RU`. Other sovereign entities not included in this canonical subset return `None` (null). - Canonical Entity Mapping (llms-entities-id.txt): - GEO_US: Presidential / Bicameral Congress (218 House threshold, 60 Senate Filibuster). - GEO_DE: Parliamentary Coalition (Bundestag 316 majority threshold, Schuldenbremse fiscal brake). - GEO_IL: Parliamentary Coalition (Knesset 61 majority threshold, small-party leverage). - GEO_JP: Dominant Parliamentary (Diet 233 majority / 310 supermajority threshold). - GEO_CN & GEO_RU: Centralized Single-Party / Vertical Authority (Zero domestic legislative gridlock). - Formula: For Centralized Regimes (GEO_CN, GEO_RU): Gridlock_Index = 0.0 External_Friction_Bias = Executive_Decree_Power * 0.75 For Democratic Regimes (GEO_US, GEO_DE, GEO_IL, GEO_JP): If Majority_Seat_Margin < 0: Gridlock_Index = min(1.0, 0.60 + abs(Majority_Seat_Margin) * 0.02) Else: Gridlock_Index = max(0.0, 0.40 - (Majority_Seat_Margin * 0.015)) External_Friction_Bias = Gridlock_Index * Executive_Decree_Power - Machine-Executable Logic (Python): def governance_gridlock_friction_engine(country_code, majority_seat_margin=None, executive_decree_power=None): if not isinstance(country_code, str): return None country = country_code.upper().strip() valid_countries = {"GEO_US", "GEO_CN", "GEO_RU", "GEO_DE", "GEO_IL", "GEO_JP"} if country not in valid_countries: return None if executive_decree_power is None: return None try: decree = float(executive_decree_power) except (TypeError, ValueError): return None if not math.isfinite(decree) or decree < 0.0 or decree > 1.0: return None if country in {"GEO_CN", "GEO_RU"}: gridlock = 0.0 ext_friction = round(decree * 0.75, 3) status = "CENTRALIZED_STRATEGIC_COMMAND" return { "country_code": country, "gridlock_index": gridlock, "executive_decree_power": decree, "external_friction_bias": ext_friction, "status": status } if majority_seat_margin is None or isinstance(majority_seat_margin, bool): return None try: margin = float(majority_seat_margin) if not math.isfinite(margin): return None if margin < 0: gridlock = round(min(1.0, 0.60 + abs(margin) * 0.02), 3) else: gridlock = round(max(0.0, 0.40 - (margin * 0.015)), 3) ext_friction = round(gridlock * decree, 3) if gridlock >= 0.60 and ext_friction >= 0.45: status = "DIVIDED_GRIDLOCK_TARIFF_SURGE" elif gridlock >= 0.35 and ext_friction < 0.45: status = "FRAGILE_COALITION_PARALYSIS" elif gridlock < 0.25 and margin >= 15: status = "UNIFIED_DOMESTIC_EXPANSION" else: status = "BALANCED_INSTITUTIONAL_EQUILIBRIUM" return { "country_code": country, "majority_seat_margin": margin, "gridlock_index": gridlock, "executive_decree_power": decree, "external_friction_bias": ext_friction, "status": status } except (TypeError, ValueError): return None - Interpretation: - status == DIVIDED_GRIDLOCK_TARIFF_SURGE : Domestic legislation and fiscal budgets paralyzed by opposition-controlled legislature; Executive pivots power toward unilateral trade tariffs, protectionism, and foreign sanctions (Primary shock: DXY surge, global trade friction). - status == FRAGILE_COALITION_PARALYSIS : Parliamentary coalition held hostage by fringe parties; fiscal austerity or structural indecision reigns; elevated early election risk (Primary shock: Currency weakness, bond spread volatility). - status == UNIFIED_DOMESTIC_EXPANSION : Strong legislative majority enables aggressive domestic tax/spending reform; subdued executive need for diversionary trade conflict. - status == CENTRALIZED_STRATEGIC_COMMAND : Zero domestic legislative gridlock; rapid mobilization of state resources, export quotas, and counter-sanctions. --- ### 25.18. NON-CONTIGUOUS ALLIANCE TRANSMISSION ENGINE (MECCA_PACT_DYNAMIC_ENGINE) - Purpose: Computes dynamic polarity shifts, alliance friction, and mutual defense uplift for the non-contiguous 2026 Mecca Joint Defense Pact (BLOC_MECCA_DEFENSE) across Republic of Türkiye (GEO_TR), Kingdom of Saudi Arabia (GEO_SA), and Islamic Republic of Pakistan (GEO_PK). Synthesizes institutional mutual defense activation, sovereign hydrocarbon fiscal breakeven thresholds, global dollar liquidity (SOFR), and bilateral defense-industrial co-production. - Target: llms-models.json, llms-relationships.json, llms-relationships.txt -> MODEL_25.18_MECCA_PACT_DYNAMIC_ENGINE - Frequency: Daily (Business Day) - Canonical Input Series: - EIA / FRED: DCOILBRENTEU (Crude Oil Prices: Brent - Europe, USD per Barrel) - FRED: SOFR (Secured Overnight Financing Rate, Percent) - IMF: SAUPZPIOILBEGUSD (Fiscal Breakeven Oil Price for Saudi Arabia, USD per Barrel) - Mathematical Formulation: 1. Treaty Activation Uplift: Delta_treaty = +0.10 (Institutional mutual collective defense commitment upon pact ratification) 2. Hydrocarbon Fiscal Breakeven Ratio: R_oil = Brent / Breakeven_oil (Where Breakeven_oil is dynamically ingested from IMF SAUPZPIOILBEGUSD. If unavailable or non-positive, calculation halts and evaluates strictly to None; zero synthetic fallbacks permitted.) If R_oil >= 1.05: S_energy = +0.05 (Fiscal surplus enables expanded defense procurement and bilateral sovereign liquidity deposits) Else If R_oil < 0.90: S_energy = -0.05 (Fiscal consolidation pressure) Else: S_energy = 0.00 (Fiscal equilibrium) 3. Global Dollar Liquidity Transmission: If SOFR >= 5.25%: delta_dollar = -0.03 (Elevated global dollar funding stress) Else: delta_dollar = 0.00 (Benign funding conditions) 4. Pair-Specific Dynamic Deltas: dynamic_delta(TR_SA) = round(clamp(Delta_treaty + S_energy + delta_dollar, -0.30, 0.30), 2) dynamic_delta(SA_PK) = round(clamp(Delta_treaty + S_energy + delta_dollar, -0.30, 0.30), 2) dynamic_delta(TR_PK) = round(clamp(Delta_treaty + min(0.0, delta_dollar), -0.30, 0.30), 2) - Machine-Executable Logic (Python): def calculate_mecca_pact_transmission(brent, sofr, breakeven_oil): if any(v is None or isinstance(v, bool) for v in (brent, sofr, breakeven_oil)): return None try: f_brent = float(brent) f_sofr = float(sofr) f_be = float(breakeven_oil) if not (math.isfinite(f_brent) and math.isfinite(f_sofr) and math.isfinite(f_be)): return None if f_be <= 0.0 or f_brent < 0.0: return None delta_treaty = 0.10 r_oil = f_brent / f_be if r_oil >= 1.05: s_energy = 0.05 elif r_oil < 0.90: s_energy = -0.05 else: s_energy = 0.00 delta_dollar = -0.03 if f_sofr >= 5.25 else 0.00 delta_tr_sa = round(min(0.30, max(-0.30, delta_treaty + s_energy + delta_dollar)), 2) delta_sa_pk = round(min(0.30, max(-0.30, delta_treaty + s_energy + delta_dollar)), 2) delta_tr_pk = round(min(0.30, max(-0.30, delta_treaty + min(0.0, delta_dollar))), 2) return { "model_id": "MODEL_25.18_MECCA_PACT_DYNAMIC_ENGINE", "oil_breakeven_ratio": round(r_oil, 4), "breakeven_oil_price": round(f_be, 2), "delta_treaty": delta_treaty, "s_energy": s_energy, "delta_dollar": delta_dollar, "deltas": { "TR_SA": delta_tr_sa, "SA_PK": delta_sa_pk, "TR_PK": delta_tr_pk }, "status": "TREATY_ACTIVE_SURPLUS_EXPANSION" if s_energy > 0 else ("TREATY_ACTIVE_EQUILIBRIUM" if s_energy == 0 else "TREATY_ACTIVE_FISCAL_RESTRAINT") } except (TypeError, ValueError, OverflowError): return None - Interpretation: - status == TREATY_ACTIVE_SURPLUS_EXPANSION : High hydrocarbon revenues (Brent >= 1.05 * Breakeven) combined with benign global interest rates; sovereign wealth investments, bilateral defense procurement, and liquidity deposits operate at peak velocity. - status == TREATY_ACTIVE_EQUILIBRIUM : Hydrocarbon revenues aligned with sovereign budgetary requirements (0.90 <= R_oil < 1.05); mutual defense treaty guarantees and defense co-production pipelines proceed on schedule. - status == TREATY_ACTIVE_FISCAL_RESTRAINT : Hydrocarbon revenues fall below sovereign breakeven threshold (R_oil < 0.90) or dollar funding stresses elevate; mutual security umbrella remains intact while non-essential discretionary capital deployments moderate. --- ### 25.19. MULTI-LAYER MACROECONOMIC TRANSMISSION ENGINE - Purpose: Calculate nine bounded macroeconomic trigger scores and transmit their signed contributions to bilateral relationship deltas. Model 25.18 calculates the separate Mecca Pact delta; Model 25.1 combines the deltas with the structural baseline and classifies the resulting net polarity. - Notation: `current` and `prior` mean the latest and year-ago observations retained for each series. - Percentage change: `P(current, prior) = round(clamp(current / prior - 1, -1, 1), 4)`. The prior value must be strictly positive (`prior > 0`). If `prior <= 0`, percentage change is mathematically undefined and returns `null`. For example, an increase of 32.74% produces +0.3274. - Signed-index change: `D(current, prior) = round(clamp(current - prior, -1, 1), 4)`. This measures a difference in index points rather than a percentage, so it remains meaningful when the prior index is zero or negative. - A positive score means the measured indicator increased; a negative score means it decreased. Clamping limits both methods to [-1, 1]. Neither method determines the direction or size of an effect on a country relationship. #### Trigger Formulas - `IND_TRIGGER_HORMUZ_SPREAD` - Inputs: FRED `DCOILBRENTEU` (Brent) and `DCOILWTICO` (WTI), current and year-ago prices. - `spread_current = Brent_current - WTI_current`; `spread_prior = Brent_prior - WTI_prior`. - `trigger = P(spread_current, spread_prior)`. - **Spread Boundary & Positivity Rule:** Brent and WTI price inputs must be finite and strictly positive. Because `P(current, prior)` requires `prior > 0`, the historical benchmark spread must be strictly positive (`spread_prior > 0`). If Brent-WTI spread inverts or collapses (`spread_prior <= 0`), the percentage change is mathematically invalid, returning `null` with status `INVALID_DATA` ('Annual percentage change requires a positive prior model value.'). - Measures change in the benchmark price difference; it does not directly observe a Hormuz disruption. - `IND_TRIGGER_OVX_ENERGY_PANIC` - Inputs: FRED `OVXCLS` and `VIXCLS`, current and year-ago index values. - `ratio_current = OVX_current / VIX_current`; `ratio_prior = OVX_prior / VIX_prior`. - `trigger = P(ratio_current, ratio_prior)`. - Measures change in oil volatility relative to equity volatility, not an observed geopolitical event. - `IND_TRIGGER_NATGAS_CRACK` - Inputs: FRED `DCOILWTICO` (WTI) and `DHHNGSP` (Henry Hub), current and year-ago prices. - `ratio_current = WTI_current / Henry_Hub_current`; `ratio_prior = WTI_prior / Henry_Hub_prior`. - `trigger = P(ratio_current, ratio_prior)`. - Measures change in the WTI-to-Henry-Hub price ratio; Henry Hub is not a European gas benchmark. - `IND_TRIGGER_CHIP_CONTAINMENT` - Inputs: FRED `NASDAQSOX` at current, year-ago and two-observation-years-ago dates; FRED `VIXCLS` and NY Fed `GSCPI` at current and year-ago dates. - `sox_yoy_current = round((SOX_current / SOX_prior - 1) * 100, 4)`. - `sox_yoy_prior = round((SOX_prior / SOX_two_years_ago - 1) * 100, 4)`. - For each period, `chip_index = 0.40 * GSCPI - 0.35 * (sox_yoy / 50) + 0.25 * (VIX / 20)`. - `trigger = D(chip_index_current, chip_index_prior)`. - The weights are model assumptions: supply-chain pressure and volatility increase the index, while semiconductor equity growth reduces it. The score does not directly observe export controls or physical chip shortages. - `IND_TRIGGER_SOFR_DOLLAR_DRAIN` - Inputs: FRED `SOFR`, current and year-ago rates. - `trigger = P(SOFR_current, SOFR_prior)`. - Measures proportional change in the rate, not a direct observation of offshore dollar flows. - `IND_TRIGGER_GSCPI_LOGISTICS` - Inputs: NY Fed `GSCPI`, current and year-ago index values. - `trigger = D(GSCPI_current, GSCPI_prior)`. - Measures the change in global supply-chain pressure in index points, not a directly observed disruption at a particular chokepoint. - `IND_TRIGGER_WHEAT_PRICE` and `IND_TRIGGER_CORN_PRICE` - Inputs: FRED `PWHEAMTUSDM` (wheat) and `PMAIZMTUSDM` (corn), respectively, with current and year-ago monthly prices in USD per metric ton. - Each trigger is `P(price_current, price_prior)`. Percentage changes put the two commodities on a comparable scale without combining their price levels. - These are global market pressure indicators, not direct observations of the conflict or of Ukrainian export volumes. Harvests, weather and other global factors also affect prices. - `IND_TRIGGER_US_SPR_BUFFER` - Inputs: EIA `PET.WCSSTUS1.W` (Weekly U.S. Ending Stocks of Crude Oil in Strategic Petroleum Reserve), current and year-ago stock levels in thousand barrels. - `trigger = P(stocks_current, stocks_prior)`. - Measures annual rate of expansion or depletion of the U.S. emergency petroleum buffer. A negative score reflects inventory erosion, constraining sanctions elasticity and heightening energy shock vulnerability. - Data integrity: Inputs must be finite; Brent, WTI, Henry Hub, OVX, VIX, NASDAQSOX, wheat, corn, and SPR inventory stocks must be positive when used. Current dates must match for same-frequency combined series. For the chip trigger, current NASDAQSOX and VIX dates must match, and the monthly GSCPI date must not be later than them. Each year-ago date must precede its current date, and the SOX two-year-ago date must precede its year-ago date. - Historical dates: Year-ago dates may differ because series use their own retained observations. A historical ratio or composite assembled from different dates is not a same-day observation. The GSCPI prior date is used only when retained observations match the published current and year-ago values. - Missing or invalid inputs, mismatched current dates, or a non-positive prior value for percentage change produce `null`, an explicit status and a warning; a valid current value remains visible where available. Calculations use unrounded inputs and intermediate ratios, except for the SOX year-over-year values rounded as specified above. - Output: All nine IDs are published with `model: MODEL_25.19`, their inputs, dates and status in `llms-relationships.json`, and summarized in `llms-relationships.txt`. #### Relationship Transmission Pipeline 1. **Contribution and dominant selection:** For each trigger mapped to a pair, `contribution_i = trigger_value_i * impact_direction_i`, where the direction is +1 or -1. Select the signed contribution with the largest absolute value as `dominant`. If magnitudes tie, select the first trigger in the pair's mapping. 2. **Secondary damping and macro transmission:** `raw_delta = dominant + 0.20 * sum(other signed contributions)`. Then calculate `dynamic_delta = round(clamp(0.20 * raw_delta, -0.20, 0.20), 6)`. Six decimal places preserve the result of applying both weights to four-decimal trigger scores. 3. **Baltic floor:** For LT_RU, EE_RU and LV_RU, apply `dynamic_delta = max(dynamic_delta, -0.09)`. Positive deltas remain unchanged; no separate land-border multiplier is applied. - UA_RU maps wheat, corn and GSCPI to direction -1, a modeling assumption that rising global grain prices and supply-chain pressure worsen the modeled polarity. The same dominant-selection rule applies to all three, so GSCPI can also be dominant; the Baltic-only floor does not apply. Each trigger uses its own latest observation, which can be from a different month; the combined delta is not a same-month measurement. This is a market-pressure proxy, not evidence that the conflict has escalated or ended. - TR_SY maps wheat (FRED PWHEAMTUSDM, direction -1) and supply-chain pressure (NY Fed GSCPI, direction -1) to capture regional food security and cross-border corridor logistics friction. - US_VE maps benchmark price spread (FRED Brent-WTI HORMUZ_SPREAD, direction +1), dollar funding stress (FRED SOFR, direction -1), and U.S. emergency petroleum buffer depletion (EIA US_SPR_BUFFER, direction -1) to capture US Gulf Coast heavy crude refinery demand elasticity, unilateral financial sanctions pressure, and strategic inventory erosion. - All triggers mapped to a relationship are required. If any is unavailable, the relationship's dynamic_delta and P_net are null and its regime is UNAVAILABLE. Contributions, directions, statuses and the dominant trigger are published in `llms-relationships.json` and `llms-relationships.txt`. - Legacy petrol, chip and VIX deltas remain visible separately and are not added to P_net. - Interpretation: Each trigger is a bounded proxy for a documented macroeconomic pressure channel, not direct evidence of a geopolitical event. A missing input invalidates the dependent relationship transmission; it must remain null with an explicit status instead of being treated as zero or replaced by a fallback. #### Integration with Models 25.18 and 25.1 - **Model 25.18:** For TR_SA, SA_PK and TR_PK, the Mecca Pact delta is calculated separately using the +0.10 treaty uplift, Brent relative to Saudi fiscal breakeven oil, and SOFR. TR_SA and SA_PK include the energy and dollar adjustments; TR_PK includes the dollar adjustment but not the energy adjustment. Each is clamped to [-0.30, +0.30] and rounded to two decimals. In the relationship generator, when the required macro inputs are unavailable or invalid, only the +0.10 treaty uplift is retained. For all other pairs, the Mecca Pact delta is zero. - **Model 25.1:** `P_net = round(clamp(P_baseline + dynamic_delta + mecca_pact_delta, -1.00, +1.00), 2)`. Classification uses this rounded P_net: - `P_net >= 0.85`: ALLIANCE. - `0.50 <= P_net < 0.85`: STRATEGIC_ALIGNMENT. - `0.10 <= P_net < 0.50`: TACTICAL_COOPERATION. - `-0.10 <= P_net < 0.10`: NEUTRAL. - `-0.50 <= P_net < -0.10`: STRATEGIC_FRICTION. - `-0.95 <= P_net < -0.50`: PROXY_WAR. - `P_net < -0.95`: KINETIC_WAR when conflict_severity == "CRITICAL" (Model 28.1 Conflict_Heat >= 80); otherwise PROXY_WAR. - **Kinetic escalation rule:** KINETIC_WAR requires both `P_net < -0.95` and `conflict_severity == "CRITICAL"`. This classification resolves deterministically from schema-declared conflict severity or Model 28.1 outputs with zero hardcoded country configurations. --- ### 27. RHETORIC INTENSITY SCORE - Purpose: Scores hostile targeting, delegitimizing language, sanction threats, and diplomatic norm breaches in political statements on a 0-100 scale. - Target: political.json -> rhetoric_intensity_score - Formula: Rhetoric_Score = (x1 * 0.30) + (x2 * 0.30) + (x3 * 0.20) + (x4 * 0.20) - Machine-Executable Logic (Python): def rhetoric_intensity_score(direct_target, delegitimize, threat, norm_breach): if not all(_is_num(v) for v in (direct_target, delegitimize, threat, norm_breach)): return None x1 = min(100.0, max(0.0, float(direct_target))) x2 = min(100.0, max(0.0, float(delegitimize))) x3 = min(100.0, max(0.0, float(threat))) x4 = min(100.0, max(0.0, float(norm_breach))) score = (x1 * 0.30) + (x2 * 0.30) + (x3 * 0.20) + (x4 * 0.20) return int(round(min(100.0, score))) - Interpretation: - Rhetoric_Score >= 80 : HOSTILE_TARGETING (Severe hostility / Existential targeting) - 50 <= Rhetoric_Score < 80 : AGGRESSIVE_POLEMIC (Polarizing and aggressive political conflict) - 25 <= Rhetoric_Score < 50 : MODERATE_CRITICISM (Firm but bounded political criticism) - Rhetoric_Score < 25 : DIPLOMATIC_DISCOURSE (Measured / Routine diplomatic language) --- ### 27.1. COMPOSITE TENSION SCORE - Purpose: Synthesizes rhetoric intensity with institutional and alliance friction to determine balanced political tension on a 0-100 scale. - Formula: Composite_Tension = (Rhetoric_Score * 0.50) + (Alliance_Friction * 0.50) - Machine-Executable Logic (Python): def composite_tension(rhetoric, alliance_friction): if not (_is_num(rhetoric) and _is_num(alliance_friction)): return None r = min(100.0, max(0.0, float(rhetoric))) a = min(100.0, max(0.0, float(alliance_friction))) return int(round((r * 0.50) + (a * 0.50))) - Interpretation: - Tension >= 75 : CRITICAL_POLITICAL_CRISIS (Government/Alliance fracture, systemic gridlock) - 50 <= Tension < 75 : HIGH_TENSION (Severe political polarization) - 25 <= Tension < 50 : MODERATE_FRICTION (Routine political friction) - Tension < 25 : STABLE_POLITICAL_CLIMATE (Robust alliance / Political stability) --- ### 28. COMPOSITE STRATEGIC SCORE - Purpose: Generates a holistic sovereign macro-strategic risk score on a 0-100 scale by synthesizing internal political stability, defense doctrine, geopolitical polarization, and economic/infrastructure vulnerability. - Target: country.json -> composite_strategic_score - Formula: Composite_Strategic_Score = (pol * 0.25) + (defense * 0.35) + (geo * 0.20) + (vuln * 0.20) - Machine-Executable Logic (Python): def composite_strategic_score(pol, defense, geo, vuln): if not all(_is_num(v) for v in (pol, defense, geo, vuln)): return None p = min(100.0, max(0.0, float(pol))) d = min(100.0, max(0.0, float(defense))) g = min(100.0, max(0.0, float(geo))) v = min(100.0, max(0.0, float(vuln))) score = int(round(p * 0.25 + d * 0.35 + g * 0.20 + v * 0.20)) if score >= 80: status = "CRITICAL_STRATEGIC_RISK" elif score >= 60: status = "HIGH_STRATEGIC_RISK" elif score >= 40: status = "MODERATE_STRATEGIC_RISK" else: status = "STABLE_SOVEREIGN" return {"composite_strategic_score": score, "status": status} - Interpretation: - Score >= 80 : CRITICAL_STRATEGIC_RISK (Severe geopolitical/domestic crisis; elevated war or sanction risk) - 60 <= Score < 80 : HIGH_STRATEGIC_RISK (High vulnerability and potential conflict threshold) - 40 <= Score < 60 : MODERATE_STRATEGIC_RISK (Manageable regional/domestic dynamic pressure) - Score < 40 : STABLE_SOVEREIGN (Stable and resilient sovereign structure) --- ### 28.1. CONFLICT HEAT SCORE - Purpose: Scores kinetic military conflict, diplomatic friction, and critical infrastructure/trade transit disruption risks on a 0-100 scale. - Target: core_analysis -> conflict_heat - Deterministic Input Normalization (Zero-Guesswork SSOT Mapping): - c1 (kinetic_military): Fixed 4-tier state enum: 0 (no active kinetic conflict / sanctions or administrative friction only), 35 (border/proxy harassment), 70 (direct kinetic strikes), 100 (full-scale war or kinetic blockade). - c2 (geo_tension): max(0.0, -P_net) * 100.0 from llms-relationships.json / llms-country-relationships.json (primary adversarial dyad). - c3 (disruption_risk): Model 28.3 Disruption_Score_100 from llms-relationships.json / llms-graph-chokepoints.json (CATASTROPHIC=100, HIGH=70, MODERATE-HIGH=45, MODERATE=20; 0 if no chokepoint). - Formula: Conflict_Heat = (c1 * 0.40) + (c2 * 0.35) + (c3 * 0.25) - Machine-Executable Logic (Python): def conflict_heat_score(kinetic_military, geo_tension, disruption_risk): if not all(_is_num(v) for v in (kinetic_military, geo_tension, disruption_risk)): return None c1 = min(100.0, max(0.0, float(kinetic_military))) c2 = min(100.0, max(0.0, float(geo_tension))) c3 = min(100.0, max(0.0, float(disruption_risk))) score = (c1 * 0.40) + (c2 * 0.35) + (c3 * 0.25) return int(round(min(100.0, score))) - Interpretation: - Conflict_Heat >= 80 : CRITICAL_KINETIC_ESCALATION (Major war / Chokepoint closure / Acute kinetic escalation) - 55 <= Conflict_Heat < 80 : HIGH_FRICTION (Direct conflict risk / Severe diplomatic crisis) - 30 <= Conflict_Heat < 55 : MODERATE_TENSION (Proxy warfare / Managed regional tension) - Conflict_Heat < 30 : LOW_RISK_ENVIRONMENT (Routine geopolitical baseline) --- ### 28.2. MARKET IMPACT SCORE - Calibration & Weighting Rationale: Multi-Criteria Decision Analysis (MCDA) assigning tripartite normalized weights (35% Asset Volatility, 35% Liquidity Spreads, 30% Macro Transmission). Asset volatility and credit liquidity capture high-frequency market repricing, while macro transmission integrates lower-frequency supply chain spillovers. - Purpose: Synthesizes asset volatility, credit/liquidity spreads, and macro transmission linkages to calculate financial shock severity on a 0-100 scale. - Target: core_analysis -> market_impact_score - Deterministic Input Normalization (Zero-Guesswork Live SITREP Mapping): - m1 (asset_volatility): clamp((cboe_vix_index - 12.0) / 28.0 * 100.0, 0.0, 100.0) from llms-sitrep.json -> macro_liquidity.cboe_vix_index. - m2 (liquidity_spread): clamp((us_high_yield_spread_pct - 2.5) / 5.5 * 100.0, 0.0, 100.0) from llms-sitrep.json -> macro_liquidity.us_high_yield_spread_pct. - m3 (macro_spillover): Active 0-100 domain shock score from llms-sitrep.json (e.g., Model 25.31 EU Gas Shield, Model 28.4 Chokepoint Spillover, or clamp(GSCPI / 3.0 * 100.0, 0.0, 100.0)). - Formula: Market_Impact = (m1 * 0.35) + (m2 * 0.35) + (m3 * 0.30) - Machine-Executable Logic (Python): def market_impact_score(asset_volatility, liquidity_spread, macro_spillover): if not all(_is_num(v) for v in (asset_volatility, liquidity_spread, macro_spillover)): return None m1 = min(100.0, max(0.0, float(asset_volatility))) m2 = min(100.0, max(0.0, float(liquidity_spread))) m3 = min(100.0, max(0.0, float(macro_spillover))) score = (m1 * 0.35) + (m2 * 0.35) + (m3 * 0.30) return int(round(min(100.0, score))) - Interpretation: - Market_Impact >= 75 : SEVERE_MARKET_SHOCK (Global sell-off / Liquidity crisis / Panic) - 50 <= Market_Impact < 75 : ELEVATED_VOLATILITY (Elevated volatility / Rising risk premium) - 25 <= Market_Impact < 50 : MODERATE_REPRICING (Bounded repricing / Localized impact) - Market_Impact < 25 : MUTED_RESPONSE (Markets discount or absorb event / Fully priced in) #### 28.2.1. ENTITY EXPOSURE HEAT (ARTICLE `key_entities[].heat` HELPER RULE) - Purpose: Deterministically scores individual actor/chokepoint `heat` (0-100) in article `key_entities[]` payloads using existing Model 28.1/28.2 event heat, Model 28.3 chokepoint `severity_weight`, and SSOT bilateral polarity (`llms-country-relationships.json` / `llms-relationships.json`) — zero subjective guessing. - Target: Article JSON -> structured_content_analysis.quantitative_data_summary.key_entities[].heat - Formula: Entity_Heat = min(100, round((Base_Event_Heat * Role_Weight) + (Risk_Factor * 25.0))) Where: - Base_Event_Heat: Event's Model 28.2 (market_impact_score) or Model 28.1 (conflict_heat) score. - Role_Weight: 0.85 (Primary anchor/chokepoint), 0.65 (Direct counterparty/transshipment node), 0.45 (Secondary/spillover actor). - Risk_Factor: - CHOKE_* / CORRIDOR_* / BASIN_*: Model 28.3 severity_weight from llms-relationships.json / llms-graph-chokepoints.json (CATASTROPHIC=1.00, HIGH=0.70, MODERATE-HIGH=0.45, MODERATE=0.20). Keep polarity=null. - GEO_*: max(0.0, -P_ssot) where P_ssot is SSOT polarity in [-1.0, 1.0] from llms-country-relationships.json / llms-relationships.json (positive polarity or null adds 0.0). - INST_* / other non-dyad entities: 0.0 (polarity=null). - Machine-Executable Logic (Python): def entity_exposure_heat(base_event_heat, role_weight, p_ssot=None, severity_weight=None): if not all(_is_num(v) for v in (base_event_heat, role_weight)): return None if role_weight not in (0.85, 0.65, 0.45): return None base = min(100.0, max(0.0, float(base_event_heat))) if severity_weight is not None and _is_num(severity_weight): risk = min(1.0, max(0.0, float(severity_weight))) elif p_ssot is not None and _is_num(p_ssot): risk = min(1.0, max(0.0, -float(p_ssot))) else: risk = 0.0 return int(round(min(100.0, (base * float(role_weight)) + (risk * 25.0)))) --- ### 28.3. CHOKEPOINT DISRUPTION SEVERITY ENGINE - Purpose: Converts qualitative Disruption Severity enum values from llms-relationships.txt (Section 4 Chokepoints & Section 7 Strategic Corridors) into normalized numeric weights (0.0 to 1.0) and 0-100 scores. Directly feeds disruption_risk in Model 28.1 and macro_spillover in Model 28.2. - Data Link: llms-relationships.txt -> Section 4 & Section 7 (Disruption Severity Registries) - Input Schema: - severity_enum: "CATASTROPHIC" | "HIGH" | "MODERATE-HIGH" | "MODERATE" - Weights Dictionary: - CATASTROPHIC : 1.00 (Complete dual-direction blockade, global supply shock) - HIGH : 0.70 (Severe disruption, mandatory route diversion) - MODERATE-HIGH : 0.45 (Regional capacity constraint, added ton-mile freight costs) - MODERATE : 0.20 (Localized friction, manageable logistical delays) - Formula: Disruption_Weight = SEVERITY_WEIGHT_MAP[severity_enum] Disruption_Score_100 = Disruption_Weight * 100 - Machine-Executable Logic (Python): SEVERITY_WEIGHT_MAP = { "CATASTROPHIC": 1.00, "HIGH": 0.70, "MODERATE-HIGH": 0.45, "MODERATE": 0.20 } def chokepoint_severity_multiplier(severity_enum): if severity_enum is None or isinstance(severity_enum, bool): return None try: clean_key = str(severity_enum).strip().upper().replace("_", "-") if clean_key not in SEVERITY_WEIGHT_MAP: return None weight = SEVERITY_WEIGHT_MAP[clean_key] score_100 = int(round(weight * 100.0)) return { "severity": clean_key, "weight": weight, "score_100": score_100 } except (TypeError, ValueError, AttributeError): return None - Interpretation: - severity == CATASTROPHIC : weight 1.00 / score 100 (Systemic global shock / Complete dual-direction chokepoint closure) - severity == HIGH : weight 0.70 / score 70 (Severe supply disruption / Freight rates and transit days surge) - severity == MODERATE-HIGH : weight 0.45 / score 45 (Regional logistics bottleneck / Partial capacity loss) - severity == MODERATE : weight 0.20 / score 20 (Low-scale operational pressure / Localized distribution delay) --- ### 28.4. CHOKEPOINT MACRO SPILLOVER BRIDGE - Purpose: Combines the Hormuz severity, bilateral net polarity, transit-flow exposure, bypass-capacity assumption, live EIA SPR inventory, and dynamic PortWatch/MODI effective crisis duration into a 0-100 spillover score. U.S. field production is reported as a context metric only; it is not part of the score formula. - Data Links: - EIA: PET.WCSSTUS1.W (Weekly U.S. Ending Stocks of Crude Oil in SPR - Thousand Barrels) - EIA: PET.WPULEUS3.W (Weekly U.S. Percent Utilization of Refinery Operable Capacity - Percent; drives Formula 28.6 MODI time-dilation alpha) - EIA context metric: PET.WCRFPUS2.W (Weekly U.S. Field Production of Crude Oil - Thousand Barrels per Day) - IMF PortWatch: llms-portwatch.json -> CHOKE_HORMUZ (Asymmetric hysteresis blockade tracker & 2023 baseline AIS shift) - llms-relationships.json -> IL_IR relationship (P_net) and CHOKE_HORMUZ (severity and baseline transit flow) - llms-relationships.txt -> Section 1 (P_net) & Section 4/7 (Disruption Severity) - Local Models -> Model 25.1 (dynamic_polarity_engine), Model 28.1 (conflict_heat_score), Model 28.2 (market_impact_score), Model 28.3 (chokepoint_severity_multiplier), Model 28.6 (MODI) - Mathematical Formulation: 1. Geopolitical Polarity Friction: Friction_Factor = max(0.0, -P_net) (Where P_net in [-1.0, 1.0]; negative values indicate kinetic/diplomatic hostility, positive values indicate detente/alliance with zero friction) 2. Live Physical Buffer & Clamped Net Deficit Ratio: SPR_Sustainable_mbpd = min(4.4, (spr_stocks_kbbl / 1000.0) / 90.0) if spr_stocks_kbbl is not None else spr_release_mbpd Effective_SPR = SPR_Sustainable_mbpd * (1.0 if t <= 60 else (0.50 if t <= 90 else 0.25)) Total_Buffer = min(Gross_Flow, Bypass_Capacity + Effective_SPR) Net_Deficit_Ratio = max(0.0, (Gross_Flow - Total_Buffer) / Gross_Flow) U.S. field production is not added to Total_Buffer; no validated substitution rule is defined here. 3. Dynamic MODI Time-Dilation & Sigmoid Crisis Duration Multiplier (S-Curve): shortage_ratio = clamp((88.0 - refinery_util_pct) / (88.0 - 70.0), 0.0, 1.0) daily_alpha = round(0.20 + 0.80 * shortage_ratio, 4) t_effective += daily_alpha (under PortWatch asymmetric hysteresis: trigger <= -50.0% for 2 runs, reset >= -20.0% for 5 runs, partial recovery decay -2.0d per 5 runs) t = max(1, round(t_effective)) Conditional SPR Runway (when daily_alpha > 0): conditional_days_to_60d_threshold = (60.0 - t_effective) / daily_alpha (if t_effective < 60.0 else null) conditional_days_to_90d_threshold = (90.0 - t_effective) / daily_alpha (if t_effective < 90.0 else null) M_duration(t) = 1.0 / (1.0 + exp(-0.15 * (t - 14.0))) Duration_Scale = 0.40 + 0.60 * M_duration(t) - Empirical Grounding for t0 = 14 Days: Represents the critical global maritime logistics inflection point. Average waterborne transit time for VLCC supertankers from the Persian Gulf to primary Asian/European hubs is 10 to 18 days. Concurrently, global refineries maintain an operational working inventory buffer of 10 to 14 days. Prior to Day 14, disruptions generate financial market panic pricing (OVX/VIX) while pre-loaded floating storage continues to dock; after Day 14, waterborne transit exhausts, refinery storage hits bottom, and acute physical rationing/industrial shutdowns commence. - Day 1: ~0.48 panic pricing; Day 14: ~0.70 operational inventory depletion; Day 30: ~0.95 physical exhaustion; Day 60+: ~1.00 acute structural shock. 4. Final Spillover Score: Base_Shock = (Severity_Weight * Net_Deficit_Ratio * 70.0) + (Friction_Factor * 30.0) Spillover_Score = round(min(100.0, max(0.0, Base_Shock * Duration_Scale))) - Machine-Executable Logic (Python): def chokepoint_transmission_bridge( severity_enum, p_net, duration_days=14, bypass_capacity_mbpd=4.0, spr_stocks_kbbl=None, spr_release_mbpd=None, gross_flow_mbpd=20.5, us_crude_prod_kbpd=None ): if any(v is None or isinstance(v, bool) for v in (severity_enum, p_net)): return None try: # Resolve severity weight via Model 28.3 sev_data = chokepoint_severity_multiplier(severity_enum) if not sev_data: return None w_sev = float(sev_data["weight"]) p_val = float(p_net) if not math.isfinite(p_val): return None pol_clamped = min(1.0, max(-1.0, p_val)) friction = max(0.0, -pol_clamped) # Duration & Physical Bounds t = max(1, int(duration_days)) if duration_days is not None else 14 f_gross = max(0.1, float(gross_flow_mbpd)) if gross_flow_mbpd is not None else 20.5 f_bypass = max(0.0, float(bypass_capacity_mbpd)) if bypass_capacity_mbpd is not None else 4.0 # Dynamic SPR calculation from live EIA stocks (PET.WCSSTUS1.W) if spr_stocks_kbbl is not None and not isinstance(spr_stocks_kbbl, bool): f_spr_kbbl = float(spr_stocks_kbbl) spr_mbbl = f_spr_kbbl / 1000.0 raw_spr = round(min(4.4, max(0.0, spr_mbbl / 90.0)), 2) elif spr_release_mbpd is not None and not isinstance(spr_release_mbpd, bool): raw_spr = max(0.0, float(spr_release_mbpd)) else: return None # SPR Depletion Decay Rule: # <= 60d: 100% capacity | 61-90d: 50% capacity | >90d: 25% emergency reserve if t <= 60: spr_decay = 1.0 elif t <= 90: spr_decay = 0.50 else: spr_decay = 0.25 effective_spr = round(raw_spr * spr_decay, 2) # Net Unmet Deficit with Clamping Guard total_buffer = round(min(f_gross, f_bypass + effective_spr), 2) net_deficit_ratio = round(max(0.0, (f_gross - total_buffer) / f_gross), 4) # Sigmoid Crisis Duration Scaling (Centered at t0=14 with k=0.15) sigmoid_val = 1.0 / (1.0 + math.exp(-0.15 * (t - 14.0))) duration_scale = round(0.40 + 0.60 * sigmoid_val, 4) # Weighted Transmission: 70% physical disruption + 30% geopolitical polarity friction base_shock = (w_sev * net_deficit_ratio * 70.0) + (friction * 30.0) score = int(round(min(100.0, max(0.0, base_shock * duration_scale)))) if score >= 85: transmission_regime = "CRITICAL_SYSTEMIC_SHOCK" elif score >= 60: transmission_regime = "HIGH_SPILLOVER" elif score >= 30: transmission_regime = "MODERATE_FRICTION" else: transmission_regime = "LOCALIZED_IMPACT" return { "bridge_score": score, "transmission_regime": transmission_regime, "inputs": { "severity_weight": w_sev, "friction_factor": round(friction, 2), "duration_days": t, "gross_flow_mbpd": round(f_gross, 2), "bypass_capacity_mbpd": round(f_bypass, 2), "effective_spr_release_mbpd": effective_spr, "net_deficit_ratio": net_deficit_ratio, "duration_scale": duration_scale } } except (TypeError, ValueError, OverflowError): return None - Interpretation: - bridge_score >= 85 : CRITICAL_SYSTEMIC_SHOCK (Full-capacity systemic shock input for 28.1 disruption_risk and 28.2 macro_spillover) - 60 <= bridge_score < 85 : HIGH_SPILLOVER (High pass-through pressure on global commodity/freight prices) - 30 <= bridge_score < 60 : MODERATE_FRICTION (Regional supply chain congestion and localized cost increases) - bridge_score < 30 : LOCALIZED_IMPACT (Market-absorbable limited operational delays) - Duration (14 days in the current runner) and bypass capacity (4.0 mbpd) are scenario assumptions, not live observations. The runner must source P_net, chokepoint severity, and baseline flow from the generated relationship data; absent required values must not be replaced with fixed observations. --- ### 28.5. REGIME-ADJUSTED MARKET IMPACT - Purpose: Scales raw Market Impact Score from Model 28.2 with a deterministic multiplier based on monetary policy stance (Model 2) and financial conditions (Model 12). - Data Links: - llms-formulas-rates-liquidity.txt -> Model 2 (real_policy_rate), Model 12 (financial_conditions_regime) - Local Models -> Model 28.2 (market_impact_score) - Formula: Macro_Multiplier = 1.25 if (Real_Rate > 1.5 or NFCI > 0.0) else (0.75 if (Real_Rate < 0.0 and NFCI < 0.0) else 1.00) Adjusted_Market_Impact = min(100, round(Market_Impact * Macro_Multiplier)) - Machine-Executable Logic (Python): def macro_regime_impact_multiplier(real_rate, nfci_val): if any(v is None or isinstance(v, bool) for v in (real_rate, nfci_val)): return None try: rr = float(real_rate) nf = float(nfci_val) if not (math.isfinite(rr) and math.isfinite(nf)): return None if rr > 1.50 or nf > 0.0: return 1.25 elif rr < 0.0 and nf < 0.0: return 0.75 else: return 1.00 except (TypeError, ValueError): return None def adjusted_market_impact(market_impact_score_val, real_rate, nfci_val): if any(v is None or isinstance(v, bool) for v in (market_impact_score_val, real_rate, nfci_val)): return None try: base_score = float(market_impact_score_val) if not math.isfinite(base_score): return None multiplier = macro_regime_impact_multiplier(real_rate, nfci_val) if multiplier is None: return None final_score = int(round(min(100.0, max(0.0, base_score * multiplier)))) return { "base_market_impact": int(round(base_score)), "macro_multiplier": multiplier, "adjusted_market_impact": final_score } except (TypeError, ValueError): return None - Interpretation: - Multiplier == 1.25 : AMPLIFIED_SHOCK (Tight money / Financial stress / Liquidity constraints amplify crisis shock) - Multiplier == 1.00 : NEUTRAL_PASS_THROUGH (Balanced macro regime / Standard transmission) - Multiplier == 0.75 : DAMPED_LIQUIDITY_IMPACT (Loose liquidity / Excess reserves absorb and cushion shock) --- ### 28.6. MARITIME OBSERVABILITY DIVERGENCE INDEX (MODI) - Purpose: Evaluates the divergence between civilian open-satellite AIS transit telemetry (IMF PortWatch) and physical downstream energy throughput (U.S. EIA Refinery Utilization) to classify physical flow regime and detect AIS transponder darkness / shadow naval escort protocols. - Data Links: - IMF PortWatch: `chokepoint6` (Strait of Hormuz daily vessel count & percentage shift vs 2023 baseline) - EIA: `PET.MOURXUS2.M` / `US_REFINERY_UTILIZATION` (U.S. Refinery Utilization Percentage) - Mathematical Formulation: Divergence_Spread = Refinery_Utilization_Pct - (100.0 + min(0.0, AIS_Shift_Pct)) - Machine-Executable Logic (Python): def maritime_observability_bridge(ais_shift_pct, refinery_util_pct): if any(v is None or isinstance(v, bool) for v in (ais_shift_pct, refinery_util_pct)): return None try: ais_s = float(ais_shift_pct) ref_u = float(refinery_util_pct) if not (math.isfinite(ais_s) and math.isfinite(ref_u)): return None # Observability divergence metric: measures spread between physical refinery draw and visible satellite transits divergence_spread = round(ref_u - (100.0 + min(0.0, ais_s)), 2) # Regime classification if ais_s <= -50.0 and ref_u >= 85.0: status_key = "DIVERGENCE_TRANSPONDER_DARK_FLOW" interpretation = "Civilian satellite open-AIS captures severe contraction; sustained refinery utilization confirms physical transits persist via transponder-dark routing and naval escorts." elif ais_s <= -50.0 and ref_u < 80.0: status_key = "CORROBORATED_PHYSICAL_CONTRACTION" interpretation = "Civilian transit contraction is corroborated by downstream refinery run cuts; physical supply chain disruption confirmed." elif ais_s > -30.0 and ref_u >= 85.0: status_key = "PEACETIME_STABLE_FLOW" interpretation = "Both satellite transit observations and downstream physical processing operate within normal baseline tolerances." else: status_key = "TRANSITIONAL_OBSERVABILITY_BAND" interpretation = "Moderate transit deceleration under active absorption by inventory buffers." return { "status_key": status_key, "divergence_spread": divergence_spread, "ais_shift_pct": round(ais_s, 2), "refinery_util_pct": round(ref_u, 2), "interpretation": interpretation } except (TypeError, ValueError, OverflowError): return None - Interpretation: - DIVERGENCE_TRANSPONDER_DARK_FLOW : Sivil uydu radarındaki sert düşüşe rağmen rafineri talebi tam kapasite devam etmektedir; fiziksel petrol akışının sinyalsiz / gölge filo veya askeri konvoylarla sürdüğünü teyit eder. - CORROBORATED_PHYSICAL_CONTRACTION : Sivil transit düşüşü rafinerilerin de durmasıyla doğrulanmıştır; gerçek fiziki arz kesintisi mevcuttur. - PEACETIME_STABLE_FLOW : Hem geçişler hem de rafineri kullanımı olağan barış dönemi bandındadır. - TRANSITIONAL_OBSERVABILITY_BAND : Geçişlerde orta şiddetli dalgalanma veya stok tamponlama devrededir. --- ### 28.7. MARITIME REROUTE STRAIN & FOOD CASCADE MODEL - Purpose: Quantifies maritime shipping diversion from the Suez Canal (`CHOKE_SUEZ`) to the Cape of Good Hope (`CHOKE_CAPE_OF_GOOD_HOPE`) using IMF PortWatch AIS telemetry (`pct_change_vs_2023`) and tests whether severe reroute strain coincides with global food (`PFOODINDEXM`) or wheat (`PWHEAMTUSDM`) inflation cascades. - Input Standards: - IMF PortWatch: `llms-portwatch.json` -> `CHOKE_SUEZ` `pct_change_vs_2023` (daily %, valid range `[-100, 500]`), `CHOKE_CAPE_OF_GOOD_HOPE` `pct_change_vs_2023` (daily %, valid range `[-100, 500]`) - FRED / IMF Global Food Index: `PFOODINDEXM` YoY % (monthly %, valid range `[-100, 300]`) - FRED / IMF Global Wheat Price: `PWHEAMTUSDM` YoY % (monthly %, valid range `[-100, 300]`) - Formula: - `suez_contraction_pct = max(0.0, -suez_pct_vs_2023)` - `cape_surge_pct = max(0.0, cape_pct_vs_2023)` - `reroute_strain_index = 0.5 * suez_contraction_pct + 0.5 * cape_surge_pct` - `reroute_diversion_ratio = round(cape_surge_pct / suez_contraction_pct, 4)` if `suez_contraction_pct >= 1.0` else `None` - Machine-Executable Logic (Python): ```python def calculate_maritime_reroute_strain( suez_pct_vs_2023: float, cape_pct_vs_2023: float, food_index_yoy_pct: float, wheat_yoy_pct: float, observation_dates: dict = None, observation_frequencies: dict = None, ) -> dict | None: ... ``` - Temporal Integrity: Optional `observation_dates` and `observation_frequencies` require paired valid ISO `YYYY-MM-DD` dates and canonical frequencies (`daily` for PortWatch AIS vs `monthly` for `PFOODINDEXM` / `PWHEAMTUSDM`). `asynchronous_frequencies` is derived strictly from differing canonical frequencies. - Interpretation: - Reroute_Strain >= 40.0 & (PFOODINDEXM_YoY >= 8.0% or PWHEAMTUSDM_YoY >= 25.0%) : MARITIME_REROUTE_FOOD_CASCADE (Suez-to-Cape diversion strain coinciding with food/wheat inflation cascade) - Reroute_Strain >= 40.0 : SEVERE_MARITIME_REROUTE_STRAIN (Severe Suez contraction and Cape of Good Hope transit surge without concurrent food inflation threshold) - Reroute_Strain >= 20.0 : ELEVATED_MARITIME_REROUTE (Moderate maritime rerouting pressure along the Red Sea / Cape corridor) - CHOKE_SUEZ_pct >= -10.0% & CHOKE_CAPE_pct <= 15.0% : NORMALIZED_MARITIME_FLOW (Suez and Cape of Good Hope transit flows near 2023 baseline) - Otherwise : MODERATE_ROUTE_ADJUSTMENT (Transitional shipping route reallocation) --- ### 29. EVIDENCE & SOURCE CONFIDENCE SCORE - Purpose: Evaluates authority, corroboration, and recency of intelligence supporting analytical assertions on a deterministic 0-100 scale. - Input Standards: Explicitly accepts inputs on standard normalized [0.0, 1.0] unit scale (or percentage [0.0, 100.0] via explicit scale="pct"). Eliminates scale guessing heuristics. - Deterministic Input Normalization (Zero-Guesswork Rubric): - authority: 1.0 (official statistical agency / central bank / sovereign registry), 0.7 (institutional research / exchange feed), 0.4 (secondary media / unverified wire). - corroboration: min(1.0, independent_source_count / 3.0). - recency: 1.0 (<= 30 days), 0.8 (31-90 days), 0.6 (91-180 days), 0.4 (> 180 days). - Formula: confidence_score = round((authority * 0.40 + corroboration * 0.35 + recency * 0.25) * 100.0) - Machine-Executable Logic (Python): def confidence_score(authority, confirmation, recency, scale="unit"): if any(v is None or isinstance(v, bool) for v in (authority, confirmation, recency)): return None try: a = float(authority) c = float(confirmation) r = float(recency) if not (math.isfinite(a) and math.isfinite(c) and math.isfinite(r)): return None if scale == "pct": if any(x < 0.0 or x > 100.0 for x in (a, c, r)): return None a, c, r = a / 100.0, c / 100.0, r / 100.0 elif scale == "unit": if any(x < 0.0 or x > 1.0 for x in (a, c, r)): return None else: return None score = int(round((a * 0.40 + c * 0.35 + r * 0.25) * 100.0)) return { "confidence_score": score, "authority_weight": 0.40, "corroboration_weight": 0.35, "recency_weight": 0.25 } except (TypeError, ValueError): return None - Interpretation: - confidence_score >= 80 : HIGH_CONFIDENCE (Triangulated intelligence / Verified official sources) - 50 <= confidence_score < 80 : MODERATE_CONFIDENCE (Single-source official or corroborating secondary reports) - confidence_score < 50 : LOW_CONFIDENCE (Unverified field reports / Elevated analytical uncertainty)