Price Prediction

Optimizing sourcing costs with deep learning


Our client is a global freight forwarder. This logistic business consists in arranging transport for a lot of customers from point A and ship them all to point B, booking spaces to ocean and air carriers for long-haul and local truck providers for smaller distances. One of the core activity is therefore the ability for our client to negotiate the best space agreements with carriers, in order to get available spaces at a bargained rate at any time, and therefore ensure competitive prices to their customers. In mid 2015 the container market was disrupted with rates falling down to historic low level. This change was mainly due to an increase of the carrier capacity and a global reduction of activities, breaking the balance between supply and demand. Since then, future rates have been even harder to predict, even for sea transport experts. Our client needed to have some visibility on the rate values to secure its bookings in advance and stay competitive. The route from Asia to Northern Europe is an important shipping road for our client who already started to collect many years of historical transaction data on this route. MFG Labs mission was to identify the factors impacting rates, and build a prediction algorithm to provide next month median rate on Asia-North Europe.

Container ship


Container rates are hard to predict because they are very volatile, so MFG Labs team decided to run this project in 3 steps

  1. Container Rate analytics
  2. Choice of the best model
  3. Performance

1. Understand container rate dynamic through analytics

The purpose was to analyse the rates dynamism regarding various KPIs :

  • Comparison of the rate between different carriers
  • Identification of high-medium-low pricing carriers
  • Identification of a carrier trend setter if there is one
  • Comparisons between 40’ and 20’ containers rates
  • Analysis of rate seasonality
  • Rate Variation between different ports of loading and ports of delivery
  • Impact of macro-economic KPIs, carrier strategy, holidays, capacity etc on the rate

Seasonality containers rate

This analysis was essential to understand the shipping market.

First it enabled to identify and reduce the prediction scope : 40’ containers on Shanghai - Le Havre. Indeed, this specific road turned to be representative of the whole trade activity, and from 40’ rate you can deduce other containers price.

Secondly, we provided key insights to our client about the main factors influencing rates. These actionable insights have been taken into account by procurement teams in their daily operations, and bargaining strategies.

Finally, we built an exhaustive feature engineering input to feed our predictive model.

2. Chose the best model

Once you have the data and the best inputs, you need to choose the model that best fits your project.

Model best project

MFG Labs team experimented frequentist and bayesian models, that are quite common to run a forecast. This test and learn phase is crucial to understand what the model is doing. However, due to the complexity of the factors influencing over the rate, the performance of these models was not satisfying.

We thus looked at neural network models. Such models do not help to understand the results (i.e what is happening in the various layers is a bit of a black box) but are quite powerful when it comes to making prediction. Indeed, at this stage of the project, our objective was mainly to focus on performance rather than interpretation. In order to integrate temporality in the process, we ended up with a recurrent neural network.

We decided to run the model with +100 sets of hyper-parameters to get the best fit between available data and container rate. We considered that our model performs accurately if the prediction is close enough to the actual rate and within a predefined “performance interval”. Top 5 models were selected, and we took into account the average of their output as the final rate.

Top 5 models zone

3. Improving Performance

Each month, MFG Labs provides a rate prediction for the following month, and measures the performance of previous month forecast. This regular monitoring allows us to detect new factors that might impact the market rate, and if needed, to improve the feature engineering with the actual findings.


A prediction of the container rate each month, based on a tailor made recurrent neural network, with a performance error of 10%.

Thanks to this regular forecast, our client has the ability to negotiate container price with carrier companies one month ahead with increased Market Intelligence.