NEURAL NETWORKS APPLIED TO STOCK MARKET FORECASTING: AN EMPIRICAL ANALYSIS



Similar documents
DESIGN A NEURAL NETWORK FOR TIME SERIES FINANCIAL FORECASTING: ACCURACY AND ROBUSTNESS ANALISYS

Chapter 8: Regression with Lagged Explanatory Variables

TEMPORAL PATTERN IDENTIFICATION OF TIME SERIES DATA USING PATTERN WAVELETS AND GENETIC ALGORITHMS

Journal Of Business & Economics Research September 2005 Volume 3, Number 9

Predicting Stock Market Index Trading Signals Using Neural Networks

DOES TRADING VOLUME INFLUENCE GARCH EFFECTS? SOME EVIDENCE FROM THE GREEK MARKET WITH SPECIAL REFERENCE TO BANKING SECTOR

MACROECONOMIC FORECASTS AT THE MOF A LOOK INTO THE REAR VIEW MIRROR

SPEC model selection algorithm for ARCH models: an options pricing evaluation framework

INTRODUCTION TO FORECASTING

Measuring macroeconomic volatility Applications to export revenue data,

Stock Price Prediction Using the ARIMA Model

Can Individual Investors Use Technical Trading Rules to Beat the Asian Markets?

Chapter 8 Student Lecture Notes 8-1

The naive method discussed in Lecture 1 uses the most recent observations to forecast future values. That is, Y ˆ t + 1

Hierarchical Mixtures of AR Models for Financial Time Series Analysis

Principal components of stock market dynamics. Methodology and applications in brief (to be updated ) Andrei Bouzaev, bouzaev@ya.

PROFIT TEST MODELLING IN LIFE ASSURANCE USING SPREADSHEETS PART ONE

The Greek financial crisis: growing imbalances and sovereign spreads. Heather D. Gibson, Stephan G. Hall and George S. Tavlas

Morningstar Investor Return

Duration and Convexity ( ) 20 = Bond B has a maturity of 5 years and also has a required rate of return of 10%. Its price is $613.

USE OF EDUCATION TECHNOLOGY IN ENGLISH CLASSES

BALANCE OF PAYMENTS. First quarter Balance of payments

Vector Autoregressions (VARs): Operational Perspectives

COMPARISON OF AIR TRAVEL DEMAND FORECASTING METHODS

Cointegration: The Engle and Granger approach

Time Series Analysis Using SAS R Part I The Augmented Dickey-Fuller (ADF) Test

Modelling and Forecasting Volatility of Gold Price with Other Precious Metals Prices by Univariate GARCH Models

4. International Parity Conditions

How Useful are the Various Volatility Estimators for Improving GARCH-based Volatility Forecasts? Evidence from the Nasdaq-100 Stock Index

Usefulness of the Forward Curve in Forecasting Oil Prices

Market Liquidity and the Impacts of the Computerized Trading System: Evidence from the Stock Exchange of Thailand

Multiprocessor Systems-on-Chips

Investor sentiment of lottery stock evidence from the Taiwan stock market

How To Calculate Price Elasiciy Per Capia Per Capi

Forecasting Model for Crude Oil Price Using Artificial Neural Networks and Commodity Futures Prices

The Real Business Cycle paradigm. The RBC model emphasizes supply (technology) disturbances as the main source of

ANALYSIS AND COMPARISONS OF SOME SOLUTION CONCEPTS FOR STOCHASTIC PROGRAMMING PROBLEMS

DYNAMIC MODELS FOR VALUATION OF WRONGFUL DEATH PAYMENTS

Individual Health Insurance April 30, 2008 Pages

Chapter 6: Business Valuation (Income Approach)

Real-time Particle Filters

Stock Trading with Recurrent Reinforcement Learning (RRL) CS229 Application Project Gabriel Molina, SUID

ARCH Proceedings

Hedging with Forwards and Futures

Estimating Time-Varying Equity Risk Premium The Japanese Stock Market

FORECASTING NETWORK TRAFFIC: A COMPARISON OF NEURAL NETWORKS AND LINEAR MODELS

A New Type of Combination Forecasting Method Based on PLS

Performance Center Overview. Performance Center Overview 1

GOOD NEWS, BAD NEWS AND GARCH EFFECTS IN STOCK RETURN DATA

The Grantor Retained Annuity Trust (GRAT)

SEASONAL ADJUSTMENT. 1 Introduction. 2 Methodology. 3 X-11-ARIMA and X-12-ARIMA Methods

Small and Large Trades Around Earnings Announcements: Does Trading Behavior Explain Post-Earnings-Announcement Drift?

Relationships between Stock Prices and Accounting Information: A Review of the Residual Income and Ohlson Models. Scott Pirie* and Malcolm Smith**

Distributing Human Resources among Software Development Projects 1

Mathematics in Pharmacokinetics What and Why (A second attempt to make it clearer)

The Transport Equation

Hotel Room Demand Forecasting via Observed Reservation Information

Measuring the Downside Risk of the Exchange-Traded Funds: Do the Volatility Estimators Matter?

Appendix D Flexibility Factor/Margin of Choice Desktop Research

Option Put-Call Parity Relations When the Underlying Security Pays Dividends

Forecasting stock indices: a comparison of classification and level estimation models

Tourism demand forecasting with different neural networks models

Chapter 1.6 Financial Management

Load Prediction Using Hybrid Model for Computational Grid

A Note on Using the Svensson procedure to estimate the risk free rate in corporate valuation

Term Structure of Prices of Asian Options

Forecasting, Ordering and Stock- Holding for Erratic Demand

Automatic measurement and detection of GSM interferences

The Kinetics of the Stock Markets

Analysis of I-Series, An Appraisal and Its Models

Why Did the Demand for Cash Decrease Recently in Korea?

Measuring the Services of Property-Casualty Insurance in the NIPAs

Task is a schedulable entity, i.e., a thread

II.1. Debt reduction and fiscal multipliers. dbt da dpbal da dg. bal

Premium Income of Indian Life Insurance Industry

Expecaion Heerogeneiy in Japanese Sock Index

Bid-ask Spread and Order Size in the Foreign Exchange Market: An Empirical Investigation

Chapter 7. Response of First-Order RL and RC Circuits

NEURAL NETWORKS AND INVESTOR SENTIMENT MEASURES FOR STOCK MARKET TREND PREDICTION

LEASING VERSUSBUYING

DEMAND FORECASTING MODELS

JEL classifications: Q43;E44 Keywords: Oil shocks, Stock market reaction.

Volatility Forecasting Techniques and Volatility Trading: the case of currency options

11/6/2013. Chapter 14: Dynamic AD-AS. Introduction. Introduction. Keeping track of time. The model s elements

THE NEW MARKET EFFECT ON RETURN AND VOLATILITY OF SPANISH STOCK SECTOR INDEXES

Risk Modelling of Collateralised Lending

Measuring the Effects of Monetary Policy: A Factor-Augmented Vector Autoregressive (FAVAR) Approach * Ben S. Bernanke, Federal Reserve Board

Working Paper No Net Intergenerational Transfers from an Increase in Social Security Benefits

Default Risk in Equity Returns

Day Trading Index Research - He Ingeria and Sock Marke

NONLINEAR MARKET DYNAMICS BETWEEN STOCK RETURNS AND TRADING VOLUME: EMPIRICAL EVIDENCES FROM ASIAN STOCK MARKETS

Contrarian insider trading and earnings management around seasoned equity offerings; SEOs

Improvement in Forecasting Accuracy Using the Hybrid Model of ARFIMA and Feed Forward Neural Network

Time-Series Forecasting Model for Automobile Sales in Thailand

Implementing 130/30 Equity Strategies: Diversification Among Quantitative Managers

Single-machine Scheduling with Periodic Maintenance and both Preemptive and. Non-preemptive jobs in Remanufacturing System 1

A COMPARISON OF FORECASTING MODELS FOR ASEAN EQUITY MARKETS

The Relationship between Stock Return Volatility and. Trading Volume: The case of The Philippines*

Market Analysis and Models of Investment. Product Development and Whole Life Cycle Costing

GUIDE GOVERNING SMI RISK CONTROL INDICES

Transcription:

