Skip to content

persiangulf-research/hormuz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

150 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hormuz Gambit β€” Geopolitical & Geoeconomics Analyst Platform

Game-theoretic analysis of the 2026 Iran War and Iran's de-dollarisation strategy.

Introdction to use analyst platform for strategic briefing and event classification

Workstreams.1.mov

πŸš€ Deploy to GitHub Pages

  1. Push this entire folder to a GitHub repository
  2. Go to Settings β†’ Pages β†’ Source: Deploy from branch β†’ main β†’ / (root)
  3. Live at https://yourusername.github.io/hormuz/index.html

πŸ“ File Structure

github_site/
β”œβ”€β”€ index.html             ← Public portal with breaking news banner
β”œβ”€β”€ admin.html            ← Admin control panel (parameter calibration)
β”œβ”€β”€ params.json           ← Shared parameters file (AI analysis + Brent)
β”œβ”€β”€ README.md
β”‚
β”œβ”€β”€ eq4/                  ← Equation 4: U.S. accommodation vs escalation
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ css/style.css
β”‚   └── js/main.js
β”‚
β”œβ”€β”€ eq5/                  ← Equation 5: Iran closure decision
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ css/style.css
β”‚   └── js/main.js
β”‚
β”œβ”€β”€ eq7/                  ← Equation 7: Swing producer cascade
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ css/style.css
β”‚   └── js/main.js
β”‚
β”œβ”€β”€ eq8/                  ← Equation 8: Dollar hegemony decay
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ css/style.css
β”‚   └── js/main.js
β”‚
└── eq12/                 ← Equation 12: Sanctions relief threshold
    β”œβ”€β”€ index.html
    β”œβ”€β”€ css/style.css
    └── js/main.js

βš™οΈ Admin Panel Workflow

The admin.html panel manages model parameters via AI calibration:

1. Setup (One-Time)

Get free API keys:

Enter keys in admin panel β†’ Click "Save keys" (stored in browser localStorage only)

2. Calibration Workflow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  1. Fetch Brent Oil Price                        β”‚
β”‚     β€’ Auto-scrapes oilprice.com (every 5 min)    β”‚
β”‚     β€’ Fallback: Yahoo Finance                    β”‚
β”‚     β€’ Manual override available                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  2. Fetch Headlines                              β”‚
β”‚     β€’ Guardian API (customizable keywords)       β”‚
β”‚     β€’ Auto-labeled by equation (Eq.4-12)        β”‚
β”‚     β€’ 24h lookback (configurable)               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  3. Run Claude Calibration                       β”‚
β”‚     β€’ AI analyzes headlines + Brent price        β”‚
β”‚     β€’ Updates 12 model parameters               β”‚
β”‚     β€’ Provides justifications + confidence       β”‚
β”‚     β€’ Stores changelog (learning tool)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  4. Review & Publish                            β”‚
β”‚     β€’ View changelog history (insights)         β”‚
β”‚     β€’ Add analyst notes                         β”‚
β”‚     β€’ Download params.json                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  5. Deploy to GitHub                            β”‚
β”‚     β€’ git add github_site/params.json           β”‚
β”‚     β€’ git commit -m "Update params"             β”‚
β”‚     β€’ git push                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  6. Portal Auto-Updates                         β”‚
β”‚     β€’ index.html fetches params.json (10 min)   β”‚
β”‚     β€’ All equation pages update                 β”‚
β”‚     β€’ Banner shows dynamic AI analysis          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š Model Parameters (12 total)

Symbol Name Range Description
c Credibility 0.0-1.0 Iran closure threat credibility (0=bluff, 1=certain)
E Base escalation cost 1-15 U.S. military intervention base cost
m Geographic multiplier 1.0-5.0 Hormuz chokepoint impact (~3.0 = 20% global oil)
H Hegemony loss 1-12 U.S. dollar dominance erosion
G Iran yuan gain 1-15 Iran benefit from yuan adoption
S Sanctions cost 1-15 Iran economic damage from sanctions
Sr Sanctions relief 0-25 Sanctions relief amount (OFAC/SWIFT)
k Cascade switchers 0-10 Swing producers switching to yuan
nu Network gain 1-8 Utility gain per yuan switcher
Ps U.S. guarantee value 5-20 U.S. security guarantee value to allies
rhoI Iran decay rate 0.005-0.15 Iran's erosion rate from yuan settlements
n Swing states 0-5 Number of swing producer states

