forecasting foreign exchange rates4

18
1. Forecasting foreign exchange rates: Random Walk Hypothesis, linearity and data frequency Christopher Bellgard Dr Peter Goldschmidt [email protected] [email protected] Department of Information Management and Marketing The University of Western Australia Perth, Western Australia Abstract This research paper discusses aspects of foreign exchange rate forecasting in terms of the Random Walk Hypothesis (RWH). The following forecasting techniques were evaluated for profitability: Random Walks, Exponential Smoothing, AutoRegressive Integrated Moving Average and Artificial Neural Networks. Using recent Australian-US dollar data, the research examined the implications, of data frequency and linearity, on the RWH. The research intention is, consequently, to advance foreign exchange rate research, particularly of the Australian-US dollar. The importance of such research is substantiated by the phenomenal size of the foreign exchange rate market; the Bank of International Settlements (1993) estimated that it exceeded US$1 trillion per day. The paper discusses how the RWH was initially discounted through statistical insignificance. However, statistical measures of accuracy do not always have a direct bearing on

Upload: alex-davila

Post on 18-Dec-2015

12 views

Category:

Documents


1 download

DESCRIPTION

Pronóstico mercado forex

TRANSCRIPT

  • 1.

    Forecasting foreign exchange rates:

    Random Walk Hypothesis, linearity and data

    frequency

    Christopher Bellgard Dr Peter Goldschmidt

    [email protected] [email protected]

    Department of Information Management and Marketing

    The University of Western Australia

    Perth, Western Australia

    Abstract

    This research paper discusses aspects of foreign exchange rate forecasting in terms of the

    Random Walk Hypothesis (RWH). The following forecasting techniques were evaluated for

    profitability: Random Walks, Exponential Smoothing, AutoRegressive Integrated Moving

    Average and Artificial Neural Networks. Using recent Australian-US dollar data, the

    research examined the implications, of data frequency and linearity, on the RWH.

    The research intention is, consequently, to advance foreign exchange rate research,

    particularly of the Australian-US dollar. The importance of such research is substantiated by

    the phenomenal size of the foreign exchange rate market; the Bank of International

    Settlements (1993) estimated that it exceeded US$1 trillion per day.

    The paper discusses how the RWH was initially discounted through statistical insignificance.

    However, statistical measures of accuracy do not always have a direct bearing on

  • 2.

    profitability (Lee, 1996). Consequently, all model types including random walks were

    ultimately compared through a trading simulation. Being based on a position-taking rule, the

    trading simulation was inherently non-linear.

    In direct conflict with the RWH, the trading simulation was able to surpass a 30% annualised

    return, within sample. This was achieved by capturing and capitalising upon intrinsic non-

    linearities. That is, foreign exchange rates exhibit complex (non-linear) patterns that may be

    profitably exploited.

    This paper adds to an increasing body of evidence against the RWH. Evidence, to date,

    includes the following:

    FX differences are leptokurtic (Hsieh, 1988; Contingency Analysis, 1997).

    ANNs, including hybrid ANNs (Tan, 1995), can yield a higher profit than linear

    models (Refenes, 1992; Lee and Jhee, 1994; Zhang, 1994).

    Technical analysis is widely used by many investors (Hawley et al., 1993; Mehta,

    1995).

    Keywords

    Forecasting; Random Walk Hypothesis; linearity; artificial neural networks; foreign

    exchange.

    Introduction

    This research paper considers the Random Walk Hypothesis (RWH) through the effect of

    linearity and forecasts of different data frequencies. Linear and non-linear models were

  • 3.

    evaluated on various linear and non-linear criteria. In accordance with the aim, models were

    ultimately evaluated through a position-taking trading simulation, which, incidentally,

    introduced further non-linearity. The RWH is addressed through the consideration of non-

    linear models.

    Background

    This paper is derived from Bellgard (1998). In this research, one null hypothesis was: Foreign

    exchange rate data exhibits complex (non-linear) patterns that may be profitably exploited.

    The research question was: Are artificial neural networks superior to simple linear modelling

    techniques in forecasting foreign exchange rates, at different data frequencies? Accordingly,

    the objective was to investigate various modelling techniques used for forecasting foreign

    exchange (FX) rates. For example, Random Walks (RWs), Exponential Smoothing,

    AutoRegressive Integrated Moving Average (ARIMA) and Artificial Neural Networks

    (ANNs). The aim was to identify the most profitable model if any at each frequency. It

    was expected that linearity and non-linearity would influence such identification. This would,

    then, have a significant impact on the RWH.

    Data set

    For reasons of reliability and interest, the data set comprised half-hourly observations of the

    United States Dollar and Australian Dollar (USD/AUD) FX rate during 1996. Forecasting of

    this particular FX rate has, incidentally, received much less research attention than the two

    most traded currencies (USD and Deutschmark) recent exceptions include Manzur (1993)

    and Tan (1995).

  • 4.

    From the half-hourly data set, hourly and daily observations were extracted. The first

    difference was then taken for each frequency; earlier studies have found that the direction of

    the forecast is more important than the actual forecast in determining the profitability of a

    model (Tsoi et al., 1993a; Tsoi et al., 1993b; Sinha and Tan, 1994).

    Linearity

    Linearity is the property of having one dimension (Oxford Dictionary, 1992). The term is also

    used to express the concept that the model possesses the properties of additivity and

    homogeneity (Hair et al., 1998) meaning that a change in one variable causes a proportional

    change in another variable. It follows that non-linearity is the property of having more than

    one dimension. Profitably trading on such intrinsic data properties is directly relevant to the

    RWH.

    Random walks

    A RW is a time series whose period to period changes, or first differences, are stationary

    (Newbold and Bos, 1994). A time series is stationary if its mean and variance are both

    constant across time and its autocorrelation1 depends only on the lag. Hence, for a stationary

    time series, mean, variance and autocorrelation are all independent of time (Everett, 1997).

    Additionally, the proportional changes of RWs, in a short period of time, are normally

    distributed (Hull, 1995). That is, the direction and size of changes are independently and

    randomly chosen from the normal distribution. The best prediction is no change; this is

    known as the naive forecast.

    1 Correlation between a time series and the same series with a given lag.

  • 5.

    The Random Walk Hypothesis

    The Efficient Markets Hypothesis (EMH)2 states that, in an efficient market, asset prices fully

    reflect all available information about the asset; investors cannot consistently earn abnormal

    returns (Peirson et al., 1995). The weak form considers only past information (i.e. historical

    prices). It implies that prices follow a RW in which successive price changes have zero

    correlation (Trippi and Lee, 1996). This subset of the EMH is known as the RWH (Peirson et

    al., 1995). Furthermore, the EMH does not support technical analysis.

    Due to market efficiency, FX rates are widely viewed to be best explained as RWs (Diebold

    and Nason, 1990). In addition, research by Meese and Rogoff (1983) and Hogan (1986)

    supports the superiority, of RWs, over certain estimated models, like ARIMA. The ARIMA

    modelling approach (Box and Jenkins, 1970), however, is more general because it includes

    RWs.

    EMH and ANNs

    The weak EMH is mitigated by bounded rationality arguments (Simon, 1955; Simon, 1982).

    Such arguments hold that efficiency is restricted by human information processing which is

    inherently limited. New processing technology (such as ANNs) provides profit opportunities

    for the holder of that technology, effectively providing a form of insider information.

    However, the EMH implies that increased availability, of the technology, will rapidly erode

    its advantages until they disappear. Meanwhile, in view of the relative novelty of neural

    networks, and the implications of bounded rationality, it is at least conceivable that previously

    2 Fama (1970).

  • 6.

    undetected regularities exist in historical asset price data, and that such regularities may yet

    persist. (White, 1993).

    Preliminary evidence against RWH

    The study of kurtosis provides preliminary evidence against the RWH for FX rates. Kurtosis

    is a measure of the fatness of a probability distributions tails. It is measured relative to a

    normal distribution with the same mean and standard deviation. A leptokurtic distributions

    tails are fatter and a platykurtic distributions tails are thinner than those of a

    corresponding normal distribution (Contingency Analysis, 1997). This is exemplified in

    Figure 1, below.

    Figure 1: Normal, Leptokurtic and Platykurtic Distributions

    FX rate changes tend to be leptokurtic (Hsieh, 1988; Contingency Analysis, 1997). This

    means that dramatic market moves occur with greater frequency than is predicted by the

    normal distribution. That is, large changes (those at the tails) have a greater probability than

    they would have under a normal distribution. The existence of leptokurtic FX rates provides

    evidence against the RWH.

    Normal

    Leptokurtic

    Platykurtic

  • 7.

    Normality (stationarity), of first differences, can be assessed quantifiably with statistical tests.

    Statistical test for non-stationarity

    The adjusted Box-Pierce Q-Statistic indicates the overall adequacy of the RW model

    (Manzur, 1993; Newbold and Bos, 1994). It is derived as follows.

    Let: n = number of observations (less lags)

    M = number of autocorrelations

    = min (n/2, 3 n)

    K = number of parameters in model

    r(k) = correlation at lag k

    then: -

    += =

    M

    k knkr

    nnQ1

    2 )()2(

    and: Q ~ c2M-K

    Hence, Q has a chi-squared (c2) distribution with M-K degrees of freedom. The observed

    value of Q is significant (and the data non-stationary) if it is less than the critical (tabulated)

    chi-square value. At a 5% significance level, an insignificant observed value of Q indicates

    (with at least 95% certainty) that the data does not follow a RW.

    Corresponding to the aim, first differences were used as the basis of prediction. The predicted

    direction of price movements was more relevant, to the position-taking nature of the trading

    simulation, than the actual price prediction. For completeness, however, the Q-test was

    applied to the prices and price changes of the data sets. The Q-test results are shown below in

    Table 1.

  • 8.

    Data FrequencyHalf-Hourly Hourly Daily

    Critical Value 443.4 320.0 74.5Prices

    Observed Value 1173.1 555.9 79.6

    Critical Value 443.4 320.0 74.5Price changes

    Observed Value 6346.0 3025.1 220.2

    Table 1: Box-Pierce Q-Statistic Results

    The observed values of the price changes are substantially higher than those of the prices.

    That is, price changes are more stationary than prices. More importantly, in all cases,

    observed chi-square values exceed critical values, especially at higher frequencies. Hence,

    1996 USD/AUD FX prices (and price changes) fail the Box-Pierce Q-Test. 1996 USD/AUD

    FX prices did not follow a RW.

    This finding is replicated by the normality test macro in SPSS (refer to Figures 2, 3 and 4).

    The Kolmogorov-Smirnov Test is similar to the Box-Pierce Q-Test; the sig value is the

    probability that price changes follow a normal distribution. A sig value of less than 5% means

    that price changes are not normally distributed, and that prices do not follow a RW.

    Incidentally, this is true for all three frequencies.

    Visually, the histogram of normally distributed input should be very close to the normal

    curve. In all cases, the histogram is substantially taller. This is consistent with the leptokurtic

    FX finding of Hsieh (1988) and Contingency Analysis (1997).

  • 9.

    Half-Hourly USD/AUD FX Price Changes (UA30D)

    Case Processing Summary

    17567 100.0% 0 .0% 17567 100.0%UA30DN Percent N Percent N Percent

    Valid Missing Total

    Cases

    Tests of Normality

    .164 17567 .000UA30DStatistic df Sig.

    Kolmogorov-Smirnova

    Lilliefors Significance Correctiona.

    UA30D

    .0117.0102

    .0086.0070

    .0055.0039

    .0023.0008

    -.0008

    -.0023

    -.0039

    -.0055

    -.0070

    -.0086

    -.0102

    -.0117

    Histogram

    Fre

    quen

    cy

    10000

    8000

    6000

    4000

    2000

    0

    Std. Dev = .00

    Mean = .0000

    N = 17567.00

    Normal Q-Q Plot of UA30D

    Observed Value

    .02.010.00-.01-.02

    Exp

    ecte

    d N

    orm

    al

    4

    2

    0

    -2

    -4

    Detrended Normal Q-Q Plot of UA30D

    Observed Value

    .02.010.00-.01-.02

    Dev

    from

    Nor

    mal

    20

    10

    0

    -10

    -20

    Figure 2: Output for Normality Test of USD/AUD half-hourly price changes

  • 10.

    Hourly USD/AUD FX Price Changes (UA60D)

    Case Processing Summary

    8783 100.0% 0 .0% 8783 100.0%UA60DN Percent N Percent N Percent

    Valid Missing Total

    Cases

    Tests of Normality

    .140 8783 .000UA60DStatistic df Sig.

    Kolmogorov-Smirnova

    Lilliefors Significance Correctiona.

    UA60D

    .0109.0084

    .0059.0034

    .0009-.0016

    -.0041

    -.0066

    -.0091

    -.0116

    Histogram

    Fre

    quen

    cy

    5000

    4000

    3000

    2000

    1000

    0

    Std. Dev = .00

    Mean = .0000

    N = 8783.00

    Normal Q-Q Plot of UA60D

    Observed Value

    .02.010.00-.01-.02

    Exp

    ecte

    d N

    orm

    al

    4

    2

    0

    -2

    -4

    Detrended Normal Q-Q Plot of UA60D

    Observed Value

    .02.010.00-.01-.02

    Dev

    from

    Nor

    mal

    20

    10

    0

    -10

    -20

    Figure 3: Output for Normality Test of USD/AUD hourly price changes

  • 11.

    Daily USD/AUD FX Price Changes (UA366D)

    Case Processing Summary

    365 100.0% 0 .0% 365 100.0%UA366DN Percent N Percent N Percent

    Valid Missing Total

    Cases

    Tests of Normality

    .123 365 .000UA366DStatistic df Sig.

    Kolmogorov-Smirnova

    Lilliefors Significance Correctiona.

    UA366D

    .0112.0088

    .0062.0037

    .0012-.0013

    -.0038

    -.0063

    -.0088

    -.0112

    -.0137

    -.0162

    -.0187

    -.0213

    Histogram

    Fre

    quen

    cy

    140

    120

    100

    80

    60

    40

    20

    0

    Std. Dev = .00

    Mean = .0001

    N = 365.00

    Normal Q-Q Plot of UA366D

    Observed Value

    .02.010.00-.01-.02-.03

    Exp

    ecte

    d N

    orm

    al

    3

    2

    1

    0

    -1

    -2

    -3

    Detrended Normal Q-Q Plot of UA366D

    Observed Value

    .02.010.00-.01-.02-.03

    Dev

    from

    Nor

    mal

    2

    1

    0

    -1

    -2

    -3

    -4

    -5

    Figure 4: Output for Normality Test of USD/AUD daily price changes

  • 12.

    Normally distributed data should closely follow the straight line of the Normal Plot. It should

    not exhibit a pattern in the Detrended Normal Plot. Clearly, the histogram and plots are

    consistent with the Kolmogorov-Smirnov Normality Test in asserting that price changes are

    not normally distributed. Furthermore, the S-shape Normal Plots suggest that high-frequency

    FX prices are further away from a RW than low-frequency FX prices (the daily datas Normal

    Plot is straighter).

    Based on the above evidence, it is not surprising that RW models were statistically

    insignificant at each frequency. However, given the non-linearity of the trading simulation,

    RWs were not discarded from the comparison. The logical rationale for this was that

    statistical insignificance may not have a bearing on profitability, when considering non-

    linearities. This is because statistical measures of accuracy do not always have a direct

    bearing on profitability (Lee, 1996).

    Comparing models

    At each frequency, six models were compared. These comprised:

    three ARIMA models3 (statistically significant)

    one Recurrent Neural Network (RNN)

    one RW (statistically insignificant)

    one Exponential Smoothing model (statistically insignificant).

    Models were initially compared using theoretical (linear) measures such as root mean squared

    error (RMSE), mean absolute error (MAE) and information coefficient (Tr). Tr is also known

    3 Diagnosed with an ARIMA modelling algorithm explained in Bellgard and Goldschmidt (1999a).

  • 13.

    as Theils Coefficient of Inequality (1966). It measures performance relative to the naive

    forecast of a RW (Refenes, 1995).

    All ARIMA models ranked first. This reflects the statistical significance of the ARIMA

    models and the linearity of the measures. RNNs were ranked close to RWs and exponential

    smoothing. The linear measures did not account for the non-linearity of the RNN models.

    The next type of comparison introduced a degree of non-linearity. It measured percentage of

    correctly predicted direction changes. Individual results are not important, except to report

    that:

    There was a big difference in model rankings between frequencies.

    RWs were always ranked last.

    RNN rankings varied substantially.

    Considering all of the preceding measures, the findings so far suggest that:

    RWs could not better ARIMA or RNNs.

    Linear and non-linear measures are not necessarily consistent.

    This provided enough justification to continue with the trading simulation.

    Trading simulation

    To make it more realistic, the trading simulation incorporated filters and transaction costs

    (both measured in FX points). Filters expanded the range of available models. A market

    maker with low transaction costs requires 60% correct trades to run a profitable FX desk

    (Grabbe, 1996). Hence, a model was deemed acceptable if it returned a net positive gain,

  • 14.

    subject to having winning trades at least 60% of the time. At each frequency, the three most

    acceptable models were collected in Table 2, below.

    Model FilterTotal

    AnnualisedGain

    %Win

    1st ARIMA(2,0,2) 0.0010 15.3% 100.0

    ARIMA(2,0,0) 0.0010 15.3% 100.0

    ARIMA(0,0,2) 0.0010 15.3% 100.0

    2nd RNN 0.0050 14.8% 75.0Hal

    f-H

    ourl

    y

    3rd ARIMA(2,0,0) 0.0005 1.9% 60.0

    1st Random Walk 0.0050 4.9% 60.0

    2nd (none)

    Hou

    rly

    3rd (none)

    1st RNN 0.0000 43.9% 62.5

    2nd RNN 0.0005 38.5% 60.0

    Dai

    ly

    3rd ARIMA(0,0,1) 0.0000 30.5% 100.0

    Table 2: Three most acceptable models by frequency

    The three daily models are also the three most acceptable models overall. For hourly data,

    RW with 0.0005 filter was the only acceptable model.

    Conclusion

    This study conflicts with the RWH and, hence, with the weak form of the EMH. This

    apparent discovery adds to the increasing body of evidence against the RWH. The pertinent

    view, in economic literature, that exchange rates follow a random walk, has been dismissed

    by recent empirical work. There is now strong evidence that exchange rate returns are not

    independent of past changes. (Tenti, 1996). This body of evidence includes the following:

  • 15.

    FX differences are leptokurtic (Hsieh, 1988; Contingency Analysis, 1997).

    ANNs, including hybrid ANNs (Tan, 1995), can yield a higher profit than linear

    models (Refenes, 1992; Lee and Jhee, 1994; Zhang, 1994).

    Technical analysis is widely used by many investors (Hawley et al., 1993; Mehta,

    1995).

  • 16.

    References

    Bank of International Settlements (1993). Central Bank Survey of Foreign Exchange MarketActivity in April 1992. Monetary and Economic Department, Bank of InternationalSettlements. Basel.

    Bellgard, C.D. (1998). Forecasting Foreign Exchange Rates for Profit. Unpublishedmanuscript (Honours dissertation supervised by Dr P.S. Goldschmidt). Department ofInformation Management and Marketing, The University of Western Australia. Perth.

    Bellgard, C.D. and P.S. Goldschmidt (1999a). An ARIMA modelling algorithm.Unpublished manuscript. Department of Information Management and Marketing, TheUniversity of Western Australia. Perth.

    Box, G.E.P. and G.M. Jenkins (1970). Time Series Analysis: Forecasting and Control.Holden Day. San Francisco.

    Contingency Analysis (1997). Kurtosis (Leptokurtic and Platykurtic).http://www.ContingencyAnalysis.com/GlossaryKurtosis.htm

    Diebold, F.X. and J.A. Nason (1990). Nonparametric exchange rate prediction? Journal ofInternational Economics. 28:315-332.

    Everett, J.E. (1997). Department of Information Management and Marketing, The Universityof Western Australia. Perth.

    Fama, E.F. (1970). Efficient capital markets: A review of theory and empirical work.Journal of Finance. 25:383-417.

    Grabbe, J.O. (1996). International Financial Markets. (3rd ed). Prentice Hall. EnglewoodCliffs, New Jersey.

    Hair, J.F., Jr; R.E. Anderson; R.L. Tatham and W.C. Black (1998). Multivariate DataAnalysis. (5th ed). Prentice Hall. Upper Saddle River, NJ.

    Hawley, D.D.; J.D. Johnston and D. Raina (1993). Artificial neural systems: A new tool forfinancial decision making. Neural networks in finance and investing: Using artificialintelligence to improve real-world performance. R.R. Trippi et al., Eds . Probus. Chicago,Illinois.

    Hogan, L. (1986). A comparison of alternative exchange rate forecasting models. TheEconomic Record. 24:129-145.

    Hsieh, D.A. (1988). The statistical properties of daily foreign exchange rates: 1974-1983.Journal of International Economics. 24:129-145.

  • 17.

    Hull, J. (1995). Introduction to Futures and Options Markets. (2nd ed). Prentice Hall. NewJersey.

    Lee, C.G.H. (1996). Applying neural networks to currency trading - a case study. NeuralNetworks in Financial Engineering. A.-P.N. Refenes et al., Eds . World Scientific.Singapore; River Edge, New Jersey: 157-165.

    Lee, J. and W. Jhee (1994). A two stage neural network approach for ARMA modelidentification with ASACF. Decision Support Systems. 11:461-479.

    Manzur, M. (1993). Exchange rates, prices, and world trade: New methods, evidence, andimplications. Routledge. London; New York.

    Meese, R. and K. Rogoff (1983). Empirical exchange rate models of the seventies: Do theyfit out of sample? Journal of International Economics. 14:3-12.

    Mehta, M. (1995). Foreign Exchange Markets. Neural Networks in the Capital Markets. A.-P.N. Refenes, Ed. Wiley. Chichester; New York: 177-198.

    Newbold, P. and T. Bos (1994). Introductory Business and Economic Forecasting. (2nd ed).South-Western Publishing Co. Cincinnati, Ohio.

    Oxford Dictionary (1992). The Australian Concise Oxford Dictionary. (2nd ed). OxfordUniversity Press, Australia. Melbourne.

    Peirson, G.; R. Bird; R. Brown and P. Howard (1995). Business Finance. (6th ed). McGraw-Hill. Sydney.

    Refenes, A.-P.N. (1992). Constructive learning and its applications to currency exchangerate forecasting. Neural Networks in Finance and Investing. A.-P.N. Refenes, Ed. ProbusPublishing Co. Illinois: 465-494.

    Refenes, A.-P.N. (1995). Testing strategies and metrics. Neural Networks in the CapitalMarkets. A.-P.N. Refenes, Ed. Wiley. Chichester; New York: 67-76.

    Simon, H. (1955). A behavioural model of rational choice. Quarterly Journal ofEconomics. 69:99-118.

    Simon, H. (1982). Models of Bounded Rationality. MIT Press. Cambridge.

    Sinha, T. and C.N.W. Tan (1994). Using artificial neural networks for profitable sharetrading. Journal of the Securities Institute of Australia. No 3:30-31.

    Tan, C.N.W. (1995). Applying artificial neural networks in finance: A foreign exchangemarket trading system example with transaction costs. PhD Conference in Economics andFinance, November 1995. Perth, Western Australia.

    Tenti, P. (1996). Forecasting foreign exchange rates using recurrent neural networks.Applied Artificial Intelligence. 10:567-581.

  • 18.

    Theil, H. (1966). Applied Economic Forecasting. North-Holland Publishing Co. Amsterdam.

    Trippi, R.R. and J.K. Lee (1996). Artificial intelligence in finance & investing: State-of-the-art technologies for securities selection and portfolio management. (Rev. ed). IrwinProfessional Publishing. Burr Ridge, Illinois.

    Tsoi, A.C.; C.N.W. Tan and S. Lawrence (1993a). Financial time series forecasting:Application of artificial neural network techniques. 1993 International Symposium onNonlinear Theory and its Applications, Hawaii, USA.

    Tsoi, A.C.; C.N.W. Tan and S. Lawrence (1993b). Financial time series forecasting:Application of recurrent artificial neural network techniques. First InternationalWorkshop of Neural Networks in Capital Markets, London Business School, UK.

    White, H. (1993). Economic prediction using neural networks: The case of IBM daily stockreturns. Neural networks in finance and investing: Using artificial intelligence to improvereal-world performance. R.R. Trippi and E. Turban, Eds . Probus. Chicago, Illinois: 315-328.

    Zhang, X. (1994). Non-linear predictive models for intra-day foreign exchange trading.Intelligent Systems in Accounting, Finance and Management. 3:293-302.

    The data set was derived from HFDF96 which was purchased from Olsen and Associates,Switzerland. SPSS for Windows is a trademark of SPSS Inc.