FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES USING WAVELETS AND NEURAL NETWORKS Amit Mitra Department of Mathematics & Statistics IIT Kanpur. 1/30
OVERVIEW OF THE TALK Introduction What are exchange rates Exchange rate dynamics Importance of exchange rate forecasting Conventional methods of exchange rate forecasting Economic fundamental models Technical models Wavelets and use of wavelets in the context of the problem Proposed method and empirical studies 2/30
INTRODUCTION What are exchange rates? Nominal exchange rate: Value of domestic currency in terms of a unit of foreign currency Real exchange rate: Price adjusted nominal exchange rate Type of nominal exchange rates Spot rate: price of the currency in the spot market Forward rate: price of the currency in the forward market 3/30
EXCHANGE RATE REGIMES Floating Exchange Rate Nominal exchange is determined by demand and supply Free movement of the currency rates Fixed Exchange Rates Nominal exchange rate is set by one country Economic fundamentals play a crucial role in fixing exchange rates Country s government supports the exchange rate by adjusting foreign exchange reserves-exchange rate intervention policy 4/30
EXCHANGE RATE FORECASTING Important and fundamental problem in finance Challenging area of research to applied statisticians, financial analysts and econometricians Importance of exchange rate forecasting Central Bank- Exchange rate stability Financial Institutions- trading in currency market Foreign Institutional Investors, Corporate firms 5/30
Why forecasting exchange rate is difficult? Efficient Market Hypothesis Louis Bachelier (1900)-The Theory of Speculation Paul Samuelson (1965), Eugene Fama (1970) Financial markets are informationally efficient Prices on traded financial assets reflect all known information, the collective beliefs of all investors about future prospects It is not possible to consistently outperform the market by using any information that the market already knows Best Forecast: naïve random walk forecasts! 6/30
EXCHANGE RATE FORECASTING MODELS Structural Econometric Models Based on analysis of macroeconomic variables that are likely to influence the currency. e.g. relative inflation, interest rates, national income growth, changes in money supply, balance of payments Based on theoretical relationships such as PPP Econometric modeling Useful in particular for longer forecasting horizons, fails for short term forecasts 7/30
SHORT TERM EXCHANGE RATE MODELS Technical models Financial Technical Indicator based trigger models Linear Time Series Models: Auto Regressive (AR), Moving Average (MA), Auto Regressive Integrated Moving Average (ARIMA) Non-Linear Time Series Models: Bi-Linear, Threshold AR, SETAR, Auto Regressive Conditional Heteroskadastic (ARCH), Generalized ARCH (GARCH) For daily spot exchange rate data, most of these models fail to beat the Random Walk! 8/30
Alternate Technical Models: Artificial Intelligence Models Models based on Artificial Neural Networks Refenes (1996)-hourly spot data Weigend et. al. (1992)- daily spot data Hann and Steurer (1996)-weekly data Lisi and Schiavo (1999)-monthly data Models based on Genetically Optimized Neural Networks Nag and Mitra (2002)-daily spot data Models outperforms non-linear statistical models and beats RW 9/30
WAVELETS IN THE CONTEXT OF THE PROBLEM Wavelets Wavelet theory has its roots in the classical Fourier analysis Wavelet analysis is a refinement of the Fourier analysis Wavelets are defined over a finite domain and unlike the Fourier transform; they are localized both in time and in scale Ideal for analyzing non-stationary signals and those with transients or singularities Advantage over traditional Fourier methods in analyzing physical situations where the signals contain discontinuities and sharp spikes 10/30
Schematic Representation of Wavelet Decomposition using Mallat s Pyramid Algorithm L S H A 1 D 1 L A 2 H D 2 L: Low pass filter H: High pass filter A 2-level wavelet decomposition 11/30
USE OF WAVELETS IN EXCHANGE RATE FORECASTING Observed exchange rate series can be thought of as a mixture of some distinct process components at different scales and volatility levels, which is typical of financial time series The observed time series is a mixture of such complex processes Analyst, who is unable to identify the separate scale-related components of the series, is unable to produce models capable of giving accurate forecasts If we are able to decompose the original time series into scale of resolution related components and model each component separately, we can produce more accurate models 12/30
PROPOSED FORECASTING TECHNIQUE Decompose original exchange rate series using wavelet decomposition and obtain the corresponding approximation and details series at a predetermined level of resolution Design neural network predictive models for each of the decomposed components of the original series Input variables of the neural network models for each of the decomposed series, comprise of technical indicators We further use a generational genetic algorithm with elitism for arriving at the optimum values of the neural network design parameters 13/30
THE ANN STRUCTURE TARGET ŷ p o net p 0 w j h µ j ( net h pj ) 1 L net h pj HIDDEN LAYER h wji xpi M 1 i INPUT LAYER Feed forward neural network design for component models 14/30
GENERATIONAL GA WITH ELITISM FOR EACH COMPONENT ANN MODEL Initialization: Create an initial population from possible inputs variables and network architectures selected at random. Initial population members are transformed to binary coded chromosomes. Fitness Evaluation: Training and testing these networks using Back Propagation to determine how fit they are for solving the problem. Calculate the fitness of each trained network in the 15/30
current population using ranking based approach and preserve the information about the string with highest fitness value. Selection: Using a stochastic sampling with replacement, populate fit parents pool, size of the pool depending on the generation gap. Crossover: From the selected parents pool, we select pairs in order and apply a 2-point crossover (with a pre-assigned crossover probability), exchanging genetic material of parents to obtain offspring chromosomes. 16/30
Parent I Offspring I 00110011 00110011 00110011 11001100 11001100 11001100 11001100 00110011 Parent II Offspring II A one-point crossover Mutation: Apply mutation on the new chromosome strings with small pre-assigned mutation probability. Elitism: Use elitist strategy to fill the generation gap. Repeat the steps 2 to 6 till the convergence criterion is reached. 17/30
EMPIRICAL STUDIES Modeling of daily spot exchange rate data Australian Dollar/US Dollar, Canadian Dollar/US Dollar, Japaneese Yen/US Dollar, US Dollar/Pound Sterling, French Franc/US Dollar, Swiss Franc/US Dollar, Dutch Guilders/US Dollar and German Deutsch Mark/US Dollar Data Source: Reuters One-step ahead forecasting models: Target variable is the closing exchange rate one day ahead Multi-step ahead models: Target variable is the closing spot rate at the chosen lead period 18/30
Sample size 1000 data points, stretched over a period of three and half years. Data Period: 2004-2007 Data Splitting Last 10% data points (test set data) are reserved for evaluation of the out of sample performance and are not used during the model building stage with training set (first 90%). Wavelet Decomposition Using a Daubechies-5 wavelets, we obtain a wavelet decomposition of the training set data 19/30
Daubechis-5 3-level decomposition of US Dollar/Pound Sterling rate 20/30
Daubechis-5 3-level decomposition of Japanese Yen /US Dollar rate 21/30
Component Modeling Genetically optimized neural networks for modeling each component Exchange rate Forecasts The component-wise forecasts are combined to get the forecasts of the original series Out-of-Sample Testing After the model building with the training set data using the proposed methodology is done, we use the respective component models to generate forecasts for the test data set 22/30
Performance Measures Average Absolute Error (AAE) Average Absolute Percentage Error (AAPE) Root Mean Square Error (RMSE) Percentage of Correct Movements (PCM) R-Square (RSQ) Models Compared Proposed Model (WDGONN) ARCH, GARCH, AGARCH, EGARCH Models Ordinary Genetically optimized ANN models (GONN) 23/30
OUT-OF-SAMPLE PERFORMANCE RESULTS One-step ahead prediction: US Dollar/Pound Sterling 0.009 0.008 1.2 0.007 0.006 0.005 0.004 0.003 0.002 0.001 WDGONN GONN ARCH ARCH-M GARCH GARCH-M AGARCH EGARCH 1 0.8 0.6 0.4 0.2 WDGONN GONN ARCH ARCH-M GARCH GARCH-M AGARCH EGARCH 0 AAE RMSE 0 RSQ AAPE 24/30
OUT-OF-SAMPLE PERFORMANCE RESULTS One-step ahead prediction: US Dollar/Pound Sterling MSE PCM 7.0E-05 6.0E-05 5.0E-05 4.0E-05 3.0E-05 2.0E-05 1.0E-05 0.0E+00 WDGONN GONN ARCH ARCH-M GARCH GARCH-M AGARCH EGARCH 100 90 80 70 60 50 40 30 20 10 0 WDGONN GONN ARCH ARCH-M GARCH GARCH-M AGARCH EGARCH 25/30
OUT-OF-SAMPLE PERFORMANCE RESULTS One-step ahead prediction: Japanese Yen /US Dollar 4 3.5 3 WDGONN GONN PCM 2.5 2 1.5 1 0.5 ARCH ARCH-M GARCH GARCH-M AGARCH EGARCH 100 90 80 70 60 50 40 30 20 10 0 0 AAE AAPE RMSE MSE RSQ WDGONN GONN ARCH ARCH-M GARCH GARCH-M AGARCH EGARCH 26/30
Out-of-sample performance at different levels Results For Japanese Yen/US Dollar Component AAE MSE RSQ Level 3 Approximation 0.37441 0.28402 0.99744 Level 3 Detail 0.11790 0.02451 0.98223 Level 2 Detail 0.12016 0.02692 0.95349 Level 1 Detail 0.15881 0.04953 0.88863 Observation Among the detail series, the coarsest series level 3 detail, which is the least volatile component, is easiest to forecast. 27/30
Multi-step ahead prediction Performance deteriorate as lead period increases 4-step ahead US Dollar/Pound Sterling 0.016 1 0.014 0.9 0.012 0.01 0.008 0.006 0.004 WDGONN GONN ARCH ARCH-M GARCH GARCH-M AGARCH EGARCH 0.8 0.7 0.6 0.5 0.4 0.3 0.2 WDGONN GONN ARCH ARCH-M GARCH GARCH-M AGARCH EGARCH 0.002 0.1 0 AAE RMSE 0 RSQ AAPE 28/30
EGARCH 4-step ahead US Dollar/Pound Sterling MSE 0.0002 0.00018 0.00016 0.00014 0.00012 0.0001 0.00008 0.00006 0.00004 0.00002 0 29/30 GARCH-M AGARCH PCM ARCH-M GARCH ARCH GONN 90 80 70 60 50 40 30 20 10 0 WDGONN GONN ARCH ARCH-M GARCH GARCH-M AGARCH EGARCH WDGONN
REFERENCES Louis Bachelier (1900), Théorie de la spéculation, Gauthier-Villars. Paul Samuelson (1965), Proof That Properly Anticipated Prices Fluctuate Randomly. Industrial Management Review 6: 41-49. Eugene Fama (1965), The Behavior of Stock Market Prices. Journal of Business 38: 34-105. Eugene Fama (1970), Efficient Capital Markets: A Review of Theory and Empirical Work. Journal of Finance 25: 383-417. Ashok Nag & Amit Mitra (2002), Forecasting daily foreign exchange rates using genetically optimized neural networks. Journal of Forecasting, 21 501-511 30/30