Keywords

1 Introduction

Time series forecasting is very popular and plays an important role in various fields such as economics, engineering, environment, and bioinformatics. The basic idea behind time series forecasting involves the development of models that estimate the future values of a series based on its past values. There are many forecasting models that have been used in the forecasting literature. The models mainly follow two approaches: nonlinear and linear models. Nonlinear models like artificial intelligence (AI)-based methods employing neural networks (NNs) have been proposed by different researchers. Second type of models are linear models like univariate autoregressive (AR), autoregressive moving average (ARMA), autoregressive integrated moving average (ARIMA), multivariate time series models like transfer function and dynamic regression, and generalized autoregressive conditional heteroskedastic (GARCH) model. In order to provide estimates for the future, these models analyze the historical data. Usually time series are not deterministic series. In fact, in many cases the researchers considered the series to be stationary time series. One way to model any time series is to consider it as a deterministic function plus white noise. The white noise in any time series process can be minimized by some procedures which are called the de-noising. Then a better model can be obtained. Consequently, to obtain a good de-noising, there are some mathematical models that can be applied such as Fourier transformation (FT) and wavelet transformation (WT) (Yao et al. 2000; Strang 1993). WT seems to be ideal for time series forecasting since time information is preserved in the transformed variables. Moreover, WT is a very effective technique for local representation of the time series in both time and frequency domains (Yevgeniy et al. 2005). WT is used to split up the time series into one low-frequency subseries (approximation part) and some high-frequency subseries (detailed part) in the wavelet domain. In models mentioned above, after appropriate decomposition, the prediction was made in wavelet domain and then inverse WT was applied to obtain the actual value of the predicted variable.

Wavelet transform has been used in many fields in forecasting models. Among them Wadi et al. (2011) and Arino and Vidakovic (1995) perform wavelet transform in forecasting financial time series based on ARIMA model and neural network-based model, respectively. Rocha et al. (2010) and Henriques and Rocha (2009) have used wavelet transform in NN model to predict acute hypotensive episodes. Gang et al. (2008), Aggarwal et al. (2008), and Antonio et al. (2005) have decomposed electricity price series using wavelet transformation for more efficient forecasting based on ARIMA, artificial neural network, and regression-based techniques. In most cases they decomposed the historical time series data into wavelet domain constitutive subseries using wavelet transform, and then combined with the other time domain variables to perform the set of input variables for the proposed forecasting model (Conejo et al. 2005). Based on statistical analysis the behavior of the wavelet domain constitutive series has been studied. It has been observed that forecasting accuracy can be improved by the use of wavelet transforms in forecasting models. Alrumaih and Al-Fawzan (2002) used Saudi stock index to illustrate that wavelet transformation is better than the other forecasting technique in predicting the de-noising of the financial time series.

Thus, the recently developed wavelet theory has proven to be a useful tool in the time series forecasting methods in different fields. However, the potential of this theory for analyzing and forecasting climatic time series has not been fully exploited yet. The accurate forecasting of climatic variables in Bangladesh is an important issue in disaster management policy-making due to the effects of recently happened climate change. Our objective in this chapter is to check whether the use of the wavelet transformation as a preprocessor in forecasting climatic data improves the predicting behavior of any forecasting model. As forecasting models, we have used the widely used and more popular ARIMA models. Humidity of Rajshahi, Bangladesh, is used as a climatic time series in this chapter. This is the way the comparison is performed with and without the wavelet transform, not across techniques. The fundamental and novel contribution of this chapter is to use the wavelet transformation to decompose the humidity series into a set of better-behaved constitutive series. These decomposed series and inverse wavelet transformation are used as a pre-processing procedure of forecasting humidity series using the same models in two approaches. Finally, the forecasting results based on wavelet transform and ARIMA model (hereafter called Wavelet-ARIMA model) will be compared with the forecasting values based on ARIMA model using some statistical criteria.

This chapter is organized as follows. Section 8.2 gives the brief description of the wavelet transformation. Section 8.3 provides the details of data processing and forecasting framework using wavelet transformation. Forecasting accuracy criteria, which are used to compare the performances of forecasting ability of the models, are defined in Sect. 8.4. Empirical results of a case study based on performance of wavelet transformation in forecasting humidity of Rajshahi are shown in Sect. 8.5. Finally, Sect. 8.6 provides some relevant conclusions.

2 Wavelet Transformation

In this section we briefly review the discrete wavelet transform (DWT), which is the wavelet counterpart to the discrete Fourier transform. Then we show the splitting of a time series into cyclical components by using wavelet analysis. As in Fourier analysis, there are continuous and discrete versions of wavelet analysis (Nason and Silverman 1994). Since we will be dealing with discrete data sets, our focus will be on the DWT. Good references on wavelet transformation are in Mallat (1989) and Percival and Walden (2000).

The time series under study is independently decomposed by DWT, which is defined as

$$ {\varPsi}_{j,k}=\frac{1}{\sqrt{s_0^j}}\psi \left(\frac{t-k{\tau}_0{s}_0^j}{s_0^j}\right) $$
(8.1)

where the parameters j and k are integers that control, respectively, the wavelet dilatation (scale) and translation (time). The value s 0 > 1 is a fixed dilation step and the translation factor τ 0 depends on the dilation step. The most common and simplest choice for the parameters s 0 and τ 0 is 2 and 1 (time steps), respectively, known as dyadic grid arrangement. In this case, the coefficients of DWT decomposition are given by

$$ {W}_{j,k}=\frac{1}{2^{j/2}}{\displaystyle \sum_{t=0}^{N-1}{y}_t\psi \left(\frac{t-k}{2^j}\right)} $$
(8.2)

where the W j,k are the wavelet coefficients corresponding to the scale S = 2j and the location τ = 2j k. This dyadic arrangement can be implemented by using a filter bank scheme developed by Mallat (1989), as depicted in Fig. 8.1.

Fig. 8.1
figure 1

Filter bank for discrete wavelet transformation

In Fig. 8.1, H[⋅], L[⋅] and H′ [⋅], L′ [⋅] are the high-pass and low-pass filters for wavelet decomposition and reconstruction, respectively. In the decomposition phase, the low-pass filter removes the higher frequency components of the series and high-pass filter picks up the remaining parts. Then, the filtered series are down-sampled by two and the results are called approximation and detail coefficients. The major advantage of decimation is that just enough information is kept to allow exact reconstruction of the input data. The reconstruction is just the inverse process of the decomposition and, for perfect reconstruction by filter bank, we should have y t  = y t . Using this approach, signal can be decomposed by cascade algorithm as shown in the following:

$$ \begin{array}{c}\kern-10.7em {y}_t=a{1}_t+d{1}_t\\ {}\kern-7.5em =a{2}_t+d{2}_t+d{1}_t\\ {}\kern-5em =a{3}_t+d{3}_t+d{2}_t+d{1}_t\\ {}\kern-7.3em \vdots \\ {}=a{n}_t+d{n}_t+d{\left(n-1\right)}_t+\cdots +d{1}_t\end{array} $$
(8.3)

where dn t and an t are the detail and approximation coefficients at level n, respectively. These coefficients allow for the identification of changes in the trends at different scales.

A wavelet function of type Daubechies of order 5 and decomposition level 3 is used in this case study (Daubechies 1992). This wavelet offers an appropriate tradeoff between wavelength and smoothness. This results in an appropriate behavior for climate series prediction. In the next section we show how to use the decomposed series in forecasting model.

3 Data Processing and Forecasting Framework

In order to illustrate the effectiveness of wavelet transform in forecasting models, the climatic data on humidity of Rajshahi, Bangladesh, is selected. The data is collected from the website of Bangladesh Agricultural Research Council (BARC), Ministry of Agriculture. We consider the monthly humidity series for the time period from January 1964 to December 2008 (1964:1 to 2008:12). The data set is divided into two sub-data sets: (1) a training set to estimate the model parameters and (2) a test set to evaluate these models by calculating error functions. There are 540 observations in the humidity series. The first 528 observations from 1964:1 to 2007:12 are used to build the model, and the last 12 observations from 2008:1 to 2008:12 to check the forecast ability of the models.

We first need to decompose the series under study using wavelet transformation. For this purpose, we have applied the DWT to the humidity series. Many wavelet families exist, where Daubechies family of wavelets, which are compactly supported orthonormal wavelets, is the most popular one and has been used in this work. Thus, a wavelet function of type Daubechies of order 5 and decomposition level 3 is used in this case study. The wavelet transform applied to climatic series y t , t = 1, 2, …, T results in four series denoted by d1 t , d2 t , d3 t , and a3 t and can be defined by

$$ {y}_t=a{3}_t+d{3}_t+d{2}_t+d{1}_t $$
(8.4)

Series d1 t , d2 t , and d3 t are denominated detail series, while a3 t is denominated approximation series. This approximation series constitutes the main component of the transformation, while the three detail series provide “small” adjustments. A graph of the original series and its decomposed series is shown in Fig. 8.2a, b. These series present a better behavior (more stable variance and no outliers) than the original humidity series and, therefore, they can be predicted more accurately. The reason for the better behavior of the constitutive series is the filtering effect of the wavelet transform.

Fig. 8.2
figure 2

(a) Original series and approximation series over 1964:1 to 2008:12. (b) Detail series over 1964:1 to 2008:12

We have used this decomposed series in the forecasting models in two approaches; (1) first approach includes d2 t , d3 t , and a3 t series in the analysis, whereas, (2) in the second approach, all decomposed series are used in forecasting models. Two approaches are outlined as follows.

3.1 Approach-1

The steps of modeling the decomposed series by Wavelet-ARIMA and Wavelet-NN techniques are given below.

Step-11: The wavelet transformation of type Daubechies-5 and decomposition level 3 is applied to the humidity series Y t (t = 1, 2, …, T) for the training period 1964:1 to 2007:12 which results in four series denoted by a3 t , d3 t , d2 t , and d1 t ; t = 1, 2, …, T. That is,

$$ \mathrm{WT}\left({y}_t;t=1,2,\dots, T\right)=\left\{a{3}_t,d{3}_t,d{2}_t,d{1}_t;t=1,2,\dots, T\right\} $$
(8.5)

Step-12: The decomposed series d1 t contains the highest frequency components among the others and hence is outlier prone. Therefore, series corresponding to d1 t has been discarded and only series a3 t , d3 t , and d2 t have been used to reconstruct the original series using inverse wavelet transformation as follows:

$$ {\mathrm{WT}}^{-1}\left\{a{3}_t,d{3}_t,d{2}_t;t=1,2,\dots, T\right\}={y}_t^{*};\kern1em t=1,2,\dots, T $$
(8.6)

Step-13: Use the appropriate ARIMA and NN model to the reconstructed series to forecast the future values in the test period 2008:1 to 2008:12;

$$ \left\{{y}_t^{*};t=1,2,\dots, T\right\}\overset{\mathrm{ARIMA}/\mathrm{NN}\kern0.5em \mathrm{forecast}}{\to}\left\{{y}_t^f;t=T+1,\dots, T+n\right\} $$
(8.7)

We call these forecasting values obtained from Wavelet-ARIMA/Wavelet-NN model using approach-1.

3.2 Approach-2

The steps of modeling the decomposed series by Wavelet-ARIMA and Wavelet-NN techniques are given below:

Step-21: The wavelet transformation of type Daubechies-5 and decomposition level 3 is applied to the humidity series Y t  (t = 1, 2, …, T) for the full period 1964:1 to 2008:12 which results in four series denoted by a3 t , d3 t , d2 t , and d1 t ; t = 1, 2, …, T.

$$ \mathrm{WT}\left({y}_t;t=1,2,\dots, T\right)=\left\{a{3}_t,d{3}_t,d{2}_t,d{1}_t;t=1,2,\dots, T\right\} $$
(8.8)

Step-22: Then, specific ARIMA and NN methods are used to each one of the constitutive series for the training period 1964:1 to 2007:12. The best fitted model is then used to forecast its n future values in the test period which are denoted by \( {\widehat{d1}}_t,{\widehat{d2}}_t,{\widehat{d3}}_t \), and \( \widehat{a{3}_t} \); t = T + 1, T + 2, …, T + n, respectively. That is,

$$ \left\{a{3}_t,d{3}_t,d{2}_t,d{1}_t;t=1,2,\dots, T\right\}\overset{\mathrm{ARIMA}/\mathrm{NN}\kern0.5em \mathrm{forecast}}{\to}\left\{a{3}_t^f,d{3}_t^f,d{2}_t^f,d{1}_t^f;t=T+1,\dots, T+n\right\} $$
(8.9)

