## Probabilistic, Counterfactual Forecasting

This project merges several ideas to allow forecasting future demand in an ecommerce setting. For stocking and logistics decisions, it is often not good enough to have *one* expected number of orders; decisions can be considerably improved with probabilistic distributions over possible outcomes. In addition, forecasts can be improved when business plans are incorporated: price changes, for example, should naturally shift the expected number of units sold.

I developed this side project as a proof of concept, with promising results. The main ideas used are (1) counterfactual inference using prior elasticity estimates, (2) Exponential Smoothing, and (3) Autoregressive Recurrent Networks. The implementation is in pytorch; it slightly outperforms a benchmark in lightgbm.

Since this side project merges my (NDA’d) professional work at the time with my private research interests, code and documentation unfortunately are available only on request.

A sample forecast is shown below. Note that stock-out periods are handled gracefully. The plot shows the mean of the forecasted negative binomial distribution.