Subscribe Now Subscribe Today
Research Article

Application of Wavelet Method in Stock Exchange Problem

S.A.A. Karim, B.A. Karim, M.T. Ismail, M.K. Hasan and J. Sulaiman
Facebook Twitter Digg Reddit Linkedin StumbleUpon E-mail

The development of wavelet theory in recent years has motivated the emergence of applications such as in signal processing, image and function representation, finance, economics, numerical method etc. One of the dvantages wavelet as compared with Fourier is, it has fast algorithm to evaluate the series expansion. In the present study, we will discuss the applications of fast wavelet algorithm namely Discrete Wavelet Transform (DWT) in finance such as denoising the time series by using wavelet thresholding. Some numerical results by using real data will be presented.

Related Articles in ASCI
Similar Articles in this Journal
Search in Google Scholar
View Citation
Report Citation

  How to cite this article:

S.A.A. Karim, B.A. Karim, M.T. Ismail, M.K. Hasan and J. Sulaiman, 2011. Application of Wavelet Method in Stock Exchange Problem. Journal of Applied Sciences, 11: 1331-1335.

DOI: 10.3923/jas.2011.1331.1335

Received: October 18, 2010; Accepted: December 24, 2010; Published: March 09, 2011


Wavelets are relatively new in pure and applied mathematics field of research; they have, with respect to theory and applications, strong relations with Fourier Transform. Wavelets have emerged in the last twenty years as a synthesis of ideas from fields such as electrical engineering, statistics, physics, computer science, economy, finance and mathematics. Wavelet transform have beautiful and deep mathematical properties, making them well-adapted tool for a wide range of functional spaces, or equivalently, for very different types of data. On the other hand, they can be implemented via fast algorithms, essential to convert their mathematical efficiency into truly practical tool (Chui, 1992; Daubechies, 1992; Mallat, 1998).

Temperature, water level or closed market prices over a period of time are an example of time series data. In its descriptive form, time series data may be defined as a set of data collected or arranged in a sequence of order over a successive equal increment of time. An example of a financial time series that will be used in this study is the Kuala Lumpur Composite Index (KLCI). We use daily closing data covering the period of 1 January 1995 to December 31, 2008 (the total data sets are 3706). The index is denominated in local currency units, extracted from the Bloomberg Database. It is undeniably, the daily data contain too much noise and are subject to the problem of non-synchronous infrequent trading. KLCI time series moves on the basis of supply and demand for shares. Therefore, the supply and demand curve will be surrounded by noise created by random order signal.

Noise is an unwanted modulation of the carrier whose presence interferes with the detection of the desired signal (Resnikoff and Wells, 1998). Noise is extraneous information in a signal that can be filtered out via the computation of averaging and detailing coefficients in the wavelet transformation. In fact many statistical phenomena have wavelet structure. Often small bursts of high frequency wavelets are followed by lower frequency waves or vice versa. The theory of wavelets reconstruction helps to localize and identify such accumulations of small waves and helps thus to better understand reason for these phenomena. In addition, wavelet theory is different from Fourier analysis and spectral theory since it is based on a local frequency representation (Hardle et al., 1998).


In this section we will review the basic definition of Wavelet theory by using Multiresolution Analysis (MRA) approach. For more detail the reader can referred the books on wavelet by Chui ( 1992), Daubechies (1992), Hardle et al. (1998), Mallat (1998), Meyer (1992) and Van Fleet (2008).

Until recently wavelet analysis via MRA approach has been found to be a reliable method in financial and economic analysis, in particular for stock market and foreign exchange. Applications of wavelets in finance can be seen in the study of non-stationary and non-linearity property of financial time series because of structure change, volatility and long-memory process. Furthermore, wavelet methods have also being use as a tool for forecasting. In addition, wavelets decompositions of a signal or data can be adopted to improve the hypothesis testing on existing theories and can also provide insights of financial phenomena and enhance the development of theories.

Based on Mallat (1989), Mallat (1998) and Meyer (1992), suppose that there exists a function φ(t) ε L2 (R), such that the family of functions:


is an orthonormal basis of Vj.

