0115 966 7955 Today's Opening Times 10:30 - 17:00 (BST)

Artificial Neural Networks to forecast London Stock Exchange

Disclaimer: This dissertation has been submitted by a student. This is not an example of the work written by our professional dissertation writers. You can view samples of our professional work here.

Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UK Essays.


This dissertation examines and analyzes the use of the Artificial Neural Networks (ANN) to forecast the London Stock Exchange. Specifically the importance of ANN to predict the future trends and value of the financial market is demonstrated. There are several contributions of this study to this area. The first contribution of this study is to find the best subset of the interrelated factors at both local and international levels that affect the London stock exchange from the various input variables to be used in the future studies.

We use novel aspects, in the sense that we base the forecast on both the fundamental and technical analysis.The second contribution of this study was to provide well defined methodology that can be used to create the financial models in future studies. In addition, this study also gives various theoretical arguments in support of the approaches used in the construction of the forecasting model by comparing the results of the previous studies and modifying some of the existing approaches and tested them. The study also compares the performance of the statistical methods and ANN in the forecasting problem. The main contribution of this thesis lies in comparing the performance of the five different types of ANN by constructing the individual forecasting model of them.

Accuracy of models is compared by using different evaluation criteria and we develop different forecasting models based on both the direction and value accuracy of the forecasted value. The fourth contribution of this study is to investigate whether the hybrid approach combining different individual forecasting models can outperform the individual forecasting models and compare the performance of the different hybrid approaches. Three hybrid approaches are used in this study, two are existing approaches and the third original approach, the mixed combined neural network -is being proposed in this study to the academic studies to forecast the stock exchange. The last contribution of this study lies in modifying the existing trading strategy to increase the profitability of the investor and support the argument that the investor earns more profit if the forecasting model is being developed by using the direction accuracy as compared to the value accuracy.

The best forecasting classification accuracy obtained is 93% direction accuracy and 0.0000831 (MSE) value accuracy which are better than the accuracies obtained by the previous academic studies. Moreover, this research validates the work of the existing studies that hybrid approach outperforms the individual forecasting model. In addition, the rate of the return that was attained in this thesis by using modified trading strategy is 120.14% which has shown significant improvement as compared to the 10.8493% rate of return of the existing trading strategy in other academics studies. The difference in the rate of return could be due to the fact that this study has developed good forecasting model or a better trading strategy.

The experimental results show our method not only improves the accuracy rate, but also meet the short-term investors’ expectations. The results of this thesis also support the claim that some financial time series are not entirely random, and that contrary to the predictions of the efficient markets hypothesis (EMH), a trading strategy could be based solely on historical data. It was concluded that ANN do have good capabilities to forecast financial markets and, if properly trained, the investor could benefit from the use of this forecasting tool and trading strategy.

Chapter 1

1 Introduction

1.1 Background to the Research

Financial Time Series forecasting has attracted the interest of academic researchers and it has been addressed since the 1980.It is a challenging problem as the financial time series have complex behavior, resulting from a various factors such as economic, psychological or political reasons and they are non-stationary , noisy and deterministically chaotic.

In today’s world, almost every individual is influenced by the fluctuations in the stock market. Now day’s people prefer to invest money in the diversified financial funds or shares due to its high returns than depositing in the banks. But there is lot of risk in the stock market due to its high rate of uncertainty and volatility. To overcome such risks, one of the main challenges for many years for the researchers is to develop the financial models that can describe the movements of the stock market and so far there had not been an optimum model.

The complexity and difficulty of forecasting the stock exchange, and the emergence of data mining and computational intelligence techniques, as alternative techniques to the conventional statistical regression and Bayesian models with better performance, have paved the road for the increased usage of these techniques in fields of finance and economics. So, traders and investors have to rely on the various types of intelligent systems to make trading decisions. (Hameed,2008). A Computational Intelligence system such as neural networks, fuzzy logic, genetic algorithms etc has been widely established research area in the field of information systems. They have been used extensively in forecasting of the financial market and they have been quite successful to some extent .Although the number of purposed methods in financial time series is very large , but no one technique has been successful to consistently to “beat the market”.

For last three decades, opposing views have existed between the academic communities and traders about the topic of “Random walk theory “and “Efficient Market Hypothesis(EMH)” due to the complexity of the financial time series and lot of publications by different researchers have gather various amount of evidences in support as well as against it. Lehman (1990), Haugen (1999) and Lo (2000) gave evidence of the deficiencies in EMH. But the investors such as Warren Buffet for long period of time have beaten the stock market consistently. Market Efficiency or “Random walk theory” in terms of stock trading in the financial market means that it is impossible to earn excess returns using any historic information.

In essence, then, the new information is the only variable that causes to alter the price of the index as well as used to predict the arrival and timing. Bruce James Vanstone (2005) stated that in an efficient market, security prices should appear to be randomly generated. Both sides in this argument are supported by empirical results from the different markets across over the globe. This thesis does not wish to enter into the argument theoretically whether to accept or reject the EMH. Instead, this thesis concentrates on the methodologies to be used for development of the financial models using the artificial neural networks (ANN), compares the forecasting capabilities of the various ANN and hybrid based approach models, develop the trading strategy that can help the investor and leaves the research of this thesis to stack up with the published work of other researchers which document ways to predict the stock market. In recent years and since its inception, ANN has gained momentum and has been widely used as a viable computational intelligent technique to forecast the stock market.

The main challenge of the traders is to know the signals when the stock market deviates and to take advantage of such situations. The data used by the traders to remove the uncertainty in the stock market and to take trading decisions whether to buy or sell the stock using the information process is “noisy”. Information not contained in the known information subset used to forecast is considered to be noise and such environment is characterized by a low signal-to noise ratio. Refenes et.al (1993) and Thawornwong and Enke (2004) described that the relationship between the security price or returns and the variables that constitute that price (return), changes over time and this fact is widely accepted within the academic institutes.

In other words, the stock market‘s structural mechanics may change over time which causes the effect on the index also change. Ferreira et al. (2004) described that the relationship between the variables and the predicted index is non linear and the Artificial neural networks (ANN) have the characteristic to represent such complex non-linear relationship. This thesis presents the mechanical London Stock Market trading system that uses the ANN forecasting model to extract the rules from daily index movements and generate signal to the investors and traders whether to buy, sell or hold a stock. The figure 1 and 2 represents the stock exchange and ANN forecasting model. By viewing the stock exchange as a financial market that takes historical and current data or information as an input, the investors react to this information based on their understanding, speculations, analysis etc.

It would now seem very difficult to predict the stock market, characterized by high noise, nonlinearities, using only high frequency (weekly, daily) historical prices. Surprisingly though, there are anomalies in the behavior of the stock market that cannot be explained under the existing paradigm of market efficiency. Studies discussed in the literature review have been able to predict the stock market accurately to some extent and it seems that forecasting model developed by them have been able to pick some of the hidden patterns in the inherently non-linear price series. While it is true that forecasting model need to be designed and optimized with care in order to get accurate results .

Further, it aims to contribute knowledge that will one day lead to a standard or optimum model for the prediction of the stock exchange. As such, it aims to present a well defined methodology that can be used to create the forecasting models and it is hoped that this thesis can address many of the deficiencies of the published research in this area. In the last decade, there has been plethora of the ANN models that were developed due to the absence of the well defined methodology, which were difficult to compare due to less published work and some of them have shown superior results in their domains. Moreover, this study also compares the predictive power of the ANN with the statistical models. Normally the approach used by the academic researchers in the forecasting use technical analysis and some of them include the fundamental analysis. The technical analysis uses only historical data (past price) to determine the movement of the stock exchange and fundamental analysis is based on external information (like interest rates, prices and returns of other asset) that comes from the economic system surrounding the financial market.

Building a trading system using forecasting model and testing it on the evaluation criteria is the only practical way to evaluate the forecasting model. There has been so much prior research on identifying the appropriate trading strategy for forecasting problem. This thesis does not wish to enter into the argument which strategy is best or not. Although, the importance of the trading strategy can hardly be underestimated, but this thesis concentrates on using one of the existing strategy, modify it and compares the return by the forecasting models. But there has always been debate in the academic studies over how to effectively benchmark the model of ANN for trading. Some of the academic researchers stated that predicting the direction of the stock exchange may lead to higher profits while some of them supported the view that predicting the value of the stock exchange may lead to higher rate of return. Azoff (1994) and Thawornwong and Enke (2004) discussed about this debate in their study.

In essence, there is a need for a formalized development methodology for developing the ANN financial models which can be used as a benchmark for trading systems. All of this is accommodated by this thesis.

1.2 Problem Statement and Research Question

The studies mentioned above have generally indicated that ANN, as used in the stock market, can be a valuable tool to the investor .Due to some of the problems discussed above, we are not still able to answer the question:

Can ANNs be used to develop the accurate forecasting model that can be used in the trading systems to earn profit for the investor?

From the variety of academic research summarized in the literature review, it is clear that a great deal of research in this area has taken place by different academic researchers and they have gathered various amounts of evidences in support as well as against it. This directly threatens the use of ANN applicability to the financial industry.

Apart from the previous question, this research addresses various other problems:

1. Which ANN have better performance in the forecasting of the London Stock Exchange from the five different types of the ANN which are widely used in the academics?

2. Which subset of the potential input variables from 2002-08 affect the LSE?

3. Do international stock exchanges, currency exchange rate and other macroeconomic factors affect the LSE?

4. How much the performance of the forecasting model is improved by using the regression analysis in the factor selection?

5. Can use of the technical indicators improve the performance of the forecasting model?

6. Which learning algorithm in the training of the ANN give the better performance?

7. Does Hybrid-based Forecasting Models give better performance than the individual ANN forecasting models?

8. Which Hybrid-based models have the better performance and what are the limitations of using them?

9. Does the forecasting model developed on the basis of the percentage accuracy gives more rate of the return as compared to the value accuracy?

10. Does the forecasting model having better performance in terms of the accuracy increase the profit of the investor when applied to the trading strategy?

Apart from all questions outlined above, it addresses various another questions regarding the design of the ANN.

• Are there any approaches to solve the various issues in designing of the ANN like number of hidden layers and activation functions?

This thesis will attempt to answer the above question within the constraints and scope of the 6-year sample period (from 2002-2008) using historical data of various variables that affect the LSE. Further, this thesis will also attempt to answer these questions within the practical constraints of transaction costs and money management imposed by real-world trading systems. Although a formal statement of the methodology or steps that is being used is left until section 3, it makes sense to discuss the way in which this thesis will address the above question.

In this thesis, various types of ANN will be trained using fundamental data, and technical data according to the direction and value accuracy. A better trading system development methodology will be defined, and the performance of the forecasting model will be checked by using evaluation criteria rate of the return .In this way, the benefits of incorporating ANN into trading strategies in the stock market can be exposed and quantified. Once this process has been undertaken, it will be possible to answer the thesis all questions.

1.3 Motivation of the Research

Stock market has always had been an attractive appeal for the researchers and financial investors and they have studied it over again to extract the useful patterns to predict the movement of the stock market. The reason is that if the researchers can make the accurate forecasting model, they can beat the market and can gain excess profit by applying the best trading strategy.

Numerous financial investors have suffered lot of financial losses in the stock market as they were not aware of the stock market behavior. They had the problem that they were not able to decide when they should sell or buy the stock to gain profit. Nevertheless, finding out the best time for the investor to buy or to sell has remained a very difficult task because there are too many factors that may influence stock prices. If the investors have the accurate forecasting model, then they can predict the future behavior of the stock exchange and can gain profit. This solves the problem of the financial investors to some extent as they will not bear any financial loss. But it does not guarantee that the investor can have better profit or rate of return as compared to other investors unless he utilized the forecasting model using better trading strategy to invest money in the share market. This thesis tries to solve the above problem by providing the investor better forecasting model and trading strategies that can be applied to real-world trading systems.

1.4 Justification of Research

