TERM STRUCTURE OF BOOKINGS

Roopanjali Jasrotia
Booking.com Data Science
10 min readJul 20, 2022

--

Introduction

Bookings, cancellations, arrivals: if you’ve ever worked in the travel industry there is a high chance you’ve heard of these terms.

These are some of the key business metrics that every other business action boils down to. Whether it is a new product offering or a brand campaign, these metrics reflect the results.

It’s no surprise then that investors and shareholders are interested in how these metrics evolve over time.

What is unique about them, especially in the context of the travel industry, is their interrelation. You can only cancel as much as you book and the same goes for check-in. More interestingly, the bookings made today give us useful information about the future. For example, you already know in February how busy Easter may be, and a relatively high volume of bookings for a future check-in date may reflect something specific about that period, like a sports event or concert, etc.

This is certainly not true for most retail businesses, where volume forecasts for the future do not have an implication on any other metric except returns.

For our business, the booking curve is critically important to forecast. By “booking curve”, I mean the accumulation of bookings in the weeks leading up to arrival date.

To state the problem simply: a) how do you forecast final arrival volumes from booking volumes, and b) how do you leverage partial information already available regarding future arrivals?

A straightforward and tedious approach would be to forecast individually for every day in the future from the date of booking, but this soon runs into a scaling issue if we need to slice up the data for greater granularity.

Is there a more elegant way to do this? The answer is YES!

In this post, you will learn about

  • a neat solution to forecasting booking curves leveraging the term structure modeling approach
  • incorporating information from the incomplete curves without complex advanced ML architecture

The Forecasting Challenge

Let’s set up the situation. Imagine you are in the pre-pandemic era somewhere in 2018. Your task is to come up with an arrival forecast for the year 2019. The only relevant information you have at this point is historical arrivals and the bookings made so far for future arrivals.

What you need to forecast is the volume of bookings made next week that will arrive in that same week, the number made next week that will arrive in the following week, and so on.

To simplify the problem, we make a couple of assumptions and data transformations:

  1. We assume that we already have a forecast for total booking volume each week. This helps us exercise more control when building various forecasting scenarios. To achieve our objective of forecasting arrivals we then only need to forecast the percentage of bookings (BpctT in equation 1 below) made t weeks prior to check-in that will arrive in a particular week T over a 52-week period.

Credit goes to our colleagues Francesco Scardinia and Zeyuan Li in the CS forecasting team for proposing this metric!

Equation 1:

where:

T is a particular week in the future and t denotes the number of weeks prior to week T, C(T) is the number of check-ins in week T, B(T-t) is the number of bookings made in week T-t, and BpctT(T-t) is the percentage of bookings made in week T-t that check-in in week T

2. We only look at bookings made 0 to 52 weeks before check-in week. (The proportion of bookings made more than 52 weeks in advance is negligible.)

The booking curve in percentage terms can be visualized in the 3D view below.

Figure 1: For every check-in week (y-axis), the percentage of bookings (z-axis) created t weeks before the check-in week (x-axis).

The figure below gives a two dimensional view of the same curve.

Figure 2: Percentage of bookings (y axis) created t weeks before the check-in week (x axis) that check in on a particular check-in week (represented by the lines). The shape of the curves differ due to seasonality in booking patterns.

Our task is to forecast these curves for every check-in week. Depending on the desired level of granularity of the forecast, this problem can easily require forecasting 1000 to more than 300,000 series. Enter term structure models.

Analogies with Term Structure Models

As pointed out earlier, this forecasting setup is common in the travel industry and is known by various terms: dynamic hotel booking, advance booking models, etc. The documented approaches range from classical techniques like pick-up models, linear regression, and curve similarity, to more complicated machine learning (ML) methods like support vector machines and neural networks[1]. While the ML based approaches can potentially capture complex bookings patterns much better than the classical methods, they require a more in-depth understanding prior to implementation. We haven’t tried all these techniques, but that is a topic for another blog.

Given how we have framed our problem, we need good estimates for the booking curve. It turns out that a similar problem is observed in the financial domain: bond term structure or yield curve prediction.

A yield curve is a line that plots yields (interest rates) of bonds having equal credit quality but differing maturity dates. The slope of the yield curve gives an idea of future interest rate changes and economic activity. …. is used as a benchmark for other debt in the market ….. and it is used to predict changes in economic output and growthInvestopedia

Figure 3: Different shapes of the yield curves.

Policy makers are interested in good estimates of the term structure of interest rates.[2] Various curve fitting spline methods, from quadratic to cubic to B-splines have been introduced, but these methods have been criticized for having undesirable economic properties and for being “black box” models.

Nelson and Siegel suggested parametric curves that are flexible enough to describe a whole family of observed term structure shapes. These models are parsimonious, they are consistent with a factor interpretation of the term structure and they have both been widely used in academia and in practice[2]. Parametric models can help us explain the curve and reconstruct it when needed, an advantage over black box models.

Credit goes to my colleague Kai Ming Lee for drawing the analogy between these term structure models and our very own booking curve, as well as guiding the effort to implement it.

In the next section we will learn about what these models are and how to implement them for our use case.

