forecasting daily spot foreign exchange rates … mitra.pdf2/30 overview of the talk •...

30
1/30 FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES USING WAVELETS AND NEURAL NETWORKS Amit Mitra Department of Mathematics & Statistics IIT Kanpur.

Upload: others

Post on 22-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

1/30

FORECASTING DAILY SPOT FOREIGN EXCHANGE

RATES USING WAVELETS AND NEURAL

NETWORKS

Amit Mitra

Department of Mathematics & Statistics

IIT Kanpur.

Page 2: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

2/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

Page 3: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

3/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

Page 4: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

4/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

Page 5: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

5/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

Page 6: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

6/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!

Page 7: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

7/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

Page 8: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

8/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!

Page 9: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

9/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

Page 10: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

10/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

Page 11: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

11/30

Schematic Representation of Wavelet Decomposition using Mallat’s Pyramid Algorithm

A 2-level wavelet decomposition

A1

D2

S

D1

L: Low pass filter H: High pass filter

A2

H L

H L

Page 12: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

12/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

Page 13: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

13/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

Page 14: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

THE ANN STRUCTURE

TARGET py

opnet

HIDDEN LAYER

h

hjiw pix

INPUT LAYER

Feed forward neural network design for component models

pjnet

)( hpj

hj netµ

1 i M

1 L

0jw

14/30

Page 15: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

15/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

Page 16: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

16/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.

Page 17: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

17/30

A one-point crossover

Parent I Offspring I 00110011 00110011 00110011 11001100

11001100 11001100 11001100 00110011

Parent II

• 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.

Offspring II

Page 18: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

18/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

Page 19: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

19/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

Page 20: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

20/30

Daubechis-5 3-level decomposition of US Dollar/Pound Sterling rate

Page 21: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

21/30

Daubechis-5 3-level decomposition of Japanese Yen /US Dollar rate

Page 22: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

22/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

Page 23: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

23/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)

Page 24: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

24/30

OUT-OF-SAMPLE PERFORMANCE RESULTS One-step ahead prediction: US Dollar/Pound Sterling

0

0.001

0.002

0.003

0.004

0.005

0.006

0.007

0.008

0.009

AAE RMSE

WDGONNGONNARCHARCH-MGARCHGARCH-MAGARCHEGARCH

0

0.2

0.4

0.6

0.8

1

1.2

RSQ AAPE

WDGONNGONNARCHARCH-MGARCHGARCH-MAGARCHEGARCH

Page 25: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

25/30

OUT-OF-SAMPLE PERFORMANCE RESULTS One-step ahead prediction: US Dollar/Pound Sterling

MSE

0.0E+00

1.0E-05

2.0E-05

3.0E-05

4.0E-05

5.0E-05

6.0E-05

7.0E-05

WDGONNGONNARCH

ARCH-MGARCH

GARCH-MAGARCHEGARCH

PCM

0102030405060708090

100

WDGONN

GONN

ARCHARCH-M

GARCHGARCH-M

AGARCHEGARCH

Page 26: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

26/30

OUT-OF-SAMPLE PERFORMANCE RESULTS

One-step ahead prediction: Japanese Yen /US Dollar

0

0.5

1

1.5

2

2.5

3

3.5

4

AAE AAPE RMSE MSE RSQ

WDGONNGONNARCHARCH-MGARCHGARCH-MAGARCHEGARCH

PCM

0102030405060708090

100

WDGONNGONNARCH

ARCH-MGARCH

GARCH-MAGARCHEGARCH

Page 27: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

27/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.

Page 28: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

28/30

Multi-step ahead prediction

• Performance deteriorate as lead period increases

4-step ahead US Dollar/Pound Sterling

0

0.002

0.004

0.006

0.008

0.01

0.012

0.014

0.016

AAE RMSE

WDGONNGONNARCHARCH-MGARCHGARCH-MAGARCHEGARCH

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

RSQ AAPE

WDGONNGONNARCHARCH-MGARCHGARCH-MAGARCHEGARCH

Page 29: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

29/30

4-step ahead US Dollar/Pound Sterling

MSE

00.000020.000040.000060.00008

0.00010.000120.000140.000160.00018

0.0002

WDGONN

GONN

ARCHARCH-M

GARCHGARCH-M

AGARCHEGARCH

PCM

0102030405060708090

WDGONN

GONN

ARCHARCH-M

GARCHGARCH-M

AGARCHEGARCH

Page 30: FORECASTING DAILY SPOT FOREIGN EXCHANGE RATES … Mitra.pdf2/30 OVERVIEW OF THE TALK • Introduction • What are exchange rates • Exchange rate dynamics • Importance of exchange

30/30

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