# 2/3 Some simple forecasting methods

Some fore­cast­ing meth­ods are very sim­ple and sur­pris­ingly effec­tive. Here are four meth­ods that we will use as bench­marks for other fore­cast­ing methods.

## Aver­age method

Here, the fore­casts of all future val­ues are equal to the mean of the his­tor­i­cal data. If we let the his­tor­i­cal data be denoted by , then we can write the fore­casts as

The nota­tion is a short-hand for the esti­mate of based on the data .

Although we have used time series nota­tion here, this method can also be used for cross-sectional data (when we are pre­dict­ing a value not included in the data set). Then the pre­dic­tion for val­ues not observed is the aver­age of those val­ues that have been observed. The remain­ing meth­ods in this sec­tion are only applic­a­ble to time series data.

R code
 meanf(y, h) # y contains the time series # h is the forecast horizon

## Naïve method

This method is only appro­pri­ate for time series data. All fore­casts are sim­ply set to be the value of the last obser­va­tion. That is, the fore­casts of all future val­ues are set to be , where is the last observed value. This method works remark­ably well for many eco­nomic and finan­cial time series.

R code
 naive(y, h) rwf(y, h) # Alternative

## Sea­sonal naïve method

A sim­i­lar method is use­ful for highly sea­sonal data. In this case, we set each fore­cast to be equal to the last observed value from the same sea­son of the year (e.g., the same month of the pre­vi­ous year). For­mally, the fore­cast for time is writ­ten as

and denotes the inte­ger part of . That looks more com­pli­cated than it really is. For exam­ple, with monthly data, the fore­cast for all future Feb­ru­ary val­ues is equal to the last observed Feb­ru­ary value. With quar­terly data, the fore­cast of all future Q2 val­ues is equal to the last observed Q2 value (where Q2 means the sec­ond quar­ter). Sim­i­lar rules apply for other months and quar­ters, and for other sea­sonal periods.

R code
 snaive(y, h)

## Drift method

A vari­a­tion on the naïve method is to allow the fore­casts to increase or decrease over time, where the amount of change over time (called the drift) is set to be the aver­age change seen in the his­tor­i­cal data. So the fore­cast for time is given by

This is equiv­a­lent to draw­ing a line between the first and last obser­va­tion, and extrap­o­lat­ing it into the future.

R code
 rwf(y, h, drift=TRUE)

## Exam­ples

Fig­ure 2.13 shows the first three meth­ods applied to the quar­terly beer pro­duc­tion data.

Fig­ure 2.13: Fore­casts of Aus­tralian quar­terly beer production.

R code
 beer2 <- window(ausbeer,start=1992,end=2006-.1) beerfit1 <- meanf(beer2, h=11) beerfit2 <- naive(beer2, h=11) beerfit3 <- snaive(beer2, h=11)   plot(beerfit1, plot.conf=FALSE, main="Forecasts for quarterly beer production") lines(beerfit2$mean,col=2) lines(beerfit3$mean,col=3) legend("topright",lty=1,col=c(4,2,3), legend=c("Mean method","Naive method","Seasonal naive method"))

In Fig­ure 2.14, the non-seasonal meth­ods were applied to a series of 250 days of the Dow Jones Index.

Fig­ure 2.14: Fore­casts based on 250 days of the Dow Jones Index.

R code
 dj2 <- window(dj,end=250) plot(dj2,main="Dow Jones Index (daily ending 15 Jul 94)", ylab="",xlab="Day",xlim=c(2,290)) lines(meanf(dj2,h=42)$mean,col=4) lines(rwf(dj2,h=42)$mean,col=2) lines(rwf(dj2,drift=TRUE,h=42)\$mean,col=3) legend("topleft",lty=1,col=c(4,2,3), legend=c("Mean method","Naive method","Drift method"))

Some­times one of these sim­ple meth­ods will be the best fore­cast­ing method avail­able. But in many cases, these meth­ods will serve as bench­marks rather than the method of choice. That is, what­ever fore­cast­ing meth­ods we develop, they will be com­pared to these sim­ple meth­ods to ensure that the new method is bet­ter than these sim­ple alter­na­tives. If not, the new method is not worth considering.

Pro­ceed to Sec­tion 2/4.