- About this Journal ·
- Abstracting and Indexing ·
- Aims and Scope ·
- Annual Issues ·
- Article Processing Charges ·
- Articles in Press ·
- Author Guidelines ·
- Bibliographic Information ·
- Citations to this Journal ·
- Contact Information ·
- Editorial Board ·
- Editorial Workflow ·
- Free eTOC Alerts ·
- Publication Ethics ·
- Reviewers Acknowledgment ·
- Submit a Manuscript ·
- Subscription Information ·
- Table of Contents

Journal of Applied Mathematics

Volume 2012 (2012), Article ID 917247, 17 pages

http://dx.doi.org/10.1155/2012/917247

## Using Wavelets to Understand the Relationship between Mortgages and Gross Domestic Product in Spain

Department of Applied Economics, University of La Laguna (ULL), Campus de Guajara s/n, 38071 La Laguna, Spain

Received 11 May 2012; Accepted 18 October 2012

Academic Editor: Alvaro Valencia

Copyright © 2012 C. González-Concepción et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

We use wavelet multiresolution decomposition and cross-wavelet analysis to reveal certain properties in financial data related to mortgages to households and gross domestic product data in Spain. Wavelet techniques possess many desirable properties, some of which are useful as a vehicle for analysing economic and financial data. In our case, wavelets are useful for drawing conclusions both in the time and frequency domains and for obtaining information on the different phases through which the study variables progress.

#### 1. Introduction

The literature on wavelets has expanded rapidly over the past 20 years. Many papers have been published using wavelet methodology in a wide variety of disciplines. Applications using wavelets are prominent in astronomy, engineering, medicine, physics, and many other fields of study, including finance and economics in recent years, for instance, see [1–20].

The goal of this paper is to illustrate for scenario testing the application of the wavelet technique, bearing the drawbacks in mind, in the multiresolution analysis for modelling financial data related to mortgages to households (MH) and gross domestic product (GDP) in order to obtain time and frequency information simultaneously.

The examples chosen reveal the importance of being able to decompose the original signal into a trend component and various detail components, which allow the different frequencies and their time model to be observed separately.

The type of data involved (daily, weekly, monthly, quarterly, annual, or other frequency schedules) is vital when drawing conclusions. These can be modelled using wavelet decompositions to yield conclusions regarding frequencies that cannot be observed directly in the original series. When highly disaggregated series (data with an hourly or higher frequency) are available, however, it is also of interest to aggregate data in order to obtain another type of periodicity (weekly, monthly, etc.).

Wavelets are certain families of orthogonal or quasi-orthogonal functions that possess many desirable properties, some of which are useful in economics and finance, but many of which are not. For example, in [17], Ramsey and Lampart explore four ways in which wavelets might be used to enhance the empirical toolkit in economics and finance (exploratory analysis, density estimation and local inhomogeneity, time scale decomposition, forecasting, etc.). The drawbacks involve the sample characteristics and potential numerical instabilities. Wavelet-based techniques rely on equally spaced data, a condition which does not always hold in economic series. Even when it does, the cycles over which the economic activity takes place may not be homogeneous with respect to the type of data. Moreover, some techniques based on wavelets require dyadic samples and a certain number of initial values in order to begin the calculation process. Certain instabilities can also arise when attempting to decompose a signal using very high-order polynomials, due to the requirement to calculate their roots.

This paper has been organised into the following sections: Sections 2 and 3 offer a brief summary of the methodology we employ in the data to establish the contrast among the three types of domains: time, frequency, and scale. The wavelet technique, when applied to the scale domain, can be understood as a necessary expansion of the Fourier and short-time Fourier techniques because the functions used in wavelet theory are flexible enough to be adapted to different frequency bandwidths by intervals. Given their practical interest, we focus on discrete and continuous wavelet filters, specifically those devised by Daubechies and Morlet [6, 10], chosen specifically for their theoretical properties.

In Section 4.1 we use MATLAB [12] and analyse the methodology by focusing on practical cases involving MH monthly data in Spain and in one of its provinces, Santa Cruz de Tenerife. Finally, in Section 4.2, we analyse the relationship between changes in GDP and MH in both cases from 1995. The calculations are both done using the MATLAB Toolbox in [4].

#### 2. Multiresolution Decomposition

Next, we provide a brief theoretical overview that is available in more detail in [8], among others. Our contribution focuses on the practical interpretation of the multiresolution decomposition (MRD) of a discrete signal for the financial data selected.

