Skip to content
readingthenarrowsPublic

About

Shipping chokepoint monitor (Red Sea, Suez, Hormuz, Malacca) with daily ship traffic, alerts and Asia–Europe container freight forecasts, scored in public. Supply chain risk for procurement.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Narrows · Shipping chokepoint monitor and container freight forecasts

Red Sea, Suez, Hormuz, Bab el-Mandeb, Malacca, Cape of Good Hope, Gibraltar: daily ship traffic, alerts, and public, timestamped forecasts of Asia–Europe container freight rates.

Daily data Prediction-market odds Tests Python 3.11 License: MIT

English · Français · Website

Narrows watches ship traffic through six maritime chokepoints and forecasts what it means for Asia–Europe container freight, one and four weeks ahead. Every forecast is committed here before the outcome is known, then scored against reality and against a "nothing changes" baseline.

  • Website: readingthenarrows.github.io (launch planned for 17 December 2026)
  • Weekly locked forecasts start in January 2027. Star or watch the repository to follow them.

Who it is for

  • Procurement and supply chain teams importing from Asia: is a disruption at Suez or Hormuz about to move my landed cost or lead time?
  • Freight and commodity analysts: an open, reproducible dataset of chokepoint transits since 2019, with a normal per week of the year and alert levels.
  • Forecasting and data science: a walk-forward backtest with a proper scoring rule (RPS), honest baselines, and a public track record including misses.

How it works

flowchart LR
    A[Daily collection] --> B[Normal traffic<br/>per strait]
    B --> C[Alerts<br/>green / orange / red]
    C --> D[Model]
    D --> E[Forecasts locked<br/>every Thursday]
    E --> F[Scores vs<br/>'nothing changes']
Loading
  1. Collect. GitHub Actions gather traffic, freight, futures, market and news data every day.
  2. Normal and alerts. For each strait, the normal is the mean of the same ISO week in 2019 and January–October 2023. Orange beyond 2 usual variations, red beyond 3.
  3. Forecast. 6 variables × 2 horizons (1 and 4 weeks) = 12 forecasts a week, each given as probabilities of down / stable / up: Drewry WCI Shanghai → Rotterdam and Shanghai → Genoa; transits at Suez, Bab el-Mandeb and Hormuz; the Cape of Good Hope's share of Suez + Cape traffic.
  4. Score. Ranked probability score (RPS), compared with the historical frequencies of each class.

The six chokepoints: Malacca, Hormuz, Bab el-Mandeb, Suez, the Cape of Good Hope and Gibraltar.

Backtest so far

Walk-forward test since January 2024: each week the model only uses what was known on the Thursday. "Gain" is the RPS improvement over the "nothing changes" baseline.

Forecast 1 week 4 weeks
Suez transits +15 % +8 %
Bab el-Mandeb transits +13 % +5 %
Cape share +9 % +1 %
Hormuz transits +3 % +2 %

Sources: traffic_backtest_summary.csv and, for freight rates, champion_record_summary.csv. Hormuz and the Cape share are flagged low reliability: the 2026 Hormuz crisis has no equivalent in the history.

Data sources

Role Series Source Frequency In this repository
Forecast Drewry WCI Shanghai → Rotterdam, Shanghai → Genoa (Shanghai → Los Angeles as control) drewry.co.uk Weekly (Thu) No, see below
Forecast / signal Strait transits and port calls IMF PortWatch Daily, updated weekly Yes
Signal INE container freight (Europe) futures, front month and curve INE via Sina Daily Yes
Signal Brent crude, heating oil, EUR/USD Yahoo Finance Daily Yes
Signal Events and articles near the routes GDELT via Google BigQuery Daily Yes
Comparison Odds on chokepoint markets Polymarket, Kalshi public APIs Hourly Yes
Context Maersk B, Hapag-Lloyd share prices Yahoo Finance Daily Yes
Context HARPEX charter index, bunker prices harperpetersen.com, shipandbunker.com Weekly / daily Yes

Drewry data stays private. Drewry's World Container Index is published for personal use. Narrows collects it into a private repository and never republishes the series here. The forecast records in this repository keep our probabilities, the outcome class and the scores, without the underlying rates.

Yahoo Finance and Sina are unofficial endpoints: the daily run fails loudly if a core source stops answering.

Repository layout

config/                  model settings and news families
narrows/sources/         one module per data source
narrows/alerts.py        normal traffic and alerts per strait
narrows/model/           features and forecasting engines
scripts/collect.py       daily, hourly and backfill runs, writes data/status.json
scripts/                 backtests and model comparisons
data/clean/              tidy CSV files, one per source
data/model/              backtest scores and forecast records
.github/workflows/       automated collection and tests

Run locally

pip install -r requirements.txt
python scripts/collect.py odds      # needs no credentials
python -m pytest -q tests

The full daily run also needs Google BigQuery credentials (GCP_SA_KEY, GCP_PROJECT) and a checkout of the private Drewry repository in private/ (or wherever NARROWS_PRIVATE points).

Cite

If you use Narrows in research, GitHub's Cite this repository button gives a ready reference (CITATION.cff).

Author

Built by Ethan Breysse, MSc Supply Chain (SKEMA): LinkedIn · GitHub

License

Code under the MIT license. Data keeps the terms of its source.

Information only. Not investment advice, and no bets are placed.

About

Shipping chokepoint monitor (Red Sea, Suez, Hormuz, Malacca) with daily ship traffic, alerts and Asia–Europe container freight forecasts, scored in public. Supply chain risk for procurement.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages