Australan Forex Market Analyss Usng Connectonst Models A. Abraham, M. U. Chowdhury* and S. Petrovc-Lazarevc** School of Computng and Informaton Technology, Monash Unversty (Gppsland Campus), Churchll, Vctora 3842, Australa, Emal: ajth.abraham@eee.org *School of Computng and Mathematcs, Deakn Unversty, 662 Blackburn Road, Clayton, Melbourne, Vc. 3168, Australa, Emal: muc@deakn.edu.au **Monash Unversty, Department of Management, McMahons Road, Frankston 3199, Australa Emal: Sonja.Petrovc-Lazarevc@buseco.monash.edu.au Abstract The need for ntellgent montorng systems has become a necessty to keep track of the complex forex market. The forex market s dffcult to understand by an average ndvdual. However, once the market s broken down nto smple terms, the average ndvdual can begn to understand the foregn exchange market and use t as a fnancal nstrument for future nvestng. Ths paper s an attempt to compare the performance of a Takag- Sugeno type neuro-fuzzy system and a feed forward neural network traned usng the scaled conjugate gradent algorthm to predct the average monthly forex rates. The exchange values of Australan dollar are consdered wth respect to US dollar, Sngapore dollar, New Zealand dollar, Japanese yen and Unted Kngdom pound. The connectonst models were traned usng 70% of the data and remanng was used for testng and valdaton purposes. It s observed that the proposed connectonst models were able to predct the average forex rates one month ahead accurately. Experment results also reveal that neuro-fuzzy technque performed better than the neural network. Keywords: Forex predcton, neurocomputng, neuro-fuzzy computng, scaled conjugate gradent 1 Introducton Creatng many nternatonal busnesses, the globalzaton has made the nternatonal trade, nternatonal fnancal transactons and nvestment to rapdly grow. Globalsaton s followed by foregn exchange market also known as forex. The forex s defned as a change n a market value relatonshp between natonal currences (at a partcular pont n tme) that produces profts, or losses, for all foregn currency traders (Long and Walter, 2001). As such, t plays an mportant role of provdng payments n between countres, transferrng funds from one currency to another and determnng the exchange rate (Forexcaptal, 2001). 1
The forex s the largest and the most lqud market n the world wth a daly turnover of around 1 trllon U.S. dollars (Usfxm, 2001). It was founded n 1973 wth the deregulaton of the foregn exchange rate n the USA and other developed countres. Namely, before 1973 the fxed exchange rates regme was used for global currency relatonshps. It was based on the Bretton Woods agreement from 1944 wth Amercan dollar as an anchor for all free world currences. The Amercan dollar has been a reserve currency for the world that was based on gold standard. No other country guaranteed to exchange ts currency for a gold. However, n 1960s and early 1970s the global economc crss brought on by the worldwde nflaton has shown that The Unted States were not able any more to meet the gold standard. Wth a rse of nflaton more dollars became worth less, and dollars holders around the globe sought the safety of gold. As a consequence, many natons were unable to mantan the value of ther currences under the Bretton Woods regme, and the U.S. gold reserves sgnfcantly fell. Then, n 1973 the floatng exchange rate system was created establshng markets prces rule. The system s dynamc, generatng greater trade and captal flows. It s expandng wth rapd technologcal nnovatons. In partcular, the foregn exchange market has become an over-the-counter market wth traders located n the offces of major commercal banks around the world. Today, communcaton among traders goes on usng computers, telephones, telexes, and faxes. Traders buy and sell currences, but also they create prces. The exchange of currences, however, s n the form of an exchange of electronc messages. Most of the tradng n the forex market takes places n several currences: U.S dollar, German mark, Japanese yen, Brtsh pound sterlng, Australan dollar, Canadan dollar. More than 80 percent of global foregn exchange transactons are stll based on Amercan dollar. There are two reasons for quotng most exchange rates aganst the U.S. dollar. The frst has to do wth smplcty to avod enormous number of dealng markets f each currency were traded drectly aganst each other currency. A second s to avod the possblty of trangular arbtrage. That s, snce all currences are traded wth respect to the dollar, there s only one avalable cross rate and no possblty of arbtrage (Grabbe, 1996). The forex market s 24-hour market wth three major centers n dfferent part of the world: New York, London, and Tokyo. It s the busest n the early mornng New York tme snce banks n London and New York are smultaneously open and tradng. Its centers open and close one after the other. If t s open n Tokyo and Hong Kong, t s also open n Sngapore. Then f t opens n Los Angeles n the after noon, t wll be also open n Sydney the next day n the mornng. 2
At present the forex market ncludes the partcpaton of commercal banks around the globe, wth a tendency to spread to corporate, fundng and retal nsttutons. At the forex market, traders create prces by buyng and sellng currences to exporters, mporters, portfolo managers, and toursts. Each currency has two prces: a bd prce at whch a trader s wllng to buy and an offer prce at whch a trader s wllng to sell. If beng n the major money centers banks traders deal n two way prces, for both buyng and sellng. In market-makng banks worldwde much of the tradng take place by drect dealng, whle the rest takes place through brokers. Today computerzed servces electroncally match buy and sell orders usng an automated brokerage termnal. As Grabbe quotes, about 85 percent of all forex tradng s between market makers (Grabbe, 1996). Wth the rest the forex purchases and sales are by companes engaged n trade, or toursm. Snce the most tradng takes place between market makers t creates a space for speculatve gans and losses. However, speculaton n the forex market s potentally a zero-sum game: the cumulatve profts equal the cumulatve losses. The operatons are nter-bank transactons were a sngle rumor can create eruptve reactons followed by huge and often-unpredctable captal flows. Now traders play aganst each other nstead of playng aganst central banks as they dd when currences were not floatng (Dormael, 1997). Startng from 1983 there were consderable changes n the Australan forex market. Lke Australa most of developed and developng countres n the world welcome foregn nvestors. When foregn nvestors get access to nvest n any country s bond equtes, manufacturng ndustres, property market and other assets then the forex market becomes affected. Ths affect nfluences everyday personal and corporate fnancal lves, and the economc and poltcal fate of every country on the earth. The nature of the forex market s generally complex and volatle. The volatlty or rate fluctuaton depends on many factors. Some of factors nclude fnancng government defcts, changng hands of equty n companes, ownershp of real estate, employment opportuntes, mergng and ownershp of large fnancal corporaton or companes. The major attractons to the busness of forex tradng are threefold, namely, hgh lqudty, good leverage and low cost assocated wth actual tradng. There are, of course, many other advantages attached wth the dealng of forex market once one gets nvolved and understands t n more detals. Forex market traders can use many ways to analyze the drectons of forex market. Whatever the method chosen, t s always related to actvtes of a prce for some perods of tme n the past. The pattern n whch 3
prces move up and down tends to repeat tself. Thus, the predcton of future prce movements can be plotted out by studyng the hstory of past prce movements. It s well known that the forex market has ts own momentum and usng tradtonal statstcal technques based on prevous market trends and parameters, t s very dffcult to predct future exchange rates. In partcular, t s dffcult to predct exchange rates n a long-term, what would be very helpful for polcy makers and traders whle makng crucal decsons. The am of ths paper s to propose an ntellgent montorng system for predctng the monthly average forex market rates for major currences wth respect to Australan dollar. The paper s organzed as follows: Secton two explores some theoretcal background on neural networks and neuro-fuzzy computng. Secton three ponts to the experment through two stages: frst, modelng the predcton systems by neuro-fuzzy computng and neurocomputng, and, second, performance evaluaton. Paper ends wth concludng remarks and future research drectons. 2 Computatonal Intellgence (CI) CI substtutes ntensve computaton for nsght nto how complcated systems work. Artfcal neural networks, fuzzy nference systems, probablstc computng, evolutonary computaton etc were all shunned by classcal system and control theorsts. CI provdes an excellent framework unfyng them and even by ncorporatng other revolutonary methods. Artfcal Neural Networks (ANNs) were desgned to mmc the characterstcs of the bologcal neurons n the human bran and nervous system. An artfcal neural network creates a model of neurons and the connectons between them, and trans t to assocate output neurons wth nput neurons. The network learns by adjustng the nterconnectons (called weghts) between layers. When the network s adequately traned, t s able to generate relevant output for a set of nput data. A valuable property of neural networks s that of generalzaton, whereby a traned neural network s able to provde a correct matchng n the form of output data for a set of prevously unseen nput data. Backpropagaton (BP) s one of the most famous tranng algorthms for multlayer perceptrons. Bascally, BP s a gradent descent technque to mnmze the error E for a partcular tranng pattern. For adjustng the weght ( w k ),n the batched mode varant the descent s based on the gradent δe E ( ) for the total tranng set: δw k wk (n) δe = ε. + α. wk (n 1) (1) δwk The gradent gves the drecton of error E. The parameters ε and α are the learnng rate and momentum respectvely. A good choce of both the parameters s requred for tranng success and speed of the ANN. 4
In the Conjugate Gradent Algorthm (CGA) a search s performed along conjugate drectons, whch produces generally faster convergence than steepest descent drectons. A search s made along the conjugate gradent drecton to determne the step sze, whch wll mnmze the performance functon along that lne. A lne search s performed to determne the optmal dstance to move along the current search drecton. Then the next search drecton s determned so that t s conjugate to prevous search drecton. The general procedure for determnng the new search drecton s to combne the new steepest descent drecton wth the prevous search drecton. An mportant feature of the CGA s that the mnmzaton performed n one step s not partally undone by the next, as t s the case wth gradent descent methods. An mportant drawback of CGA s the requrement of a lne search, whch s computatonally expensve. Moller ntroduced the Scaled Conjugate Gradent Algorthm (SCGA) as a way of avodng the complcated lne search procedure of conventonal CGA. Accordng to the SCGA, the Hessan matrx s approxmated by " E ( wk )pk ' E ( wk ' k pk ) E ( wk ) + σ k + σ = λ (2) k pk where E' and E" are the frst and second dervatve nformaton of global error functon E (w k ). The other terms p k, σ k and λ k represent the weghts, search drecton, parameter controllng the change n weght for second dervatve approxmaton and parameter for regulatng the ndefnteness of the Hessan. In order to get a good quadratc approxmaton of E, a mechansm to rase and lower λ k s needed when the Hessan s postve defnte. Detaled step-by-step descrpton can be found n the lterature (Moller, 1993). Neuro-Fuzzy (NF) computng s a popular framework for solvng complex problems (Abraham and Chowdhury, 2001), (Abraham, 2001), (Abraham and Nath, 2000). If we have knowledge expressed n the form of lngustc rules, we can buld a Fuzzy Inference System (FIS), and f we have data, or can learn from a smulaton (tranng) then we can use ANNs. For buldng a FIS, we have to specfy the fuzzy sets, fuzzy operators and the knowledge base. Smlarly for constructng an ANN for an applcaton the user needs to specfy the archtecture and learnng algorthm. An analyss reveals that the drawbacks pertanng to these approaches seem complementary and therefore t s natural to consder buldng an ntegrated system combnng the concepts. Whle the learnng capablty s an advantage from the vewpont of FIS, the formaton of lngustc rule base wll be advantage from the vewpont of ANN. We used the Adaptve Neuro Fuzzy Inference System (ANFIS) mplementng a Takag-Sugeno type FIS. We modfed the ANFIS model to accommodate the multple outputs (Jang et al. 1997). Fgure 1 depcts the 6- layered archtecture of multple output ANFIS and the functonalty of each layer s as follows: 5
premse parameters Σw A 1 x consequent parameters x A 2 B 1 W 1 f Σw f / Output 1 W 2 B 2 C 1 W 3 y C 2 D 1 W 4 f Σw f / Output 2 D 2 y Σw O 1 O 2 O 3 O 4 O 5 O 6 Fgure 1. Archtecture of ANFIS wth multple outputs Layer-1. Every node n ths layer has a node functon. O 1 = µ A ( x ), for =1, 2 or O 1 ( y ) = µ B 2, for 1 =3,4,. O s the membershp grade of a fuzzy set A ( = A 1, A 2, B 1 or B 2 ) and t specfes the degree to whch the gven nput x (or y) satsfes the quantfer A. Usually the node functon can be any parameterzed functon. A gaussan membershp functon s specfed by two parameters c (membershp functon center) and σ (membershp functon wdth). guassan (x, c, σ) = 1 2 x c e 2 σ. Parameters n ths layer are referred to premse parameters. Layer-2. Every node n ths layer multples the ncomng sgnals and sends the product out. Each node output represents the frng strength of a rule. O 2 = w = µ A ( x ) µ B ( y ), = 1,2..., In general any T-norm operator that perform fuzzy "AND" can be used as the node functon n ths layer. Layer-3. The rule consequent parameters are determned n ths layer. 3 O f = xp + yq + r =, where { p,, } Layer-4. Every node n ths layer s wth a node functon q r are the rule consequent parameters. 6
4 O = w f = w ( p x + q y + r ), where w s the output of layer 2 Layer-5. Every node n ths layer aggregates all the frng strengths of rules 5 O = w. Layer-6. Every -th node n ths layer calculates the ndvdual outputs. 6 w f O = Output =, = w 1,2.... ANFIS makes use of a mxture of backpropagaton to learn the premse parameters and least mean square estmaton to determne the consequent parameters. A step n the learnng procedure has two parts: In the frst part the nput patterns are propagated, and the optmal concluson parameters are estmated by an teratve least mean square procedure, whle the antecedent parameters (membershp functons) are assumed to be fxed for the current cycle through the tranng set. In the second part the patterns are propagated agan, and n ths epoch, backpropagaton s used to modfy the antecedent parameters, whle the concluson parameters reman fxed. Ths procedure s then terated. Fgure 2. Forex fluctuatons durng the perod January 1981 Aprl 2001 for four dfferent currences. 3 Expermentaton Set-up Tranng and Performance Evaluaton The data for our study were the monthly average forex rates from January 1981 to Aprl 2001. We consdered the exchange rates of the Australan dollar wth respect to the Japanese yen, US Dollar, UK pound, Sngapore 7
dollar and New Zealand dollar. Fgure 2 shows the forex fluctuatons durng the perod January 1981 Aprl 2001 for the four dfferent currences. The expermental system conssts of two stages: modellng the predcton systems (tranng n the case of soft computng models) and performance evaluaton. For network tranng, the sx selected nput descrptor varables were: the month, exchange rates for the Japanese yen, US Dollar, UK pound, Sngapore dollar and New Zealand. 70% of the data was used to tran the neural network and 30% for testng purposes. Experments were repeated three tmes and the worst errors were reported. The test data wll be then passed through the traned network to evaluate the learnng effcency of the consdered models. Our objectve s to develop an effcent forex predcton system capable of producng a short-term forecast.the requred tme-resoluton of the forecast s monthly, and the requred tme-span of the forecast s one month ahead. Ths means that the system should be able to predct the forex rates one month ahead based on the values of the prevous month. We used a Pentum II, 450 MHz platform for smulatng the predcton models usng MATLAB. Fgure 3. Convergence of SCGA tranng. Tranng of Connectonst Models Our prelmnary experments helped us to formulate a feedforward neural network wth 1 nput layer, 2 hdden layers and an output layer [6-14-14-1]. Input layer conssts of 6 neurons correspondng to the nput varables. The frst and second hdden layers consst of 14 neurons respectvely usng tanh-sgmodal actvaton functons. Tranng was termnated after 2000 epochs and we acheved a tranng error of 0.0251. Fgure 3 shows the 8
convergence of SCGA durng the 2000 epochs tranng. For tranng the neuro-fuzzy (NF) model, we used 4 gaussan membershp functons for each nput varables and 16 rules were learned usng the hybrd tranng method. Tranng was termnated after 30 epochs. For the NF model, we acheved tranng RMSE of 0.0248. tme factor NZ $ Jap UK US $ Sngapore $ NZ $ Jap UK US $ Sngapore $ Inputs Outputs Fgure 4. Developed Takag-Sugeno type fuzzy nference model for forex predcton Table 1. Test results and performance comparson of forex forecastng Japanese Yen US $ UK Artfcal neural network Sngapore $ New Zealand $ Tranng tme =200 seconds, learnng epochs: 2000, tranng data RMSE = 0.0251 Testng data RMSE 0.028 0.0340 0.023 0.030 0.021 Neuro-Fuzzy system Tranng tme =35 seconds, learnng epochs: 30, tranng error (RMSE) = 0.0248 Testng data RMSE 0.026 0.0340 0.037 0.029 0.020 Test results Table 1 summarzes the tranng and test performances of the neuro-fuzzy system and neural network. Fgure 4 shows the developed Takag-Sugeno type fuzzy nference model for forex predcton. Fgure 5,6, 7 and 9 llustrates the test results for forex predcton usng NF system and Fgure 8 usng ANN. 9
Fgure 5. NF test results for Japanese Yen Fgure 6. NF test results for New Zealand dollar 10
Fgure7. NF test results for Sngapore dollar Fgure 8. ANN test results for UK pounds 11
Fgure 9. NF test results for US dollar 4. Conclusons In ths paper, we have proposed an ntellgent montorng system for predctng the monthly average forex rates of US dollar, UK pounds, Sngapore dollar, New Zealand dollar and Japanese yen wth respect to Australan dollar. Test results reveal that the proposed connectonst models are capable of predctng the results accurately. Compared to artfcal neural network, neuro-fuzzy system performed better n terms of RMSE and tranng tme. Another mportant advantage of neuro-fuzzy system s the nterpretablty of the results usng f-then rules. It s also nterestng to note that neural network performed better for the predcton of UK pounds. The proposed ntellgent system mght be useful for polcy makers, nvestors, traders, companes engaged n nternatonal busness etc. In our research we consdered the monthly forex data from January 1981 to Aprl 2001. Performance could have been mproved by provdng more tranng data. Our future research wll be drected towards short-term forecast (daly, hourly etc.) of forex data usng more ntellgent systems. Acknowledgements Authors would lke to thank Edmond Bosworth (Group Manager Group Captal Management of Natonal Australa Bank Ltd.) for the frutful dscussons and suggestons, whch has provded more techncal nsghts and sound understandng of the forex market. 12
References ABRAHAM, A. and CHOWDHURY, M. (2001): An Intellgent Forex Montorng System, In Proceedngs of IEEE Internatonal Conference on Info-tech and Info-net, Bejng, Chna, IEEE Press, pp.523-528. ABRAHAM, A. (2001): Neuro-Fuzzy Systems: State-of-the-Art Modelng Technques, Connectonst Models of Neurons, Learnng Processes, and Artfcal Intellgence, Lecture Notes n Computer Scence, Jose Mra and Alberto Preto (Eds.), Germany, Sprnger-Verlag, LNCS 2084: 269-276. ABRAHAM, A. and NATH, B. (2000): Desgnng Optmal Neuro-Fuzzy Systems for Intellgent Control, Proceedngs of the Sxth Internatonal Conference on Control Automaton Robotcs Computer Vson (ICARCV 2000), Sngapore. DORMALE, A. V. (1997): The Power of Money, Macmllan Press, London. FOREXCAPITAL. (2001): Introducton to Forex Market. http://www.forexcaptal.com, Accessed on 14-Sept.- 2001. GRABBE, J. O. (1996): Internatonal Fnancal Markets, Englewood Hlls, Prentce Hall Inc. JANG, S. R., SUN, C. T. and MIZUTANI, E. (1997): Neuro-Fuzzy and Soft Computng: A Computatonal Approach to Learnng and Machne Intellgence, US, Prentce Hall Inc. LONGL, K. and WALTER, K. (2001): Electronc Currency Tradng for Maxmum Proft, Prma Money, Rosevlle, Calforna. MOLLER, A. F. (1993): A Scaled Conjugate Gradent Algorthm for Fast Supervsed Learnng, Neural Networks. 6:525-533. USFXM. (2001): Foregn Exchange Market n the Unted States, http://www.ny.frb.org/phome/addpub/usfxm. Accessed on 14-Sept.-2001. 13