Step-23: Finally, we use the inverse wavelet transform to estimate the forecasting values of the original series using the forecasting values of the constitutive series. The inverse wavelet transform is used in turn to reconstruct the forecasting series for original series, i.e.,

$$ {\left\{{\widehat{d1}}_t,{\widehat{d2}}_t,{\widehat{d3}}_t\kern0.5em \mathrm{and}\kern0.5em {\widehat{a3}}_t\right\}}_{t=T+1}^{T+n}\overset{\mathrm{Inverse}\ \mathrm{Wavelet}\ \mathrm{Transformation}}{\to }{\left\{{\widehat{y}}_{\kern-0.1em t}\right\}}_{t=T+1}^{T+n} $$
(8.10)

We call these forecasting values obtained from Wavelet-ARIMA/Wavelet-NN model using approach-2. The forecasting performance of Wavelet-ARIMA model is compared with the ARIMA model to forecast the original climatic series using the forecasting accuracy criteria discussed in the next section.

4 Comparison of Forecasting Performance

To assess and compare the forecasting performance of the models, three types of forecasting accuracy criteria of the test sets data have been adopted. They are the mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE), which are defined by

$$ \mathrm{MAE}=\frac{1}{n}{\displaystyle \sum_{t=T+1}^{T+n}\left|{y}_{\mathrm{real},t}-{y}_{\mathrm{forecast},t}\right|} $$
(8.11)
$$ \mathrm{RMSE}=\sqrt{\frac{{\displaystyle {\sum}_{t=T+1}^{T+n}{\left({y}_{\mathrm{real},t}-{y}_{\mathrm{forecast},t}\right)}^2}}{{\displaystyle {\sum}_{t=T+1}^{T+n}{\left({y}_{\mathrm{real},t}-\overline{y}\right)}^2}}} $$
(8.12)
$$ \mathrm{MAPE}=\frac{1}{n}{\displaystyle \sum_{t=T+1}^{T+n}\left|\frac{y_{\mathrm{real},t}-{y}_{\mathrm{forecast},t}}{y_{\mathrm{real},t}}\right|}\times 100 $$
(8.13)

where y real,t and y forecast,t are the real and forecast data point at time t, respectively, \( \overline{y} \) is the mean of y real,t , T is the number of observation in the trail series, and n is the number of data points forecasted in the test series. Lower values of the criteria imply the better forecast of the model.

5 Empirical Results

The main objective of this chapter is to show the forecasting performance of the time series models using the original data and the decomposed data. The original series is decomposed using wavelet transformation. Time series ARIMA models are used as forecasting models. First, we use these models to the original series over the training period to select an appropriate model. Then the selected models is used to forecast the data points of the test period. Secondly, we use these models to the decomposed series by wavelet transformation and forecast the test data as mentioned in the previous two approaches. Finally, we compare the performance of these forecasting series using the forecasting accuracy criteria discussed in Sect. 8.4.

5.1 Forecasting Based on Original Series

Here the original series over the training period is used to select the appropriate ARIMA model. Then, the model is used to forecast the series over the test period. Good references on ARIMA models and standard forecasting techniques are in Box and Jenkins (1976), Pankratz (1991), and Granger and Newbold (1986).

We have used the famous Box and Jenkins (1976) modeling philosophy for choosing an appropriate ARIMA model for the monthly humidity series over the period 1964:1 to 2007:12. The ARIMA(0,1,1)(0,1,1) model shows the more robust coefficients, white-noise error, and the smallest forecasting errors among the competitive models. The out of sample forecasting errors are calculated using the series over the period 2008:1 to 2008:12. The model is

$$ {\nabla}_{12}{\nabla}_1{y}_t=\underset{\left(-6.73\right)}{\left(1-0.283L\right)}\underset{\left(-80.35\right)}{\left(1-0.953{L}^{12}\right){\varepsilon}_t} $$
(8.14)

where the operators L k and k are defined by L k y t  = y t − k and ∇ k  = 1 − L k. The parentheses under the model contain the value of t-statistic of each coefficient. Monthly forecasts according to model (8.14) together with their actual values are presented in Table 8.1. The values of out of the sample or test period forecasting accuracy criteria MAE, RMSE, and MAPE are 0.1633, 0.2187, and 18.566, respectively. Figure 8.3 shows a graph of the humidity for the period 2006:1 to 2008:12 and the forecast values of ARIMA model from 2008:1 to 2008:12 along with the forecasting values using wavelet transformation.

