Author Archives: Nikos

ISF2018 Presentation: Information Sharing in the Presence of Promotions in a Supply Chain

Patrick Saoud, Nikolaos Kourentzes and John Boylan, ISF2018, 20th June 2018

Many supply chains experience the Bullwhip effect, defined as the upstream amplification of demand variability. This information distortion results in a misalignment of forecasts, generating expensive business costs. A proposed remedy in the literature is the sharing of Point of Sales information data among the members of the supply chain. The theoretical and empirical results have pointed in different directions, with the empirical evidence suggesting that information sharing helps achieve better forecasting accuracy. A less studied facet of the Bullwhip is the effect of promotions on it, which was highlighted as one of its four original sources. This research is dedicated to examining the effect of promotions and other demand shocks on the performance of the different tiers of the supply chain. In particular, it will study the impact of promotions on forecasting accuracy, Bullwhip propagation and safety stocks for the participants of the supply chain. Furthermore, it will also investigate the impact of different types of information sharing in this context on the Supply Chain, and compare their performance in terms of gains in forecasting accuracy.

Download slides.

Demand forecasting with user-generated online information

O. Schaer, N. Kourentzes and R. Fildes, 2018, International Journal of Forecasting. https://doi.org/10.1016/j.ijforecast.2018.03.005

Recently, there has been substantial research on augmenting aggregate forecasts with individual consumer data from internet platforms, such as search traffic or social network shares. Although the majority of studies report increased accuracy, many exhibit design weaknesses including lack of adequate benchmarks or rigorous evaluation. Furthermore, their usefulness over the product life-cycle has not been investigated, which may change, as initially, consumers may search for pre-purchase information, but later for after-sales support. In this study, we first review the relevant literature and then attempt to support the key findings using two forecasting case studies. Our findings are in stark contrast to the literature, and we find that established univariate forecasting benchmarks, such as exponential smoothing, consistently perform better than when online information is included. Our research underlines the need for thorough forecast evaluation and argues that online platform data may be of limited use for supporting operational decisions.

Download paper and online supplement.

ISF 2018 Presentation: The inventory impact of including macroeconomic leading indicators in global supply chain management

Yves R. Sagaert, Nikolaos Kourentzes, Stijn De Vuyst and El-houssaine Aghezzaf, ISf2018, 19th June 2018

Supply chain management is increasingly performed at a global level. The decision process is often based on tactical sales forecasts, which has been shown to benefit from including relevant exogenous information. Leading indicators that cover different aspects of macroeconomic dynamics are appealing in this context, as macroeconomic dynamics in target countries can affect companies end markets. Even though this information can be beneficial on a tactical level, it remains unclear how this information can impact sales forecasts at Stock-Keeping-Unit (SKU) product level, due to increased levels of noise and products having differing demand patterns and dynamics, masking macro-effects. Nonetheless, hierarchical forecasting can be used to reconcile macroeconomic leading indicators from tactical level forecasts to detailed SKU levels, and vice versa. In this paper, we evaluate the feasibility and benefits of merging tactical and operational forecasting, where higher level forecasts include leading indicators, in contrast to univariate SKU operational predications. We present a framework that identifies automatically the most relevant leading indicators on global sales level, and by exploiting the hierarchical product structure, carries this information to sales forecasts at SKU product level. For our evaluation we rely on inventory metrics obtained from simulation experiments, reflecting the associated supply chain risk.

Download slides.

ISF2018 Presentation: Interpreting algorithmic and qualitative information when making judgmental forecast adjustments

Anna Sroginis, Robert Fildes and Nikolaos Kourentzes, ISF2018, 19th June 2018

Despite the continuous improvements in statistical forecasting, human judgment remains essential in business forecasting and demand planning. Typically, forecasters do not solely rely on statistical forecasts, which are obtained from various Forecasting Support Systems (FSS); they also adjust forecasts according to their knowledge, experience and information that is not available to the statistical models. However, we do not have adequate understanding of the adjustment mechanisms, particularly how people use additional information (e.g. special events, promotions, strikes, holidays etc.) and under which conditions this is beneficial. To investigate this, we conduct experiments that simulate a typical supply chain forecasting process that additionally provides qualitative and model-based information about past and future promotional periods for retail products. Using laboratory experiments, we find that when making adjustments people tend to focus on several anchors: the last promotional uplift, current statistical forecast and contextual statements for the forecasting period. At the same time, participants ignore the past baseline promotional uplifts and domain knowledge about the past promotions. They also discount statistical models with incorporated promotional effects, hence showing lack of trust in algorithms. These results highlight the need for more fundamental understanding of processes behind human adjustments and the reasons for them since it can help to guide forecasters in their tasks and to increase forecast accuracy.

Download slides.

ISF 2018 Presentation: Estimating the market potential pre-launch with search traffic

Oliver Schaer, Nikolaos Kourentzes and Robert Fildes, ISF2018, 18th June 2018

