Tutor HuntResources Physics Resources

Wavelet Transform And Its Application In Time Series Analysis Of Various Foreign Exchange Rates

We try to analyze various foreign exchange rates over the last 14 years with the help of wavelet transforms.

Date : 28/09/2014

Author Information

Dhananjay

Uploaded by : Dhananjay
Uploaded on : 28/09/2014
Subject : Physics

1. MOTIVATION AND INTRODUCTION

The exchange rate is a key financial variable that affects decisions made by foreign exchange investors, exporters, importers, bankers, businesses, financial institutions, policymakers and tourists in the developed as well as developing world. Movements in exchange rates thus have important implications for the economy's business cycle, trade and capital flows and are therefore crucial for understanding financial developments and changes in economic policy. Timely forecasts of exchange rates can therefore provide valuable information to decision makers and participants in the spheres of international finance, trade and policy making. Nevertheless, the empirical literature is skeptical about the possibility of accurately predicting exchange rates. Here we focus on the exchange rate of the Indian rupee vis-à-vis major foreign currencies-the US dollar, the Pound Sterling, the Euro and the Japanese Yen, i.e., the Rupees per unit of foreign currency.

2.Data The data(foreign exchange rates) was collected from RBI's website for the following foreign currencies for a period spanning over 14 years(August 25,1998 to November 7,2013): the US dollar, the Pound Sterling, the Euro and the Japanese Yen. 3.A brief introduction to wavelet transform In signal processing, the representation of signals plays a fundamental role. Most of the signals in practice are time domain signals in their raw format. This representation is not always the best representation of the signal for most of the signal processing related applications. In many cases, the useful information is hidden in the frequency content (spectral components) of the signal. Wavelet Transform is one of the frequency transforms used. In Wavelet analysis the signal is multiplied with a function (wavelet), similar to a window function and the transform is computed separately for the different portions of the time domain signal. The width of this wavelet function is changed while computing the transform, based on the signal spectral components. Wavelet Analysis has become a common tool for analyzing localized variations of power within a time series. By decomposing a time series into time-frequency space, one is able to determine both the dominant modes of variability and how those modes vary in time. A wavelet is a small wave which oscillates and decays in the time domain. Unlike the Fourier transform, wavelets can have infinite varieties which are fundamentally different from each other. The ones which have strictly finite extent in the time domain, are known as discrete wavelets, otherwise they are called continuous wavelets. Wavelet basis consist of two orthogonal functions: 1. Parent wavelet or the scaling function ?(t) 2. Mother wavelet or the wavelet function ?? (t) By scaling and translation of these orthogonal functions, complete basis is obtained. The following conditions are satisfied by scaling and wavelet functions. where A is a constant. It can be noted that the energies of these functions are finite as indicated below, Also the functions are orthogonal to each other as shown below, There are two basic operations in Wavelet theory. They are translation and scaling. Translation is the action of using scaling function in different windows. Scaling is an operation which makes a given object thicker or thinner, by the choice of a parameter. There is freedom of deciding the number of levels of decomposition. The choice of the width of the scaling function is thus a free parameter, depending upon which the mother and daughter wavelet sizes are determined. In Discrete Wavelet Transform (DWT), the function f(t) can be represented as, Here the coefficients ck's and ??j,k's represent the discrete wavelet transform of the function ??(t). ck's capture the average parts and are called low pass coefficient and ??j,k's represent the variations at different scales, present in the function or signal and are called detail or high pass coefficients. These features are common to all the wavelets. Coefficients are extracted as, Here the continuous wavelet transform of the approximated-data has been performed with the Morlet wavelet Where n is the localized time index and ??0=6 for zero mean and localization in both time and frequency space.

4. Data Analysis The Algorithm: 1. To study the general trend in the data, the original time series was decomposed with discrete wavelet transform to remove some of the high frequency components. Various discrete wavelet transform was done on the original time series with the Daubechies 4 wavelet. The Daubechies family of wavelets is made to satisfy vanishing moments conditions, due to which this family of wavelets extracts polynomial trends. For example, we used Db4, where, for n = 1, the wavelet coe?cients are blind to a linear trend. These are captured by the low-pass coe?cients. 2. The approximation thus obtained was then put to continuous wavelet transform using the Morlet wavelet to find out the wavelet coefficients for each scale and time.

3. The semi-log plot of the wavelet power summed over all times for all scales is done.

Dollar vs Rupee

Figure: Dollar/Rupee vs time

I chose to work with the level-3 filtered data. Figure : First level approximation (top) and the first level detail (bottom) of the series after its level-3 de-noising using the Db4 Wavelet. Figure: Zoomed view of the first level detail (bottom) of the series after its level-3 de-noising using the Db4 Wavelet.

The level 3 approximation thus obtained was then put to continuous wavelet transform using the Morlet wavelet to find out the wavelet coefficients for each scale and time: Figure: The 3 dimensional scalogram obtained by plotting the continuous wavelet coefficients at various scales and times. Figure: Percentage of energy for each wavelet coefficient.

The Continuous Wavelet Transform plot obtained shows periodicities at certain specific scales.

To obtain the exact periodicities the semi-log plot of wavelet power summed over all time at different scales (time period) is done. Figure : Semi-log plot of the wavelet power at various scales.