Table 8.1 Original and forecasting values for the test period 2008:1 to 2008:12
Fig. 8.3
figure 3

Original series along with the forecasting series of ARIMA and Wavelet-ARIMA (approach-1 and approach-2) models (for visual convenience the figure shows data from 2006:1)

We compare these forecasts with the forecasts made after decomposing the data set with the wavelet methodology.

5.2 Forecasting Based on Decomposed Series Using Wavelet Transformation

For using the Wavelet-ARIMA model to forecast, we first need to decompose the series under study using wavelet transformation. For that purpose, we have applied the DWT to the humidity series. A wavelet function of type Daubechies of order 5 and decomposition level 3 is used in this case study. The wavelet transform applied to climatic series y t , t = 1, 2, …, T results in four series denoted by d1 t , d2 t , d3 t , and a3 t . Series d1 t , d2 t , and d3 t are denominated detail series, while a3 t is denominated approximation series.

5.2.1 Approach-1

In approach-1, as described in Sect. 8.3.1, we have used DWT to decompose the original series into four constitutive series as mentioned above. The decomposed detail series d1 t contains the highest frequency components among the others and hence is outlier prone. Therefore, series corresponding to d1 t has been discarded and only series a3 t , d3 t , and d2 t have been used to reconstruct the original series using inverse wavelet transformation as follows:

$$ {y}_t^{*}={\mathrm{WT}}^{-1}\left\{a{3}_t,d{3}_t,d{2}_t;t=1,2,\dots, T\right\};\kern1em t=1,2,\dots, T $$

Then, we have chosen an appropriate ARIMA model for the series y * t following the Box–Jenkins modeling philosophy which has the lowest forecasting error according to the three forecasting accuracy criteria mentioned in Sect. 8.4. The selected model is ARIMA(2,1,1)(0,1,1) which is defined as

$$ \underset{(11.27)\kern4em \left(-14.64\right)}{\left(1-0.4256L+0.5520{L}^2\right)}{\nabla}_{12}{\nabla}_1{y}_t^{*}=\underset{(50.85)}{\left(1+0.9457L\right)}\underset{\left(-19.18\right)}{\left(1-0.6929{L}^{12}\right)}{\varepsilon}_t $$
(8.15)

The parentheses under the model contain the value of t-statistic of each coefficient, which shows the estimates of the parameters are highly significant. The forecasting values over the test period 2008:1 to 2008:12 are shown in Table 8.1. The values of test period forecasting accuracy criteria for model (8.15) MAE, RMSE, and MAPE are 0.0655, 0.0799, and 9.1473, respectively.

5.2.2 Approach-2

Here the DWT is performed to the original series over the full period 1964:1 to 2008:12. Then, a specific ARIMA model is fitted for each constitutive series over the training period 1964:1 to 2007:12. The ARIMA model for each series is chosen based on the smallest forecasting error over the test period 2008:1 to 2008:12 with significant coefficients and white-noise error as outlined in Box–Jenkins method. In fact, the best ARIMA models for the series d1 t , d2 t , d3 t , and a3 t are ARIMA(2,0,2)(0,0,0), ARIMA(0,0,4)(0,1,0), ARIMA(0,1,2)(0,1,1), and ARIMA(8,2,8)(0,0,1), respectively. The estimates of the ARIMA model for d1 t are

$$ \underset{\left(-12.29\right)\kern3em \left(-14.08\right)}{\left(1+0.866L+0.566{L}^2\right)}d{1}_t=\underset{\left(-8.56\right)\kern4em \left(-4.12\right)}{\left(1-0.671L-0.326{L}^2\right)}{\varepsilon}_t $$
(8.16)

The estimates of the ARIMA model for d2 t are

$$ {\nabla}_{\kern-2pt 12}d{2}_t=\left(1+\underset{(80.19)}{1.701L}-\underset{\left(-6.34\right)}{0.130{L}^2}-\underset{\left(-82.87\right)}{1.736{L}^3}-\underset{\left(-41.34\right)}{0.885{L}^4}\right){\varepsilon}_t $$
(8.17)