Derived Metrics:

  • E* (Effective escalation cost): E Γ— [1 + c(mβˆ’1)]
  • Dominance margin: G + S - Sr (positive = trap active)
  • Sr coverage: Sr/(G+S) Γ— 100%

Learning Workflow:

After 10 calibrations, you notice:
β€’ Eq.5 headlines (attacks) β†’ Always boost 'c' (HIGH confidence)
β€’ Eq.12 headlines β†’ Only move 'Sr' when containing "OFAC/SWIFT"
β€’ Eq.7 headlines (yuan switching) β†’ Gradual 'H'/'G' increases
β€’ Brent >$90 β†’ c parameter jumps significantly

Use these insights to:
βœ“ Refine search keywords
βœ“ Write better analyst notes
βœ“ Understand model sensitivity
βœ“ Predict parameter moves

πŸ”’ Data Privacy

Data Type Storage Shared?
API Keys Browser localStorage ❌ Never (private)
Changelog Browser localStorage ❌ Never (learning tool)
Parameters GitHub (params.json) βœ… Yes (public)
Headlines Session memory ❌ No (cleared on refresh)

Zero server costs - everything runs in browser or GitHub Pages.


πŸ†• Adding a New Analysis

  1. Create folder: /eqXX/
  2. Add files:
    • index.html (copy from existing eq folder)
    • css/style.css (shared stylesheet)
    • js/main.js (equation-specific logic)
  3. Update index.html in root:
    • Change .card.coming to .card.live
    • Add correct href to /eqXX/
  4. Ensure equation page fetches params.json:
    fetch('../params.json')
      .then(r => r.json())
      .then(p => {
        // Use parameters in visualization
      });

πŸ“‘ Analyses

see Article https://persian-gulf.medium.com/the-hormuz-strait-coalition-why-a-naval-coalition-cannot-break-irans-trap-f05cd274bf95

ID Equation Status Path Description
001 E* = EΓ—[1 + c(mβˆ’1)] βœ… Live /eq5/ Hormuz Commitment Device
002 a* = argmax min U_A βœ… Live /eq4/ U.S. Dominant Strategy
003 Gs + kΞ½ > Ps(1βˆ’Ξ΄)^k βœ… Live /eq7/ Swing Producer Cascade
004 Sr β‰₯ G+S βœ… Live /eq12/ Sanctions Relief Threshold
005 H_{t+1} = H_t(1βˆ’ΟIβˆ’nt·ρS) βœ… Live /eq8/ Hegemony Decay

πŸ› οΈ Tech Stack

  • Frontend: Pure HTML/CSS/JavaScript (no frameworks)
  • APIs:
    • Guardian API (news headlines)
    • Anthropic Claude API (AI calibration)
    • oilprice.com scraper (Brent crude)
    • Yahoo Finance fallback (Brent crude backup)
  • Storage:
    • localStorage (API keys, changelog)
    • GitHub Pages (params.json, static site)
  • Deployment: GitHub Pages (zero cost, auto-updates)

🎯 Key Features

βœ… Auto-scraping Brent price (every 5 minutes)
βœ… Guardian API integration (headline fetching)
βœ… Claude AI calibration (parameter updates)
βœ… Changelog tracking (learn from past calibrations)
βœ… Manual overrides (full control)
βœ… Dynamic banner (shows AI analysis from params.json)
βœ… Slower scrolling (60s cycle for readability)
βœ… Bigger fonts (15px for visibility)
βœ… Zero server costs (browser + GitHub Pages)
βœ… Privacy-first (API keys never leave browser)
βœ… Real-time portal updates (params.json auto-fetch)


πŸ“„ License

MIT License - Free to use and modify for research purposes.


πŸ”— Links


πŸ“… Scenario Timeline

Date Event
28 FEB 2026 Crisis begins - Hormuz closure
23 MAR 2026 Trump-Iran talks signal, Brent volatile

Current Crisis Metrics:

  • Brent $105+ (up 18% on invasion)
  • Trap Status Active (dominance margin > 0)
  • Primary Threat Military escalation + Bab al-Mandan leverage

About

Hormuz Gambit, a game-theoretic research platform tracking the 2026 #IranWar through interactive mathematical models. The platform is designed to model a "dominant strategy trap" where Iran utilizes its geographic leverage to impose high escalation costs on the U.S. while bypassing sanctions via yuan-based trade

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors