Prediction of Financial Time-Series Signals Using á ...

2 downloads 0 Views 384KB Size Report
The set of decomposed time-series is then fed into the polynomial regression part before later combining to obtain the predicted sample. Results when.
Prediction of Financial Time-Series Signals Using á Trous Wavelet Transform 1,a *

Wassanun Sangjun

, Supawat Supakwong

1,b

and Suttipong Thajchayapong

2,c

1

Department of Electrical and Computer Engineering, Faculty of Engineering, Thammasat University, Pathumthani, Thailand

2

National Electronics and Computer Technology Center (NECTEC), Pathumthani, Thailand a

[email protected], [email protected], [email protected]

Keywords: á Trous wavelet transform, time-series, prediction

Abstract. The use of wavelet transform together with polynomial regression is proposed in this paper for prediction of financial time-series signals. The principle of wavelet transform is employed here for the purpose of decompressing financial time-series signals into different resolutions before individually processed and subsequently enter the prediction algorithm. As the last entry of the time-series represents the most up-to-date data and is considered to be crucially imperfect for data prediction, á Trous wavelet transform that only processes the past and present time-series samples is chosen for this propose in order to avoid the data edge problem. The set of decomposed time-series is then fed into the polynomial regression part before later combining to obtain the predicted sample. Results when evaluated with real-world financial time-series data show significant improvement on the prediction performance when the proposed á Trous wavelet transform is employed. Introduction Time-Series forecasting has been one of the most active fields of research with a vast amount of applications ranging from prediction of daily electric usage, amount of goods trading, to forecasting road traffic accident and price change in stock market [1]. In general, the fluctuation of time-series signal occurs in various levels. For instances, in financial market, stock prices change due to a number of factors including business revenue, economic outlook, breaking news, and fund flow. Subsequently, the time-series signal is composed of components in various frequencies (resolutions). The principle of wavelet transform can be used to extract or decompose the feature in each time period which can represents the important event from the data [2], which shall be benefit to investors and stock traders. However, when using wavelet transform for time-series prediction, the issue of data edge needs to be treated carefully. This is because the last sample on time-series on the right edge represents the most recent data and plays significant role for the next sample prediction. Conventional wavelet transform cannot process these data along the edge given that fact that the process involves the past, present as well as the future samples, which are not available in practice. Several approaches in [3,4] can be used to get around this limitation including using symmetric extension, using cyclic extension or using zero padding. However, these can be applied only for a certain type of signals such as for speech and images, but do not work well for the financial time series. For example, zero padding would unrealistically change the interpretation of financial data. á Trous wavelet transform was introduced for this propose. The advantage of this wavelet is comes from the fact that only the data from the past and present is used. á Trous wavelet has been widely used for prediction purposes for example in [5] á Trous wavelet transform was used in comparing algorithms to predict the amount of website access data, while in [6] was used with ANN to predict future trading.

1 Time-Series

D1 D’ D2

( x)

Wavelet Transform

D’

D1 ' D’ D2 '

2

Data Processing D’ (Trend, Dn ' Smoothing, An ' Histogram

Dn An

3

Dˆ1 Dˆ

Estimated Data

2

Prediction Algorithm

Dˆ n Aˆ

+

( xˆ)

n

Fig.1 Overview of the proposed algorithm in paper In this paper, the use of á Trous wavelet transform together with a polynomial regression analysis for financial time-series prediction as shown in Fig.1. The proposed method starts from decomposes the original signal ( x) into component of signal in various frequency then send these signal components to data processing for get along with noise before fed them to prediction process for predict future sample ( xˆ) . And this proposed method will be analyzed to see the performance enchantment as compared to the convention regression analysis method using real-world financial data. The rest of paper is organized as follow. Next section, the background and related work are presented, followed by the proposed method. Then, experimental results are discussed. Finally the paper is summarized in last section. Background and Related work á Trous wavelet transform, also referred to as the undecimated discrete wavelet transform (UDWT), is a close-form wavelet transform techniques that decomposes the original signal x(t ) into dyadic step levels due to the use of corresponding high-pass and low-pass band filters accordingly. From the financial time-series perspective, the approximation component of level j ( A[t ] j ) captures the trend of the signal which can calculate from Eq.1, while the detail component of level j ( D[t ] j ) represents the detail or fluctuation of the signal which can calculate from Eq.2. This process involves iterative computation as follows Eq.1 and Eq.2, where t is time step (day, minute) and x[t ] is the original signal at time t . For more details can be found in [5,6].

A t  j

D t  j

 0.5  x  t  1  x t     j 0.5 A t  2  j 1  A t  j 1   x t   A t  j    A t  j 1  A t  j 













if j = 0 otherwise

(1)

if j = 0 otherwise

(2)

Several work has include á Trous wavelet transform for prediction of finite time-series. For instance, in [6], the authors introduce the use of á Trous wavelet transform together with artificial neural network (ANN) for trading’s data prediction. The proposed algorithm in [6] contains 3 steps, namely data decomposition, feature selection, and data prediction. Their proposed algorithm gave good performance on real-world financial time-series data as compared to old neuro-wavelet algorithm. However, the main drawback is on ANN whose initialization complexity has various factor to consider such as the determination of different initial weight of neural network will affects to model’s error as well as the structure of model that affects to processing’s speed. In addition, the signal component after

decomposition may compose of noise or fluctuation that can undermine the prediction capability. In contrast, in our work presented here, we use some approaches to get along with noisy data and can keep or discard some component more flexibly. For prediction, we use polynomial regression analysis that simply create model. The Proposed Method Our proposed algorithm form Fig.1 can be summarized as follows. Step 1 : Wavelet Transform. The original time-series x(t ) is decomposed into n levels using á Trous wavelet transform. The results after decomposition contain the approximation at level n ( An ) together with the detail parts ( D1 , D2 , , Dn ) Step 2 : Data Processing. Outputs from the decomposed signal ( An , D1 , D2 , , Dn ) then get processed in this step. The aim is to smooth out the noise and keep only the major trend. Various approaches can be done such as a) Keep only An and treat D1 , D2 , , Dn as noise. b) Smoothing variations within An , D1 , D2 , , Dn using low-pass filter. c) Analyze the distribution for each scale of An , D1 , D2 , , Dn and set a hard-threshold for values exceeding a certain boundary. In this paper, we investigate all of these possibilities. Step 3 : Prediction Algorithm. There are various prediction algorithms can be employed here [5-7], the polynomial regression analysis is chosen in this work to minimize computational complexity of the algorithm. Performance Evaluation and Discussion For the propose comparison, two sets of real-world time-series are used in this paper, namely the daily close price index from Stock Exchange of Thailand (SET) and daily crude oil’s price from EU names New York Mercantile Exchange (NYMEX). The data are shown in Fig.2, each contains about 1,300 records from January 2009 to June 2014. It should be pointed out that even though the financial time-series are used here, with proper calibration, the proposed algorithm can be applied to other timeseries signals such as prediction of traffic conditions, water level, etc. In this work, the performance is evaluated using the total benefit and profit/loss as an indicator. The results are shown in Table 1. Several points can be addressed. For SET index, the result showed that the performance is maximized when the data processing employed only the trend of the time-series. This shows the nature of this signal type. Hence, investors who hold stocks for a longer period (2-5 weeks in this example) can gain more profit. This also shows that the fluctuation of the detailed parts D1 , D2 , , D5 may be treated as spectaculation. On the other hand, NYMEX crude oil’s price need both approximation and detail component. If we use estimated approximation signal add together with detail by smoothing method as referred “Smoothing”, it gives maximum returns.