In general, the MRD of the variable or signal at the level is given by such that :

is called the trend signal at level and is the detail signal at level constructed using the father (or scaling function, representing the smooth, trend, or low-frequency) and mother (representing the detailed or high-frequency) wavelets, respectively.

In economics, is normally a discrete real time signal. Then, we can directly use a discrete wavelet transform (DWT) or the continuous wavelet transform (CWT), if we assume a continuous signal approximating , under certain conditions.

In general, given a particular wavelet the CWT is a function of two variables and is obtained by projecting the function via where is the translated (via ) and dilated (via ) version of the original wavelet . The variables and represent, respectively, the position of the wavelet in the time and frequency domains. This transform depicts the local variance of the time series .

Taking into account the properties of the Fourier Transform, may also be represented in the frequency domain, as where and are the Fourier Transform of and , respectively, symbolizes the complex conjugate of and . Then, the wavelet power spectrum is defined as .

Then, we may view the DWT as a discretization of the CWT through sampling specific wavelet coefficients. We can see that the Fourier transform is a particular case when (). The classical DWT is obtained from CWT using wavelets with and where and are integers (dyadic basis) representing the set of discrete translation and discrete dilations. The values for all integers and produce an orthogonal basis with a dyadic dilation.

In the wavelet transform, the scale, or dilation, operation is defined to preserve energy and the quality filter is the ratio of its peak energy to its bandwidth.

The interpretation of the MRD using the DWT and its inverse (IDWT) is of interest in terms of understanding the frequency at which activity in the time series occurs.

In our study, we will use MRD obtained with the Daubechies wavelets [5, 6] to improve on the frequency-domain characteristics of the Haar wavelets and which may still be interpreted as generalized differences of adjacent averages. We will use the discrete and continuous versions.

#### 3. Cross-Wavelet Analysis: Transform, Power, Coherency, and Phase-Difference

The cross-wavelet analysis is used in many applications to analyse, detect and quantify relationships between two time series. The concepts of cross-wavelet power, wavelet coherency and wavelet phase-difference are natural generalizations of the basic wavelet analysis tools that enable us to appropriately deal with the time-frequency dependencies between two time series.

Following the notation and definition in [2], for specific values of the arguments and, the cross-wavelet transform of two series, and is defined as
and the cross-wavelet power* as *, which can be interpreted as the local covariance between these time series at each time and frequency. Note that when , we obtain the wavelet power spectrum.

If denotes a smoothing operator in both time and scale, the complex wavelet coherency between and is defined by Smoothing is necessary because otherwise, coherency would be identically one at all scales and times. Then, their module is called the wavelet coherency and their angle is called the phase-difference. On the one hand, a phase-difference of zero indicates that the time series move together at the specified time-frequency; a phase-difference located in the first quadrant indicates that the series move in phase, but the time series leads , while one located in the fourth quadrant indicates that is leading. On the other hand, a phase-difference of or – indicates an anti-phase relationship, a phase-difference located in the second quadrant indicates that the series move out of phase, but the time series leads , while if located in the third quadrant it indicates that is leading.

In this paper, we will use the Morlet wavelets to illustrate these concepts in our financial application.

#### 4. Working with Financial Data