There are several features of this academic research that distinguish it from previous academic researches. First of all, the time frame chosen for the investigation of the ANN (2002-08) in the London Stock Exchange has never been tested in the previous academic work. The importance of the period chosen is that there are two counter forces, which are opposing each other. On the one hand, the improvement of the UK and other countries economy after the 2001 financial crises happened in this period as a whole. On the other hand, this period also shows the decline in the stock markets from Jan, 2008 to Dec, 2008. So, it is important to test the forecasting model for bull, stable and bear market.

Second, some of the research questions addressed in the above section, have not been investigated much in the academic studies, especially there is hardly any study which have done research on all the problems. Moreover, original hybrid based mixed neural network, better trading strategy and other modified approaches have been successfully being described and used in this study

Finally, there is a significant lack of work carried out in this area in the LSE. As such, this thesis draws heavily on results published mainly within the United States and other countries; from the academics .One interesting aspect of this thesis is that it will be interesting to see how much of the published research on application of ANN in stock market anomalies is applicable to the UK market. This is important as some of the academic studies (Pan et al (2005)) states that each stock market in the globe is different.

1.5 Delimitations of scope

The thesis concerns itself with historical data for the variables that affect London Stock Exchange during the period 2002 – 2008.

1.6 Outline of the Report

The remaining part of the thesis is organized in the following six chapters.

The second chapter, the background and literature review, provides a brief introduction to the domain and also pertinent literature is reviewed to discuss the related published work of the previous researchers in terms of their contribution and content in the prediction of the stock exchange which serves as the building block for much of the research. Moreover, this literature review also gave solid justification why a particular set of ANN inputs are selected, which is important step according to the Thawornwong and Enke (2004) and and some concepts from finance.

The third chapter, the methodology, describes the steps in detail, data and the mechanics or techniques that take place in the thesis along with the empirical evidence. In addition, it also discuss the literature review for each step. Formulas and diagrams are shown to explain the techniques when necessary and it also covers issues as software and hardware used in the study.

The fourth chapter, the implementation, discusses the approaches used in the implementation in detail based on the third chapter. It also covers such issues as software and hardware used in the study.

The fifth chapter, the results and analysis, present the results according to the performance and benchmark measures that we have used in this study to compare with other models. It describes the choices that were needed in making model and justifies these choices in terms of the literature.

The sixth chapter, conclusions and further work, restates the thesis hypothesis, discuss the conclusions drawn from the project and also thesis findings are put into perspective. Finally, the next steps to improve the model performance are considered.

Chapter 2 Background and Literature Review

2 Background and Literature Review

This section of thesis explores the theory of three relevant fields of the Financial Time Series, Stock Market, and Artificial Neural Networks, which together form the conceptual frameworks of the thesis as shown in the figure 1. Framework is provided to the trader to make quantitative and qualitative judgments concerning the future stock exchange movements. These three fields are reviewed in historical context, sketching out the development of those disciplines, and reviewing their academic credibility, and their application to this thesis. In the case of Neural Networks, the field is reviewed with regard to that portion of the literature which deals with applying neural network to the prediction of the stock exchange, the various type of techniques and neural networks used and an existing prediction model is extended to allow a more detailed analysis of the area than would otherwise have been possible.

2.1 Financial Time Series

2.1.1 Introduction

The field of the financial time series prediction is a highly complex task due to the following reasons:

1. The financial time series frequently behaves like a random-walk process and predictability of such series is controversial issue which has been questioned in scope of EMH.

2. The statistical property of the financial time series shift with the different time. Hellstr¨om and Holmstr¨om [1998]).

3. Financial time series is usually noisy and the models which have been able to reduce such noise has been the better model in forecasting the value and direction of the stock exchange.

4. In the long run, a new forecasting technique becomes a part of the process to be forecasted, i.e. it influences the process to be forecasted (Hellstr¨om and Holmstr¨om [1998]).

The first point is explained later in this section while discussing the EMH theory (Page).The graph of the volatility time series of FTSE 100 index from 14 June, 1993 to 29 December, 1998 and Dow Jones from 1928 to 2000 by Nelson Areal (2008) and Negrea Bogdan Cristian (2007) illustrates the second point of the FTSE 100 [2.1.r]in figure 2.1.1 and 2.2.2.These figures also shows that the volatility changes with period , in some periods FTSE 100 index value fluctuates so much and in some it remains calm.

The third point is explained by the fact the events on a particular data affect the financial time series of the index, for example, the volatility of stocks or index increases before announcement of major stock specific news (Donders and Vorst [1996]). These events are random and contribute noise in the time series which may make difficult to compare the two forecasting models difficult to compare as a random model can also produce results. The fourth result can be explained by the example. Suppose a company develop a model or technique that can outcast all other models or techniques. The company will make lot of profits if this model is available to less people. But if this technique is available to all people with time due to its popularity, than the profits of the company will decrease as the company will not no longer take advantage of this technique. This argument is described in Hellstr¨om and Holmstr¨om [1998] and Swingler [1994] .

2.1.2 Efficient Market Hypothesis (EMH)

EMH Theory has been a controversial issue for many years and there has been no mutual agreed deal among the academic researchers, whether it is possible to predict the stock price. The people who believe that the prices follow “random walk” trend and cannot be predicted, are usually people who support the EMH theory. Academic researchers( Tino et al. [2000]), have shown that the profit can be made by using historical information , whereas they also found difficult to verify the strong form due to lack of all private and public data.

The EMH was developed in 1965 by Fama (Fama [1965], Fama [1970]) and has found widely accepted (Anthony and Biggs [1995], Malkiel [1987], White [1988], Lowe and Webb [1991]) in the academic community (Lawrence et al. [1996]).It states that the future index or stock value is completely unpredictable given the historical information of the index or stocks. There are three forms of EMH: weak, semi-strong, and strong form. The weak EMH rules out any form of forecasting based on the stock’s history, since the stock prices follows a random walk in which in which successive changes have zero correlation (Hellstr¨om and Holmstr¨om [1998]). In Semi Strong hypothesis, we consider all the publicly available information such as volume data and fundamental data. In strong form, we consider all the publicly and privately available information.