Definition 1 (multiresolution representation): We define a MRA in L2 (R) as a sequence of closed subspaces Vj, jεZ, of L2 (R), satisfying the following properties:

(M2) fεVj if and only if, f(2t)εVj+1
(M4) . [ is dense in L2 (R)]
(M5) There exists a function φεV0 such that the set{φ (t-k); kεZ} is an orthonormal basis of V0.

Each of the subspaces Vj is called scale space. Furthermore we called 2-j as resolution. We know that given two consecutive scale spaces Vj⊂Vj+1, the orthogonal complement Wj of Vj in Vj+1 could be obtained using a band-pass filter defined on L2 (R). For every jεZ, we define Wj as the orthogonal complement of Vj in Vj+1. We have Vj+1 = Vj⊕ Wj.

Moreover, (M4) also show that:


That is, we obtained a decomposition of L2 (R) as a sum of orthogonal subspaces. Equation 2 means that any f∈L2 (R) can be represented as a series (convergent in L2 (R)):


where, αk and βjk are coefficients defined by Eq. 4 and {ψjk}, kεZ is a basis for Wj. The relation (3) is called a multiresolution expansion of f. To turn (3) into wavelet expansion one needs to justify the use of

Basically, the function φjk(x) and ψjk(x) are called the scaling function (father wavelet) and the mother wavelet respectively. The space and are called detail space and approximation space, respectively. In the Fourier analysis we have only one resolution level, meanwhile in MRA there are many resolution levels.


Often in the wavelet literature the αk are called approximation/coarser coefficients and βjk are called detail coefficients.

Lemma 1: Let φ be a father wavelet, which generates a MRA of L2(R). The inverse Fourier transform ψof


where, is a mother wavelet

Lemma 2: The mother wavelet satisfies:


where, For the father wavelet we have the relations:


In this study, we use the symlet 4 wavelet (8 filter coefficient). To show the power of DWT, we apply the symlet 4 to denoise time series data up to seven level of approximation.

Figure 1 show the example of symlet 4 scaling function and its corresponding wavelet function. Meanwhile Fig. 2 show the wavelet decomposition for the original time series data (KLCI data). For this data set, the best level of decomposition is 7. We can see clearly from Fig. 2, even at level 7, the wavelet decomposition already contains the main patterns of the original time series that is appear very volatile and various point of spike.

Fig. 1: Symlet 4 scaling function and wavelet function


The denoising algorithm that can be used in order to denoise any signal (time series) that contains the unwanted noise is listed in Algorithm 1.

However, before that, we will discuss briefly about thresholding. There are two main rules of thresholding either soft thresholding or hard thresholding. Given a wavelet coefficient and threshold value, the hard threshold value of the coefficient can be written as:

While the soft threshold value is

Fig. 2: Wavelet decomposition to the original time series up to level 7 (a) approximation and (b) detail

Fig. 3: Denoised original signal using DWT (various thresholding approach)

Where, I is the usual indicator function. In other words, hard means keep or kill while soft means shrink or kill (Hardle et al., 1998; Van Fleet, 2008).

The rule that usually being adopted is the soft thresholding.

Although the hard thresholding is able to preserve the peak, it also produce greater spurious oscillations and close discontinuties. There are a few methods can be use to find the threshold value. Some of these methods are Universal Threshold Method, Sure Threshold, Two fold Cross validation Method, Level dependent, Cross validation Method, and Ebays Threshold Method.

Algorithm 1: Algorithm for denoising:

Step 1: Apply a DWT to the original signal (time series)
Step 2: Remove the small (detail/wavelets) coefficients by using thresholding method (hard thresholding or soft thresholding).
Step 3: Reconstruct the original signal (we obtain the reconstruct signal)