Implementation of the Nelson-Siegel Model

The Nelson-Siegel Curve can be defined by the following formula:

Equation 2:

where t is time to maturity, β0, β1, β2 and τ1 are coefficients, with τ1 > 0.

Let’s look at the parameters a bit closely and see what they mean, especially in context of the booking curve.

Figure 4: Components of the Nelson-Siegel model.

  1. β0 is a constant and is interpreted as the long term level. The contribution of the other two terms vanishes as t approaches infinity. Because we do not have reservations that check in more than one year in the future, this term should be essentially zero.
  2. The second term introduces an exponential time decay that becomes slower the bigger τ1 is. When the time to maturity approaches zero, only the slope component vanishes and the percentage converges to β0 + β1. This would be the percentage of check-ins that happen the same week they are booked.
  3. The third term produces either a hump (if β2 is positive) or a trough (if β2 is negative) that occurs at a time governed by τ1.

Calibration of the parameters is based on ordinary least squares for the betas and nonlinear optimization for τ1.

These parameters can describe the entire booking curve with reasonable fidelity. Figure 5 illustrates the comparison of three curve estimation techniques with the actual booking curve for a particular check-in week. The Nelson-Siegel curve gives the best fit in this case.

Figure 5: Comparison of curve estimation techniques. The curve labeled as “custom function for curve fitting” (red dashed line) was defined as f(t) = b0+b1exp-t+b3

The next step after estimating the parameters of the existing booking curves is to be able to forecast them. Figure 6 shows the evolution of these parameters over time.

Figure 6: Time variation of the Nelson-Siegel curve equation parameters

A decomposition of these time series reveals that each of these have a trend and seasonality component. To model these components, I went with Prophet, using the extra holiday regressor (see Figure 7). Then we reconstruct the future curves using these parameters and the formula in equation 1.

Figure 7: Time variation of the actual and forecasted Nelson-Siegel curve parameters.

Leveraging information from partial data

But hang on — what about the information we already have about future check-ins? Remember, the goal is to predict the eventual number of reservations that will be checking in in a particular future week. For each week in the future we already have many reservations booked a long time in advance with check-ins during that week. So, some part of our booking curve already exists, and we can use that information to make a better forecast for the rest of the curve.

Figure 8 illustrates these incomplete curves.

Figure 8: Incomplete curves for check-in weeks in 2019, taking into account only bookings that have already been made through the end of 2018. Percentage of bookings (y axis) created t weeks before the check-in week (x axis) that check in in a particular check-in week (represented by the lines).

To incorporate information from these incomplete curves we put in place a simple additive rescale factor. We add the mean difference between the available points and the forecasted portion for those points to the rest of the forecasted curve. Figure 9 below illustrates this with an animation. Here the blue line is the original forecast of the curve, and the red line is the rescaled forecast, which incorporates information from the incomplete curve (black line).

Figure 9: Rescaling of forecasted curve, based on mean difference between forecasted and actual points of the incomplete curve.

Validation

Now that we have all the forecasted curves, we use them to get forecasted check-in volumes from known or forecasted gross bookings using equation 1 described earlier.

It is time to check our final check-in volume and compare it with the actuals. Our training data was the period 2014 to 2018. We now compare actual check-in volume for 2019 with our forecast and calculate the accuracy for the entire one year horizon.

Figure 10: Actual check-in volume compared with the forecasts.

The forecast from the Nelson-Siegel approach is more aligned with actuals than the baseline approach. Here the baseline approach is to forecast every point in the curve independently for every check-in week. This amounts to 52 forecasts for each check-in week.

We use MAPE (mean absolute percentage error) to quantify the variances. The Nelson-Siegel approach gives the lowest overall variance. Moreover, we also see that the forecast with rescaling gives us a lower MAPE.

Table 1: Overall percentage error of forecasts vs actuals

Figure 11: Weekly percentage error of forecasts vs actuals.

Recap and Future Work

Recap

Let’s zoom out to see what we were able to achieve with the “term structure” view on hotel bookings:

  1. Forecast the entire booking curve using only 4 parameters
  2. Leverage the information from the incomplete curves
  3. Achieve better accuracy than the baseline approach
  4. Give additional insight on the book window pattern

The approach is also better during the pandemic and post-pandemic periods, although booking trends were certainly not as stable during that time.

Future Work

We have explored a variety of other possibilities, including the Nelson-Siegel-Svensson generalization, non-parametric curve fitting, and vector autoregression of parameters (to account for correlations). However, we find that the Nelson-Siegel model as presented here gives us the best balance between accuracy and explainability. We continue to explore alternative forecasting frameworks, e.g. forecasting cancellation rates and directly forecasting reservation volumes.

References

[1]Rachel Yueqian Zhang, Forecasting Hotel Demand Using Machine Learning Approaches

[2]Jan Annaert , Anouk G.P. Claes, Marc J.K. De Ceuster a , Hairui Zhang, Estimating the Yield Curve Using the Nelson-Siegel Model: A Ridge Regression Approach (2012), International Review of Economics & Finance, Forthcoming

--

--