Efficient prediction of stock market indices using adaptive bacterial foraging optimization (ABFO) and BFO based techniques

https://doi.org/10.1016/j.eswa.2009.01.012Get rights and content

Abstract

The present paper introduces the use of BFO and ABFO techniques to develop an efficient forecasting model for prediction of various stock indices. The structure used in these forecasting models is a simple linear combiner. The connecting weights of the adaptive linear combiner based models are optimized using ABFO and BFO by minimizing its mean square error (MSE). The short and long term prediction performance of these models are evaluated with test data and the results obtained are compared with those obtained from the genetic algorithm (GA) and particle swarm optimization (PSO) based models. It is in general observed that the new models are computationally more efficient, prediction wise more accurate and show faster convergence compared to other evolutionary computing models such as GA and PSO based models.

Introduction

Financial forecasting or specifically Stock Market prediction is one of the hottest fields of research due to its commercial applications and the attractive benefits it offers. As more and more money is being invested in the stock market, investors get nervous and anxious of the future trends of the stock prices in the markets. The primary area of concern is to determine the appropriate time to buy, hold or sell. Unfortunately, stock market prediction is not an easy task, because of the fact that stock market indices are essentially dynamic, nonlinear, complicated, nonparametric, and chaotic in nature (Tan, Quek, and Ng, 2005). The time series of these processes are multi-stationary, noisy, random, and has frequent structural brakes (Oh and Kim, 2002, Wang, 2003). In addition, stock market’s movements are affected by many macro-economical factors (Wang, 2002) such as political events, firms’ policies, general economic conditions, investors’ expectations, institutional investors’ choices, movement of other stock market and psychology of investors.

Many research works have been reported in the field of stock market prediction across the globe. Generally there are three schools of thoughts regarding such prediction. The first school believes that no investor can achieve above average trading advantages based on historical and present information. The major theories include the random walk hypothesis and the efficient market hypothesis (Peters, 1996). Taylor (1986) in his paper has provided compelling evidence to reject the random walk hypothesis and therefore researchers have been encouraged to suggest better models for market price prediction. The second view is that of fundamental analysis. Analysts have undertaken in-depth studies into the various macro-economic factors and have looked into the financial conditions and results of the industry concerned to discover the extent of correlation that might exist with the changes in the stock prices. Technical analysts have presented the third view on market price prediction. They believe that there are recurring patterns in the market behavior, which can be identified and predicted. In the process they have used number of statistical parameters called technical indicators and charting patterns from historical data. However, these techniques have often yielded contradictory results due to heavy dependence on human expertise and justification.

The recent trend is to develop adaptive models for forecasting financial data. These models can be broadly divided into statistical models and soft-computing models. One of the well known statistical methods is the one based on autoregressive integrated moving average (ARIMA) (Ayeni Babatunde and Pilat, 1992). The recent advancement in the field of soft-computing has given new dimension to the field of financial forecasting. Most artificial neural network (ANN) based models use historical stock index data such as technical indicators (Kim, 2006) to predict future prices. Tools based on ANN have increasingly gained popularity due to their inherent capabilities to approximate any nonlinear function to a high degree of accuracy. Neural networks are less sensitive to error term assumptions and can tolerate noise, chaotic components, and heavy tails better than most other methods (Masters, 1993). The three most popular ANN tools for the task are radial basis function (RBF) (Hann and Kamber, 2001), recurrent neural network (RNN) (Saad, Prokhorov, and Wunsch, 1998) and multilayer perceptron (MLP). More recently, new models based on multi-branch neural networks (MBNN) (Yamashita, Hirasawa, and Hu, 2005), local linear wavelet neural networks (LLWNN) (Chen, Dong, and Zhao, 2005) among others have been reported. The genetic algorithm (GA) has recently been applied (Tan et al., 2005; Kim, 2006) for prediction. Existing literature reveals that very little work has been reported on the use of evolutionary computing tools in training the weights of forecasting of models. Recently a new evolutionary computing technique known as bacterial foraging optimization (BFO) has been reported (Passino, 2002) and successfully applied to many real world problems like harmonic estimation (Mishra, 2005), transmission loss reduction (Tripathy, Mishra, Lai, and Zhang, 2006), active power filter for load compensation (Mishra and Bhende, 2007), power network (Tripathy and Mishra, 2007), load forecasting (Ulagammai, Venkatesh, Kannan, and Padhy, 2007) and independent component analysis (Acharya, Panda, Mishra, and Lakhshmi, 2007). The conventional BFO employs constant run length unit (the step by which the bacteria run or tumble in one go) in updating the location of the bacteria. To improve the optimization performance Takagi–Sugeno fuzzy scheme has been used to adapt the run length unit (Mishra, 2005). However, in Fuzzy-BFO the performance is linked with choice of the membership function and the fuzzy rule parameters and no systematic approach exists to determine these parameters for a given problem. Hence, the Fuzzy-BFO presented in Mishra (2005) is not suitable for optimizing various complex problems. In Mishra and Bhende (2007), a modified BFO proposed in has been used to optimize the coefficients of PI controller for active power filters. This algorithm has been shown to outperform a conventional GA with respect to convergence speed. Tripathy and Mishra (2007) have recently proposed an improved BFO algorithm for simultaneous optimization of the real power losses and voltage stability limit of a mesh power network. Simulation results of their approach shows superior performance compared to the conventional BFO based method. In a recent communication (Ulagammai et al., 2007) the BFO has been applied to train a wavelet neural network (WNN) meant for identifying nonlinear characteristics of power system loads. Acharya et al. (2007) have used the BFO in independent component analysis and have reported that the proppseed method yields better separation performance compared to the constrained genetic algorithm based ICA.

