WEB-BASED EXCHANGE RATE FORECASTING: TOP 5 SOUTHEAST ASIAN CURRENCIES TO PHILIPPINE PESO USING ARTIFICIAL NEURAL NETWORK Albert A. Vinluan1, Jerome Ian C. Llaguno2, Marnie Bright R. Palapar3 1
Program/Research Coordinator, College of Computer Studies, New Era University, Philippines
[email protected] 2 College of Computer Studies, New Era University, Philippines
[email protected] 3 College of Computer Studies, New Era University, Philippines
[email protected]
ABSTRACT This study focused on the development of a web-based forecasting system for the top five Southeast Asian currencies frequently exchanged in the Philippines. Aimed towards helping the government, investors, economists, researchers and other financial institutions to determine the status of the peso with its neighboring countries in the foreign exchange market; the system automatically gathered data from the online reference exchange rate bulletin of the Central Bank of the Philippines. An artificial neural network (ANN) algorithm was used to predict currency exchange rates between the Singapore dollar, Brunei dollar, Indonesian Rupiah, Malaysian Ringgit, Thai Baht, and the Philippine peso in daily and weekly time series. The researchers applied the supervised artificial neural network in the implementation of the web-based forecasting system. A supervised artificial neural network is a strategy that needs a known data set (history exchange rates) first for the system to make guesses. The performance of the forecasting was calculated by percentage of error, and the evaluation results showed that a supervised ANN was an effective algorithm for the web application due to its capability to increase its accuracy (average percentage error of 60.34% for the Philippine peso to Singapore Dollar past exchange rates) and reduce its rate of error with training (an average of 2.93% per test).
KEYWORDS Artificial Neural Network, Foreign Currency Exchange, Web-based Forecasting, Southeast Asian Currencies, Singapore dollar, Brunei dollar, Indonesian Rupiah, Malaysian Ringgit, Thai Baht, Philippine Peso
I. INTRODUCTION Every nation trades with other nations in the world. The foreign exchange (forex) is the market where goods and services are traded between international buyers and sellers. thru certain means of payment. Since the units of account are not the same, the foreign currency is traded for the domestic currency to consummate the transaction. The exchange rate, which is the value of a currency in terms of another currency, is used to determine the accumulated amount of the trade. In the Philippines, the government follows a market determined foreign exchange policy; the exchange rate is not fixed at a given level, allowing the interplay of supply and demand for the peso to determine the exchange rate. This interplay is often influenced by many related factors, including political events, general economic conditions, and traders’ expectations, resulting in the forex market’s high complexity and volatility. Moreover, the status of the peso in the forex
affects the country’s inflation and future price movements of imported goods and services as well as the cost of servicing (principal and interest payments) on its foreign debt. Developing an exchange rate forecasting system between the Philippine peso and its neighboring countries’ currencies, namely the Singapore dollar, Brunei dollar, Indonesian Rupiah, Malaysian Ringgit and Thai Baht will provide trading decision information for the government, financial institutions, investors, economists and researchers in order to determine the peso exchange rate’s impact to the country’s economy and to the Southeast Asian region. The web-based system will utilize data-driven and self-adaptive methods of artificial neural networks (ANNs) to predict exchange rates of these currencies in daily and weekly series based on the reference exchange rate bulletin of the Central Bank of the Philippines (Bangko Sentral ng Pilipinas). The following sections discuss more about the currency exchange rate forecasting system. Section 2 describes other related systems. Section 3 presents the system architecture. Section 4 explains the evaluation used by the system, with Section 5 clarifying the results and observations. Lastly, Section 6 cites recommendations and conclusions for improvements of the system. II. RELATED WORK The Artificial Neural Network (ANN) is an emerging computational technique that provides a new avenue for exploring dynamics of various economic and financial applications. The ANN is an information process technique for modeling mathematical relationships between input variables and output variables. It is a class of generalized non-linear non-parametric models inspired by studies of the brain and nerve system [1]. The use of historic data to determine the direction of future trends. Forecasting is used by companies to determine how to allocate their budgets for an upcoming period of time. This is typically based on demand for the goods and services it offers, compared to the cost of producing them. Investors utilize forecasting to determine if events affecting a company, such as sales expectations, will increase or decrease the price of shares in that company. Forecasting also provides an important benchmark for firms which have a long-term perspective of operations [9]. III. SYSTEM ARCHITECTURE AND IMPLEMENTATION A neural network is a “connectionist” computational system. The computational systems are procedural; a program starts at the first line of code, executes it, and goes on to the next, following instructions in a linear fashion. A true neural network does not follow a linear path. Rather, information is processed collectively, in parallel throughout a network of nodes (the nodes, in this case, being neurons) [6]. The ANN model (refer to Figure 1) takes an input vector X (the previous exchange rates) and produces output vector Y, the forecasted rate. Before producing the output Y, the input X must undergo processes and calculations in the hidden layer to produce the output. There can be one hidden layer in a neural network or more. The neural network can then be trained by giving more input values to generate outputs closer to the exact values.
Figure 1. Artificial Neural Network
The type of artificial neural network that the researchers will use is the supervised. Supervised is the best strategy to use in this kind of problem since there is a known data set that can be used. A supervised artificial neural network is a method that needs a trainer or a teacher smarter than that of the network. The network will make its guesses and the teacher will give the answer. The network will compare its guesses to the correct answer and make some adjustments to make the next guess closer to the correct answer. To implement this, the system used the Hypertext Preprocessor (PHP) language and MySQL as the back end and Hypertext Markup Language (HTML) and Cascading Style Sheets (CSS) as the front end. The PHP code retrieved the data of currency conversion and history of currency exchange rate from the Central Bank of the Philippines Reference Exchange Rate Bulletin and calculated the forecasted value, storing it in a MySQL database while the HTML, Javascript and CSS3 were for the design and formatting of the web application. IV. EVALUATION There are two equations used in this study shown below in the form of Eqn (1) and Eqn (2). Since the neural network can be trained, the weights must be adjusted so that the forecasted value will be closer to the exact value. As such, the first equation is for computing the new weight for the ANN while the latter is for calculating the percentage of error of the system.
𝑛𝑒𝑤 𝑤𝑒𝑖𝑔ℎ𝑡 = 𝑤𝑒𝑖𝑔ℎ𝑡 + (𝑙𝑒𝑎𝑟𝑛𝑖𝑛𝑔 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 × 𝑒𝑟𝑟𝑜𝑟 × 𝑑𝑎𝑡𝑎) |𝐹𝑜𝑟𝑒𝑐𝑎𝑠𝑡 𝑉𝑎𝑙𝑢𝑒 –𝐸𝑥𝑎𝑐𝑡 𝑉𝑎𝑙𝑢𝑒| 𝐸𝑥𝑎𝑐𝑡 𝑉𝑎𝑙𝑢𝑒
× 100%
(1) (2)
V. RESULTS AND OBSERVATION The percentage of error was uncertain at first due to the randomized weights used by the neural network. But as it was being trained, the weights had adjusted and the percentage of error will decrease. The researchers calculated the percentage of error of the system during training. The data set used by researchers was based on history exchange rates of the Philippine peso and the Singapore Dollar from March 1 to April 19, 2015.
38% Training Set 62%
Testing Set
Figure 2. Ratio of Training Data Set to Testing Data Set The training data set used by the researchers consists of Singapore Dollar Exchange Rate from March 1, 2015 to March 31, 2015 while the testing data set consists of Singapore Dollar Exchange Rate from April 1, 2015 to April 19, 2015 The results are shown on the table below.
Table 1. Singapore Dollar to Philippine Peso Forecast From April 1, 2015 to April 19, 2015 Test
Percentage Error
1 67.61% 2 65.87% 3 64.22% 4 62.79% 5 60.56% 6 59.91% 7 58.25% 8 56.38% 9 54.90% 10 53.42% 11 51.59% 12 49.96% 13 48.37% 14 46.70% 15 45.43% 16 43.80% 17 42.26% 18 40.86% 19 39.35% Average Percentage Error
No. of Inputs 24 25 26 27 28 29 30 31 32 33
34 35 36 37 38 39 40 41 42 53.28%
On the first test, the percentage error was at 81.23% for the 24 inputs. When the system undertook its training, the final test resulted in a 39.35% for the 42 outputs. Overall, the system averaged a percentage error of 53.28% and an average decrease per test of 1.57%. The system needs a large data set for training so that the percentage of error will be decreased to a single digit. VI. CONCLUSION, RECOMMENDATION AND POLICY IMPLICATIONS Results of the evaluation suggest the increasing accuracy of the system during training and the desired objective of predicting currency exchange rates with foreign monetary values with the Philippine peso is achieved. This proves that the supervised artificial neural network is an effective algorithm for forecasting in the web-based application. The researchers recommend to the next developers to make the system available for forecast from Philippine Peso to other currencies beside the Singapore dollar, Brunei dollar, Indonesian Rupiah, Malaysian Ringgit and Thai Baht, and more so, in mobile platforms. Regarding its implementation, the policy implication of the system is that data inputted during training must be precise for greater accuracy and lesser training time. The weights and other variables must be constant or else the web application may fail to produce accurate results.
VII. REFERENCES [1] Alon, I., Min Q. and Sadowski, R. J. (2001). Forecasting Aggregate Retail Sales: A Comparision of Artificial Neural Networks and Traditional Methods. Journal of Retailing and Consumer Services, 8, no. 3, p. 147-156. [2] Latitudes. (2012, March 3). Introduction to Southeast Asia: 11 Countries, 620 million people!. Retrieved from http://latitudes.nu/introduction-to-southeast-asia-11-countries-593million-people/ [3] Pradhan, R. and Kumar, R. (2010). Forecasting Exchange Rate in India: An Application of Artificial Neural Network Model. Journal of Mathematics Research, 2, no.4. [4] Price, C., Zhu, J, and Hillier, F. (2007). International Series in Operations Research & Management Science, 107, p. 3-23, 249-274. Retrieved from http://link.springer.com/bookseries/6161 [5] Tadiou, K.M. Artificial Neural Networks. Retrieved from http://futurehumanevolution.com/artificial-intelligence-future-human-evolution/artificial-neuralnetworks [6] Shiffman, D. (2012). The Nature of Code, Chapter 10. Retrieved from http://natureofcode.com/book/chapter-10-neural-networks/ [7] Wright, R. and Quadrini, V. (2009). Money and Banking, 1, Chapter 18. Retrieved from http://catalog.flatworldknowledge.com/bookhub/30?e=wright-ch18_s01 [8] Bangko Sentral ng Pilipinas Primers and FAQs. (2014). Q&A on the Exchange Rate Impact: How Much, What We Can Do, and What's Next. Retrieved from http://www.bsp.gov.ph/downloads/publications/faqs/fximpact.pdf [9] Forecasting. Retrieved from http://www.investopedia.com/terms/f/forecasting.asp [10] Historical Exchange Rate Table. Philippine Peso (PHP) to Singapore Dollar (SGD). Retrieved from http://www.bsp.gov.ph/statistics/sdds/exchrate.htm