NEURAL NETWORKS APPLIED TO STOCK MARKET FORECASTING: AN EMPIRICAL ANALYSIS Absrac LEANDRO S. MACIEL, ROSANGELA BALLINI Economics Insiue (IE), Sae Universiy of Campinas (UNICAMP) Piágoras Sree, 65 Cidade Universiária Zeferino Vaz CEP 13083-857 Campinas, São Paulo, Brazil E-mail: leandro_maciell@homail.com; ballini@eco.unicamp.br Neural neworks are an arificial inelligence mehod for modeling complex arge funcions. For cerain ypes of problems, such as learning o inerpre complex real-world sensor daa, arificial neural neworks (ANNs) are among he mos effecive learning mehods. During he las decade, hey have been widely applied o he domain of financial ime series predicion, and heir imporance in his field is growing. This paper aims o analyze neural neworks for financial ime series forecasing, specifically, heir abiliy o predic fuure rends of Norh American, European, and Brazilian sock markes. Their accuracy is compared o ha of a radiional forecasing mehod, generalized auoregressive condiional heeroskedasiciy (GARCH). Furhermore, he bes choice of nework design is examined for each daa sample. This paper concludes ha ANNs do indeed have he capabiliy o forecas he sock markes sudied, and, if properly rained, robusness can be improved, depending on he nework srucure. In addiion, he Ashley Granger Schmalancee and Morgan Granger Newbold ess indicae ha ANNs ouperform GARCH models in saisical erms. Keywords: Arificial neural neworks, finance forecasing, economic forecasing, sock markes. 1. Inroducion There is a long hisory of research in financial and economic modeling. Time series analysis is one of he mos widely used radiional approaches in his field. There are wo kinds of models o describe he behavior of ime series. The firs are he linear models. A linear approach o ime series analysis is ypically effeced hrough one of he following mehods: (a) Box Jenkins echniques, (b) Kalman filers, (c) Brown s heory of exponenial smoohing, and (d) piecewise regression. The second kinds are he nonlinear models, based on (a) Taken s heorem, (b) Markov swiching models, (c) hreshold auoregression, and (d) smooh ransiion auoregression, for example. These echniques aemp o reconsruc he ime series based upon a sampling of he daa o forecas fuure values. Alhough hese echniques are saisically powerful, hey have low success raes when used o forecas financial markes. Recen evidence shows ha financial markes are nonlinear; however, he linear mehods menioned are sill able o well describe he nonlinear sysems found in financial marke ime series analysis (Fang e al., 1994). Bollerslev (1986) provides an excellen survey of he exisence of nonlineariies in he financial daa and develops a model o predic financial ime series, called generalized auoregressive condiional heeroskedasiciy (GARCH), ha combines all he feaures observed in hese series. Bu, he economy evolves (raher slowly) over ime; his aspec canno be easily capured by fixed specificaion linear models, however, and manifess iself in he form of an evolving coefficien esimae. Many facors inerac in finance and economics, including poliical evens, general economic condiions, and raders expecaions. Therefore, predicing financial and economic movemens is quie difficul. Arificial neural neworks (ANNs) are a very powerful ool in modern quaniaive finance and have emerged as a powerful saisical modeling echnique. They provide an aracive alernaive ool for boh researches and praciioners. They can deec he underlying funcional relaions wihin a se of daa and perform asks such as paern recogniion, classificaion, evaluaion, modeling, predicion, and conrol (Anderson and Rosenfeld, 1988; Hech-Nielsen, 1990; Herz e al., 1991; Hiemsra and Jones, 1994). Several disinguishing feaures of ANNs make hem valuable and aracive in forecasing. Firs, ANNs are nonlinear daa-driven approaches. They are capable of modeling nonlinear sysems wihou an a priori knowledge abou he relaions beween he inpu and oupu variables. The nonparameric ANN model may be preferred over radiional parameric saisical models in siuaions where he inpu daa do no mee he assumpions required by he parameric model, or when large ouliers are eviden in he daase (Lawrence, 1991; Rumelhar and McClelland, 1986; Waie and Hardenbergh, 1989; Wasserman, 1993). Second, ANNs are universal funcions approximaions. I has been shown ha a neural nework can approximae any coninuous funcion o any accuracy desired (Hornik, 1993; Hornik e al., 1987). Third, ANNs are able o generalize. Afer learning he daa presened, ANNs can ofen correcly infer he unseen par of a populaion, even if he sample daa conain noisy informaion. Neural neworks are able o capure he underlying paern or auocorrelaion srucure wihin a ime series even when he underlying law governing he sysem is unknown or oo complex o describe. 3

Because of heir paern recogniion abiliies, ANNs have been applied successfully in many fields and are increasingly being used in economics, as well as in business research. Wong and Selvi (1998) classify perinen aricles by year of publicaion, applicaion area, journal, various decision characerisics (problem domain, decision process phase, level of managemen, level of ask inerdependence), means of developmen, inegraion wih oher echnologies, and major conribuion. Zang e al. (1998) survey aricles ha address modeling issues when ANNs are applied o forecasing. The auhors summarize he mos frequenly cied advanages and disadvanages of he ANN models. Chaerjee e al. (000) provide an overview of he ANN sysem and is wide-ranging use in financial markes. Their work furher discusses he superioriy of ANNs over radiional mehodologies. The sudy concludes wih a descripion of he successful use of ANNs by various financial insiuions. Edward Gaely (1996), in his book Neural Neworks for Financial Forecasing, describes he general mehodology required o build, rain, and es a neural nework using commercially available sofware.in addiion, Shapiro (003) describes capial marke applicaions of neural neworks, fuzzy logic, and geneic algorihms. Garcia and Gencay (000), Gencay (1998), and Qi and Madala (1999) employ ANNs in sock marke predicions. Qi and Wu (003), who employ an ANN model wih moneary fundamenals, find ha heir model canno supass he random walk model. Alernaively, Kiani (005) and Kiani e al. (005) use ANN models wih macroeconomic ime series and find ha hese ouperform he linear as well as oher nonlinear models employed. O Connor and Madden (005) evaluae he effeciveness of using ANNs wih exernal indicaors, such as commodiy prices and currency exchange raes, in predicing movemens in he Dow Jones Indusrial Average index. Their resuls show ha here are a few benefis o using hese indicaors over radiional mehods based on hisorical daa oupu only. Dua e al. (006) discuss modeling he Indian sock marke (price index) using ANNs. The auhors sudy he efficacy of ANNs in modeling he Bombay Sock Exchange Sensex weekly closing values. They use roo mean squared error (RMSE) and mean absolue error (MAE) as indicaors of performance for wo kinds of ANN srucures. They conclude ha he ANN wih more inpu values can improve he verified resuls. 1 Mos recenly, Faria e al. (009) performed a predicive sudy of he Ibovespa hrough ANNs and an adapive exponenial smoohing mehod o compare he forecasing performances of boh mehods on his marke index and evaluae heir accuracy in predicing he sign of marke reurns. The auhors show ha boh mehods produce similar resuls regarding he predicion of index reurns. They use wo differen merics o evaluae forecasing accuracy: RMSE and he measure N(end) ha represens he correc endencies number achieved by he model, ha is, he number of imes he predicions follow he real endencies of he marke. Finally, Lin and Yu (009) invesigae he profiabiliy of using ANN predicions ha are ransformed ino a simple rading sraegy, whose profiabiliy is evaluaed agains a simple buy hold sraegy. The auhors adop his approach o analyze he Taiwan Weighed Index and he Sandard & Poor's (S&P) 500 and find ha he rading rule based on ANNs generaes higher reurns han he buy hold sraegy. In addiion, ANNs have been successfully applied o predic imporan financial and marke indexes, he S&P 500 and he Nikkei 5 Index, among ohers (Chen, 1994; Enke and Thawornwong, 005; Huang e al., 007; Huarng and Yu, 006; Refenes e al., 1994; Yu and Huarng, 008), bu hese works focus only on special markes ha conform o differen kinds of ANN archiecures and do no necessarily compare wih radiional saisical mehods such as auoregressive inegraed moving average (ARIMA) GARCH models. Besides, none of hese works evaluae he differences beween compeiive mehods in saisical erms, bu only by using radiional merics such as RMSE and MAE. This paper aims o analyze and examine he use of neural neworks o predic fuure rends of Norh American, European, and Brazilian sock marke indexes, namely, he Dow Jones and S&P 500 (Unied Saes), he DAX (Germany), he CAC 40 (France), he FTSE (Unied Kingdom), he IBEX 35 (Spain), he PSI 0 (Porugal), and Ibovespa (Brazil). We provide a deailed discussion of he applicaion of neural neworks o forecasing sock marke economic indicaors. As a comparison, we analyze a GARCH model applied o each series o evaluae he accuracy of ANNs, according o radiional performance measuremens and saisical ess such as he Ashley Granger Schmalancee (AGS) and Morgan Granger Newbold (MGN) ess. An exploraion abou how ANNs can incorporae he heeroskedasiciy of financial ime series is presened o verify he model's robusness. This paper is organized as follows. Secion discusses neural nework applicaions in sock marke index price forecasing. Secions 3 and 4 describe GARCH and neural nework models, respecively. Secion 5 discusses he srucure of he neural nework applied. Secion 6 compares he performances of he mehods. Finally, Secion 7 presens our conclusions. Applicaions in Sock Marke Index Forecasing The sock marke is one of he mos popular invesmens, owing o is high expeced profi. However, he higher he expeced profi, he higher he implied risk. The sock marke, which has been invesigaed by various sudies, is a raher complicaed 1 A number of aemps have been made o apply ANNs o he ask of modeling securiy prices (see, e.g., Cao e al., 005; Jasic and Wood, 004; Kaasra and Boyd, 1996; Lam, 004; Nygren, 004). Pan e al. (004) presen an applicaion o predicing he Ausralian sock marke using feedforward neural neworks wih he objecive of developing an opimal archiecure for his purpose. 4