Now we describe how to denoise the signal (any type of signal): Starting with the signal, we first decompose it over an orthogonal wavelet basis (in this paper we use symlet 4 using the discrete wavelet transform (DWT). Then we select a part of the coefficients through thresholding and we keep the coefficients of approximation above the threshold value. For signal denoising using DWT we have various denoising method that can be used in order to remove the noise from the original signal while its still preserving any spike or anomaly that is exist in the original signal (in our case it is time series data). Normally, denoising of data require either hard thresholding or soft thresholding (Van Fleet, 2008) and then we can used various denoising method such as Heuristic SURE, SURE, Minimax and Fixed-Form method (Donoho and Johnstone, 1994; Donoho and Johnstone, 1995; Antoniadis, 1997, 2007; Karim and Ismail, 2008; Karim et al., 2008; Rizzi et al., 2009; Van Fleet, 2008).

Figure 3 show the denoise signal (time series) by using various type of thresholding selection rule. In this example we apply the soft thresholding and hard thresholding methods. We can see that for this dataset, the Minimax and fixed form threshold give us the better result as compare to the heuristic SURE and SURE options. It is clear that, the denoised time series are clean and the least distorted.


In this study we have discussed the basic theory of wavelet and its application in financial problem e.g., denoising the KLCI time series data that consist noise. We have utilized symlet 4 (8 lowpass and highpass filters respectively). The result show that the Minimax and fixed form threshold give us the better result as compare to the heuristic SURE and SURE methods. Future research will focus on forecasting volatility of the time series by using wavelets algorithm. The authors are keen to discuss it in a subsequent paper.


The first author would like to thanks to Universiti Teknologi PETRONAS for providing the financial support and computing facilities including Matlab software.

Antoniadis, A., 1997. Wavelets in statistics: A review. J. Italian Statist. Soc., 6: 97-130.
Direct Link  |  

Antoniadis, A., 2007. Wavelet methods in statistics: Some recent developments and their applications. Stat. Surv., 1: 16-55.
CrossRef  |  Direct Link  |  

Chui, C.K., 1992. An Introduction to Wavelets. Academic Press, San Diego, New York, ISBN 0121745848..

Daubechies, I., 1992. Ten Lectures on Wavelets. Vol. 61, Society for Industrial Applied Maths, Philadelphia, pp: 357.

Donoho, D.L. and I.M. Johnstone, 1994. Ideal spatial adaptation by wavelet shrinkage. Biometrika, 81: 425-455.
CrossRef  |  Direct Link  |  

Donoho, D.L. and I.M. Johnstone, 1995. Adapting to unknown smootnees via wavelet shrinkage. J. Am. Statist. Soc., 90: 1200-1224.
Direct Link  |  

Hardle, W., G. Kerkyacharian, D. Picard and A. Tsybakov, 1998. Wavelets, Approximation and Statistical Applications, (Lecture Notes in Statistics). Vol. 129, Springer, New York.

Karim, S.A. and M.T. Ismail, 2008. Wavelet method in statistics. Proceedings of the 16th National Symposium on Mathematical Sciences, June 3-5, Kota Baharu, pp: 95-103.

Karim, S.A.A., M.T. Ismail and B.A. Karim, 2008. Denoising non-stationary time series using daubechies wavelets. Proceedings of Seminar Kebangsaan Matematik and Masyarakat, Feb. 13-14, Kuala Terengganu, pp: 50-59.

Mallat, S.A., 1998. Wavelet Tour of Signal Processing. Academic Press, San Diego.

Mallat, S.G., 1989. A theory for multiresolution signal decomposition: The wavelet representation. IEEE Trans. Pattern Anal. Mach. Intell., 11: 674-693.
CrossRef  |  Direct Link  |  

Meyer, Y., 1992. Wavelet and Operators. Cambridge University Press, Cambridge.

Resnikoff, H.L. and R.O. Wells, 1998. Wavelets Analysis: A Scalable Structure of Information. Springer-Verlag, New York.

Rizzi, M., D. Matteo and C. Beniamino, 2009. High sensitivity and noise immune method to detect impedance cardiography characteristic points using wavelet transform. J. Applied Sci., 9: 1412-1421.
CrossRef  |  Direct Link  |  

Van Fleet, P.J., 2008. Discrete Wavelet Transformation: An Elementary Approach with Application. John Wiley and Sons, New Jersey.

©  2020 Science Alert. All Rights Reserved