With shorter product life-cycles and increased competition, generating pre-launch forecasts is a vital task for companies. Forecasting the success of a new product is challenging as one need to estimate the market potential. In practice, this is typically done by expert judgment. However, there is substantial evidence that experts are biased when forecasting new products.

Alternative approaches which rely on large surveys or conjoint analysis can be expensive and provide limited data points before launch. Moreover, throughout the pre-launch phase, consumer preference for short life-cycle products change significantly. A potential solution for obtaining more timely data points is to use online user-generated information.

Pre-release buzz reflects the aggregate anticipation of consumers towards a new product. Various studies report improved forecast accuracy when incorporating pre-release information from sources such as search engines, blogs as well as discussions taking part in forums. However, a majority of them only investigate the forecasting potential for the first initial weeks of sales, which from an operational point of view might not suffice, given that traditional time series models a require reasonable size of sales history.

In this research, we provide insights on whether search traffic information from Google Trends is useful in improving the estimation of the market potential before product launch. Search traffic is particularly interesting as it is regarded as a proxy for consumer interest in a product, but it also captures partially marketing expenditures. We (i) develop an approach to augment analogy based information from previous generations with pre-launch search traffic; (ii) compare the forecast performance against forecast from traditional analogy based methods and (iii) investigate the leading properties of pre-launch buzz.

Download slides.

ISF 2018 Presentation: The dynamics of judgmental adjustments

Robert Fildes and Nikolaos Kourentzes, ISF2018, 19th June 2018

Judgement plays a central role in forecasting, as statistical forecasts are often modified before informing user decisions. There is strong evidence that judgemental adjustments can be beneficial, yet inconsistent, often harming forecast accuracy. This has motivated research into how to best manage judgemental adjustments to maximise any benefits. However, a limitation of existing work is that there is very limited research into the dynamics of judgemental adjustments: how experts adjust forecasts across time and whether their effectiveness is consistent across forecast horizons. Furthermore, it is unknown whether experts incorporate the same information, and in the same way, for different horizons. This paper attempts to address these questions by investigating the dynamics of judgemental adjustments from a UK manufacturer. Our findings suggest that there is a clear shift in the type of information integrated in the statistical forecasts, particularly across forecast horizons, resulting in changing behaviour and performance of adjustments.

Download slides.

Update for nnfor: reuse and retrain models

A feature that was missing in the nnfor package was the ability to reuse and retrain mlp and elm model fits. This is now possible with the new arguments model and retrain.

As an example, let us use the AirPassengers time series, with three different sample sizes and re-use and re-train the same model in various combinations.

library(nnfor)
# Get some data
y <- AirPassengers
y1 <- window(y,end=c(1958,12))
y2 <- window(y,end=c(1959,12))
y3 <- window(y,end=c(1960,12))

# Fit NN 
fit <- list()
fit[[1]] <- mlp(y1)
fit[[2]] <- mlp(y2,model=fit[[1]])
fit[[3]] <- mlp(y2,model=fit[[1]],retrain=TRUE)
fit[[4]] <- mlp(y3,model=fit[[1]])
fit[[5]] <- mlp(y3,model=fit[[3]])
fit[[6]] <- mlp(y3,model=fit[[1]],retrain=TRUE)
fit[[7]] <- mlp(y3)

# Get MSE and number of lags
mse <- unlist(lapply(fit,function(x){x$MSE}))
lags <- unlist(lapply(fit,function(x){length(x$lags)}))
round(mse,2)
lags
Results
Model Series Sample Training Sample Retrain MSE Lags
fit[[1]] up to 1958 up to 1958 X 6.73 9
fit[[2]] up to 1958 up to 1958 61.25 9
fit[[3]] up to 1959 up to 1959 X 6.68 9
fit[[4]] up to 1960 up to 1958 541.13 9
fit[[5]] up to 1960 up to 1959 260.22 9
fit[[6]] up to 1960 up to 1960 X 12.65 9
fit[[7]] up to 1960 up to 1960 New fit 7.95 10

As you can see, with different in-sample data and no retraining the in-sample MSE deteriorates. Using the “up to 1958” fit on the “up to 1959” and “up to 1960” samples returns MSE of 61.25 and 541.13 respectively. If we refit the network (keeping the specification fixed) the error reduces to 6.68 and 12.65 respectively. Building a new model on the “up to 1960” data finds a different lag structure (increasing the used lags from 9 to 10), resulting in an MSE of 7.95.

The same arguments can be used with elm.

Can you predict the closing price of Bitcoin?

Lately, there has been a lot of talks whether Bitcoin is a bubble (about to burst) or not. The discussion is quite interesting, not only because there is potentially a lot of money involved, but also because it shows how our economic theories are primarily unclear and secondarily incomplete on concepts such as bubbles and cryptocurrencies. Irrespectively of the various views of the “real” value of Bitcoin, most agree that it is fueled by lots of speculation. That made me wonder, how well can crowdsourcing anticipate its movements?

