10.1.1.34.9279

Upload: amarjargal-norov

Post on 14-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 10.1.1.34.9279

    1/19

    TIME SERIES FORECASTS VIA WAVELETS: AN APPLICATION TO CAR

    SALES IN THE SPANISH MARKET1

    BY

    MIGUEL A. ARINO

    IESE

    UNIVERSIDAD DE NAVARRA

    Avda. Pearson 21

    08034 Barcelona

    SPAIN

    [email protected]

    Abstract: In this paper we propose to apply wavelet theoryin forecasting economic time series.

    The method consists in decomposing the series intoits long-term trend and its seasonal

    component according to the shape of the scalogram of the discretewavelet transform of the series.

    Each component is then extended to provide a forecast of thetotal series. The method is applied to

    the data set of monthly car sales in the Spanish market and theresults are compared with the Box-

    Jenkins forecast of the series.

    Key words: Forecasts, Arima models, Wavelets.

    1This article has been prepared while the author wasvisiting the Institute of Statistics and Decision Sciences at

    Duke University. The author acknowledges the invaluable help ofBrani Vidakovic during the research on wavelet

    methodology.

    1

  • 7/30/2019 10.1.1.34.9279

    2/19

    1. Introduction.

    Our purpose in this paper is to present amethodology for forecasting univariate time series. This

    methodology combines standard forecasting techniques withwavelet methodology described in

    this paper. The recently developed wavelet theory has proven tobe a useful tool in the analysis ofsome problems in engineering and related fields. However, thepotential of this theory -which will

    be outlined in the next section- for analyzing economic problemshas not been fully exploited yet.

    This paper presents one of its many possible applications in thisfield. As an example we will apply

    the methodology to forecast car sales in the Spanishmarket and compare the results with those

    given by standard forecasting techniques. Roughlyspeaking, using wavelets, we decompose a

    time series (xt) in its trend (yt) and its seasonal component (zt). The way of decomposing the series

    is explained in Arino and Vidakovic (1995) and isoutlined later in this paper. Then we apply

    standard forecasting techniques to each component to obtain aforecast of the original series (xt).

    This paper is organized as follows: After thisintroduction, a brief summary of wavelets is

    presented together with the discrete wavelettransform (DWT) and the application of wavelet

    analysis to decompose a time series into its long-term trend andits seasonal component. In Section

    3 we apply the wavelet analysis described in theprevious section to the data set of monthly car

    sales in the Spanish market. The seasonal componentand the long-term trend of the series are

    found and each one of them is forecasted ultimatelyproviding a forecast of the total series. In the

    last section we present our conclusions.

    2. Wavelets.

    In this section we first present wavelets briefly.Then we review the discrete wavelet transform,

    which is the wavelet counterpart to the discrete Fouriertransform. Finally 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 waveletanalysis. Although for our purposes it is sufficient to

    deal with the discrete version, we provide a generalsummary of wavelets for decompose

    continuous functions, as well. Since we will bedealing with discrete data sets, our focus will be

    on the discrete wavelet transform.

    2.1. An introduction to wavelets.

    The wavelet series representation of asquare-integrable function f is in some way, similar to the

    Fourier series representation. The Fourier series representationof a function takes as orthonormal

    basis for its expansion the simple harmonics {einx}, while for the wavelet representation different

    sets of orthonormal bases {jk(x)} satisfying some conditions are used.

    2

  • 7/30/2019 10.1.1.34.9279

    3/19

    If f is a square-integrable function defined on theinterval [0,2], the Fourier series representationof f is

    f(x) = cn einx

    n=-

    where the constants cn are defined as

    2cn =1/2f(x)einxdx.

    0

    A characteristic of this Fourier seriesrepresentation is that the orthonormal basis {wn } on which

    the function f is expanded, is generated by dilation of a singlefunction w(x) = eix , that is wn (x) =

    w(nx).

    For the wavelet series representation of a function,we expand that function in terms of some

    orthonormal base {n} different from the trigonometric base. Each one ofthese possible bases isgenerated by translations and dilations of a singlewavelet mother as the trigonometric basis is

    generated by dilations of the function eix.

    Given a mother wavelet mother , the wavelet jkis obtained from by dilating by the factor 2j

    and translating by 2-jk as follows:

    jk(x) = 2j/2(2jx - k).

    The coefficient 2j/2 is a scaling factor. Under suitable conditions on (see Chui, 1992 and Meyer,

    1992) the set {jk} forms an orthonormal basis for the space of thesquare-integrable functions.The wavelet series representation of a function f is

    f(x) = fjkjk(x)j,k

    where fjkare the wavelet coefficients of f with respect to the basis{jk}, which can be found by

    3

  • 7/30/2019 10.1.1.34.9279

    4/19

    fjk = f(x) jk (x) dx.

    -

    The most simple example of wavelet basis is the Haarbasis generated by the mother wavelet defined by

    1 for 0 x< 1/2

    (x) = -1 for 1/2 x

  • 7/30/2019 10.1.1.34.9279

    5/19

    . . ,bN-1 ) defined by

    N-1

    bj = at e-i(2j/N)t j = 0, . . . , N-1.t=0

    This sequence b is a linear transformation of a, which allows us to look at the data set inthe

    frequency domain instead of the time domain.b is the set of Fourier coefficients of thediscrete

    Fourier transform of a. In a similar way, given a wavelet basis(jk ), the discrete wavelet

    transformation of a data vector x of dimension N=2n is another data vector d of the same

    dimension as x which allows us to look at the data set x in local and frequency domain instead of

    in the time domain. The vector d is the set of coefficients in the wavelet series representationofx

    with respect to the wavelet basis chosen. Thistransformation is linear and orthogonal, and can be

    described by a NxN orthogonal matrix W (detailsabout DWT can be found in Nason andSilverman, 1994; Vidakovic and Muller, 1994; Strang, 1993; orArino and Vidakovic, 1995).

    Since the elements ofd are the wavelet coefficients ofx with respect to the basis (jk), d can bewritten as

    d = (c00, d00, d10, d11, d20, . . . , dn-1,2n-1-1 ),

    where c00 is the coefficient of the scaling function . Apart from c00 there is one 0-level coefficient

    d00, two 1-level coefficients d10 and d11, and in general there are 2j

    j-level coefficients dj0, dj1 , .. . and dj,2j-1 . The last level of coefficients is the (n-1)-level.

    Finally we define the scalogram ofd, which is the wavelet counterpart of theperiodogram in

    Fourier analysis. Ifd is the vector of coefficients of the discrete wavelettransformation ofx (i.e. d

    = W x), the energy ofd at level j is defined as

    2j-1

    E(j) = djk2 for j = 0, . . . , n-1k=0

    The scalogram ofd is the vector of energies

    (c002 , E(0), E(1), . . . , E(n-1)).

    The scalogram of the discrete wavelet transform of atime series is used to decompose the series

    5

  • 7/30/2019 10.1.1.34.9279

    6/19

    into cycles of different frequencies.

    2.3. Decomposition of a time series into cycles.

    Let x = (xt) be a data set of size 2n. Our objective is to decompose x into two data sets y = (yt) andz = (zt) of the same dimension as x, such that x = y + z, where each one of them reflects

    fluctuations of (xt) at different frequencies. We present here a briefsummary of the methodology

    used. The details can be found in Arino and Vidakovic(1995).

    If at a low level j of the wavelet decomposition ofx, most of the coefficients djk are big, it

    means that a long-period, low-frequency cyclic component ispresent in x. The length of the period

    need not be constant, because some particular djkof that level can be small. On the contrary, if at

    a high-level j, most of the coefficientsdjk are big, a short-period, high-frequencycyclic

    component is present in x.

    In the analysis of economic time series, it is usualto find a 12-month period seasonal component

    and a long-term trend. Thus, it is reasonable tofind two peaks in the scalogram of the wavelet

    coefficients d of an economic data set x. Splitting d into d(1) and d(2) as explained below, and

    applying to the split parts the inverse wavelet transform W-1, the two components ofx = (xt) can

    be identified. More specifically, let us assume thatin the scalogram ofd, two peaks at levels j1