environmen. There are hree degrees of marke efficiency. The srong form of he efficien marke hypohesis saes ha all informaion ha is knowable is immediaely facored ino he marke price as a securiy. If his is rue, hen all of hose price predicors are wasing heir ime, even if hey have access o privae informaion. In he semi-srong form of he efficien marke hypohesis, all public informaion is considered o have been refleced in he price immediaely as i became known, bu possessors of privae informaion can use ha informaion for profi. The weak form holds only ha any informaion gained from examining pas rading hisory is refleced in he price as a securiy. Of course, pas rading hisory is public informaion, implying ha he weak form is a specializaion of he semi-srong form of he efficien marke hypohesis, which iself is a specializaion of he srong form. Sock marke flucuaions are he resul of complex phenomena, whose effec ranslaes ino a blend of gains and losses ha appear in a sock marke ime series ha is usually prediced by exrapolaion. The periodic variaions follow eiher seasonal paerns or business cycles in he economy. Shor-erm and day-o-day variaions appear a random and are difficul o predic, bu hey are ofen he source of sock rading gains and losses, especially in he case of day raders. Numerous invesigaions have given rise o differen decision suppor sysems for he sake of providing invesors wih opional predicions. Since a long ime, many sock markes expers have employed echnical analysis for beer predicions. Generally speaking, a echnical analysis derives a sock's movemens from he sock's own hisorical value. The hisorical daa can be used direcly o form suppor and resisance levels, or hey can be plugged ino many echnical indicaors for furher invesigaion. Convenional research addressing his problem has generally employed ime series analysis echniques ha is, mixed auoregression moving average (ARMA) mehods as well as muliple regression models (Huang e al., 005). Considerable evidence exiss ha shows ha sock marke price is o some exen predicable (Lo and MacKinlay, 1988)..1. Inpu Variables There are wo kinds of heoreical approaches o deermine he inpu variables for sock marke index forecasing wih neural neworks. The firs one inroduces he relaions beween he sock marke index price and oher macroeconomic indicaors. The second one inroduces nonlineariy in he relaion beween sock prices, dividends, and rading volume. Chen (1991) sudies he relaion beween changes in financial invesmen opporuniies and changes in he economy. The auhor provides addiional evidence ha variables such as he defaul spread, erm spread, one-monh T-bill rae, lagged indusrial producion growh rae, and dividend price raio are imporan deerminans of he fuure sock marke index. This sudy inerpres he abiliy of hese variables o forecas he fuure sock marke index in erms of heir correlaions wih changes in he macroeconomic environmen. Fama and French (1993) idenify he overall marke facor, facors relaed o firm size, and book-o-marke equiy as hree common risk facors ha seem o explain average reurns on socks and bonds. Ferson and Schad (1996) show ha he omission of variables such as he lagged sock index and previous ineres raes can lead o erroneous resuls. Sie and Sie (000) discuss he predicive abiliy of ime delay neural neworks for he S&P 500 index ime series. The vecor auoregression (VAR) mehod is mainly used o invesigae he relaions beween variables. Is advanage is ha muliple variables can be invesigaed a he same ime and heir inerdependence can be esed auomaically wih sophisicaed saisically significan levels. Ao (003a, b) find ha (1) HK depends on is pas prices, JP, NASDAQ, S&P, and DJ; () AU depends on is pas prices, S&P, and DJ; (3) depends on is pas prices, HK, NASDAQ, S&P, and DJ; (4) JP depends on is pas prices, NASDAQ, S&P, and DJ; (5) DJ depends on is pas prices and NASDAQ; and (6) S&P depends on is pas prices and NASDAQ. The resuls from VAR modeling sugges ha, for Asian markes, he relevan informaion is he sock's own hisorical values as well as he sock's movemens from he U.S. markes. I is also posiive o know he exen and ime-dependen naure of marke dynamics when we draw he correlaion diagram of he local marke wih U.S. markes. Furher invesigaion ells us ha, a ime of low correlaion, such as in he lae '90s during he Asian financial crisis, he Hong Kong marke (and, similarly, oher Asian markes) is dominaed by local evens, such as currency problems. A oher periods, he local marke is grealy correlaed wih he U.S. markes. In summary, he se of poenial macroeconomic indicaors is as follows: he erm srucure of ineres raes (TS), he shor-erm ineres rae (ST), he long-erm ineres rae (LT), he consumer price index (CPI), indusrial producion (IP), governmen consumpion (GC), privae consumpion (PC), he gross naional produc (GNP), and he gross domesic produc. These are he mos easily available inpu variables ha are observable o a forecaser. Though oher macroeconomic variables can be used, he general consensus in he lieraure is ha he majoriy of useful informaion for forecasing is subsumed by ineres raes and lagged predicive variables. The erm srucure of ineres raes, ha is, he spread of long-erm bond yields over shor-erm bond yields, may have some power in forecasing he sock index. 5

This paper uilizes as inpu variables he hisorical daa of each series sudied, 3 shown in Table 1. The goal is o analyze he influence of he ANN srucure on he forecas resuls. Afer deermining he bes srucure, we compare he performances of he ANN and GARCH models. 3. GARCH Models Table 1. Sock marke indexes ha form he sample. Counry Index Variable Unied Saes Dow Jones DOW Unied Saes S&P 500 S&P Germany DAX DAX France CAC 40 CAC Unied Kingson FTSE FTSE Spain IBEX 35 IBEX Porugal PSI 0 PSI Brazil Ibovespa IBOV The ARIMA models have one severe drawback: They assume ha he volailiy 4 of he variable being modeled (e.g., sock price) is consan over ime. In many cases his is no rue. Large differences (of eiher sign) end o be followed by large differences. In oher words, he volailiy of asse reurns appears o be serially correlaed (Campbell e al., 1997). The auoregressive condiional heeroskedasiciy (ARCH) model was developed o capure his propery of financial ime series. The ARCH 5 process is defined as ARCH (q): y = a+ζ ε (1) ζ = q i= 1 i y i α0 + α () where ζ is he condiional sandard deviaion of y, given he pas values of his process, and a is a consan. The ARCH(q) process is uncorrelaed and has a consan mean and a consan uncondiional variance ( α 0 ), bu is condiional variance is nonconsan. This model has a simple inuiive inerpreaion as a model for volailiy clusering: Large values of pas squared reurns ( y ) give rise o large curren volailiy (Marin, 1998). i The ARCH(q) model is a special case of he more general GARCH(p,q) model: GARCH(p,q): y = a+ζ ε (3) ζ = p q αi y i + i= 1 j= 1 jζ j α0 + β (4) In his model, curren volailiy depends upon he volailiies for he previous q days and he squared reurns for he previous p days. A long and vigorous line of research has followed he basic conribuions of Engle and Bollerslev (developers of he ARCH and GARCH models, respecively), leading o a number of varians of he GARCH(p,q) model, including power GARCH (PGARCH) models, exponenial GARCH (EGARCH) models, hreshold GARCH (TGARCH) models, and oher models ha incorporae so-called leverage effecs. Leverage erms allow for a more realisic modeling of he observed asymmeric behavior of reurns, according o which a good news price increase leads o lower subsequen volailiy, while bad news decreases in price lead o a subsequence increase in volailiy. I is also worh menioning wo-componen GARCH models, which reflec differing shor- and long-erm volailiy dynamics, and GARCH-in-he-mean (GARCH-M) models, which allow he mean value of reurns o depend upon volailiy (Marin, 1998). 6 3 4 5 6 The daa were obained from hp://finance.yahoo.com, accessed on Augus 17, 008. Volailiy is synonymous of sandard deviaion. This secion is based upon he work of Rupper (001). In his work, he GARCH(1,1) model was uilized as a resul of correlaion and auocorrelaion analysis. 6

4. Neural Neworks Neural neworks learning mehods provide a robus approach o approximaing real-, discree-, and vecor-valued arge funcions. For cerain ypes of problems, such as learning o inerpre complex real-world sensor daa, ANNs are among he mos effecive learning mehods known (Michell, 1997). One moivaion for ANN sysems is o capure his kind of highly parallel compuaion based on disribued represenaions. Mos ANN sofware runs on sequenial machines emulaing disribued processes, alhough faser versions of he algorihms have also been implemened on highly parallel machines and specialized. 4.1. Basic Definiions The mulilayer percepron (MLP) is he mos commonly used ype of arificial nework srucure. I consiss of several layers of processing unis (also ermed neurons or nodes). The inpu values (inpu daa) are fed o he neurons in he so-called inpu layer, which processes he inpu values, and he oupu values of hese neurons are hen forwarded o he neurons in he hidden layer. Each connecion has an associaed parameer indicaing is srengh, he so-called weigh. By changing he weighs in a specific manner, he nework can learn o map paerns presened a he inpu layer o arge values on he oupu layer. The procedure by means of which his weigh adapaion is performed is called he learning or raining algorihm. Usually, he daa available for raining he nework are divided ino (a leas) wo non-overlapping pars: he so-called raining and esing ses. The commonly large raining se is used o each he nework he desired arge funcion. Then he nework is applied o he daa in he es se o deermine is generalizaion abiliy, ha is, is abiliy o derive correc conclusions abou he populaion properies of he daa from he sample properies of he raining se (e.g., if a nework has o learn a sine funcion, i should produce correc resuls for all real numbers and no only for hose in he raining se). If he nework is no able o generalize bu, insead, learns he individual properies of he raining paerns wihou recognizing he general feaures of he daa (i.e., produces correc resuls for raining paerns bu has a high error rae in he es se), i is said o be overfied or o be subjec o overfiing. 4.. Neural Nework Properies ANN learning is well suied o problems in which he raining daa correspond o noisy, complex sensor daa, such as inpu from cameras and microphones. I is also applicable o problems for which more symbolic represenaions are ofen used, such as decision ree learning asks. In his case ANNs and decision ree learning produce resuls of comparable accuracy (Haykin, 001). The backpropagaion algorihm is he mos commonly used ANN learning echnique. I is appropriae for problems wih he following characerisics (Michell, 1997). Insances are represened by many value pairs. The arge funcion o be learned is defined over insances ha can be described by a vecor of predefined feaures, such as pixel values. These inpu aribues can be highly correlaed or independen of one anoher. The inpu values can be any real values. The arge funcion oupu can be discree valued, real valued, or a vecor of several real- or discree-valued aribues. The raining examples may conain errors. ANN learning mehods are quie robus o noise in he raining daa. Long raining imes are accepable. Nework raining algorihms ypically require longer raining imes han, say, decision ree learning algorihms. Training imes can range from a few seconds o many hours, depending on facors such as he number of weighs in he nework, he number of raining examples considered, and he seings of various learning algorihm parameers. Fas evaluaion of he learning arge funcion can be required. Alhough ANN learning imes are relaively long, evaluaing he learning nework, o apply i o a subsequen insance, is ypically very fas. The abiliy of humans o undersand he learning arge funcion is no imporan. The weighs learned by neural neworks are ofen difficul for humans o inerpre. Learned neural neworks are less easily communicaed o humans han learned rules. 4.3. MLPs A nework consiss of a se of nodes ha consiue he inpu layer, one or more hidden layers of nodes, and an oupu layer of nodes. The inpu propagaes hrough he nework in a forward direcion, on a layer-by-layer basis. These neural neworks are referred o as MLPs. In he mid-1980s, ANNs were mosly sudied by employmen of he error backpropagaion (EBP) learning algorihm in combinaion wih mulilayer neworks (Rumelhar and McClelland, 1986). Basically, he EBP process consiss of wo phases hrough he differen layers of he nework: a forward pass and a backward pass. In he forward pass, an 7

