Empty Container Forecasting: How We Extended Planning Horizon from 1 Week to 9 Weeks

Written by:

E

Editorial Team

DSG.AI

Most academic papers on empty container forecasting treat it as an optimization problem. Here is what the academic papers miss: the limiting factor in production is not the algorithm. It is the data pipeline, the integration with booking systems, and the operational trust that gets a model's output into a planner's decision workflow.

This is a production account. A tier-1 global container carrier went from 1 week of forward visibility on empty container repositioning to 9 weeks. The architecture, the data challenges, and the specific places where ML-based forecasting beats heuristic planning are covered below.

What empty container forecasting actually means

Empty container repositioning is one of the largest cost items in liner shipping. When cargo imbalances leave containers in the wrong location, with too many empties in Asia, not enough in Europe: the carrier pays to move them. The cost is direct (vessel slot consumption, trucking, port handling) and indirect (missed revenue from trade lanes that can't be served because equipment isn't available).

Forecasting helps by predicting where empties will be, in what quantity, at what future time. With accurate predictions across a meaningful horizon, planners can pre-position before imbalances peak rather than reacting after they develop.

The "horizon" (how far forward the forecast is reliable) is the single most operationally useful metric. A 1-week forecast covers the near term but leaves no room for the repositioning moves that need to be booked 3-6 weeks in advance. A 9-week forecast covers those decisions.

Why 1 week was the ceiling before ML

The carrier's planning team had been using a combination of booking data and historical patterns to forecast empty availability. The process:

  • Pull current positioning from the TOS (terminal operating system) and equipment management system
  • Overlay confirmed bookings (typically 2-3 weeks of firm bookings at any point)
  • Apply historical averages for how imbalances develop over seasonal patterns

This approach breaks down at 2-3 weeks because confirmed bookings thin out. At 4 weeks and beyond, the only reliable input is historical seasonality and for anything beyond that, the plan was effectively a guess refined weekly.

The result was reactive repositioning. Planners became very good at reacting to imbalances 1-2 weeks out. They had no systematic way to anticipate them 4-9 weeks out.

What the ML model adds

The ML approach expanded the useful forecast horizon by incorporating signals that aren't captured in confirmed booking data:

Provisional bookings and shipper intent signals. Confirmed bookings are a trailing indicator. Provisional bookings, quote requests, and shipper-submitted cargo plans are earlier signals of where demand is developing. Integrating these into the feature set extends the reliable forecast window by 3-4 weeks on its own.

Port pair imbalance patterns. Trade lane imbalances are not random. The Asia-Europe imbalance develops on a predictable seasonal cycle with year-on-year correlation. The model learned these patterns from 5 years of historical booking and repositioning data. For known seasonal cycles, the model can forecast imbalances 8-10 weeks out with reasonable accuracy.

Dwell time and gate-out velocity. Empty containers sitting at a depot have a predictable release pattern based on the port, the trade lane, and the time of year. Integrating dwell time and gate-out velocity from the equipment tracking system improved forecast accuracy for the first 3 weeks significantly, and those first-3-week accuracy improvements compounded into more reliable medium-range forecasts.

Carrier capacity signals. Published vessel schedules and blank sailing announcements are public data that directly affect empty container accumulation patterns. A blank sailing on the Asia-USWC trade lane changes the timeline for when empties return to Asia. The model ingests carrier schedule data and adjusts accordingly.

Features that don't add value

The academic literature on empty container forecasting frequently cites commodity price indices, macroeconomic indicators, and shipping demand indices as useful features. In production:

  • Commodity price indices have too much noise relative to signal at the 4-9 week horizon.
  • GDP and trade volume indicators are too lagged and too coarse to improve depot-level forecasts.
  • Shipping demand indices (like the Shanghai Containerized Freight Index) are useful for route-level trend awareness but not for depot-level forecasting granularity.

The features that matter are operational: booking data at multiple stages of confirmation, equipment tracking, port dwell times, and vessel schedule changes. This is consistent with what the February 2026 systematic review of ML in seaport-hinterland networks found (Taylor and Francis, International Journal of Production Research, 2026): practical implementations converge on operational data, not market indices.

