Wavelet Analysis for Financial Market Data
By Robert Tong, Senior Technical Consultant at NAG
Financial markets generate large quantities of high-frequency data which must be analysed to inform trading decisions. Wavelet multi-resolution analysis is increasingly being applied to these data sets because it enables the practitioner to focus on particular time scales where trading patterns are considered important.
The raw market data consists of market prices which are recorded as transactions occur and are irregularly spaced in time. Errors may be present due to faulty input or other factors and the prices can be given as bid-ask pairs, such as in the Foreign Exchange (FX) spot market. A pre-processing stage is therefore required to clean and present the raw tick by tick price information as a homogeneous (regularly spaced) time series for analysis. It is essential that any initial cleaning, filtering or sampling steps do not transmit spurious features to the following analysis stage.
The application of a wavelet multi-resolution analysis to a data set involves translation and scaling of the wavelet basis function in a convolution algorithm. This produces a decomposition of the data set into vectors of coefficients, each associated with a particular time scale which is determined by the scaling of the relevant wavelet function. This can be particularly useful for financial market data where one might want to distinguish diurnal trading patterns from other price movements.
There are several possible choices of wavelet method. The Discrete Wavelet Transform (DWT) is widely used for image processing and data compression, but this transform is not translation invariant and imposes a restriction on the length of the data set if a complete multi-resolution analysis is to be carried out. For the analysis of market data, the Maximal Overlap Discrete Wavelet Transform (MODWT) or stationary wavelet transform is preferred. This avoids some disadvantages of the DWT in this context, but at the expense of storing additional coefficients as part of the analysis.
As an example, consider the application of the MODWT to FX spot prices for the Yen (JPY) against the New Zealand dollar (NZD) for January to June 2007. This produces a decomposition into detail coefficients for the different wavelet scales, d1 - d6, together with a vector of smooth coefficients, s6 (see Figure). There are some jumps in the time series of prices, x(t), which appear as larger values in the smallest time scale detail coefficients, d1 and d2, but the smooth coefficients, s6, suggest an underlying oscillation about some notional mean value for the time period covered by the price data. The wavelet coefficients here clarify the features of the price data at the different time scales.
Wavelet analysis of FX rates, Jan-June 2007: Yen (JPY) against New Zealand Dollar (NZD), using Daubechies Least Asymmetric wavelets with eight coefficients, LA(8).
Wavelet analysis provides an important tool for extracting information from financial market data with applications ranging from short term prediction to the testing of market models and the calculation of variance in relation to specific time scales.
Due to the increasing demand for wavelet analysis NAG experts have developed a collection of wavelets which are now included in the NAG Library and NAG Toolbox for MATLAB.