Leveraging Causal Inference to Generate Accurate Forecasts

Chad Akkoyun, Qiyun Pan14 Jun 2022

Problem

Supply and demand forecasts at a delivery company break when outside factors push orders up or down for a few weeks. Some of these factors have no usable feature. Tax refund totals are known, but customer groups respond differently and receive money unevenly across years, so the totals do not describe the real effect. A model that does not see the cause treats the temporary spike as a trend and forecasts artificially high demand once it ends. That misleads decision-makers and can lead to large losses.

Example from the article: a model that ignores IRS tax refunds over-forecasts the weeks after the refund payments end.

Solution in brief

Find the part of the market the factor hits harder, estimate its effect with a causal method (difference-in-differences or synthetic control), and subtract it from the demand series before fitting the forecast model. Add the expected effect back for future dates. The same logic separates two coinciding events, using units where only one of them differs.

Questions this case answers
  • How to remove the effect of an external shock with no direct measure from a time series, so that a forecasting model does not mistake a temporary spike for a trend
  • How to separate the effects of two overlapping events on a metric when indicator variables for them are collinear and no experiment is possible
  • How to stop a temporary demand spike, such as tax refunds, from being read as a permanent trend by a forecasting model?
  • How to estimate the effect of a factor that has no direct measurable feature, using treated and untreated regions?

Tools and methods

  • Difference-in-differences — compare affected and unaffected zip codes or submarkets to get the effect of a factor
  • Synthetic control — named as an alternative causal method; the post applies difference-in-differences in both cases
  • Time-series forecasting model — fitted per submarket on the cleaned series
  • Event-date dummies — capture how the effect changes day by day after the factor starts
Continue reading — it's free

Google or a one-time email code. No password.