Another reason for argument against the EMH is that different investors or traders react differently when a stock suddenly drops in a value. These different time perspectives will cause the unexpected change in the stock exchange, even if the new information has not entered in the scene. It may be possible to identify these situations and actually predict future changes (Hellstr ¨om and Holmstr¨om [1998])

The developer have proved it wrong by making forecasting models, this issue remains an interesting area. This controversy is just only matter of the word immediately in the definition. The studies in support of the argument of EMH rely on using the statistical tests and show that the technical indicators and tested models can’t forecast. However, the studies against the argument uses the time delay between the point when new information enters the model or system and the point when the information has spread across over the globe and a equilibrium has been reached in the stock market with a new market price.

2.1.3 Financial Time Series Forecasting

Financial Time series Forecasting aims to find underlying patterns, trends and forecast future index value using using historical and current data or information. The historic values are continuous and equally spaced value over time and it represent various types of data . The main aim of the forecasting is to find an approximate mapping function between the input variables and the forecasted or output value . According to Kalekar (2004), Time series forecasting assumes that a time series is a combination of a pattern and some error. The goal of the model using time series is to separate the pattern from the error by understanding the trend of the pattern and its seasonality Several methods are used in time series forecasting like moving average (section ) moving averages, linear regression with time etc. Time series differs from the technical analysis (section) that it is based on the samples and treated the values as non-chaotic time series. Many academic researchers have applied time series analysis in their forecasting model, but there has been no major success. [1a]

2.2 Stock Market

2.2.1 Introduction

Let us consider the basics of the stock market.

MM What are stocks?

Stock refers to a share in the ownership of a corporation or company. They represent a claim of the stock owner on the company’s earnings and assets and by buying more stocks; the stake in the ownership is increased. In United States, stocks are often referred as shares, whereas in the UK they are also used as synonym for bonds, shares and equities.

MM Why a Company issues a stock?

The main reason for issuing stock is that the company wants to raise money by selling some part of the company. A company can raise money by two ways: “debt financing” (borrowing money by issuing bonds or loan from bank) and “equity financing “(borrowing money by issuing stocks).It is advantageous to raise the money by issuing stocks as the company has not to pay money back to the stock owners but they have to share the profit in the form of the dividends.

MM What is Stock Pricing or price?

A stock price is the price of a single stock of a number of saleable stocks traded by the company. A company issue stock at static price, and the stock price may increase or decrease according to the trade. Normally the price of the stocks in the stock market is determined by the supply/demand equilibrium.


MM What is a Stock Market?

Stock Market or equity market is a public market where the trading and issuing of a company stock or derivates takes place either through the stock exchange or they may be traded privately and over-the counter markets. It is vital part of the economy as it provides opportunities to the company to raise money and also to the investors of having potential gain by selling or buying share. The stock market in the US includes the NYSE, NASDAQ, the AMEX as well as many regional exchanges. London Stock Exchange is the major stock exchange in the UK and Europe.As mentioned in the Chapter 1, in this study we forecast the London Stock Exchange (Section 2.2.2.).

Investing in the stock market is very risky as the stock market is uncertain and unsteady. The main aim of the investor is to get maximum returns from the money invested in the stock market, for which he has to study about the performance, price history about the stock company .So it is a broad category and according to Hellstrom (1997), there are four main ways to predict the stock market:

1. Fundamental analysis (section 2.2.3)

2. Technical analysis, (section 2.2.4)

3. Time series forecasting (section 2.1)

4. Machine learning (ANN). (Section 2.3)

2.2.2 London Stock Exchange

London Stock Exchange is one of the world’s oldest and largest stock exchanges in the world, which started its operation in 1698, when John Casting commenced “at this Office in Jonathan’s Coffee-house” a list of stock and commodity prices called “The Course of the Exchange and other things” [2] .On March 3, 1801, London Stock Exchange was officially established with current lists of over 3,200 companies and has existed, in one or more form or another for more than 300 years. In 2000, it decided to become public and listed its shares on its own stock exchange in 2001. The London Stock market consists of the Main Market and Alternative Investments Market (AIM), plus EDX London (exchange for equity derivatives).

The Main Market is mainly for established companies with high performance, and AIM hand trades small-caps, or new enterprises with high growth potential.[1] Since the launch of the AIM in 1995, AIM has become the most successful growth market in the world with over 3000 companies from across the globe have joined AIM. To evaluate the London Stock Exchange, the autonomous FTSE Group (owned by the Financial Times and the London Stock Exchange) , sustains a series of indices comprising the FTSE 100 Index, FTSE 250 Index, FTSE 350 Index, FTSE All-Share, FTSE AIM-UK 50, FTSE AIM 100, FTSE AIM All-Share, FTSE SmallCap, FTSE Tech Mark 100 ,FTSE Tech Mark All-Share.[4] FTSE 100 is the most famous and composite index calculated respectively from the top 100 largest companies whose shares are listed on the London Stock Exchange.

The base date for calculation of FTSE 100 index is 1984. [2] In the UK, the FTSE 100 is frequently used by large investor, financial experts and the stock brokers as a guide to stock market performance. The FTSE index is calculated from the following formula:

2.2.3 Fundamental Analysis

Fundamental Analysis focuses on evaluation of the future stock exchange movements and the expected returns from the index by analyzing the market or the factors which affect the index. These factors are discussed in this section and how these factors can be used by the investors to estimate the price or direction of the stock exchange, so that they can earn significant amount of the profits.

In 1928, Benjamin Graham, commonly referred to within the field of Finance as the “Father of Value Investment “ introduced the discipline of the Value investment which is used to discover the “intrinsic values “ of a securities or index through fundamental analysis. These investment policies to forecast the stock exchange was widely recognized by the success of the Warren Buffet.There are many credible definitions of intrinsic values which are defined by the various investors or researchers, for example, Cottle et al. (1988), defined “intrinsic value is the value which is justified by assets, earnings, dividends, definite prospects, and the factor of management’. Graham emphasized many concepts in the various edition of his book “The Intelligent Investor” that should be used to predict the stock index or stock, for example, price-earnings ratio, size of firm and capitalization of stocks within index. These concepts were tested by Oppenheimer and Schlarbaum (1981), Banz (1981), and Reinganum (1981) to determine its usefulness. Following from the success of the Graham many researchers identified better and reliable ways to determine the value of the stock or index .The remainder of this section on Fundamental Analysis considers some of the research, and presents it according to the specific fundamental factors considered.

