Professional Documents
Culture Documents
Forecasting of Currency Exchange Rates Using ANN: A Case Study
Forecasting of Currency Exchange Rates Using ANN: A Case Study
Joarder Kamruzzaman
Gippsland School of Computing & IT
Monash University
Churchill, Victoria 3842
Australia
ABSTRACT
In todays global economy, accuracy in forecasting the foreign
exchange rate or at least predicting the trend correctly is of
crucial importance for any future investment. The use of
computational intelligence based techniques for forecasting has
been proved extremely successful in recent times. In this paper,
we developed and investigated three Artificial Neural Network
(ANN) based forecasting model using Standard Backpropagation
(SBP), Scaled Conjugate Gradient (SCG) and Backpropagation
with Baysian Regularization (BPR) for Australian Foreign
Exchange to predict six different currencies against Australian
dollar. Five moving average technical indicators are used to build
the models. These models were evaluated on five performance
metrics and a comparison was made with traditional ARIMA
model. All the ANN based models outperform ARIMA model. It
is found that SCG based model performs best when measured on
the two most commonly used metrics and shows competitive
results when compared with BPR based model on other three
metrics. Experimental results demonstrate that ANN based model
can closely forecast the forex market.
1.
INTRODUCTION
Ruhul A Sarker
School of Computer Science
University of NSW, ADFA Campus
NorthCott Drive, Canberra 2600
Australia
j ( n) =
E
+ j ( n 1)
j
pk = E () + k pk +1
E (k ) pk =
E (k + k p k ) E (k )
+ k pk
where E' and E'' are the first and second derivative of E.
pk, k and k are the search direction, parameter controlling
the second derivation approximation and parameter
regulating indefiniteness of the Hessian matrix.
Considering the machine precision, the value of should
be as small as possible ( 10-4). A detailed description of
the algorithm can be found in [13].
BPR: A desired neural network model should produce
small error on out of sample data, not only on sample data
alone. To produce a network with better generalization
ability, MacKay [12] proposed a method to constrain the
F = E +
1
n
j =1
2
j
3. EXPERIMENTAL RESULTS
The data used in this study is the foreign exchange rate of
six different currencies against Australian dollar from
January 1991 to July 2002 made available by the Reserve
Bank of Australia. We considered exchange rate of US
dollar, British Pound, Japanese Yen, Singapore dollar,
New Zealand dollar and Swiss Franc. As outlined in
Section 2.2, 565 weekly data was considered of which first
500 weekly data was used is training and the remaining 65
weekly data for evaluating the model.
Table 1: Performance metrics used in the experiment.
NMSE =
( x k x k )
(x k x k)
k
k
MAE =
DS =
dk =
N
100
N
1
2
( x k x k )
x k x k
dk ,
k
1 if ( x k xk 1) ( x k x k 1) 0
0 otherwise
CU = 100
dk
k
tk
0
1
tk =
0
dk =
if ( x k x k 1) > 0, ( xk x k 1) ( x k x k 1) 0
otherwise
if ( xk x k 1) > 0
otherwise
CU = 100
dk
k
tk
k
0
1
tk =
0
dk =
if ( x k x k 1) < 0, ( x k xk 1) ( x k x k 1) 0
otherwise
if ( x k x k 1) < 0
otherwise
Prediction Criteria
Period
SBP
NMSE
MAE
35 Week
DS
CP
CD
NMSE
MAE
65 Week
DS
CP
CD
0.5041
0.0047
71.4286
76.4706
70.5882
0.0937
0.0043
75.3846
81.5789
69.2308
0.2624
0.0035
80.00
82.3529
82.3529
0.0418
0.0029
81.5385
78.9474
88.4615
BPR
ARIMA
(1,0,1)
0.2787
1.0322
0.0036
0.0069
82.8571 52.9411
82.3529
0
88.2353 105.882
0.0441
1.7187
0.0030
0.0171
83.0769 42.1875
78.9474
0
92.3077 130.8462
Table 3: Prediction performance for other currencies. The first figure in each cell shows the metric on 35 weeks prediction while the
second figure on 65 weeks prediction.
Currency
SCG NN Model
MAE
DS
CU
0.0030
77.14
81.25
0.0023
84.61
87.87
0.6243
80.00
81.81
0.5188
81.53
83.78
0.0076
82.85
82.35
0.0060
86.15
88.23
0.0038
85.71
87.50
0.0033
84.61
82.14
0.0059
82.85
80.00
0.0052
84.61
84.61
NMSE
0.1578
0.0729
0.1264
0.0411
0.2321
0.0760
0.0878
0.0217
0.0485
0.0389
B. Pound
J. Yen
S. Dollar
NZDollar
S. Franc
CD
73.68
83.87
76.92
78.57
83.33
83.87
84.21
88.88
86.66
86.66
BPR NN Model
MAE
DS
CU
0.0031 82.85
93.75
0.0024 87.69
93.93
0.5806 80.00
81.81
0.5043 81.53
83.78
0.0080 82.85
82.35
0.0063 86.15
88.23
0.0039 85.71
87.50
0.0033 84.61
82.14
0.0057 80.00
75.00
0.0051 81.53
77.14
NMSE
0.1724
0.0790
0.1091
0.0367
0.2495
0.0827
0.0898
0.0221
0.0496
0.0413
CD
73.68
83.87
76.92
78.57
83.33
83.87
84.21
88.88
86.66
86.66
0.4
0.6
0.58
Actual
0.39
Forecast
Actual
0.38
0.56
Forecast
0.37
0.54
0.36
0.52
0.35
0.34
0.5
0.33
0.48
0.32
(a) USD/AUD
0.46
(b) GBP/AUD
0.31
0.3
0.44
1
11
21
31
41
51
61
11
21
31
41
51
61
1.05
75
Actual
Forecast
70
65
0.95
60
0.9
55
(c) JPY/AUD
Actual
Forecast
0.85
(d) SGD/AUD
0.8
50
1
11
21
31
41
51
61
11
21
31
41
51
61
1.3
Actual
Forecast
Actual
0.95
1.26
Forecast
0.9
1.22
0.85
1.18
0.8
1.14
(e) NZD/AUD
0.75
(e) CHF/AUD
0.7
1.1
1
11
21
31
41
51
61
11
21
31
41
51
Fig. 1. Forecasting of different currencies by SCG based neural network model over 65 weeks.
61