The wavelet power at a particular scale is calculated as sum of the modulus of the wavelet coefficients at that particular scale for all times. One clearly observes periodic modulations at these scales: 129,672,1174 and 1993 The normalized Continuous Wavelet Transform coefficients at the above scales are plotted for all times, superimposed on the normalized low pass approximation of the raw data: Figure: Normalized Continuous Wavelet Transform coefficients at the above found scales are plotted for all times, superimposed on the normalized low pass approximation of the raw data Comparison with raw data We do a similar analysis with our raw data to find out the scales of dominant periodicities in it. The raw data is put to continuous wavelet transform using the Morlet wavelet. The semi-log plot of the wavelet power summed over all times for all scales is done for the raw data, which is shown in the figure below. This figure shows periodic variations at scales 18,129,672,1174 and 1993 The scale 18 can be considered to be the noise which was removed in the previous analysis by the discrete wavelet transform. The other periodic modulation time periods are almost the same as that of the previous analysis. CORRELATION AND MULTIFRACTAL BEHAVIOR ANALYSIS Any given time-series may exhibit a variety of auto-correlation structures. For example, successive terms may show strong ('brown noise'), moderate ('pink noise') or no ('white noise') positive correlation with previous terms. The strength of these correlations provides useful information about the inherent "memory" of the system. A number of methods have also been developed in order to characterise the"colour" of time series data. These include (i) Estimating the Hurst Scaling Exponent, which quantifies the persistence of statistical behaviour in the time-series (ii) Another approach for estimating this effect is to estimate the Scaling Exponent (?) in the power spectrum of the time series ( (??)~?????). The exponent is determined by carrying a linear regression on the log-log transformed Fourier Transform and estimating the slope of this straight line. The Hurst scaling exponent can be estimated using a number of methods. We have used here the Multi-fractal de-trended fluctuation analysis, MFDFA technique using the quadratic fitting. [Dr. P. Manimaran's program has been used for characterizing the Hurst exponents at various orders of moments (q)] Plot showing the variance of the fluctuations with scales found out using the 'quadmfdfa.m' program at various values of q is shown in the figure below. Figure:Plot showing the variance of the fluctuations ??q(??) with the scale s on a log-log transformed graph Figure - plot of h(q) vs. q . At q=2, the value of h(q=2) is known to be Hurst exponent. So Hurst exponent is found out to be 0.5364.

For the mono-fractal time series, h(q) values are independent of q and for the multi-fractal time series h(q) values are dependent on q. h(q = 2) = H, the Hurst scaling exponent is a measure of fractal nature . Here H < 0.5 and H > 0.5 reveal the anti-persistent and persistent nature of the time series, whereas H = 0.5 is for random time series. To verify the value of this Hurst exponent we have also analyzed the scaling behavior through Fourier power spectral analysis. It is well known that, P(??) ~ ????? Figure - log-log plot of the power of FFT vs. frequency. Linear fitting of the plot gives the scaling exponent value from which we can calculate the Hurst exponent value. Scaling exponent ??=negative of slope=1.9 The obtained scaling exponent can be compared with that of the Hurst exponent by the relation, ?? = 2?? + 1. From here H is found out to be 0.45

Henceforth, all the filtering was carried out using Db4 wavelet(level four).

Dollar vs Rupee

Filtered data . Pound Sterling vs Rupee Raw data Filtered data . Euro vs. Rupee Raw data

Filtered data

. Japanese Yen vs. Rupee Raw data:

Filtered data: 5.RESULTS The fundamental time period were found out to be: . US Dollar: 125 days . Pound Sterling: 40 days . Euro: 20 days . Japanese Yen: 62 days

Correlation Matrix was found to be Kolmogorov-Smirnov test We got the value to be 1 thus rejecting the null hypotheses that the data comes from a standard normal distribution.

6.Conclusion The dollar/rupee time series is persistent in nature since the Hurst exponent H(calculated using MFDFA technique) came out to be 0.5384>0.5 The Hurst exponent found using two different methods were close: 0.5384(MFDFA technique) and 0.45(Fourier power spectral analysis method) The correlation coefficients between the following pairs were found to be quite high(>0.70): . Japanese Yen and US dollar: 0.729 . Japanese Yen and Euro: 0.734 . Pound Sterling and Euro: 0.711 Also striking similarities in these correlation values can be noticed.

7.REFERENCES 1. Modelling and forecasting the indian RE/US dollar exchange rate Pami Dua 2. S. Mallat, A Wavelet Tour of Signal Processing (Academic Press, 1999). 3. Statistical properties of Fluctuations: A method to check Market Behavior; Prasanta K. Panigrahi, Sayantan Ghosh, P. Manimaran, Dilip P. Ahalpara. 4. Multi-resolution analysis of fluctuations in non-stationary time series through discrete wavelets P. Manimaran, Prasanta K. Panigrahi and Jitendra C. Parikh 5. Estimating 1/ f? scaling exponents from short time-series Octavio Miramontes, Pejman Rohani 6. I. Daubechies, Ten lectures on wavelets (SIAM, Philadelphia, 1992).

This resource was uploaded by: Dhananjay

Other articles by this author