Basu (1977) investigated the use of the P/E ratio to determine the stock price which can be used similarly to forecast the index value. Banz (1981) studied the relationship of the market capitalization of a firm, and its return. DeBondt and Thayler (1987) presented the evidences that the stocks undergo seasonality patterns in their returns. Kanas (2001) investigated the non-linear relation between stock returns and the fundamental variables of dividends and trading volume. According to the Dow Dividend Policy, if there is reduction in the dividend payments of the stock, the stock price (in case of big companies) will decrease which will led to reduce the value of the index. Olson and Mossman (2002) presented that ANN are superior to the Ordinary Least Square (OLS) and logistic regression techniques and concluded that fundamental analysis adds in forecasting within the Canadian Market. This portion of the literature review has presented key ideas and developments of use of the fundamental analysis in forecasting.

MM Applicability

From the view point of the thesis, the discussions and the works above revealed that number of persistent anomalies are used within the forecasting of the stock exchange. The anomalies described above are related to the fundamental variables. As such, we use fundamental variables as the input variables of this project.

2.2.4 Technical Analysis

In 1884, Charles Dow drew up an average of the daily closing prices of 11 important stocks which led to the beginning of the technical analysis in the prediction of the stock exchange. (Edwards et al. (2001)).Dow‘s work was updated in various books and journals by various researchers such as S.A Nelson in 1903, William Peter Hamilton in 1922 , Robert Rhea in 1922 Richard W Schabacker in 1930s, Robert D Edwards and John Magee in 1948.In 1978. Wilders introduced new technical indicators and many of them are use in today. Returning to modern technical analysis, there has been many technical indicators have been used by the traders. In the 1980’s various esoteric approaches have been criticized for the technical analysis by such as the relationship of the “Super Bowl Indicator” or length of women skirts with the stock price movements. The principles of the technical analysis say that a trend, once established of the index, it tends to persist, and the index value usually move in trends. There are number of studies which support the use of the technical analysis in forecasting and an equally, oppose them. The remainder of this research present evidences as well against the use of the Technical Analysis.

In 1965, Fatma presented the considerable amount of the evidence supporting the random walk hypothesis, which says that series of price changes have no memory. In contrast, Wilder (1978), Kamara (1982) and Laderman (1987) showed the effectiveness of the technical analysis and future value can be predicted by using the historical data. Neftci and Policano (1984) used the moving averages and slopes (trends) to forecast the various gold and T-bill futures contracts and they concluded that there is significant relationship between the future prices and moving averages.

This relationship was supported by the Le Baron (1997) in his study of prediction of the foreign exchange rates. Murphy (1988) demonstrated that there is relationship between the different sectors of the market with the other sectors of the market. White (1998) used the neural networks to predict the future values but he could not find any evidence that contradicts the efficient markets hypothesis. In the late 80s, the full acceptance by the academic community for use of the technical analysis was very low, until the study of Lehmann (1990), Jegadeesh (1990), Netfci (1991), Brock et al. (1992), Taylor and Allen (1992), Levich and Thomas (1993), Osler and Chang (1995), Neely et al. (1997) and Mills (1997) concluded with the acceptance of the Technical Analysis. Lee and Swaminathan (2000) showed that the results of the forecasting get better by usage of the price momentum and trading volume. Su and Huang (2003) got the better results in prediction of trend by using the combination of various technical indicators ((Moving Average, Stochastic Line [KD], Moving average Convergence and Divergence [MACD], Relative Strength Index [RSI] and Moving average of Exchanged Volume [EMA]).

In addition to the academic sources, a brief literature review was also conducted throughout the journals. Although some of the work published in these sources, is of not academic quality, but his search help in finding the technical variables that are being used by the professionals in this field. Reverre (2000), Sharp (2000), Ehlers (2000), Pring (2000), Fries (2001), Ehlers (2001), Dormeier (2001), Boomers (2001), Schaap (2004), Yoder(2002) discussed the different techniques and combinations that can be used with the moving average. Similarly, Levey (2000), Gustafson (2001), Pezzutti (2002) investigated the use of volatility. Study of Pring (2000), Ehrlich (2000), Tanksley (2000), Peterson (2001), Bulkowski (2004), Katsanos(2004), Castleman (2003), Peterson (2003) and Gimelfarb (2004) explained the significance of the volumes in the price movements. The importance of using the Average Direction Index (ADX) in the forecasting was explained by the Boot (2000), Star (2003), Gujral (2004).In addition, Steckler (2000) and Steckler (2004) studied the use of the stochastic indicator in the prediction model. These variables along with those identified above in the research are used in this thesis.

MM Applicability

Essentially, the discussions above show that some of the technical variables have academic acceptance in the forecasting of the stock exchange, for example, Siegel (2002) supported the use of the Moving Average. Although the academic researchers have mixed kind of feeling about the use of the technical analysis, but some work clearly argue that they cannot be ignored. As such, we use the technical variables as the inputs for the ANNs in this thesis.

2.3 Artificial Neural Networks (ANN)

2.3.1 Introduction

In the last decade, the artificial neural networks were constructed with different techniques for forecasting the stock market. In this section, we gave a brief presentation on the artificial neural networks. We will focus on the structure of the feed forward networks, radial axis neural networks, time delay neural networks, probabilistic neural networks and recurrent networks which are used widely used in the forecasting of the stock market.

MM What is ANN?

An Artificial Neural Network (ANN), usually called “Neural Network” (NN) is defined as information – processing paradigm inspired by the mathematical or computational methods by which the biological nervous system (brain) process information. One unique and important property of this paradigm is the exceptional structure of the information processing system. It is built out of a highly densely interconnected set of processing elements, which are similar to the neurons, where each set of elements are joined by the weighted connections that takes a number of real-valued inputs, and produce real-valued output.

To develop a feed for this analogy, let us understand the basic principle of neuron, which is the basic building unit block of any neural network.

The simplest neural network is Multilayer perceptrons (MLP).It consists of several processing layers of nodes. The first layer is an input layer whose neurons receive input layer. After preprocessing these input values, these output values are forwarded to the neurons in the hidden layer. After preprocessing in the hidden layer, the values are processed to another layer until it reaches the output layer. Figure 1 shows an example of the MLP with one hidden layer.

For the casual forecasting problem, the relationship between the input and output value is given by where  are input or independent variables and  is output or dependent variables .But this equation is same as the non-linear regression analysis model(section 3.2).But for the time series forecasting the equation can be rewritten as where the  is the closed value of the stock market at time t. So, we can say the concept of the ANN in forecasting is same as the nonlinear autoregressive model for time series forecasting of the stock market.

Back Propagation Using Gradient Descent Technique

Usually, when we use the learning algorithm, called “backpropogation” to train the MLP we refer it as “neural network” Let the error function used by the ANN where N denotes the set of all training patterns i.e.  is the measure of the error produced by all training examples , is target output for the  th component of the neuron should produce,  is the actual pattern produced by the  th component of the output neuron and the weights of the ANN are represnted by the vector .

Normally the learning procedure consists of a set of pairs of inputs and outputs patterns. The model produces the output pattern by using the input pattern and compares these with the target pattern. If there is difference, the weights are changed to reduce the difference and change in weights is proportional to the gradient of the error surface in the negative direction. This method is called the gradient descent method. There is no derivative computation in the perceptron as it has continuous step function, so gradient descent method cannot be used in perceptron. So, we use the sigmoid neurons in FFNN. So, the basic aim of gradient descent algorithm is to reduce the minimize the .

Gradient EQ of function f is the vector of first partial derivates (Dimitri PISSARENKO,2000).

In our case .When we try to interpret the vector in the weight space,the gradient specifies the direction that produces the steepest increase in E.(Mitchell,1997,p.91)

The figure 4 shows the behavior of the  with respect to the , i.e. to decrease the value of the , we should move in the negative(reverse) direction of the slope. We repeat the procedure as moving downhill shown in the figure 4 until we reach a minimum ) , as shown in the figure 5.