The architecture in production

Data integration: the hard part

The model itself is a gradient boosting ensemble (XGBoost, with a transformer layer for sequence patterns in the booking data). The architecture is not the hard part.

The hard part is integrating the data sources reliably:

Equipment management system (EMS). Real-time equipment positioning is the ground truth for current empty inventories by depot and port; EMS integration required a dedicated API connection: the batch exports that the planning team had been using were too stale for the shorter forecast windows.

Booking system. Booking data comes in multiple stages: provisional, confirmed, bill of lading issued. Each stage has different data quality and different forecast utility. The pipeline processes all three, labels them by confirmation stage, and the model has learned which stages are reliable at which horizons.

Port and terminal data. Dwell time and gate-out velocity came from terminal operating system exports. Three of the carrier's ports export this data in incompatible formats; a normalization layer converts them to a common schema before feeding the feature pipeline.

Vessel schedules. Published carrier schedules are scraped from carrier APIs and third-party schedule providers. Blank sailing announcements are monitored via a change-detection process that flags schedule modifications within 24 hours of publication.

The output: what planners actually use

The model produces a weekly forecast for each depot in the coverage network: expected empty stock at the start of each of the next 9 weeks, with confidence intervals. The output is served into the planning team's existing workflow (not a new tool; an API integration into the planning platform they already use).

The forecast is actionable when it shows a developing shortage or surplus at a depot 5-9 weeks out. That is the window in which the repositioning options are: vessel slot allocation (the most cost-effective), cross-trade repositioning (moderate cost), or emergency repositioning (most expensive, least desirable). A 9-week horizon gives planners access to all three options. A 1-week horizon gives them only the last one.

What improved and what didn't

After deployment:

Improved significantly: Forecast accuracy at 4-8 weeks (MAPE dropped from unacceptable to operationally useful). Reactive repositioning events at the carrier's 12 highest-volume depots fell measurably (not published at the carrier's request). Planning team reported that the 9-week horizon changed the nature of their weekly meetings from crisis management to forward planning.

Improved modestly: Accuracy at 1-3 weeks (the existing heuristic was already doing reasonably well here; the ML model improved it by 15-20% on average but this was not the primary target).

Not improved: Extreme disruption events (port strikes, major weather events, geopolitical shocks). The model has no predictive power on low-frequency, high-impact events that break the historical patterns. These are handled by planners applying judgment to the model's outputs, not by the model itself. This is the correct division of labor.

Why the SERP won't tell you this

The Google search results for "empty container forecasting machine learning" return papers from Springer Nature (2022), NCBI/PMC, arXiv, and ResearchGate. The academic literature is valuable: those papers map the problem space well. What they cannot tell you is what breaks in production.

What breaks in production: EMS API reliability, booking data stage-tagging discipline, the coordination required to get planners to trust a model's 8-week output when their instinct (and historical performance) is calibrated on 1-week decisions, and the governance process for when a planner overrides the model.

The 9-week horizon was not the technical achievement. Getting planners to route decisions through it was.


Further reading: Vessel ETA Prediction in Production: What the Academic Papers Don't Tell You covers the same practitioner-vs-academic gap for ETA prediction. Demurrage Prediction: The AI Project That Pays for Itself in One Quarter covers the adjacent D&D prediction problem. Freight Rate Forecasting with Machine Learning: Replacing Analyst Estimates with a Live Model covers the commercial AI side of the same domain.

Sources

  1. Taylor and Francis, International Journal of Production Research: A systematic review of machine learning in seaport-hinterland networks, February 2026. Reviews 2008-2025 ML implementations in port logistics.
  2. DSG.AI: first-party data from production deployment at a tier-1 global container carrier; 1-week to 9-week planning horizon extension, measured operational outcomes. Carrier identity not disclosed.
<!-- related-links:start (auto-managed by seo/sync-internal-links.mjs) -->

Related

<!-- related-links:end -->