I built the app below that will update with the daily closing prices and also show how successful or not yesterday’s predictions were. Apart from getting your forecasts, I would be interested to get your views about this in the comments.

Check again tomorrow to see what was the outcome on today’s closing price!
I provide here the latest tweets about bitcoin, to fuel your predictions!
[custom-twitter-feeds hashtag=”#bitcoin”]

MAPAx example for R

I have been asked a few time to provide an example how to use MAPAx, from the MAPA package for R, so I prepared this blog post. I admit the documentation could be better, so I put together this example from a retailing case – the original setting MAPAx was developed for (see paper here). This provides a step by step use of MAPAx.

First we load the package and some data.


y <- cbind(c(1030.829,893.551,1084.09,1278.436,936.708,915.322,885.713,2364.399,774.88,977.506,831.616,813.656,1569.956,967.925,806.146,1063.117,1123.787,906.686,996.498,1088.464,977.414,1128.328,896.594,1007.172,1046.379,1514.648,1626.115,2959.558,838.506,949.377,1433.307,805.048,1218.907,872.43,1730.103,865.734,1845.713,919.291,1003.363,1102.969,847.38,1965.26,809.673,953.193,1066.089,991.352,1115.694,1003.333,1090.48,930.749,1006.184,1239.068,873.707,728.583,881.316,1302.468,997.442,3481.118,841.042,997.601,1830.194,909.693,2358.406,2573.673,777.08,773.781,945.424,968.646,1074.589,1046.22,1155.559,990.627,931.943,786.285,2297.025,628.166,889.238,937.631,1113.925,870.384,1018.375,799.458,1542.328,1879.587,750.307,1087.948,1247.803,1052.352,883.899,793.126,913.736,1082.142,968.823,2099.176,841.224,964.227,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA))
x <- cbind(c(0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
 c(0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0),
 c(0,0,0,1,1,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,1,1,0,0))
y <- y[!is.na(y)]
y <- ts(y,frequency=12)

This toy set includes sales of a heavily promoted item, with three different promotion. Let’s visualise what we have:


plot(y)
cmp <- brewer.pal(3,"Set1")
for (i in 1:3){
  points(time(y)[which(x[,i]==1)],y[which(x[,i]==1)],col=cmp[i],pch=i,cex=1.5)
}
legend("topright",c("Promo1","Promo2","Promo3"),col=cmp,pch=1:3)

Now let’s fit a MAPA and MAPAx and produce forecasts. I am modelling the sales in logs to capture the multiplicative promotional effects. For other types of applications this is not needed.

library(MAPA)
mapafit.x <- mapaest(log(y),type="es",display=1,outplot=1,xreg=x)
mapafit <- mapaest(log(y),type="es",outplot=1)

frc.x <- mapafor(log(y),mapafit.x,ifh=13,fh=13,xreg=x,conf.lvl=c(0.8,0.9,0.95),comb="w.mean")
frc <- mapafor(log(y),mapafit,ifh=13,fh=13,conf.lvl=c(0.8,0.9,0.95),comb="w.mean")

Let’s plot the results


par(mfrow=c(1,2))
plot(1:96, y, type="l",xlim=c(1,109),xaxs="i",main="MAPA",xlab="Period",ylab="Sales")
for (i in 1:96){
  lines(i:(12+i),exp(frc$infor[,i]),col="red")
}
cmp <- brewer.pal(9,"Reds")[4:2]
for (i in 1:3){
  polygon(c(97:109,109:97),exp(c(frc$PI[i,],rev(frc$PI[7-i,]))),col=cmp[i],border=NA)
}
lines(97:109,exp(frc$outfor),col="red")

plot(1:96, y, type="l",xlim=c(1,109),xaxs="i",main="MAPAx",xlab="Period",ylab="Sales")
for (i in 1:96){
  lines(i:(12+i),exp(frc.x$infor[,i]),col="red")
}
cmp <- brewer.pal(9,"Reds")[4:2]
for (i in 1:3){
  polygon(c(97:109,109:97),exp(c(frc.x$PI[i,],rev(frc.x$PI[7-i,]))),col=cmp[i],border=NA)
}
lines(97:109,exp(frc.x$outfor),col="red")

As you can see, MAPA provides a flat forecast. This is “correct” in the sense that apart from promotions this time series contains like information that could be captured by exponential smoothing. On the other hand, MAPAx is provided with the promotional information and makes use of it.

nnfor on github

I have put up a github repository for the nnfor package for R: https://github.com/trnnick/nnfor

I will be putting updates and fixes there, before they are pushed on CRAN. You can also report there bugs.

You can install the current github version with:


if (!require("devtools")){install.packages("devtools")}
devtools::install_github("trnnick/nnfor")