The algorithm shown in the figure 6 explains the procedure of the Gradient Descent.By using the equation (1)(Dimitri PISSARENKO,2000) , we get

In this equation the weight  can influence the ANN only through the .So, if we use the chain rule to write ([Mitchell, 1997, p. 102])

By using the equation (3) (Dimitri PISSARENKO,2000), the equation (2) reduces to the equation (4)

From equation (4), (3), we see that the  can influence the network only through  and  can influence the network only through the term through the .If we again use the chain rule , we get the equation:

The first term in equation can be rewritten as by using the equation(7) (Dimitri PISSARENKO,2000)

The second term in the equation (5) can be written as In equation(8) we use the fact that the Combining the results of the equation (1.1), 2,3,4,5,6,7,8, the  can be written as

Now we will discuss how weights of hidden nodes are updated.

By using equation(1),(2),(3),(4),(5),(6),(7), we get sub-expression of the weight update rule as in this equation only  differs between the output and hidden nodes.(Dimitri PISSARENKO,2000) .So, we need to derive this term only as rest all the expressions are same .

The set of all units immediately downstream of unit j in the network are denoted by , which is only variable that causes  to influence the network outputs.Therefore we can write as (Dimitri PISSARENKO,2000)

So, the weight update rule for hidden nodes is equal to, although there are many algorithms such as momentum term which are improvement over the gradient descent algorithm, but still the gradient descent algorithm is the most popular combination with the MLP to design the ANN.(Dimitri PISSARENKO,2000)

2.3.2 Feed Forward Neural Networks (FFNN)

Feed forward neural networks are the most popular and most widely used models in the forecasting problems. They are also known as "multi-layer perceptrons."

Figure shows a one-hidden-layer FFNN with inputs  and output. FFNN is divided into the layers and every node in each layer is connected to the node in the previous layer. These connections may have different name. It is called FFNN as there is no feedback in this network .The hidden layer consists of a neurons and the functionality of the hidden layer is

The output of the network is given by where h is the number of neurons in the hidden layer , n is the number of inputs and the variables  are the parameters of the network.

2.3.3 Time Delay Neural Networks (TDNN)

Time Delay Neural Network was developed by Weibel and Lang in 1987.This network helps in the introduction of the “memory” in the neural network to deal with the connections. The architecture has continuous inputs which arrive at the hidden units at different points at different time and the inputs are stored in the memory.(figure)

The response of the TDNN in time t is based on the inputs in times (t-1),(t-2), ..., (t-k).The output function at time i is given by where  is the input at time  and  is the maximum adopted time-delay.

2.3.4 Radial Basis Function Neural Networks (RBFNN)

Radial Basis function neural networks (RBFNN) are non linear hybrid networks which have attracted various researchers due to their simplicity, fast training, high prediction precision and have been used in lot of applications such as pattern recognition (Krzyzak, Linder, & Lugosi, 1996), spline interpolation and function approximation (Poggio & Girosi, 1990). RBF emerged as part of ANN in late 80s. But, they are quite not popular in the dynamic systems due there disadvantage in approximating non-smooth function limits.

It consists of one input layer, one single hidden layer of processing elements (PEs), and one output layer as shown in the figure. The input layer is non-linear n-dimension vector and this input vector connects via urinary weights with the hidden layer. Radial Basis Functions( RBF) are the activations functions on the neurons of the hidden layer, which symmetrically attenuate in the radial direction off centers The value of RBF has maximum value equal to one. The hidden layer uses the Gaussian transfer function, rather than the sigmoid transfer function which is used in feed-forward back-propogation and recurrent neural network.  is the RBF acting on the th hidden neuron, which usually adopts the Gauss Function where i is the RBF bandwidth,  is the number of hidden neurons,  is the centre of  and  is the connecting weight between the th hidden neuron and the output neuron .The output layer [222]is given by