To the best of our knowledge none of the existing work has applied the BFO and adaptive BFO algorithms in designing forecasting models for short and long term prediction of stock indices. The present work is a humble contribution in this direction.

The present paper has two main objectives. Firstly it aims to develop a new forecasting model for prediction of stock indices using an adaptive linear combiner as the basic structure of the model and the BFO, a promising evolutionary computing tool, for training the parameters of the model. The second objective is to introduce a newly developed simple adaptive BFO (ABFO) technique and apply the same to develop more efficient prediction model for the same purpose. The prediction performance of the new models have been evaluated for short and long term prediction of stock indices and have been compared with those obtained from models based on other evolutionary computing tools such as GA and PSO. The proposed ABFO learning rule provides adaptive runlength in the chemotaxis step which leads to faster convergence during training compared to its BFO counterpart.

The organization of the paper proceeds as follows. Section 2 deals with the basic principle of the BFO and ABFO tools employed for training the linear combiner of the models. The BFO and ABFO based model developments for stock market prediction are outlined in Section 3. To demonstrate the prediction performance of the proposed models the simulation study is carried out in Section 4. This section also provides the formulae of computing the technical indicators. The results of simulation are discussed in Section 5. Finally the conclusion of the investigation is provided in Section 6.

Section snippets

Basics of BFO and adaptive BFO

Bacterial foraging optimization (BFO) is a new evolutionary computation technique which has been proposed by Passino (Tan et al., 2005). It is inspired by the pattern exhibited by bacterial foraging behaviour. Bacteria have the tendency to gather to the nutrient-rich areas by an activity called chemotaxis. It is known that bacteria swim by rotating whip like flagella driven by a reversible motor embedded in the cell wall. E. coli has 8–10 flagella placed randomly on a cell body. When all

Application of BFO and ABFO to stock market prediction

The basic model for stock market prediction is assumed to be an adaptive linear combiner with parallel inputs as shown in Fig. 2. It is essentially an adaptive FIR filter having number of inputs equal to the number of features in the input pattern. The weights of the combiner are considered as the bacteria and initially their values are set to random numbers. A population of such bacteria is chosen to represent the initial solutions of the model. Each bacterium updates its values using the BFO

Experimental data

The data for the stock market prediction experiments have been collected for Standard’s and Poor’s 500 (S&P 500), USA and Dow Jones Industrial Average (DJIA), USA. The experimental data used here consists of technical indicators and daily closing price of the indices. The total number of samples for the stock indices is 3228 trading days, from 3rd January 1994 to 23rd October 2006. Each sample consists of the closing price, opening price, lowest price, highest price and the total volume of

Results and discussion

The convergence characteristics of ABFO, BFO, GA and PSO models for 1 day, 7, 30 and 60 days ahead prediction of S&P 500 and DJIA stock indices are shown in Fig. 3a, Fig. 3b, Fig. 3c, Fig. 3d, Fig. 3e, Fig. 4a, Fig. 4b, Fig. 4c, Fig. 4d, Fig. 4e, respectively. These plots clearly indicate that the ABFO based model offers fastest convergence during training followed by GA, PSO and then BFO based models. Further, according to residual MSE achieved the models are graded as ABFO/BFO, GA and PSO. In

Conclusion

In this paper two new forecasting models based on BFO and ABFO are developed to predict different stock indices using technical indicators derived from the past stock indices. The structure of these models are basically an adaptive liner combiner, the weights of which are trained using the ABFO and BFO algorithms. To demonstrate the performance of the proposed models simulation study is carried out using known stock indices and their prediction performance is compared with standard GA and PSO

References (20)

  • Kyoung-Jae Kim

    Artificial neural networks with evolutionary instance selection for financial forecasting

    Expert System with Applications

    (2006)
  • K.J. Oh et al.

    Analyzing stock market tick data using piecewise non linear model

    Expert System with Applications

    (2002)
  • Y. Wang

    Mining stock prices using fuzzy rough set system

    Expert System with Applications

    (2003)
  • Acharya, D. P., Panda, G., Mishra, S., & Lakhshmi, Y. V. S. (2007). Bacteria foraging based independent component...
  • J. Ayeni Babatunde et al.

    Crude oil reserve estimation: An application of the autoregressive integrated moving average (ARIMA) model

    Journal of Petroleum Science and Engineering

    (1992)
  • Chen, Y., Dong, X., & Zhao, Y. (2005). Stock index modeling using EDA based local linear wavelet neural network. In...
  • J. Hann et al.

    Data mining: Concepts and techniques

    (2001)
  • T. Masters

    Practical neural network recipes in C++

    (1993)
  • S. Mishra

    A hybrid least square fuzzy bacterial foraging strategy for harmonic estimation

    IEEE Transactions on Evolutionary Computation

    (2005)
  • S. Mishra et al.

    Bacterial Foraging technique based optimized active power filter for load compensation

    IEEE Transactions on Power Delivery

    (2007)
There are more references available in the full text version of this article.

Cited by (0)

View full text