The data we will study are available from Spain’s National Statistics Institute (INE, http://www.ine.es/) and comprise the following series.(i)Mortgages to households monthly data in Spain (MHS) and Santa Cruz de Tenerife, Canary Islands (MHSCT). 1995 M1–2010 M9.(ii)Gross domestic product (GDP) quarterly data in Spain. Income (current prices) 1995Q1–2010Q3.

So as to take advantage of all the available data and be able to properly use the two series simultaneously, we arranged the data as follows.(i)Since in 2003 the INE modified the methodology used to compile MHS and MHSCT data, we have two series for each case, 1995 M1–2003 M12 and 2003 M1–2010 M9, each of which relies on a different methodology. In order to use all of the available data while maintaining continuity in the time series data, we modified the 1995 M1–2002 M12 series by using a common statistical technique that relies on using a linking factor to account for the combination of the two series for each case. However, for these data series the INE does not specify the evaluated linking factor for the methodological change, only the methodology used. That is to say, said linking factor was calculated for each case as the ratio between the sum of the 2003 monthly data in the new series and the same one in the old series, resulting in a linking factor of 1.298853 for MHS and 1.126480 for MHSCT, respectively.(ii)Since the available GDP data are quarterly, and so as to use them alongside the available MH monthly data without aggregating data, we interpolated the GDP series to yield a theoretical GDP monthly series.

The interpolation leads to a more suitable sample size to data series in keeping with [15]. Thus, we used two series containing 189 data points each.

The examples to be considered involve series of varying natures which exhibit a certain periodic behaviour. We use continuous wavelets to reveal the different cycles that are hidden within the data and to detect certain irregularities in the periodicity as well as one-time exchanges. The calculations and graphs of the MRD using Daubechies wavelets (db3) are done on MATLAB with WAVELETS 1-D and those corresponding to the cross-wavelet analysis between time series on a modified MATLAB Toolbox of the so-called ASToolbox in [4]. The calculation using continuous wavelet analysis requires more computational time but yields graphs and results that are easier to interpret.

We will use two standard economic data types: first the percentage rates or INDEX as a ratio between two variables (Section 4.1), and growth rates as a measure of the evolution of a variable over time (Section 4.2). In Section 4.1, Fast Fourier Transform (FFT) and Daubechies discrete wavelets (db3) are used for data modeling. Next, a sensitivity analysis is performed by testing four different assumptions regarding the short-term future, this time using continuous wavelets to facilitate a visual comparison between different models of these assumptions.

Since we will use the word index simultaneously in both a financial and mathematical context, we will write it in uppercase letters when referring to the economic variable (growth rate or INDEX) and in lowercase letters when referring to the mathematical variable (frequency index).

##### 4.1. Multiresolution Decomposition into INDEX Variables Using MH and GDP Monthly Data

In this section we illustrate the assumptions made and compare different cases using several figures.

*Case 1. * MRD to the Spain INDEX between MHS and GDP monthly data.

Figure 1(a) shows the data for the INDEX=MHS/GDP for Spain, as well as the approximations we obtained using the Daubechies discrete wavelet filter (db3) at levels 2 and 3. Figure 1(b) shows the details for the first three levels along with their corresponding Fast Fourier Transforms (FFT). The most relevant frequency indices are indicated in Table 1.

Next, using the Daubechies continuous wavelet filter (db3), we illustrate in Figure 2 the coefficients of the decomposition on different scales. Taking into account the information in [12], we observe an increase in energy in the second part of the range that is independent of the typical boundary instability problems.

Keeping in mind the reliability limitations of any study on statistical predictions, we next conduct a sensitivity analysis using four assumptions and show the ability of MRD to highlight differences based on the assumptions. We then compare each assumption with known data from the 2010 M10. Note that Figures 3 to 7 below are identical to Figure 2 until 2010 M10.

First assumption: We consider two different periods in the future. Current low credit levels are maintained during the first period (Figure 3(a)), and an effort is made in the second transition period to a higher stable level (Figure 3(b)). The most relevant frequency indices are indicated in Tables 2 and 3, respectively.

Second assumption: In the future, credit levels continue to be cut for some time.

We observe in Figure 4 the new model. The most relevant frequency indices are equals to Table 2.

Third assumption: In the future, return to high credit levels through refinancing.

Now, we observe in Figure 5 the new model. The most relevant frequency indices are equal to Table 2.

Fourth assumption: In the future, corrective measures are taken following the initial rise in Spain INDEX. The most relevant frequency indices are indicated in Table 4.

Note that the relevant index in , frequency index 65, is the same in every case, though significant differences are evident in the global model due to different assumptions at the end of the interval (compare the coefficients at the different scales from 1 to 64 indicated on the vertical axis in Figures 3–6).

In order to assess these assumptions, in Figure 7 we show the decomposition that is obtained for the aforementioned series until 2011M2, noting that the new data for the period 2010 M10–2011M2 more closely agree with the start of the trace for the second and third assumptions (compare Figures 4, 5, and 7).

*Case 2. *MRD to the SCTfe INDEX between MHSCT and GDP monthly data.

We now consider an analogous study with MHSCT, that is, using a similar INDEX for the Spanish province of Santa Cruz de Tenerife SCTfe INDEX=MHSCT/GDP, over the period 1995 M1–2010M9 (Figure 8(a)).

Figure 8(b) shows the details and the FFT of SCTfe INDEX. Note the significant differences with the general case for Spain. In particular, many more irregularities were detected at the provincial level than nationally (compare Tables 1 and 5).

These differences suggest the convenience of showing the new SCTfe/Spain INDEX to compare both variables. Its decomposition is shown in Figure 9.

Furthermore, if we resort to continuous wavelets and study the coefficients of the decomposition, we obtain Figure 10, which shows an increase in the relative density starting in 2004. Table 6 includes the most relevant frequency indices.

##### 4.2. Comparative Analysis. Quarterly Growth Rates of MHS and GDP

Next, we analyse two new financial variables: QG MHS and QG GDP, that is, quarterly growth rates of MHS and GDP obtained from monthly data series in order to compare our results with [18] relative to the German case. The data are shown in Figure 11.

Figures 12 and 13 show the percentage of energy for each wavelet coefficient using db3 and the wavelet power spectrum, respectively, which may be more informative.

The change in the dynamics of time series QG MHS and QG GDP is nearly impossible to spot in Figure 13(a). Furthermore, if we use traditional spectral analysis, the information on the dynamic response in the time domain is completely lost (Figure 13(d)). Comparing with Figure 13(c) for each time series, we observe that spectral analysis gives us essentially the same information as the global wavelet power spectrum, which is an average, over time, of the wavelet power spectrum.

Figure 13(b) show the wavelet power spectra themselves, an important advantage of wavelet analysis over spectral analysis. On the horizontal axis we have the time dimension. The vertical axis gives us the periods. The power is given by the colour. The colour code indicates ranges of power from blue (low power) to red (high power). The white lines show the maxima of the undulations of the wavelet power spectrum, thus giving us an estimate of the cycle period. In the first case, the wavelet power spectrum of MHS varies considerably over time, especially after the year 2000. The maximum of the spectrum, indicated by white lines, has periodicities of around 4.5 and 7 years. We observe a white line on period seven across the entire horizontal axis, meaning that period seven has a permanent cycle, a cycle that intensified starting in the year 2000. For the GDP in the second case, the eight-year wavelet power spectrum shows also significant effects at higher frequencies after 2005. Comparing the power spectra of time series QG MHS and QG GDP might support similar conclusions as [19] for the German case, in the sense that there are differences in the relevant periodicities of MHS and GDP.

The wavelet cross spectrum (Figure 14) and coherency (Figure 15) provide wavelet-based alternatives for the Fourier-based cross spectrum and coherency. These wavelet estimators are suitable for non-stationary signals. Using a complex-valued analysing wavelet, we can also examine intervals in the time-scale plane where the two time series exhibit common phase behaviour. See, for example, [2] for more detail. Wavelet coherency can be interpreted as the local squared correlation coefficient in the time-scale plane. Figure 15(b) shows the wavelet coherency time-period for easier interpretation. We observe two different coherency intervals between these two time series. The first time part exhibits strong coherence to large periods and low coherence for small periods. In the second time part there is a strong coherency for nearly all periods.

Figures 15(c)-15(d) illustrate the phases and phase-difference computed for two different frequency bands (1~1.5 frequency band in (c) and 5~6 frequency band in (d)). The green and blue lines represent the GDP and MH phases, respectively. The red line represents the phase-difference. Note that the series are in phase, with the coherency being higher for small frequency bands. In the 1~1.5 frequency band, the fact that the small cycles are in phase (positively correlated) is evidenced by the phase-difference, which is consistently situated between – and . Finally, we can see in this band that the GDP cycle was leading from 1995 to 2007 and lagging from 2007, as evidenced by the positive phase difference in the first interval and the negative phase difference in the second. Looking at the 5~6 frequency band, we note that the series are nearly out of phase around the year 2000 (negatively correlated), with the GDP leading in every period.

#### 5. Conclusions

In this paper, we have used wavelets to illustrate the relationship between MH and GDP in Spain and in one of its provinces, Santa Cruz de Tenerife. We believe the wavelet technique is appropriate for designing a credit policy based on GDP data at both the national and regional level.

Wavelets, like all spectral methods, can distinguish between different relationships that occur at the same time but at different frequencies. However, they are also suited to capturing structural breaks and transient stationary and non-stationary relationships.

In general, this tool is useful for all types of time-data comparisons when we are interested in drawing conclusions in both the time and frequency domains, as well as in obtaining information on the different phases through which the study variables progress.

#### Acknowledgments

The authors wish to acknowledge the partial financial support provided by Spain’s Ministry of Education and Science (MTM2009-14039-C06-01 and MTM2011-28781) and the interesting comments of the referees.

#### References

- L. Aguiar-Conraria, N. Azevedo, and M. J. Soares, “Using wavelets to decompose the time-frequency effects of monetary policy,”
*Physica A*, vol. 387, no. 12, pp. 2863–2878, 2008. View at Publisher · View at Google Scholar · View at Scopus - L. Aguiar-Conraria and M. J. Soares, “The Continuous Wavelet Transform: A Primer,” NIPE WP, 2011, http://www3.eeg.uminho.pt/economia/nipe/.
- L. Aguiar-Conraria and M. J. Soares, “Oil and the macroeconomy: using wavelets to analyze old issues,”
*Empirical Economics*, vol. 40, no. 3, pp. 645–655, 2011. View at Publisher · View at Google Scholar · View at Scopus - L. Aguiar-Conraria and M. J. Soares, http://sites-google.com/site/aguiarconcraria/joanasoares-wavelets.
- P. M. Crowley, “A guide to wavelets for economists,”
*Journal of Economic Surveys*, vol. 21, no. 2, pp. 207–267, 2007. View at Publisher · View at Google Scholar · View at Scopus - I. Daubechies,
*Ten Lectures on Wavelets*, vol. 61 of*CBMS-NSF Regional Conference Series in Applied Mathematics*, SIAM, Philadelphia, Pa, USA, 1992. - D. Fay and J. Ringwood, “A wavelet transfer model for time series forecasting,”
*International Journal of Bifurcation and Chaos*, vol. 17, no. 10, pp. 3691–3696, 2007. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - R. Gencay, F. S. Selcuk, and B. Whitcher,
*An Introduction to Wavelets and Other Filtering Methods in Finance and Economics*, Academic Press, Elsevier, 2002. - C. González-Concepción, M. C. Gil-Fariña, and C. Pestano-Gabino, “Wavelets modelling of water, energy and electricity consumption in spain,”
*WSEAS Transactions on Mathematics*, vol. 9, no. 7, pp. 509–518, 2010. View at Scopus - P. Goupillaud, A. Grossmann, and J. Morlet, “Cycle-octave and related transforms in seismic signal analysis,”
*Geoexploration*, vol. 23, no. 1, pp. 85–102, 1984. View at Publisher · View at Google Scholar · View at Scopus - C. M. Hafner, “Cross-correlating wavelet coefficients with applications to high-frequency financial time series,”
*Journal of Applied Statistics*, vol. 39, pp. 39–36, 2012. - MATLAB Software,
*The Language of Technical Computing*, The MathWorks, 2011. - M. Meng, D. Niu, and W. Sun, “Forecasting monthly electric energy consumption using feature extraction,”
*Energies*, vol. 4, pp. 1495–1507, 2011. View at Publisher · View at Google Scholar - T. Mingming and Z. Jinliang, “A multiple adaptive wavelet recurrent neural network model to analyze crude oil prices,”
*Journal of Economics and Business*, vol. 64, pp. 275–286, 2012. View at Publisher · View at Google Scholar - W. H. Press and G. B. Rybicki, “Large-scale linear methods for interpolation, realization and reconstructing of noisy, irregularly sampled data,” in
*Time Series Prediction: Forecasting the Future and Understanding the Past*, A. S. Weigend and N. A. Gershenfeld, Eds., Addison-Wesley Publishing Company, 1993. - J. B. Ramsey, “Wavelets in economics and finance: past and future,”
*Studies in Nonlinear Dynamics and Econometrics*, vol. 6, no. 3, pp. 1–27, 2002. View at Zentralblatt MATH · View at Scopus - J. B. Ramsey and C. Lampart, “The decomposition of economic relationships by time scale using wavelets: expenditure and income,”
*Studies in Nonlinear Dynamics and Econometrics*, vol. 3, no. 1, pp. 23–41, 1998. View at Zentralblatt MATH - A. Rua and L. C. Nunes, “A wavelet-based assessment of market risk: the emerging markets case,”
*The Quarterly Review of Economics and Finance*, vol. 52, pp. 84–92, 2012. View at Publisher · View at Google Scholar - M. Scharnag, “Wavelet analysis of loans in Germany,” Working Paper, Deutsche Bundesbank, 2011.
- L. Vacha and J. Barunik, “Co-movement of energy commodities revisited: evidence from wavelet coherence analysis,”
*Energy Economics*, vol. 34, pp. 241–247, 2012. View at Publisher · View at Google Scholar