2.3.5 Probablistic Neural Networks (PNN)

Probabilistic neural networks have been used widely by the researchers in the forecasting and classification problems. The architecture is shown in figure 3 .When a financial time series is presented to the network, the first layer (radial axis) computes distances from the input vector to the training input vectors and it produces a vector whose elements indicate how close the input is to a training input. The second layer (competitive layer) sums these contributions for each class of inputs to produce as its net output a vector of probabilities. A compete transfer function on the output of the competitive layer selects the maximum of these probabilities, and produces a 1 for that class and a 0 for the other classes. (MATLAB).

Where m is the number of training samples of category B and p is the number of dimensions of the input pattern X. (K.Schierholt,1996)

2.3.6 Recurrent Networks(RNN)

RNN are defined as one in which the input layer’s activity patterns or network's hidden unit activations pass through the network more than once and output values are fed back into the network as inputs before generating a new output pattern.Recurrent Neural networks are appropriate in making forecasting model of the financial market as the feedback allows the recurrent networks to acquire state representations.The architecture of the ANN consists of the two separate components: temporal context (short memory) and predictor(feed forward part ) .Temporal context retains the features of the input financial time series relevant to the forecasting task and capture the RNN prior’s activation historical information.

Normally, most of the studies build three different types of RNN and then compare their performance. But as it is not feasible in this study to vary so many parameters in developing the three RNN, as it takes so much time(nearly 5-20 hours) to run single experiment based on RNN, we use the result of the previous studies. Tenti (1996) concluded that the RNN with hidden layer feedback perform better as compared to RNN with input layer feedback and RNN with output layer feedback. So, we are using RNN with the RNN with hidden layer feedback in this study.

In RNN with the hidden layer feedback(figure8), the hidden layer is fed back into itself through a layer of recurrent neurons. Both the input and recurrent layer as shown in the figure feed forward to activate the hidden layer, and then this hidden layer feeds forward to activate the output layer. So, the features of the previous patterns are fed back to the network. (Tenti (1996)).The output of a RNN is a function of the current input together with its previous inputs and outputs as given by: where  is the input at time  .

Theortically, RNN have an advantage over FNN by modelling dynamic relationship ,since the output of the neuron is function to the current input as well as to the previous input. In the literature view, we discussed the previous studies of the academic researchers in which they concluded that RNN are better than the FNN. They have disadvantages that they require substantially more memory as well as connections of nodes in simulation as compared to FNN and TDNN.

2.4 Literature Survey

In recent years, ANN has been used in the various applications such as powerful pattern classification and pattern recognition. For the last two decade, ANN has been extensively used in the forecasting problems. They have provided traders an alternative tool to predict the stock market. According to the Zekic (Zekic [1998]), ANN are used in the financial market for predicting stock performance for recommendation for trading, forecasting price changes of stock indexes, classification of stocks, stock price forecasting, modeling the stock performance and forecasting the performance of stock prices. They have several features which are valuable in forecasting the stock market. First is that they are self driven i.e. they don’t need prior assumptions about the model and they learn from the examples. Second, ANN can infer correctly the unseen time data series after training, even if the time series contains the noise. Third, ANN can be used to approximate accurately any continuous function. Fourth, ANN is non-linear

In this section, we discuss theoretically about the various open issues that have been subject of debate among academic researches for various years and support the use of nonlinear models and ANN in this study by giving examples of the previous studies by the various academic researchers.There has been an avalanche of studies on forecasting the stock market. A number of important academic research papers are reviewed below, chosen as they are either representative of current research directions , or represent a novel approach to this area of forecasting the stock market. In this section we present a very brief review of the related and recent studies. In addition, we also compare theoretically the performance of the various ANN in the previous studies.

MM Why consider Non-Linear Models

In recent years, non- linear model have become more common in forecasting as compared to the linear model (statistics), whose domain had been the forecasting for many years. Linear models have advantage that they can be easily analyzed and understood as well easy to implement as compared to non-linear model. Traditional Models (ARIMA method or Box-Jenkins) to prediction of the time series assume that the time series is generated from the linear process. However, they were wrong as the real world is often non-linear. (Granger, C.W.J., 1993).

During the last decade, many non-linear time-series models such as autoregressive conditional heteroscedastic (ARCH), the threshold autoregressive (TAR) model, and bilinear modelhave been developed. (Zhang et al., 1998) stated that non-linear models are still limited in that an explicit relationship for the data series .Moreover, as the number of patterns are very less in non-linear, so formulation of non-linear model to a particular set of time series is a very difficult task.ANN have been able to solve the problem as they are capable of making non-linear forecasting models without a prior knowledge of the relationship between the input and forecasted time series.

Research efforts on comparison of the ANN and statistical model are considerable and the literature is vast and growing .This thesis does not wish to enter into the argument whether to accept or reject the linear models. Based on the results of the previous studies ((Granger, C.W.J., 1993), (Zhang et al., 1998), Tang et.al (1991), Kohzadi et.al (1996)), it concentrates on the non-linear methodologies(ANN) to be used for development of the financial models. The review presented above is comprehensive and it supports the use of the non-linear models(ANN) in this study.

2.4.1 Relative Performance of ANN in forecasting

In this section we compare the performance of the ANN with the widely used statistical methods. There are many inconsistent reports on the performance of the ANN in the literature on the various academic papers. This may due to large number of reasons such as wrong selection of network (not ideal network structure), training method and use of linear data in forecasting .In this section, we attempt to provide the comprehensive view of the current status of the research. There are several academic papers that are devoted in comparing the ANN with the conventional methods, which are described below:

1. Sharda and Patil (1990), (1992) concluded that simple ANN models are comparable to Box-Jenkins method. They used the 75 and 111 M-Competition time series to make comparison between them.

2. Tang et.al (1991) concluded that for time series with more irregularity and short memory, ANN outperforms the Box-Jenkins (ARIMA). But for large memory, the performance of both the model is same. They used the reexamine the same 3 time series from the Sharda and Patil (1990).

