Paper Title (use style: paper title)

1 downloads 0 Views 818KB Size Report
Abstract— This paper evaluates whether the variable-length moving average (VMA) as input in NARX outperform the univariate exchange rate forecasting ...
(IJCSIS) International Journal of Computer Science and Information Security, Vol.13, No. 9, September 2015

Exchange Rates Forecasting Using Variable Length Moving Average - NARX Agus Sihabuddin, Subanar, Dedi Rosadi, Edi Winarko Computer Science Graduate Program, Faculty of Mathematics and Natural Science, Gadjah Mada University, Yogyakarta - Indonesia Abstract— This paper evaluates whether the variable-length

II.

moving average (VMA) as input in NARX outperform the univariate exchange rate forecasting performance. Six major rates of monthly data from January 1975 to April 2014 (USDAUD, USDCAD, USDEUR, USDGBP, USDJPY and USDCHF) are used to test the proposed model with a (1,5,0) VMA rule.

The study of Moving Average with trading range breakouts has predictive ability for financial market [4], [6] with long sufficient data [15]. The profitability of VMA method has been tested on a costly trading environment like in UK data[6].

We evaluate that the VMA can be used as input for NARX model and the forecasting accuracy is outperform the NAR univariate model with 19.97% improvement on Dstat and 3.17% improvement on MSE.

Recent literature on VMA has concluded that this method is technically more successful in the emerging market of Malaysia, Thailand and Taiwan but less powerfull in more developed countries like Hongkong and Japan [7]. [9].

Keywords— forecasting, major exchange rates, VMA, NAR, NARX

I.

RELATED WORK

The recent research shows that this method is not good as its historical sample tested out of sample over period of 1987 to 2011 and [16].

INTRODUCTION

Exchange rate forecasting has proved to be predictable using univariate model and it gives a good forecast accuracy[1]. In some cases, univariate specifications are limited that the market could be efficient and it can only be driven from outside indicators; the available time series are too short for significant technical analysis with the chosen forecasting horizon[2], and for some exchange rates, univariate model does not provide a good forecast [3].

III.

VMA-NARX METHOD

A VMA consists of comparison of two simple moving average, a longer- and a shorter- periods. Signals are generated by the short-term moving average crossing above or below the longer-term moving average [7], [15]. The rule of moving average period often uses the convention of 5-20 periods, 20-60 periods and 100-200 periods to detect short-, medium-, and long-term cycles of price movements, respectively. It depends on the economics circumstances and investors’ behaviors differ [16]. The short- and long-period of moving avergae are described below [8].

Technical analysis studies patterns in historical exchange rate series those are generated by time-to-time market activities, which aim to predict future market movements. The key information used by technical analyst is volume and price. Two technical trading rules were firstly tested extensively on DJIA during period of 1897 to 1986[4]. These two technical indicators are variable moving average (VMA) and trading range break-out. The additional research on this method is extensively done for many stock index data or single stock data [5]–[16]. VMA on exchange rate forecasting is used to filter the signal [17]. The use of VMA on exchange rates forecasting is still rare.

=



,

;

=



,

Where Ri,t is daily return in short-period of S, and Ri,t-l is the return in long-period of L. A trading range break-out (TRB) is used to filter the buy (sell) signal when the price penetrates the resistance level (local maximum or minimum). A buy (sell) signal is generated when price rises above (below) the resistance area. A 50, 150, 200 days of maximum (minimum) is often used as the resistance level and with or without 1% band break-out [4].

Nonlinear Autoregressive with eXogenous Inputs (NARX) that has been used for exchange rate forecasting with good result [18]–[20] can accommodate the VMA indicator as an input.