The estimates of the ARIMA model for d3 t are

$$ {\nabla}_{\kern-2pt 12}{\nabla}_{\kern-2pt 1}d{3}_t=-\underset{\left(-1.82\right)}{0.004}+\left(1+\underset{(134.20)}{1.918L}+\underset{(66.25)}{0.937{L}^2}\right)\left(1-\underset{\left(-26.89\right)}{0.753{L}^{12}}\right){\varepsilon}_t $$
(8.18)

The estimates of the ARIMA model for a3 t are

$$ \left(1+\underset{(23.79)}{0.634L}-\underset{\left(-13.82\right)}{0.357{L}^8}\right){\nabla}_1^2a{3}_t=\left(1+\underset{(5.98)}{0.095L}-\underset{\left(-56.48\right)}{0.930{L}^8}\right)\left(1-\underset{-14.48}{0.566{L}^2}\right){\varepsilon}_t $$
(8.19)

Using the above best models, the forecasting values over the test period 2008:01 to 2008:12 for each transformed series are evaluated. The forecasting series are denoted by \( {\widehat{d1}}_t,{\widehat{d2}}_t,{\widehat{d3}}_t \), and \( {\widehat{a3}}_t \) which are shown in Table 8.2 along with their respective forecasting errors.

Table 8.2 Forecasting values for the test period (2008:1 to 2008:12) of detail and approximation series

Finally, the inverse DWT is applied to the series \( {\widehat{d1}}_t,{\widehat{d2}}_t,{\widehat{d3}}_t \), and \( {\widehat{a3}}_t \) to get the forecasting values of the humidity series over the test period. The forecasting values are denoted by \( {\widehat{y}}_{\kern-2pt t} \), t = 2008 : 1, 2008 : 2, …, 2008 : 12. The forecasting series \( {\widehat{y}}_{\kern-2pt t} \) using Wavelet-ARIMA model is shown in Table 8.1. The values of test period forecasting accuracy criteria for this Wavelet-ARIMA model MAE, RMSE, and MAPE are 0.1336, 0.1591, and 15.356, respectively.

Table 8.3 Forecasting accuracy criteria for the model without and with wavelet transformation

5.3 Comparison

Now we have got the results to compare the performances of the forecasting models with and without wavelet transformation. The forecasting values for the test period of the models with the original series are shown in Table 8.1. For convenience, these forecasting values are depicted in Fig. 8.3 with the original humidity series. The forecasting ability of these models is compared by using three forecasting accuracy criteria—MAE, RMSE, and MAPE. Table 8.3 contains the values of these criteria for the models.

Table 8.3 shows that all three measurements of forecasting accuracy criteria are sufficiently smaller when wavelet transformation is used in the models than that of without wavelet transformation. However, the Wavelet-ARIMA model with approach-1 shows the smallest forecasting errors than approach-2. From Fig. 8.3, it obviously reveals that the forecasting values from Wavelet-ARIMA (approach-1) are very close to the original series followed by the Wavelet-ARIMA (approach-1) and ARIMA model, respectively. Thus, Wavelet-ARIMA model forecasts humidity series of Rajshahi more accurately than the direct ARIMA model.

6 Conclusions

The study has been conducted to show whether the recently developed wavelet transformation in forecasting the climatic time series in Bangladesh improves the performance of existing forecasting models, such as ARIMA. These models are applied to forecast the humidity of Rajshahi, Bangladesh. Then the wavelet transformation has been used to decompose the humidity series into a set of better-behaved constitutive series. These decomposed series and inverse wavelet transformation are used as a pre-processing procedure of forecasting humidity series using the same models in two approaches. Finally, the forecasting ability of these two models with and without wavelet transformation is compared using the statistical forecasting accuracy criteria.

The results show that the use of wavelet transformation as a pre-processing procedure of forecasting climatic time series improves the performance of forecasting models. The reason for the better behavior of the constitutive series is the filtering effect of the wavelet transform. Therefore, the forecasting using the existing models under wavelet transformed series is better than forecasting directly, and also it gives more accurate results.

Thus, the hybrid Wavelet-ARIMA model proposed in this chapter is both novel and effective in forecasting climatic time series, specially using approach-1.