Signal Type Original Trend Smoothing

Table 1 Comparison performance of each method SET Stock Data NYMEX Stock Data Num Num Num Total G/L Num Num Num Total Trade Gain Loss Benefit Ratio Trade Gain Loss Benefit 164 96 68 51.84 1.411 162 75 87 28.93 27 16 11 83.87 1.454 144 70 74 38.00 104 60 44 63.37 1.363 123 70 53 71.77

G/L Ratio 0.862 0.945 1.32

Histogram

132

78

54

72.61

1.444

144

70

74

38.73

0.945

(b) NYMEX stock data Fig.2 Data that use in this experiment (a) is SET stock data and (b) is NYMEX stock data. (a) SET stock

Summary Because of financial time-series data has many components in signal. So, the wavelet transform is used to decompose the signal to various resolutions. To solve the problem on the edge of data, the á Trous wavelet transform is used. In addition, to take care of noise and fluctuation in the signal, the data processing is needed before the prediction algorithm is deployed testing. This paper proposes the á Trous wavelet transform and polynomial regression to predict real-world financial time-series signals, SET index and crude oil’s price NYMEX data. The performance is evaluated by the total benefit and profit/loss. The result shows the significant improvement of result in prediction of financial time-series data. However, the financial time-series data depends much on external factors that affect to the ability to predict or model the data. Hence, in our future work we will consider to use the external factors that have affectation or use the other forecasting method for predict the future financial time-series data. References [1] Peter J. Brockwell and Richard A. Davis, “Introduction” in Introduction to Time Series and Forecasting, 2nd ed.: Springer, New York, 2002, ch. 1, pp. 1-44. [2] D. Lee Fugal, “Preview of Wavelets, Wavelet Filters and Wavelet Transforms” in Conceptual Wavelets In Digital Signal Processing.: Space & Signals Technical Pub., 2009, ch. 1, pp. 1-30. [3] Aiping Yang, Zhengxin Hou, Chengyou Wang, Xuewen Ding, Zhiyun Gao, "Construction of Wavelet Transform Matrices with Symmetric Boundary-Extension," Signal Processing, 2006 8th International Conference on , vol.2, no., pp.,, 16-20 2006. [4] Miha Boltežar and Janko Slavič, “Enhancements to the continuous wavelet transform for damping identifications on short signals,” Mechanical Systems and Signal Processing on, vol.18, issue 5, September 2004, Pages 1065-1076. [5] Renaud O. et al., “Wavelet-Based Combined Signal Filtering and Prediction,” in Systems, Man, and Cybernetics, Part B: Cybernetics, IEEE Transactions on, vol.35, no.6, pp.1241,1251, Dec. 2005.

[6] Zhang, B.-L.; Coggins, R.; Jabri, M.A.; Dersch, D.; Flower, B., "Multiresolution forecasting for futures trading using wavelet decompositions," Neural Networks, IEEE Transactions on , vol.12, no.4, pp.765,775, Jul 2001. [7] Perry J. Kaufman, “Regression Analysis” in Trading Systems and Methods, +Website, 5th ed.: Wiley, USA, Jan. 2013, ch. 6, pp. 235-278.

Suggest Documents