3. Kang (1991) used the 50M-competition series to make comparison and ANN and Box-Jenkins (ARIMA).He concluded that the best ANN model is always better than the Box-Jenkins.

4. Hill et.al (1994), (1996) forecasted 50 M competition time series with the ANN and statistical method and the results of the ANN were slightly better than the statistical method.

5. Kohzadi et.al (1996) used monthly live cattle and wheat prices as data to compare the ANN and AIRMA and concluded that ANN can find more turning points and consistently better.

6. Bruce et.al (1991) concluded that ANN models are inferior to the statistical models by forecasting the 8-electric load data series.

7. Caire et.al(1992) concluded that ANN are more reliable for longer step-ahead forecasts but hardly better than ARIMA for 1 step-ahead forecast by using one electric consumption data.

8. Foster et.al (1992) concluded that the performance of ANN is not good as linear regression and simple average of exponential smoothing methods.

9. Nelson (1994) concluded from his results that the ANN is unable to learn the seasonality. He used the 68 monthly time series from the M-Competition. His results were in contradiction to the result of Sharda and Patil(1992) ,who proved that the performance of the ANN are not affected by the seasonality of the time series.

10. Tang et.al (1991 and Tang and Fishwick(1993) studied under what conditions that ANN are superior than the traditional time series forecasting such as Box-Jenkins models. He concluded :

(a) ANN perform better when the forecast horizon increases.This was confirmed by studies of Kang (1991), Caire et.al(1992), Hill et.al (1994), (1996).

(b) In case of short memories, ANN perform better .This was confirmed by study of Sharda and Patil(1992).

(c) When we have more input nodes, we get better results with the ANN.

The review presented above is comprehensive and a considerable amount of research has been done in academics to find whether the ANN is better than the statistical methods.While there is no final word on this issue between the academicians, the prevalent view in this literature by most studies follows an ANN in the forecasting of the stock market .There is now strong evidence that ANN can forecast the stock market and returns of the stock market are not independent of past changes. So, these studies discussed in the literature review support the use of ANN in this study. However, the lack of many studies supporting the statistical methods over ANN does not rule out the fact that the statistical methods cannot be better than the ANN in the forecasting. There could be many tests that were often inappropriate and some conclusions could be questionable.

2.4.2 Prior research on stock market prediction using ANN

As mentioned in previous section that the potential use of the ANN in forecasting has been performed in recent years. There are various studies which have used the ANN in the forecasting of the stock exchange. The most important findings are described below.

1. One of the earliest studies was by Kimoto et.al (1990); they used ANN, and several prediction methods for developing a prediction system for the Tokyo Stock Exchange Index. They investigated the performance of the model by using the correlation coefficient and concluded that the correlation coefficient produced by the multiple regression was much lower than the model. However, the correlation coefficient may not be a proper measure for performance of the forecasting model.

2. Kamijo and Tanikawa (1990) employed recurrent neural network for analyzing candlestick charts which are used to study the pattern of the stock market.

3. Choi, Lee and Lee (1995) and Trippi and DeSieno (1992) forecasted the daily direction of change in the S&P 500 index futures using ANN.

4. Mizuno et.al. (1998) applied ANN again to Tokyo stock exchange to predict buying and selling signals with an overall prediction rate of 63%.

5. Phua et.al (2000) applied neural network with genetic algorithm to the stock exchange market of Singapore and predicted the market direction with an accuracy of 81%.

2.4.3 Relative Performance of Various ANN in Finance

Although the body of application of ANN literature is substantial, there is still a great deal of inconsistency in the findings. This is particularly the case in the relation between and futures price. While most studies agree on the importance of futures prices for financial markets, only a few studies, if any, agree on how, and why it is important. Furthermore, the vast majority of the literature is based on analytical models. A major shortfall of econometrical model is making strong assumption about the problem. This means if the assumptions are not correct; the model could generate misleading results.

1. Connor&Atlas(1993),Adam et.al, (1994) have confirmed the superiority of RNN over feed forward networks when performing non-linear time series prediction.

2.4.4 Prior Research on the Various Trading Strategy

The relation between the stock price prediction model and using that model as an investment tool by applying different trading strategies has been the centre of attention for a large number of studies, and the literature is rich with several studies covering a range of aspects with respect to this relationship. As the main aim of the trading strategy is to assist an investor in making accurate financial decisions, the application should be based on a profitable trading strategy. There are numerous trading strategies available like Buy and Hold (B&H), Stop and Objective Strategy (S&O), Neural Network stop (NN B&H) and Objective strategy or Buy and Sell (NN S&O) that are discussed in futures-spot literature. (Atya & Talaat, 1987).

Amir Atiya and Nohia Talaat (1997), tested four different trading strategies and concluded with the result that the neural networks results are consistently superior, especially NN S&O. P. B Patel (T.Marwala & Patel, October 8-112006) has also compared the ”Buy Low ,sell high ” and “buy and hold “ trading strategy, with the former better than latter.[1,a] The Buy low, sell high trading strategy, as the name suggests , involves an investor purchasing certain stocks at low price and selling these stocks when the prices is high. H. Pan et.al (2003), tested the ”Buy Low ,sell high ” and got the maximum rate of return as 10.8493%.As the main aim of the thesis , is to develop the forecasting model using the ANN and then show profit to the investor using one of the trading strategy being used in the academics. In this study, we are using the trading strategy of the H. Pan et.al .

2.5 Conclusion

Chapter 3.Methodology

3 Methodology

In this section, we discuss the design and methodologies to be used to build the different types of ANN, and hybrid approaches forecasting models based on the direction and value accuracy for different trading strategies, which are built under the guidance of the literature survey and theortical framework of the ANN employed in this thesis. The development process of the forecasting model is divided into the eight steps (figure 1) which are discussed in detail with the literature review of each step to suggest the optium step. In addition, we also modify various existing approches to find the optium solution to each step.

3.1 Variable Selection

The most importa

To export a reference to this article please select a referencing stye below:

Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.

Request Removal

If you are the original writer of this dissertation and no longer wish to have the dissertation published on the UK Essays website then please click on the link below to request removal:

More from UK Essays

Get help with your dissertation
Find out more