An important class of discrete-time nonlinear system is the NARX model and this model is well suited for modelling nonlinear system [21] . ( )= ( ( − 15

), … , ( − 1), ( ),



, … , ( − 1) (1)

http://sites.google.com/site/ijcsis/ ISSN 1947-5500

(IJCSIS) International Journal of Computer Science and Information Security, Vol.13, No. 9, September 2015

Where u(t) and y(t) represent input and output of the network at time t, nu and ny are the input and output order and f is a nonlinear function.

MSE



n



t 1

et n

2

(2)

VMA can be used as input to an artificial neural network especially NARX [22] like other trading indicators. Technical indicator is still valuable to trading decision because at least 90% of the respondent placed some weight on technical analysis for decisioon making [23]. The research goal were sets whether the VMA as input in NARX outperform the univariate exchange rate forecasting performance. The method is described as follows: 1. 2. 3. 4.

Compute the VMA of monthly six major exchange rates Use the VMA value as external input for the NARX model Calculate the forecasting performance Compare with NAR forecasting performance from previous work IV.

Fig. 1. Forecasting Process

Dstat is defined as follows [3]: 1 N D stat   at *100 % N t 1

EXPERIMENT AND RESULTS

A. Data The exchange rates data used here are monthly six major exchange rates from January 1975 until April 2014. The major exchange rates used here are USDAUD, USDCAD, USDJPY, USDGBP, USDEUR and USDCHF which are the major exchange rates in the foreign exchange market and 65.2% of exchange market liquidity in April 2013 [24]. Each data contains 472 records which is divided into 80% (377 data) for training, 5% (24 data) for validation, and 15% (71 data) for testing. This data partition is similar to[25]–[28].

(3)



where at=1 if ( x t 1  x t )( x t 1  x t )  0; otherwise 0. Dstat is more preferable in financial instruments forecasting because it gives the correctness of gradient prediction [3]. D. Result The proposed method is tested by using 10 experiments for each exchange rate pair. NAR algorithm result is used to get the univariate exchange rate forecasting and collected from the previous study [30] and used as a benchmark data. The best experiment results is presented in Table I for the MSE parameter.

The external input or external variable for NARX is exchange rate that has been processed with VMA. B. Methodology The selected variable moving average for short-, longperiods and band in this exchange rates forecasting is (1,5,0) similar to [17]. The short period is 1 because it is a monthly data and it is equal to about 24 daily data. The long periods is 5 and since it is a monthly data it is long enough and equal to about 120 daily data. It is still in the range of its original rule [4] and the consensus value [16]. We do not test trading range breakout since there is no major differences in efficacy of trading model in presence of trading band [8].

TABLE I.

FORECASTING PERFORMANCE VMA NARX ON MSE

NAR

USD AUD 3,5871

USD CAD 1,1381

USD EUR 6,6702

USD GBP 3,2602

USD JPY 7.565

USD CHF 1,3751

VMA-NARX

3,2391

1,1101

6,5202

3,2592

7.229

1,3731

MSE Dec.(%)

-9.70

-2.46

-2.25

-0.03

-4.45 -0.15 1= *10-3; 2=*10-4

Method

The VMA-NARX on MSE parameter gives the best derease of MSE for USDAUD (-9.70%) and the worst for USDGBP (-0.03%) with average of -3.17%.

Once the data calculated with VMA (1,5,0) then it is processed by NARX algorithm with preprocessing first, network training, network testing and performance measurement as shown in Fig 1.

The results for Dstat accuracy parameter is more promising in VMA-NARX model with the best accuracy improvement for USDGBP (37.84%) and the worst is USDEUR (4.66%) and the average of 19.97% for all exchange rates. The result is summarized in Table II.

C. Forecast Measure In order to evaluate the forecast accuracy of the models, two forecast error measurements are used: Mean Square Error (MSE) and directional statistics (Dstat). MSE is defined as follows [29]:

16

http://sites.google.com/site/ijcsis/ ISSN 1947-5500

(IJCSIS) International Journal of Computer Science and Information Security, Vol. 13, No. 9, September 2015 TABLE II. Method NAR (%) VMA-NARX (%) Dstat Inc. (%)

FORECASTING PERFORMANCE VMA NARX ON DSTAT USD AUD 57.75

USD CAD 47.89

USD EUR 60.56

USD GBP 52.11

USD JPY 47.89

USD CHF 57.75

66.2

60.56

63.38

71.83

60.56

63.38

14.63

26.46

4.66

37.84

26.46

9.75

The summary result for proposed method showed that VMA-NARX gives improvement for MSE and Dstat parameters for all exchange rates forecasting. With the average improvements of 3.17% for MSE and 19.97% for Dstat, it can be conclude that VMA can be used as input for NARX algorithm and the performance of proposed method outperform the NAR method for six major exchange rates pairs. V.

[7]

H. Bessembinder and K. Chan, “Market Efficiency and the Returns to Technical Analysis,” Financ. Manag., vol. 27, no. 2, pp. 5–17, 1998.

[8]

M. Ratner and R. Leal, “Tests of Technical Trading Strategies in the Emerging Equity Markets of Latin America and Asia,” J. Bank. Financ., vol. 23, no. May, pp. 1881– 1905, 1999.

[9]

A. Parvez, K. Beck, and E. Goldreyer, “Can Moving Average Technical Trading Strategies Help in Volatile and Declining Markets ? A Study of Some Emerging Asian Markets,” Manag. Financ., vol. 26, no. 6, pp. 49–62, 2000.

[10]

S. Achutan and R. Anubhai, “Effectiveness of Variable Length Moving Average ( VMA ) Trading Rules in the Indian Stock Mark,” Financ. India, vol. 19, no. 4, pp. 1375– 1391, 2005.

[11]

B. M. Cai, C. X. Cai, and K. Keasey, “Market Efficiency and Returns to Simple Technical Trading Rules: Further Evidence from U.S., U.K., Asian and Chinese Stock Markets,” Asia-Pacific Financ. Mark., vol. 12, no. 1, pp. 45–60, Jul. 2006.

[12]

M. D. Mckenzie, “Technical Trading Rules in Emerging Markets and the 1997 Asian Currency Crises Technical Trading Rules in Emerging Markets and the 1997 Asian Currency Crises,” Emerg. Mark. Financ. Trade, vol. 43, no. 4, pp. 46–73, 2007.

CONCLUSIONS.

The VMA could be applied as external input for a NARX algorithm and gives a better result compared to a univariate NAR algorithm for six major exchange rates. The proposed model gives 19.97% improvement on average for Dstat and 3.17% improvement on average for MSE. The accuracy performance could be improved by adding more variables to the models or combining with other models for further research. REFERENCES [1]

G. P. Zhang, “Time Series Forecasting using A Hybrid ARIMA and Neural Network Model,” Neurocomputing, vol. 50, pp. 159–175, 2003.

[13]

C. Lonnbark and A. Soultanaeva, “Profitability of Technical Trading Rules on the Baltic Stock Markets,” Umea Econ. Study, vol. 761, pp. 1–5, 2008.

[2]

B. R. Setyawati, R. C. Creese, and M. Jaraiedi, “Neural Networks for Univariate and Multivariate Time Series Forecasting,” Proceeding 2003 IIE Annu. Conf., 2003.

[14]

[3]

J. Yao and C. L. Tan, “A Case Study on Using Neural Networks to Perform Technical Forecasting of Forex,” Neurocomputing, vol. 34, no. 1–4, pp. 79–98, Sep. 2000.

H. Yu, G. V. Nartea, C. Gan, and L. J. Yao, “Predictive ability and profitability of simple technical trading rules: Recent evidence from Southeast Asian stock markets,” Int. Rev. Econ. Financ., vol. 25, pp. 356–371, Jan. 2012.

[15]

W. Brock, J. Lakonishok, and B. LeBaron, “Simple Technical Trading Rules and The Stochastic Properties od Stock Returns,” J. Finance, vol. 47, no. 5, pp. 1731–1764, 1992.

N. H. Hung and Y. Zhaojun, “Profitability of Applying Simple Moving Average Trading Rules for the Vietnamese Stock Market,” J. Bus. Manag., vol. 2, no. 3, pp. 22–31, 2013.

[16]

R. Sullivan, A. Timmermann, and H. White, “DataSnooping , Technical Trading Rule Performance , and the Bootstrap,” J. Finance, vol. 54, no. 5, pp. 1647–1691, 1999.

J. Fang, B. Jacobsen, and Y. Qin, “Predictability of The Simple Technical Trading Rules: An out-of-sample Test,” Rev. Financ. Econ., vol. 23, no. 1, pp. 30–45, Jan. 2014.

[17]

C. J. Neely and P. A. Weller, “Lessons from the Evolution of Foreign Exchange Trading Strategies,” Work. Pap. 2011021D Res. Div. Fed. Reserv. Bank St. Lois, 2013.

[18]

P. C. Soman, “An Adaptive NARX Neural Network Approach for Financial Time Series Prediction,” Thesis, State Univ. New Jersey, 2008.

[19]

E. Diaconescu, “The use of NARX Neural Networks to predict Chaotic Time Series,” WSEAS Trans. Comput. Res., vol. 3, no. 3, 2008.

[4]

[5]

[6]

R. Hudson, M. Dempsey, and K. Keasey, “A NOte on The Weak Form Efficiency of Capital Markets: The Application of Simple Technical Trading Rules to UK Stock Prices 1935 to 1994,” J. Bank. Financ., vol. 20, pp. 1121–1132, 1996.

17

http://sites.google.com/site/ijcsis/ ISSN 1947-5500

(IJCSIS) International Journal of Computer Science and Information Security, Vol. 13, No. 9, September 2015 [20]

C. Jiang and F. Song, “Sunspot Forecasting by Using Chaotic Time-series Analysis and NARX Network,” J. Comput., vol. 6, no. 7, pp. 1424–1429, Jul. 2011.

[21]

H. T. Siegelmann, B. G. Horne, C. L. Giles, and S. Member, “Computational Capabilities of Recurrent NARX Neural Networks,” IEEE Trans. Syst. MAN, Cybern. PART B Cybern., vol. 27, no. 2, pp. 208–215, 1997.

[22]

B. Vanstone and G. Finnie, “Combining Technical Analysis and Neural Networks in the Australian Stockmarket,” Work. Pap. Bond Univ., 2006.

[23]

B. J. Vanstone, G. Finnie, and B. Vanstone, “An Empirical Methodology For Developing Stockmarket Trading Systems Using Artificial Neural Networks An Emperical Methodology For Developing Stockmarket Trading Systems Using Artificial Neural Networks,” Work. Pap. Bond Univ., 2009.

[24]

[25]

[27]

M. Al Mamun and K. Nagasaka, “Artificial Neural Networks Applied to Long-term Electricity Demand Forecasting,” in Proceedings of the Fourth International Conference on Hybrid Intelligent Systems (HIS’04), 2004, pp. 0–5.

[28]

A. M. Oyewale, “Evaluation of Artificial Neural Networks in Foreign Exchange Forecasting,” Am. J. Theor. Appl. Stat., vol. 2, no. 4, pp. 94–101, 2013.

[30]

A. Sihabuddin, Subanar, D. Rosadi, and E. Winarko, “A Second Correlation Method for Multivariate Exchange Rates Forecasting,” Int. J. Adv. Comput. Sci. Appl., vol. 5, no. 7, pp. 30–33, 2014.

Subanar, he hold his doctoral (Ph.D) in statistics from University of Wisconsin, Madison, United States in 1976. He is currently a lecturer and professor in the Faculty of Mathematics and Natural Science, Gadjah Mada University. His research interests include Mathematic Statistics, Neural Network and Bootstrap Method. Dedi Rosadi, received the B.Sc., M.Sc. and Dr.rer.nat. degrees from Gadjah Mada University, Indonesia in 1996, University of Twente, the Nedherlands, in 1999, and Vienna University of Technology, Austria, in 2004 respectively. Since 2013, He is a professor at the Department of Mathematics, Gadjah Mada University. Dedi Rosadi is a regular member of ISI and ISAC. His research areas include time series analysis and computational statistics, including application for finance.

K. Kim and W. B. Lee, “Stock Market Prediction Using Artificial Neural Networks with Optimal Feature Transformation,” Neural Comput. Appl., vol. 13, pp. 255– 260, 2004. I. Kaastra and M. Boyd, “Designing A Neural Network for Forecasting Financial and Economic Time Series,” Neurocomputing, vol. 10, pp. 215–236, 1996.

B. Abraham and J. Ledolter, Statistical Methods for Forecasting. New Jersey: Wiley-Interscience, 1983.

Agus Sihabuddin received his Bachelor and Master degree from Computer Science, Gadjah Mada University, pursuing a doctoral at the same university. He is currently a lecturer in the Department of Computer Science and Electronics, Faculty of Mathematics and Natural Science, Gadjah Mada University. His research interests include time series forecasting, mobile applications and their applications.

Bank for International Settlements, “Triennial Central Bank Survey Foreign Exchange Turnover in April 2013 : Preliminary Global Results,” 2013.

[26]

[29]

Edi Winarko, lecturer at the Department of Computer Science and Electronics, Faculty of Mathematics and Natural Science, Gadjah Mada University. He holds his B.Sc. degree in Statistics Study Program, Gadjah Mada University, M.Sc. degree from Computer Science of Queen’s University Canada, and Ph.D. degree in Computer Science from Flinders University Australia. His research interests covers Data Warehousing and Data Mining, Information Retrieval.

18

http://sites.google.com/site/ijcsis/ ISSN 1947-5500