inpu vecor is applied o he nodes of he nework, and is effec propagaes hrough he nework, layer by layer. Finally, a se of oupus is produced as he acual nework response. During his phase, he weighs are all fixed. During he backward pass, he weighs are all adjused in accordance wih he error correcion rule. Specifically, he acual response of he nework is subraced from a desired response, producing an error signal. This error is propagaed backward hrough he nework, agains he direcion of synapic connecions hence he name EBP. The synapic weighs are adjused so as o make he acual nework response closer o he desired response (Haykin, 001). An MLP nework consiss of a leas hree layers: an inpu layer, one or more hidden layers, and an oupu layer. The nodes are conneced by links associaed wih real numbers, named weighs. Each node akes on muliple inpu values, processes hem, and produces an oupu, which can be forwarded o oher nodes. Given a node j, is oupu is equal o o = ransfer x w ) (5) j where ( ji ji o j is he oupu of node j, x ji is he ih inpu o uni j, w ji is he weigh associaed wih he ih inpu o j, and ransfer is he nonlinear ransfer funcion responsible for ransferring he weighed sum of he inpus o some value ha is given o he nex node. 7 A neuron can have an arbirary number of inpus, bu only one oupu. By changing he weighs of he links connecing he nodes, he ANN can be adjused o approximae a paricular funcion. 4.4. Learning Algorihms Usually, he weighs of an ANN mus be adjused using some learning algorihm so ha he ANN is able o approximae he arge funcion wih sufficien precision. This secion presens a sochasic gradien descen backpropagaion learning algorihm, as follows. 8 The erm neural nework refers o an MLP rained wih his learning algorihm, ofen called backpropagaion or EBP. Assume ha an ANN uses he error funcion E(w) = 1 d D k oupus ( kd o kd ) where o kd is he oupu value produced by oupu neuron k, kd is he desired (correc) value his neuron should produce, and D denoes he se of all raining paerns, ha is, E(w ) is he sum of he predicion errors for all raining examples. The predicion errors of he individual raining examples are, in urn, equal o he sum of he differences beween he oupu values produced by he ANN and he desired (correc) values, where w is he vecor of he weighs of he ANN. The goal of a learning algorihm is o minimize E(w ) for a paricular se of raining examples. There are several ways o achieve his, one of hem being he so-called gradien descen mehod, which basically works as follows (Schraudolph and Cummins, 00): 1. Choose some (random) iniial values for he model parameers.. Calculae he gradien G of he error funcion wih respec o each model parameer. 3. Change he model parameers so ha we move a shor disance in he direcion of he greaes rae of decrease of he error, ha is, in he direcion of G. 4. Repea seps an 3 unil G ges close o zero. Le G = f (x), he gradien of he funcion f, be he vecor of firs parial derivaives, f ( x) = f ( x) f ( x) f ( x),,..., x x 1 x n In our case, G = E(w) (i.e., he derivaive of he error funcion E wih respec o he weigh vecor w ). Wih his in mind, we now explore he gradien descen backpropagaion (EBP) learning algorihm. Firs, a neural nework is creaed and he parameers are iniialized (he weighs are se o small random numbers). Then, unil he erminaion condiion (e.g., he mean squared error of he ANN is less han a cerain error hreshold) is me, all raining examples are augh he ANN. The inpus of each raining example are fed o he ANN and processed from he inpu layer, over he hidden layer(s), o he oupu layer. In his way, a vecor o of oupu values produced by he ANN is obained. (6) (7) 7 8 There are a several ypes of ransfer funcions, discussed in Haykin (001). See more learning algorihms in Haykin (001). 8

In he nex sep, he weighs of he ANN mus be adjused. Basically, his is accomplished by moving he weigh in he direcion of he seepes descen of he error funcion. This happens by adding o each individual weigh he value Δw = ηδ j x ji (8) where η is he learning rae ha deermines he size of he sep ha we use o move oward he minimum of E, and represens he error erm of he neuron j. 9 The learning rae can be hough of as he lenghs of he arrows. 10 Many improvemens of his algorihm, such as momenum erms and weigh decay, are described in he appropriae lieraure (Bishop, 1996). Neverheless, MLPs in combinaion wih he sochasic gradien descen learning algorihm are he mos popular ANNs in pracice. 11 Anoher imporan feaure of his learning algorihm is ha i assumes a quadraic error funcion, and herefore assumes here is only one minimum. In pracice, he error funcion can have apar from he global minimum muliple local minima. There is a danger he algorihm will land in one of he local minima and hus no be able o reduce he error o he highes exen possible by reaching a global minimum. The nex secion describes an ANN design for our daa and a sep-by-sep comparison wih a GARCH model. 5. ANN Design in Sock Marke Forecasing The mehodology described in his secion is based upon Kaasra and Boyd (1996). The design of a neural nework ha successfully predics a financial ime series is a complex ask. The individual seps of his process are as follows: 1. Variable selecion.. Daa collecion. 3. Daa preprocessing. 4. Daa pariioning. 5. Neural nework design. 6. Training he ANN. A deailed descripion of each sep is presened below. 5.1. Variable Selecion Success in designing a neural nework depends on a clear undersanding of he problem (Gaely, 1996). Knowing which inpu variables are imporan in he marke being forecas is criical. This is easier said han done, because he very reason for relying on a neural nework is is powerful abiliy o deec complex nonlinear relaions among a number of differen variables. However, economic heory can help choose variables ha are likely imporan predicors. A his poin in he design process, he concern is abou he raw daa, from which a variey of indicaors will be developed. These indicaors will be derived from he acual inpus o he neural neworks (Kaasra and Boyd, 1996). The financial researcher ineresed in forecasing marke prices mus decide wheher o use boh echnical and fundamenal economic inpus from one or more markes. Technical inpus are defined as lagged 1 values of he dependen variable 13 or as indicaors calculaed from he lagged values. The model applied in his paper uses he lagged values of he dependen variables as a resul of correlaion and auocorrelaion analysis. 14 For each series we plo he sample auocorrelaion funcions (ACF) and parial auocorrelaion funcions (PACF), as in Box e al. (1994). Then, according o he lags and heir respecive ACF and PACF values, we selec hose lags ha indicae significan correlaion. In he nex sep, we apply all he seleced lags o he nework, as described above. Neverheless, we decrease he number of lags for each series, and apply he sandard Bayesian informaion crierion (BIC) model selecion procedure (Schwarz, 1978), according o he RMSE meric. Tha is, he choice of inpus is based on correlaion analysis and he BIC procedure. Table shows he inpu srucures performed for he daa uilized. δ j 9 10 Sochasic gradien descen backpropagaion learning algorihm derivaives are discussed in Haykin (001). Usually, η, 0 < η 0.9. Noe ha oo large an η leads o oscillaion around he minimum, whereas oo small an η can lead o he ANN's slow convergence. 11 This srucure was uilized in he presen work. 1 Lagged means peraining o an elemen of he ime series in he pas. For example, a ime, he values 9 y 1, y, y p are said o be lagged values of he ime series y. 13 The dependen variable is he variable whose behavior is being modeled or prediced (Doughery, 199). 14 Such models have ouperformed radiional ARIMA-based models in price forecasing, alhough no in all sudies (Sharda and Pail, 1994; Tang e al., 1991).

Table. Variable selecion. Variables Inpu Pas Closing Values DOW DOW 1,DOW, DOW 3 S&P S & P 1,S & P DAX DAX 1, DAX CAC CAC 1,CAC,CAC 3, CAC 4 FTSE FTSE 1,FTSE, FTSE 3 IBEX IBEX 1, IBEX PSI PSI 1,PSI,PSI 3, PSI 4 IBOV IBOV 1,IBOV, IBOV 3 The frequency of he daa depends on he researcher's objecives. A ypical off-floor rader in he sock or commodiy fuures markes would likely use daily daa if designing a neural nework as a componen of an overall rading sysem. An invesor wih a longer horizon may use weekly or monhly daa as inpus o he neural nework, raher han a passive buy and hold sraegy (Kaasra and Boyd, 1996), o formulae he bes asse mix. 5.. Daa Collecion The research mus consider cos and availabiliy when collecing daa for he variables chosen in he previous sep. Technical daa are readily available from many vendors a a reasonable cos, whereas fundamenal informaion is more difficul o obain. Time spend collecing daa canno be used for preprocessing, raining, or evaluaing nework performance. The vendor should have a repuaion for providing high-qualiy daa; however, all daa should sill be checked for errors by examining day-o-day changes, ranges, logical consisency, and missing observaions (Kaasra and Boyd, 1996). Missing observaions, which are common, can be handled in a number of ways. All missing observaions can be dropped, or a second opion is o assume ha he missing observaions remain he same by inerpolaing or averaging from nearby values. In his work, we assume ha here are no missing observaions in he sample and ha some values, which can be viewed as ouliers, are presen in he daa, because we aim o model sock markes mainly in urbulen scenarios, characerized by low losses. 15 5.3. Daa Processing As in mos oher neural nework applicaions, daa processing is crucial in achieving good predicive performance when applying neural neworks o he predicion of financial ime series. The inpu and oupu variables for which he daa are colleced are rarely fed ino he nework in raw form. A he very leas, he raw daa mus be scaled beween he upper and lower bounds of he ransfer funcions (usually beween zero and one minus one and one). Two of he mos common daa ransformaions in boh radiional and neural nework forecasing are firs differencing and aking he logarihm of a variable. Firs differencing, or using changes in a variable, can be used o remove a linear rend of daa. Logarihmic ransformaion is useful for daa ha can ake on boh small and large values. Logarihmic ransformaions also conver muliplicaive or raio relaions o addiive ones, which is believed o simplify and improve nework raining (Masers, 1993). 16 In his work we use he logarihmic ransformaion of he reurn, Index R = ln (9) Index 1 where R represens he normal logarihm of he reurns. This approach is especially useful in financial ime series analysis, and produce good resuls, according o he lieraure (see Fama, 1965; Granger and Morgensern, 1970). In addiion, he reurns behavior is more closely approximaed by a normal probabiliy disribuion, bu, as will be shown here, his is a very hardly hypohesis. 5.4. Daa Pariioning Common pracice is o divide he ime series ino hree disinc ses, he raining, esing, and validaion 17 (ou-of-sample) ses. The raining se is he larges and is used by neural neworks o learn he paerns presen in he daa. The esing se, ranging in size from 10% o 30% of he raining se, is used o evaluae he generalizaion abiliy of a supposedly rained nework. A final check on he validaion se chosen mus srike a balance beween obaining a sufficien sample size o evaluae a rained nework and having sufficien remaining observaions for boh raining and esing. The validaion se should consis of he mos recen coniguous observaions, because he pas values was applied o es he neural nework and, for evaluae he 15 16 17 The sample ranges from January 1, 000, o July 7, 008, wih daily daa. Anoher popular daa ransformaion is o use he raios of he inpu variables (see Topek and Querin, 1984). Some sudies call he validaion se he esing se. 10

generalizaion capabiliy of he model, he mos recen observaions consiss as a validaion sample as well as in sandard ime series models. This work breaks down he ses as follows: 1. Training se: 80%.. Tesing se: 15%. 3. Validaion se: 5%. 5.5. Neural Nework Design There are an infinie number of ways o consruc a neural nework. Neurodynamics and archiecure are wo erms used o describe he way in which a neural nework is organized. The number of inpu neurons is one of he easies parameers o selec once he independen variables have been reprocessed, because each independen variable is represened by is own inpu neuron. 18 The asks of selecing he number of hidden layers, he number of neurons in he hidden layers, and he number of inpu neurons, as well as he ransfer funcions, are much more difficul. 5.5.1. Hidden Layers Hidden layers provide he nework wih is abiliy o generalize. In pracice, neural neworks wih one and occasionally wo hidden layers are widely used and have performed very well. Increasing he number of hidden layers also increases he compuaion ime and he danger of overfiing, which leads o poor ou-of-sample forecasing performance. In he case of neural neworks, he number of weighs, which is inexorably linked o he number of hidden layers and neurons, and he size of he raining se (number of observaions) deermine he likelihood of overfiing (Baum and Haussler, 1989). Here we analyzed neural neworks srucure wih one and wo hidden layers o a comparison. 5.5.. Hidden Neurons Despie is imporance, here is no magic formula for selecing he opimum number of hidden neurons, and herefore researchers fall back on experimenaion. However, some rules of humb have been advanced. A rough approximaion of he opimum number of hidden neurons can be obained by he geomeric pyramid rule proposed by Masers (1993). For a hreelayer nework wih n inpu neurons and m oupu neurons, he hidden layer would have n m neurons. Baily and Thompson (1990) sugges ha he number of hidden layer neurons in a hree-layer neural nework should be 75% of he number of inpu neurons. Kaz (199) indicaes ha he opimal number of hidden neurons will generally be found beween one-half o hree imes he number of inpu neurons. Ersoy (1990) proposes doubling he number of hidden neurons unil he nework s performance on he esing se deerioraes. Klimasauskas (1993) suggess ha here should be a leas five imes as many raining facs as weighs, which ses an upper limi on he number of inpu and neurons. Because of hese feaures, his work applies differen srucures o all he daa, chosen randomly, wih, 3, 4, 5, and 6 neurons in he hidden layer o describe he bes srucure according o he index. 5.5.3. Oupu Neurons Deciding on he number of neurons is somewha more sraighforward, since here are compelling reasons o always use only one oupu neuron. Neural neworks wih muliple oupus, especially if hese oupus are widely spaced, produce inferior resuls compared o neworks wih a single oupu (Masers, 1993). In his works, we applied a nework wih he oupu layer composed by one neuron and i means he closed price one sep ahead. 5.5.4. Transfer Funcion The majoriy of curren neural nework models use he sigmoid ransfer funcion, bu ohers, such as he hyperbolic angen, arc angen, and linear ransfer funcions, have also been proposed (Haykin, 001). Linear ransfer funcions are useful for nonlinear mapping and classificaion. Levich and Thomas (1993) and Kao and Ma (199) find ha financial markes are nonlinear and have memory, suggesing ha nonlinear ransfer funcions are more appropriae. Transfer funcions such as he sigmoid are commonly used for ime series daa, because hey are nonlinear and coninuously differeniable, desirable properies for nework learning. In his sudy, he sigmoid ransfer funcion is applied in he proposed nework. 19 5.6. Training he ANN Training a neural nework o learn paerns in he daa involves ieraively presening i wih examples of he correc known answers. The objecive of raining is o find he se of weighs beween he neurons ha deermine he global minimum of he error funcion. Unless he model is overfied, his se of weighs should provide a good generalizaion. The backpropagaion nework applied in his work uses he gradien descen raining algorihm, which adjuss he weighs o move down he seepes slope of he error surface. Finding he global minimum is no guaraneed, since he error surface can include many local 18 19 Each se of daa has is specific inpu variables, as described in Table 1. The sigmoid ransfer funcion is he defaul in he Neural Nework Toolbox in MATLAB. 11

minima, in which he algorihm can become sruck. This secion discusses when o sop raining a neural nework and he selecion of learning raes and momenum values. 5.6.1. Training Ieraions Many sudies ha menion he number of raining ieraions repor convergence from 85 o 5,000 ieraions (Deboeck, 1994; Klaussen and Uhrig, 1994). However, he range is very wide, since 50,000 and 191,400 ieraions (Klimasauskas, 1993; Odom and Sharda, 199) and raining imes of 60 hours have also been repored. Training is affeced by many parameers he choice of learning rae and momenum values and proprieary improvemens o he backpropagaion algorihm, among ohers which differ beween sudies, and i is herefore difficul o deermine a general value for he maximum number of runs. In addiion, he numerical precision of he neural nework sofware can affec raining, because he slope of he error derivaive can become very small, causing some neural neworks programs o move in he wrong direcion due o round-off errors, which can quickly build up in he highly ieraive raining algorihm. I is recommended ha sudies deermine heir own paricular problem and es as many random saring weighs as compuaional consrains will allow (Kaasra and Boyd, 1996). We uilize 100, 50, 500, 800, and 1,00 randomly seleced ieraions o choose he bes performance for each index. 5.6.. Learning Rae During raining, a learning rae ha is oo high is revealed when he error funcion changes drasically wihou showing coninued improvemen. A very low learning rae also requires more raining ime. In eiher case, he researcher mus adjus he learning rae during raining, or brainwash he nework by randomizing all weighs and changing he learning rae for he new run hrough he raining se. The iniial learning raes used in his work vary widely, from 0.1 o 0.9. Mos neural nework sofware programs provide defaul values for learning raes ha ypically work well. Common pracice is o sar raining wih a higher learning rae, such as 0.7, and decrease as raining proceeds. Many nework programs will auomaically decrease he learning rae as convergence is reached (Haykin, 001). 6. Comparison Analysis This secion presens he neural nework srucure implemened for he daa ha resuls in a minimum number of errors. In addiion, he resuls of he ANN and GARCH models are described for comparison. Table 3 shows he bes neural nework srucure performed for each index sudied. Table 3. Neural nework design. Index Inpus Hidden Layer(s) Hidden Neurons Ieraions Learning Rae DOW 3 4 800 0.4 S&P 6 500 0.6 DAX 1 800 0.4 CAC 4 3 100 0.5 FTSE 3 1 500 0.7 IBEX 1 5 800 0.5 PSI 4 50 0.6 IBOV 3 3 800 0.5 The resuls show ha he choice of srucure is differen, depending on he daa. There is no magic formula o describe a srucure ha minimizes errors and leads o he bes resul. The bes choice mus be sough hrough random alernaives, according o he daa. The experimenal resuls reveal ha he proposed algorihm provides a promising alernaive o sock marke predicions, resuling in low errors in comparison wih he GARCH model (see Table 4). Table 4 compares he ranked coefficiens of muliple deerminaion for each model. The R-squared value represens he proporion of variaion in he dependen variable ha is explained by he independen variables. The beer he model explains variaion in he dependen variable, he higher he R-squared value. Wihou furher comparison, he neural nework bes explains variaion in he dependen variable, followed by he regression model. The ranked error saisics are provided for comparison. These saisics are all based on reurn errors beween he desired value and he neural nework oupu value. Table 4. Error comparison. Index R Squared Percenage Mean Error 1 RMSE POCID

ANN GARCH ANN GARCH ANN GARCH ANN GARCH DOW 0.9736 0.8637 3.8933 7.7348 0.615.83 74.65% 63.74% S&P 0.9543 0.7349.7373 6.8939 0.8733 3.838 76.3% 57.76% DAX 0.9873 0.87364 4.9831 8.78383 0.6363.7137 7.98% 58.90% CAC 0.9437 0.837 3.03933 7.3653 0.9389 4.0391 74.5% 61.13% FTSE 0.9534 0.793 4.3187 6.63733 0.7373 3.93811 77.03% 55.4% IBEX 0.89763 0.8634 3.0933 7.6373 0.831.83917 78.65% 59.99% PSI 0.9371 0.78873.6737 6.98430 1.8383 5.6361 69.03% 49.64% IBOV 0.96390 0.8033.03115 9.8391 0.638 3.63783 78.11% 6.11% In Table 4 i is relaively easy o visually verify ha he neural nework model performs beer han he GARCH process. This differs from he model ranking, due o R-squared values. The neural nework model predics he closing value relaively accuraely. In an aemp o evaluae he robusness of he ANN model applied, we analyze he error dimension in he ses performed (raining, es, and validaion). The resuls are measured by he maximum percen error (MPE) and he RMSE: MPE = max (10) 100 n n i= 1 y i yˆ i y i 1 RMSE = ( y i yˆ i ) (11) n where y i denoes he desire value i, and ŷ i he neural nework oupu. The financial marke is a complex, evoluionary, and nonlinear dynamic sysem. Many facors inerac in finance, including poliical evens, general economic condiions, and raders expecaions. Therefore, predicing financial price movemens is quie difficul bu of exreme imporance. In his case, we employ anoher relevan evaluaion measure, he correcness of he predicion of change in direcion (POCID), defined as N i= 1 D i POCID = 100 (1) n where D i = 1 if ( yi yi 1 )( yˆ i yˆ i 1) > 0, or = 0, oherwise. D i In his case, he model wih he higher POCID more accuraely predics he marke's movemens. Table 5 compares he nework ses. Table 5. Nework se comparison. Index Ses Training Tes Validaion MPE RMSE POCID MPE RMSE POCID MPE RMSE POCID DOW 4.371.151 74.16% 4.8716.8751 73.13% 4.9174 3.13134 70.14% S&P 7.537 3.4513 73.9% 7.9177 3.8753 76.53% 8.08643 4.0535 73.98% DAX 3.34741.368 76.88% 3.736.7651 73.8% 4.9347 3.371 71.41% CAC 6.831 3.7836 75.59% 7.5313 4.1363 70.19% 7.3514 4.7351 69.19% FTSE 5.977 3.081 79.01% 6.0183 4.0138 78.63% 6.6874 4.5389 76.3% IBEX 6.7416.134 7.11% 7.1633 3.4156 7.01% 7.5381 4.0571 70.86% PSI 6.634 4.7653 68.94% 6.83635 5.7351 67.99% 7.01963 6.0001 68.17% IBOV 4.5317 3.0917 7.13% 5.0746 4.0381 70.1% 5.1456 4.6318 71.08% We can see in Table 5 ha a neural nework srucure applied o all he indexes has good predicion capabiliy and, as can be seen in he low rae of validaion errors compared wih he GARCH model (see Table 4), a neural nework is capable of learning from he daa and can process good resuls for forecasing. The good performance of neural neworks in his case is verified compared wih GARCH model, which presens a higher rae of errors han he ANN model. Finally, he resuls in he es and validaion ses confirm he neural nework's generalizaion abiliy. Neverheless, he differences beween POCID 13

measures for he ANN and GARCH models reveal ha he ANN model employed predics he marke's movemens more precisely han he GARCH process (see Tables 4 and 5). In all samples of daa, we observe (see Table 4) ha he GARCH model predics a mean of 60% in marke price movemens (up or down), whereas he neural nework model has he capabiliy of predicing his measure o around 75%. As we well know, he ANN provides low POCID values in he validaion se, compared wih he oher ses. We measure he forecas performance for all he indexes in his sudy based on radiional saisical loss, a mehod employed by many, including Mahews (1994), bu hese ess do no reveal wheher he forecas by one model is saisically superior o ha of he oher. Therefore, anoher commonly used es is needed ha can help compare compeiive models in erms of forecas accuracy. In he lieraure, here are few works ha incorporae saisical ess o verify compeiive models, and hen mainly only when one of hem is a neural nework model. For his reason, in addiion o he radiional measures described above, we perform wo parameric ess of pairwise forecas evaluaions. These ess are described as follows. One of he parameric ess employed in his work is he AGS es, due o Ashley e al. (1980), and i ess for he saisical significance of he difference beween he RMSEs associaed wih wo compeing model forecass. This es is based on he equaion d = β + β ( s s ) + ζ (13) 1 mean where d is he difference beween he forecas errors, as obained by he ANN and GARCH models, s is he sum of hese forecas errors, s mean is he sample mean of s, and ζ is a whie noise process. The AGS es is a es of he equaliy of he mean squared errors (MSEs) of wo compeing models agains he alernaive ha he second model's MSE is lower (more accurae) han he firs model's. The es is performed by joinly esing he significance of he parameers β 1 and β in regression (13). 0 The es saisics for he AGS es are calculaed from he residuals obained from esimaing an unresriced model represened by equaion (13) and a model ha resrics β1 = β = 0 in equaion (13). The es saisics for his es are calculaed using he equaion as follows: TS = (( SSER SSEUR ) /( k 1))/( SSEUR /( n k)) (14) where SSE R is he sum of he squared residuals from he resriced model, SSE UR is he sum of he squared residuals from he unresriced model, and k is he number of variables in he regression model. In his es, we assume ha he forecas errors are no conemporaneously correlaed and are free from serial correlaions. The es saisic for his es is disribued F wih and n degrees of freedom under he assumpion of normaliy. Anoher parameric es of equal forecas accuracy is he MGN es. This es is recommended by Diebold and Mariano (1995) and is ofen employed when he assumpion of conemporaneous correlaion of errors is relaxed. The es saisics for his es can be compued using he equaion MGN = (1 ρˆ sd ρˆ sd ) 1 ( n 1) 1 where ρˆ sd is he esimaed correlaion coefficien beween s = e1 + e, and d = e1 e, wih e 1 and e he errors of models 1 and, respecively. In his work, 1 represens he GARCH model and he ANN model. The es saisics for he MGN es are disribued wih n 1 degrees of freedom. For his es, if he forecass are equally accurae, hen he correlaion beween s and d will be zero. Forecas accuracy measures based on he AGS and MGN ess of he forecas equivalence of wo compeing models are shown in Table 6 for all he series. The resuls from he AGS and MGN ess shown in Table 6, which examines pairwise comparisons of he forecass of he wo compeiive models (wih ANNs and GARCH as benchmarks), reveal ha he ANN shows saisically significan evidence of superior performance in predicing all he indexes evaluaed in his sudy. These resuls confirm wha was already indicaed by radiional measures, ha is, ha he ANN ouperforms he GARCH model in predicing he fuure rends of all he sock marke indexes considered in his paper. Graphically, he resuls are shown in Figures 1-8. For each series we plo (a) he real value of he index wih GARCH and ANN predicions and (b) he difference beween he index values, wih each model's resul depiced as an error measure. All he resuls correspond o he validaion se. (15) 0 The procedure for he AGS es is also described in Bradshaw and Orden (1990) and Kiani e al. (005). 14

Table 6. AGS and MGN ess for pairwise forecas evaluaions for all he indexes. Index Tess AGS Tes MGN Tes Saisic p-value Saisic p-value DOW 46.8763 (0.0001) 1.893 (0.0001) S&P 566.755 (0.0001) -.397 (0.0001) DAX 411.10 (0.0001) -1.863 (0.0001) CAC 398.756 (0.0001) 3.876 (0.000) FTSE 137.735 (0.0001) -1.9304 (0.0001) IBEX 509.8363 (0.0001) -0.1976 (0.0003) PSI 56.098 (0.0001).33 (0.0000) IBOV 145.876 (0.0001) -.6398 (0.0001) Figure 1. Dow Jones: (a) Index and model predicions. (b) Differences beween real and prediced values. Figure. S&P 500: (a) Index and model predicions. (b) Differences beween real and prediced values. 15

Figure 3. DAX: (a) Index and model predicions. (b) Differences beween real and prediced values. Figure 4. CAC 40: (a) Index and model predicions. (b) Differences beween real and prediced values. Figure 5. FTSE: (a) Index and model predicions. (b) Differences beween real and prediced values. 16

Figure 6. IBEX 35: (a) Index and model predicions. (b) Differences beween real and prediced values. Figure 7. PSI 0: (a) Index and model predicions. (b) Differences beween real and prediced values. Figure 8. IBOV: (a) Index and model predicions. (b) Differences beween real and prediced values. 17

18 Figures 1-8 confirm he resuls described above. We can see ha boh mehods are capable of predicing all he indexes evaluaed, bu when we see he difference beween he real and prediced values obained for each model, i is clear ha he ANN ouperforms he GARCH mehod. The ANN presens errors closer o zero, while he radiional saisical model resuls in larger errors. In erms of error measures, he inelligence arificial mehod has been shown o be a good way o predic financial ime series. One quesion proposed in his work is wheher or no neural neworks can incorporae heeroskedasic phenomena. Table 7 shows he residual analysis of each series sudied here. I includes a mean es, a es of normaliy (Jarque Bera), and a es of correlaions presen in he residuals (Ljung Box Pierce Q-es), and i verifies heeroskedasiciy in he residuals (Engle s ARCH es) 1,. Table 7. Residuals analysis. Index Tess Mean Jarque Bera Ljung Box Pierce Engle s ARCH Value Saisically zero? Value Normal? Value Correlaion? Value Homoskedasiciy? DOW 0.00 Yes 18.97 Yes 8.91 No 1.87 Yes S&P 0.008 Yes 16.98 Yes 9.990 No 9.871 Yes DAX 0.09 Yes 57.93 Yes 30.91 No 14.765 Yes CAC 0.061 Yes 61.98 Yes 5.81 No 8.816 Yes FTSE 0.076 Yes 5.897 Yes 6.73 No 1.87 Yes IBEX 0.07 Yes 56.93 Yes 33.81 No 15.876 Yes PSI 0.086 Yes.37 Yes 7.978 No 9.991 Yes IBOV 0.053 Yes 54.86 Yes 31.98 No 13.71 Yes Analyzing Table 7, we can see ha he neural nework residuals for all he indexes sudied have a mean saisically equal o zero and a normal disribuion, here is no correlaion beween he residuals, and, finally, he residuals are homoskedasic. The resuls show ha he neural nework srucure proposed is capable of series modeling and forecasing, capuring heeroskedasic phenomena, and confirming he mehod's robusness. 7. Conclusions This research analyzes he use of neural neworks as a forecasing ool; specifically, i ess heir abiliy o predic fuure rends of sock marke indexes. Norh American, European, and Brazilian sock marke indexes were sudied and accuracy compared agains a radiional forecasing mehod (GARCH). While only briefly discussing neural nework heory, his sudy deermines he feasibiliy and pracicaliy of he individual invesor using neural neworks as a forecasing ool. I concludes ha neural neworks do have a powerful capaciy o forecas all he sock marke indexes sudied, and, if properly rained, he individual invesor could benefi from he use of his forecasing ool over curren echniques for he following reasons. When using muliple linear regressions, he governing regression assumpions mus be rue. The lineariy assumpion iself and normal disribuion may no hold in mos financial ime series. Neural neworks can model nonlinear sysems and do no make any assumpions abou he inpu probabiliy disribuion. ANNs are universal funcion approximaions. I has been shown ha a neural nework can approximae any coninuous funcion o any desired accuracy. ANNs are able o generalize. Afer learning he daa presened o hem, ANNs can ofen correcly infer he unseen par of a populaion, even if he sample daa conain noisy informaion. Compared wih he GARCH model, neural neworks are significanly more accurae, according o radiional measuremens ess, and ANNs ouperform GARCH models in saisical erms, as he AGS and MGN ess indicae. ANNs can capure heeroskedasic phenomena. The nex sep in fuure work is o inegrae neural neworks and oher echniques such as geneic echniques, wavele analysis, fuzzy inference, paern recogniion, and radiional ime series models for financial and economic forecasing. The advanages of geneic echniques include adapiveness and robusness, and hey avoid he problem of neural neworks geing 1 For more abou hese ess, see Brockwell and Davis (1991). Chebyshev's inequaliy es is applied o confirm he resuls abou he residuals' probabiliy disribuion. For all he indexes, his was confirmed o be a normal disribuion. 18

19 suck a a local opimum. Once a nework is rained, esed, and idenified as being good, a geneic algorihm can be applied o opimize is performance. The process of geneic evoluion works on he neuron connecion of a rained nework by applying wo procedures: muaion and crossover. The applicaion of hybrid sysems seems o be well suied for he forecasing of financial daa. On he oher hand, he discussion abou inpu variables can be inerpreed according o each daase sudied. References AO, S. I. Analysis of he ineracion of Asian Pacific indices and forecasing opening prices by hybrid VAR and neural nework procedures. In Proceedings of he Inernaional Conference on Compuaional Inelligence for Modelling, Conrol and Auomaion 003, Vienna, Ausria, 003a. AO, S. I. Incorporaing correlaed markes prices ino sock modeling wih neural nework. In Proceedings of he IASTED Inernaional Conference on Modelling and Simulaion 003, Palm Springs, CA, pp. 353 358, 003b. ANDERSON, J. A., and ROSENFELD, E. Neurocompuing: Foundaions of Research. MIT Press, Cambridge, MA, 1998. ASHLEY, R., GRANGER, C. W. J., and SCHMALANCEE, R. Adverising and aggregae consumpion: An analysis of causaliy. Economerica, 48, 1149 1168, 1980. BAILY, D., and THOMPSON, D. M. Developing neural nework applicaions. AI Exper, 1, 33 41, 1990. BAUM, E. B., and HAUSSLER, D. Wha size ne gives valid generalizaion? Neural Compuaion, 6, 151 160, 1989. BISHOP, C. Neural Neworks for Speech and Sequence Recogniion. Thompson, London, 1996. BOLLERSLEV, T. R. Generalized auoregressive condiional heeroskedasiciy. Journal of Economerics, 51, 307 37, 1986. BOX, G. E. P., JENKINS, G. M., and REINSEL, G. C. Time Series Analysis: Forecasing and Conrol, 3rd ed. Prenice Hall, NJ, 1994. BRADSHAW, G. W., and ORDEN, D. Granger causaliy from he exchange raes o agriculural prices and expor sales. Wes Journal of Agriculural Economics, 100 110, 1990. BROCKWELL, P. J., and DAVIS, R. A. Time Series: Theory and Mehods, nd ed. Springer, New York, 1991. CAMPBELL, J. Y., LO, A. W., and MACLINKAY, A. C. The Economerics of Financial Markes. Princeon Universiy Press, 1997. CAO, Q., LEGGIO, K. B., and SCHNIEDERJANS, M. J. A Comparison beween Fama and French s model and arificial neural neworks in predicing he Chinese sock marke. Compuers and Operaions Research, 3, 499 51, 005. CHATTERJEE, A., AYADI, O. F., and BOONE, B. E. Arificial neural neworks and he financial markes: A survey. Managerial Finance, 6, 3 45, 000. CHEN, C. H. Neural neworks for financial marke predicion. Proceedings of he IEEE Inernaional Conference on Neural Neworks,, 1199 10, 1994. CHEN, N. Financial invesmen opporuniies and he macroeconomy. Journal of Finance, 46, 59 554, 1991. DEBOECK, G. J. Trading on he Edge: Neural, Geneic and Fuzzy Sysems for Chaoic Financial Markes. Wiley, New York 1994. DIEBOLD, F. X., and MARIANO, R. S. Comparing predicive accuracy. Journal of Business and Economics Saisics, 13, 53 63, 1995. DOUGHERTY, C. Inroducion o Economerics. Oxford Universiy Press, New York, 199. DUTTA, G., JHA, P., LAHA, A. K., and MOHAN, N. Arificial neural nework models for forecasing sock price index in he Bombay sock exchange. Journal of Emerging Marke Finance, 5, 83 95, 006. ENKE, D., and THAWORNWONG, S. The use of daa mining and neural neworks for forecasing sock marke reurns. Exper Sysems wih Applicaions, 9, 97 940, 005. ERSOY, O. Tuorial a he Hawaii Inernaional Conference on Sysems Sciences, January 1990, Hawaii, 1990. FAMA, E. F. The behavior of sock marke prices. Journal of Business, 14, 34 105, 1965. FAMA, E. F. and FRENCH, K. Common risk facors in he reurns on socks and bonds. Journal of Financial Economics, 33, 3 56, 1993. FANG, H., LAI, S., and LAI, M. Fracal srucure in currency fuures price dynamics. Journal of Fuures Markes, 14, 169 181, 1994. 19

0 FARIA, E. L., ALBUQUERQUE, M. P., GONZALEZ, J. L., CAVALCANTE, J. T. P., and ALBUQUERQUE, M. P. Predicing he Brazilian sock marke hrough neural neworks and adapive exponenial smoohing mehods. Exper Sysems wih Applicaions, 36, 1506 1509, 009. FERSON, W., and SCHADT, R. Measuring fund sraegy and performance in changing economic condiions. Journal of Finance, 51, 45 461, 1996. GARCIA, R., and GENCAY, R. Pricing and hedging derivaive securiies wih neural neworks and a homogeneiy hin. Journal of Economerics, 94, 93 115, 000. GATELY, E. J. Neural Neworks for Financial Forecasing. Wiley, New York, 1996. GENCAY, R. The predicabiliy of securiy reurns wih simple echnical rading rules. Journal of Empirical Finance, 5, 347 359, 1998. GRANGER, C., and MORGENSTERN, O. Predicabiliy of sock marke prices. Healh, Lexingon, MA, 1970. HAYKIN, S. Neural Neworks A Comprehensive Foundaion. IEEE Press, New York, 001. HECHT-NIELSEN, R. Neurocompuing. Addison-Wesley, Reading, MA, 1990. HERTZ, J., KROGH, A., and PALMER, R. G. Inroducion o he Theory of Neurocompuaion. Addison-Wesley, Reading, MA, 1991. HIEMSTRA, C., and JONES, J. D. Tesing for linear and nonlinear Granger causaliy in he sock price volume relaion. Journal of Finance, 49, May, 1639 1664, 1994. HORNIK, K. Some new resuls on neural nework approximaion. Neural Neworks, 6, 1069 107, 1993. HORNIK, K., STINCHCOMBER, M., and WHITE, H. Mulilayer feedforward neworks are universal approximaions. Neural Neworks,, 359 366, 1987. HUANG, W., LAI, K. K., NAKAMORI, Y., WANG, S. Y., and YU, L. Neural neworks in finance and economics forecasing. Inernaional Journal of Informaion Technology and Decision Making, 6, 113 140, 007. HUANG, W., NAKAMORI, Y., and WANG, S. Y. Forecasing sock marke movemen direcion wih suppor vecor machine. Compuers and Operaions Research, 3, 513 5, 005. HUARNG, K., and YU, T. H. The applicaion of neural neworks o forecas fuzzy ime series. Physica A, 363, 481 491, 006. JASIC, T., and WOOD, D. The profiabiliy of daily sock marke indices rades based on neural nework predicions: Case sudy for he S&P 500, he DAX, he TOPIX and he FTSE in he period 1965 1999. Applied Financial Economics, 14, 85 97, 004. KAASTRA, I., and BOYD, M. Designing a neural nework for forecasing financial and economic ime series. Neurocompuing, 10, 15 36, 1996. KAO, G. W., and MA, C. K. Memories, heeroscedasiciy and price limi in currency fuure markes. Journal of Fuure Markes, 1, 67 69, 199. KATZ, J. O. Developing neural nework forecasers for rading. Technical Analysis of Socks and Commodiies, 8, 58 70, 199. KIANI, K. Deecing business cycle asymmeries using arificial neural neworks and ime series models. Compuaional Economics, 6, 65 89, 005. KIANI, K., BIDARKOTA, P., and KASTENS, T. Forecas performance of neural neworks and business cycle asymmeries. Applied Financial Economics Leers, 1, 05 10, 005. KLAUSSEN, K. L., and UHRIG, J. W. Cash soybean price predicion wih neural neworks. In Conference on Applied Commodiy Analysis, Price, Forecasing and Marke Risk Managemen Proceedings, Chicago, 1994, pp. 56-65. KLIMASAUSKAS, C. C. Applying Neural Neworks. In R. R. Trippi and E. Turban, eds., Neural Neworks in Finance and Invesing: Using Arificial Inelligence o Improve Real World Performance. Probus, Chicago, 1993, pp. 64 65 LAM, M. Neural nework echniques for financial performance predicion: Inegraing fundamenal and echnical analysis. Decision Suppor Sysems, 37, 567 581, 004. LAWRENCE, J. Inroducion o Neural Neworks. California Scienific Sofware, Grass Valley, CA, 1991. 0

1 LEVICH, R. M., and THOMAS, L. R. The significance of echnical rading rule profis in he foreign exchange marke: A boosrap approach. In Sraegic Currency Invesing Trading and Hedge in he Foreign Exchange Marke. Probus, Chicago, 1993, pp. 336 365. LIN, T., and YU, C. Forecasing sock markes wih neural neworks. Working Paper Series, available a SSRN: hp://ssrn.com/absrac=137544, accessed April 8, 009, 009. LO, A. W., and MACKINLAY, A. C. Sock marke prices do no follow random walks: Evidence from a simple specificaion es. Review of Financial Sudies, 1, 41 66, 1988. MARTIN, R. D. GARCH modeling of ime-varying volailiies and correlaions. hp://fenews.com/1998/issue4/05980.hm, accessed July 5, 008, 1998. MASTERS, T. Pracical Neural Nework Recipes in C++. Academic, New York, 1993. MATHEWS, B. P. Towards a axonomy of forecas error measures. Journal of Forecasing, 13, 409 416, 1994. MITCHELL, T. M. Machine Learning. McGraw-Hill, USA, 1997. NELSON, M. M., and ILLINGWORTH, T. A Pracical Guide o Neural Nes. Addison-Wesley, Reading, MA, 1991. NYGREN, K. Sock Predicion: A neural nework approach. Maser s hesis, Royal Insiue of Technology, KTH, Sweden, 004. O CONNOR, N., and MADDEN, M. G. A neural nework approach o predicing sock exchange movemens using exernal facors. Proceedings of 5h Inernaional Conference on Innovaive Techniques and Applicaions of Arificial Inelligence, Cambridge, 005. ODOM, M. D., and SHARDA, R. A neural nework for bankrupcy predicion. In Proceedings of he IEEE Inernaional Conference on Neural Neworks, San Diego, CA, 199, pp. II163 II168. PAN, H., TILAKARATNE, C., and YEARWOOD, J. Predicing he Ausralian sock marke index using neural neworks exploiing dynamical swings and inermarke influences. Lecures Noes in Compuer Science (003), pp. 37 338, 004. QI, M., and MADALA, G. S. Economic facors and he sock marke: A new perspecive. Journal of Forecasing, 18, 151 166, 1999. QI, M., and WU, Y. Nonlinear predicion of exchange raes wih moneary fundamenals. Journal of Empirical Finance, 10, 63 640, 003. REFENES, A. N., ZAPRANIS, A., and FRANCIS, G. Sock performance modeling using neural neworks: A comparaive sudy wih regression models. Neural Neworks, 7, 375 388, 1994. RUMELHART, D. E., and MCCLELLAND, J. L. Parallel Disribued Processing, Exploraions in he Microsrucure of Cogniion. MIT Press, Cambridge, MA, 1986. RUPPERT, D. GARCH models. hp://www.orie.cornell.edu/~davidr/or473/lecnoes/noes/node139.hml, accessed April 5, 008, 001. SCHRAUDOLPH, N., and CUMMINS, F. Inroducions o Neural Neworks. hps://www.icos.ehz.ch./eaching/nncourse/backprop.hml#op, accessed Sepember 13, 008, 00. SCHWARTZ, G. Esimaing he dimension of a model. Annals of Saisics, 6, 461 468, 1978. SHAPIRO, A. F. Capial marke applicaions of neural neworks, fuzzy logic and geneic algorihms. hp://www.acuaries.org/afir/colloquia/maasrich/shapiro.pdf, accessed Augus 13, 008, 003. SHARDA, R., and PATIL, R. B. A connecionis approach o ime series predicion: An empirical es. In G. J. Deboeck, ed., Trading on he Edge: Neural, Geneic, and Fuzzy Sysems for Chaoic Financial Markes. Wiley, New York, 1994, pp. 451 464. SITTE, R., and SITTE, J. Analysis of he predicive abiliy of ime delay neural neworks applied o he S&P 500 ime series. IEEE Transacions on Sysems, Man and Cyberneics, 30, November, 568 57, 000. TANG, Z, ALMEIDA, C., and FISHWICK, P. A. Time series forecasing using neural neworks vs. Box Jenkins mehodology. Simulaion, vol. 57, no. 5, 303-310, 1991. TOPEK, W. G., and QUERIN, S. F. Random process in prices and echnical analysis. Journal of Fuure Markes, 4, 15 3, 1984. WAITE, T., and HARDENBERGH, H. Neural nes. Programmer s Journal, 7, 10, 1989. 1

WASSERMAN, P. D. Advanced Mehods in Neural Compuing. Van Nosrand Reinhold, New York, 1993. WONG, B. K., and SELVI, Y. Neural nework applicaions in business: A review and analysis of he lieraure. Informaion and Managemen, 34, 19 139, 1998. YU, T. H. K., and HUARNG, K. H. A bivariae fuzzy ime series model o forecas he TAIEX. Exper Sysems wih Applicaions, 34, 945 95, 008. ZANG, G., PATUWO, B. E., and HU, M. Y. Forecasing wih arificial neural neworks: The sae of he ar. Inernaional Journal of Forecasing, 14, 35 6, 1998.