Stock Trading Following Stock Price Index Movement Classification Using Machine Learning Techniques

Similar documents
Two kinds of neural networks, a feed forward multi layer Perceptron (MLP)[1,3] and an Elman recurrent network[5], are used to predict a company's

A Novel Prediction Method for Stock Index Applying Grey Theory and Neural Networks

An enhanced artificial neural network for stock price predications

LITERATURE REVIEW. can mimic the brain. A neural network consists of an interconnected nnected group of

International Journal of Computer Engineering and Applications, Volume XII, Issue II, Feb. 18, ISSN

International Journal of Computer Engineering and Applications, Volume XII, Issue II, Feb. 18, ISSN

Credit Card Default Predictive Modeling

Shynkevich, Y, McGinnity, M, Coleman, S, Belatreche, A and Li, Y

STOCK MARKET TRENDS PREDICTION USING NEURAL NETWORK BASED HYBRID MODEL

Predicting Economic Recession using Data Mining Techniques

Stock market price index return forecasting using ANN. Gunter Senyurt, Abdulhamit Subasi

Bond Market Prediction using an Ensemble of Neural Networks

Performance analysis of Neural Network Algorithms on Stock Market Forecasting

A Novel Method of Trend Lines Generation Using Hough Transform Method

Forecasting Price Movements using Technical Indicators: Investigating the Impact of. Varying Input Window Length

Statistical and Machine Learning Approach in Forex Prediction Based on Empirical Data

OSCILLATORS. TradeSmart Education Center

Development and Performance Evaluation of Three Novel Prediction Models for Mutual Fund NAV Prediction

Improving Stock Price Prediction with SVM by Simple Transformation: The Sample of Stock Exchange of Thailand (SET)

Iran s Stock Market Prediction By Neural Networks and GA

Accepted Manuscript. Enterprise Credit Risk Evaluation Based on Neural Network Algorithm. Xiaobing Huang, Xiaolian Liu, Yuanqian Ren

Application of Support Vector Machine on Algorithmic Trading

A Comparative Study of Various Forecasting Techniques in Predicting. BSE S&P Sensex

GUIDE TO STOCK trading tools

Role of soft computing techniques in predicting stock market direction

An introduction to Machine learning methods and forecasting of time series in financial markets

Machine Learning in Risk Forecasting and its Application in Low Volatility Strategies

A Survey of Systems for Predicting Stock Market Movements, Combining Market Indicators and Machine Learning Classifiers

PREDICTION OF CLOSING PRICES ON THE STOCK EXCHANGE WITH THE USE OF ARTIFICIAL NEURAL NETWORKS

Alternate Models for Forecasting Hedge Fund Returns

Forecasting the direction of stock market index movement using three data mining techniques: the case of Tehran Stock Exchange

SURVEY OF MACHINE LEARNING TECHNIQUES FOR STOCK MARKET ANALYSIS

Decision model, sentiment analysis, classification. DECISION SCIENCES INSTITUTE A Hybird Model for Stock Prediction

REPORT ON THE FINANCIAL EVALUATION:

STOCK MARKET PREDICTION AND ANALYSIS USING MACHINE LEARNING

Predicting Market Fluctuations via Machine Learning

Automated Options Trading Using Machine Learning

Forecasting stock market prices

AN ARTIFICIAL NEURAL NETWORK MODELING APPROACH TO PREDICT CRUDE OIL FUTURE. By Dr. PRASANT SARANGI Director (Research) ICSI-CCGRT, Navi Mumbai

CHAPTER V TIME SERIES IN DATA MINING

Naïve Bayesian Classifier and Classification Trees for the Predictive Accuracy of Probability of Default Credit Card Clients

Technical Analysis. A Language of the Market

Trading Systems. Jerzy Korczak

$tock Forecasting using Machine Learning

Academic Research Review. Algorithmic Trading using Neural Networks

Prediction Using Back Propagation and k- Nearest Neighbor (k-nn) Algorithm

Stock Market Prediction using Artificial Neural Networks IME611 - Financial Engineering Indian Institute of Technology, Kanpur (208016), India

TECHNICAL INDICATORS

Prediction of Stock Closing Price by Hybrid Deep Neural Network

Knowledge Discovery for Interest Rate Futures Trading Based on Extended Classifier System

STOCK PRICE PREDICTION: KOHONEN VERSUS BACKPROPAGATION

Neural Net Stock Trend Predictor

Creating short-term stockmarket trading strategies using Artificial Neural Networks: A Case Study

An Improved Approach for Business & Market Intelligence using Artificial Neural Network

Neuro-Genetic System for DAX Index Prediction

Stock Market Prediction with Various Technical Indicators Using Neural Network Techniques

Technical Indicators

STOCK MARKET FORECASTING USING NEURAL NETWORKS

International Journal of Research in Engineering Technology - Volume 2 Issue 5, July - August 2017

Estimating term structure of interest rates: neural network vs one factor parametric models

Fuzzy and Neuro-Symbolic Approaches to Assessment of Bank Loan Applicants

Futures Trading Signal using an Adaptive Algorithm Technical Analysis Indicator, Adjustable Moving Average'

Level II Learning Objectives by chapter

A Comparative Study of Ensemble-based Forecasting Models for Stock Index Prediction

Research Article Hybrid Machine Learning Technique for Forecasting Dhaka Stock Market Timing Decisions

Schwab Investing Insights Trading Edition Text Close Window Size: November 15, 2007

2015, IJARCSSE All Rights Reserved Page 66

EXAMINATION OF FUZZY METAGRAPH BASED DATA MINING FOR INVESTIGATION ON STOCK MARKETS A.Yashwanth Reddy 1, P.Hasitha Reddy 2, Dr.D.

Stock Trading System Based on Formalized Technical Analysis and Ranking Technique

Williams Percent Range

THE investment in stock market is a common way of

Journal of Internet Banking and Commerce

ALGORITHMIC TRADING STRATEGIES IN PYTHON

Accepted Manuscript AIRMS: A RISK MANAGEMENT TOOL USING MACHINE LEARNING. Spyros K. Chandrinos, Georgios Sakkas, Nikos D. Lagaros

Figure (1 ) + (1 ) 2 + = 2

Level III Learning Objectives by chapter

Based on BP Neural Network Stock Prediction

Level III Learning Objectives by chapter

The Loans_processed.csv file is the dataset we obtained after the pre-processing part where the clean-up python code was used.

Forecasting FX Rates. Forecasting Exchange Rates

Forecasting Ontario Provincial Drug Expenditures a Hybrid Approach to Improving Accuracy CADTH 2018 HALIFAX, APRIL 16, 2018

Lending Club Loan Portfolio Optimization Fred Robson (frobson), Chris Lucas (cflucas)

Neural Network Prediction of Stock Price Trend Based on RS with Entropy Discretization

Algorithmic Trading using Sentiment Analysis and Reinforcement Learning Simerjot Kaur (SUNetID: sk3391 and TeamID: 035)

Introducing GEMS a Novel Technique for Ensemble Creation

IJMSS Vol.03 Issue-06, (June, 2015) ISSN: International Journal in Management and Social Science (Impact Factor )

The Schaff Trend Cycle

Foreign Exchange Rate Forecasting using Levenberg- Marquardt Learning Algorithm

Profitability of Oscillators used in Technical Analysis for Financial Market

The Technical Edge Page 1. The Technical Edge. Part 1. Indicator types: price, volume, and moving averages and momentum

Predicting Direction of Movement of Stock Price and Stock Market Index

Data Adaptive Stock Recommendation

4 th September, DGCX- on the move:

Module 12. Momentum Indicators & Oscillators

Alpha-Beta Soup: Mixing Anomalies for Maximum Effect. Matthew Creme, Raphael Lenain, Jacob Perricone, Ian Shaw, Andrew Slottje MIRAJ Alpha MS&E 448

A Review of Artificial Neural Network Applications in Control. Chart Pattern Recognition

Forecasting Agricultural Commodity Prices through Supervised Learning

Subject: Daily report explanatory notes, page 2 Version: 0.9 Date: Dec 29, 2013 Author: Ken Long

Designing short term trading systems with artificial neural networks

RSI 2 System. for Shorter term SWING trading and Longer term TREND following. Dave Di Marcantonio 2016

Transcription:

Stock Trading Following Stock Price Index Movement Classification Using Machine Learning Techniques 6.1 Introduction Trading in stock market is one of the most popular channels of financial investments. But it is always hard to decide the best time to buy or sell due to the highly fluctuating and dynamic behavior of stock market. Technical indicators are the primary interest for most of the researchers to monitor the stock prices and to assist investors in setting up trading rules for buy sell hold decisions. Technical indicators are produced based on historical stock data. So trading decision taken based on particular technical indicators may not always be more profitable. In literature various data mining and artificial intelligence tools has been applied to analyze technical indicators in an attempt to find the best trading signals [74-82]. Gaining profit or loss from stock trading ultimately depends on analysis of future movement of highly fluctuating and irregular stock price values. Successful classification of up and down movements in stock price index values may not only helpful for the investors to make effective trading strategies, but also for policy maker to monitor stock market. Keeping track of upswings and downswings over the history of individual stocks will reduce the uncertainty associated to investment decision making. Investors can choose the best times to buy and sell the stock through proper analysis of the stock trends. Hence developing more realistic models to predict the rise and fall situations in the stock price index movement is a big challenge for most of the investors and professional analysts. In literature a number of models combining technical analysis with computationally intelligent techniques are available for prediction of stock price index movements [71-73]. This chapter contributes to literature by developing a classification model for stock price index movement classification followed by stock trading decision prediction. In the first part of the work, a classification model using the computationally efficient functional link artificial neural network (CEFLANN) is proposed for classifying the stock price index movements as up and down movements. Instead of training the CEFLANN network using traditional back propagation algorithm, the ELM 136

learning is proposed for the network. Six technical indicators calculated from the historical stock index price values are selected as inputs of the proposed model. The proposed model is compared with two other familiar networks used for classification Like Chebyshev FLANN [11, 42, 126, and 127] and Radial Basis Function (RBF) Network [9, 10, 83, and 85]. Performance of all the three networks is compared with both back propagation and ELM learning techniques, over two benchmark financial time series data set. Classification accuracy and F-measure are used to validate the model performance. Further the work is extended for generating the stock trading decisions. For stock trading the same CEFLANN model trained with ELM is used. The output from the CEFLANN model is transformed in to a simple trading strategy with buy, hold and sells signals using suitable rules. The model performance is evaluated based on profit percentage obtained during test period. The CEFLANN model is also compared with some other known machine learning techniques like support vector machine (SVM) [71, 72, 128, 130], Naive Bayesian model, K nearest neighbor model (KNN) [78, 130] and decision tree (DT) [129] model. The details of CEFLANN model and ELM training are discussed in chapter 2. So this chapter highlights the detailed steps of stock price index movement classification and stock trading using an ELM based CEFLANN. 6.2 Detailed Steps of Classification of Stock Price Index Movement In this section the prediction of stock price index movement is cast as a classification problem with two class values: one for the upward movement in stock index value and another for the downward movement in stock index value. A classification model using the computationally efficient functional link artificial neural network (CEFLANN) is proposed for classifying the stock price index movements as up and down movements. Instead of training the CEFLANN network using traditional back propagation algorithm, the ELM learning is proposed for the network. Few popular technical indicators derived from historical stock index prices are taken as input for the network where as the up down class values indicating the direction of daily change in stock index closing price are taken as output during training of the network. The frame work figure of the proposed model is shown in Fig. 6.1. 137

Fig. 6.1 Proposed Model for classification of Stock Price Index Movement Step 1: Input Output Preparation In literature, researchers have used different types of technical indicators for analysis of future movement of stock index values. In this study, total 6 popular technical indicators are chosen as input to the proposed model. The technical indicators are calculated from historical prices as follows: Simple Moving Average (SMA): It is the simple statistical mean of previous n day closing price, that normally smoothies out the price values. In this study value of n is set to 25. MA n 1 n n i 1 cp( i) (6.1) Where cp(i) is the closing price. Moving Average Convergence and Divergence (MACD): The MACD shows the relationship between two exponential moving averages of prices. 138

MACD EMA 12 EMA EMA( i) ( CP( i) EMA( i 1)) Multiplier EMA( i 1) where Multiplier 2/( no of 26 days to be considered 1) (6.2) Stochastic KD: Stochastic provides a mean of measuring price movement velocity. K% measures the relative position of current closing price in a certain time range, whereas D% specifies the three day moving average of K%. cp( i) L K%( i) H L n n n 100 (6.3) D%( i) ( K%( i 2) K%( i 1) K%( i))/3 Where cp(i) is the closing price, L n is the lowest price of last n days, H n is the highest price of last n days. Relative Strength Index (RSI): RSI is a momentum indicator calculated as follows: 100 RSI 100 1 RS Average of n day' s up closes where RS Average of n day' s down closes (6.4) Larry William s R%: William s R% is a stochastic oscillator, calculated as follows: H n cp( i) R%( i) 100 H L n n (6.5) Where cp(i) is the closing price, L n is the lowest price of last n days, H n is the highest price of last n days. The direction of daily change in stock price index is categorized as 0 or 1. The direction value 1 represents that index value at time t is greater than time t- 1indicating an upward movement and direction value 0 represents that index value at time t is smaller than time t-1indicating a downward movement. These 0 and 1 values are used as class values in the classification model. The up down movements used in the training stage of the network are calculated from historical closing prices using the following rule: 139

If cp(i)>cp(i-1) then signal is up (1) Else signal is down (0) Step 2: Data Normalization Originally the six technical indicator values represent continuous values in different ranges. So the input data is scaled in the range 0 to 1 using the min max normalization as follows: y x x x max min x min (6.6) Where y = normalized value. x = value to be normalized x min = minimum value of the series to be normalized x max = maximum value of the series to be normalized Scaling the input data ensures that larger value input attributes does not overwhelm smaller value inputs. Step 3: Creating Network Structure CEFLANN is a single layer neural network with only an output layer. The output layer contains a single neuron to provide the corresponding class value of the given input sample. The normalized values of the six chosen technical indicator values are given as input to the network. The network performance varies based on the selected expansion order and learning technique used. So a suitable order is chosen for expansion. The associate parameters used in expansion are initialized randomly. Step 4: Training and Testing the Network For training the network using ELM, data from the training set are fed to the network, so that the network can adjust its weights. The output weights of the network are obtained analytically using a robust least squares solution including a regularization parameter. The regularization parameter value is set through a parameter selection process. Finally the class values of the training and testing samples are obtained by comparing the weighted sum of the expanded inputs with a specified threshold value. 140

Step 5: Performance Evaluation The performance of the model is evaluated based on classification accuracy and F- measure value. Computation of these evaluation measures are done by estimating Precision and Recall values. In a classification task, the precision for a class is obtained as a ratio of the number of true positives (i.e. the number of items correctly labeled as belonging to the positive class) to the total number of elements of the positive class. Recall is defined as a ratio of the number of true positives divided by the total number of elements belongs to the positive class. True Positive Pr ecision True Positive False Positive (6.7) True Positive Re call True Positive False Negative True Positive True Negative Accuracy True Positive False Positive True Negative False Negative (6.8) (6.9) 2 Precision Recal F measure Precision Recal (6.10) 6.3 Detailed Steps of Stock Trading In this section a novel trading model using the CEFLANN network is proposed to generate the short term trading decisions more effectively. The six popular technical indicators used in stock price index movement classification are also used as the input features for this model. The CEFLANN network is applied to capture the nonlinear relationship exists between the technical indicators and trading signals. Predicting trading decisions is also cast as a classification problem with three class values representing the buy, hold and sell signals. Instead of using three discrete class values during training of the network, a continuous trading signal within range 0 to 1 are fed to the network. The new trading signals in the range 0 to 1 can provide more detailed information regarding stock trading related to the original price variations. Further the output trading signals are used to track the trend and to produce the trading decision based on that trend using some trading rules. The frame work figure of the proposed model is shown in Fig. 6.2. 141

Fig. 6.2 Proposed Model for Stock Trading The detailed steps of stock trading using CEFLANN model trained with ELM are as follows: Step 1: Extract Technical indicators In this study, six popular technical indicators i.e. MA 15, MACD 26, K 14, D 3, RSI 14, WR 14 are used to monitor the future movement of stock prices and in setting up trading rules for buy sell hold decisions. The technical indicators are calculated from the historical stock prices as discussed in section 6.2. Step 2: Trend Analysis using Technical Indicators Gaining profit or loss from stock trading ultimately depends on analysis of future movement of stock price values. In literature different technical indicators are used for successful classification of up and down movements in stock price index values. In this 142

study rules using MA are used for classifying the stock market movement as upward (Uptrend) or downward (downtrend) as follows: If closing price value leads its MA 15 and MA 15 is rising for last 5 days then trend is Uptrend i.e. trend signal is 1. If closing price value lags its MA 15 and MA 15 is falling for last 5 days then trend is Downtrend i.e. trend signal is 0. However, if none of these rules are satisfied then stock market is said to have no trend. Step 3: Trading Signal Generation from Trend Analysis Instead of using the discrete trend signal in training of network, trading signals in range 0 to 1 are generated using momentum of the stock prices. The new trading signals are not only able to reflect the price variation, but also provide more detailed information to make precise stock trading decision. The continuous trading signals Tr i are generated using following rules: For up trend: [ cpi min cp] Tri 0.5 0.5 [maxcp min cp] min cp min( cp, cp i 1 maxcp max( cp, cp i i, cp i 1 i 2, cp ) i 2 ) (6.11) For down trend: Tr i [ cpi min cp] 0.5 [max cp min cp] (6.12) Where cp i, cp i+1, cp i+2, are the closing price of the ith, (i+1)th, (i+2)th trading days respectively. Step 4: Data Normalization Originally the six technical indicator values represent continuous values in different ranges. So the input data is scaled in the range 0 to 1 using the min max normalization as given in equation (6.6). 143

Step 5: Network Structure Creation and Training using ELM The same structure of CEFLANN network used for stock price index movement classification is used for stock trading. The network has six inputs representing the normalized six technical indicator values and one output neuron for producing the trading signals. Initially with a suitable expansion order and random values of associated parameters used in expansion the network is created. Further with the ELM learning, the output weights of the network is obtained analytically using a robust least squares solution including a regularization parameter. The regularization parameter value is set through a parameter selection process. Step 6: Trend Determination from Output Trading Signal After the training process, a new set of test data is applied to the trained network to produce a set of outputs. Output value of the network is the trading signal i.e. the continuous value in range 0 to 1. To make trading decision, it is first required to track the trend and decide when to trade. The uptrend and down trend is classified from the output trading signals (OTR i ) using the following rules: If OTr i > mean (Tr) predicted trend is up(1) else predicted trend is down(0) Step 7: Trading Point Decision from Predicted Trend After obtaining the stock movement direction, trading points are obtained using straightforward trading rules as follows: If the next day trend=uptrend then decision is BUY If Buy decision exists then HOLD If the next day trend=downtrend then decision is SELL If SELL decision exists then HOLD Step 8: Profit Calculation The main parameter adopted for performance evaluation is the profit percentage obtained during the test period. The profit percentage is generated from a combination of buy and sells transactions as follows: 144

Profit % ( cp Where k number of transactions cp cp si bi k i 1 si cp selling price of buying price of bi i i th th ) / cp bi 100 transaction transaction (6.13) 6.4 Empirical Study In this study the performance of the CELANN model is validated for both stock price index movement classification and stock trading problem by applying it on two stock index data sets. The proposed model is compared with two other familiar networks like Chebyshev FLANN (CHFLANN) and Radial Basis Function (RBF) Network for stock price index movement classification problem. The CEFLANN model is also compared with some other known classifiers like support vector machine (SVM), Naive Bayesian model, K nearest neighbor model (KNN) and decision tree (DT) model for stock trading problem. 6.4.1 Experimental Outputs and Result Analysis for Stock Price Index Movement Classification Five years of historical stock index price values of two stock indices (BSE SENSEX and S&P 500) are used in this study. The detail of the data set is given in Table 6.1. Number of increase and decrease cases in each year in the entire dataset of BSE SENSEX and S&P 500 data set is shown in Table 6.2. Both the data sets are divided into training and testing sets. For BSE data set the training set consists of 650 patterns and 569 patterns are used for testing and for S&P dataset the training set consists of 650patterns leaving the 583 patterns for testing. The training set comprises nearly 50% samples from each year of the data set. Table 6.1 Data set Description Data Set BSE SENSEX S&P 500 Period 4- Jan- 2010 to 31-Dec-2014 4- Jan- 2010 to 31-Dec-2014 145

Table 6.2 Number of increase and decrease cases in each year in the entire dataset of S&P 500, BSE SENSEX Data set Year Increase Decrease Total 2010 127 100 227 2011 104 143 247 BSE SENSEX 2012 140 111 251 2013 130 120 250 2014 141 103 244 Total 642 577 1219 2010 130 97 227 2011 138 114 252 S&P 500 2012 132 118 250 2013 147 105 252 2014 144 108 252 Total 691 542 1233 In literature, researchers have used different types of technical indicators for analysis of future movement of stock index values. In this study, total 6 popular technical indicators are chosen as input to the proposed model. Table 6.3 summarizes the statistical analysis of the selected technical indicators for both the stock indices. To measure the generalization ability of the network initially the dataset is divided in to a single train and test set. Then simulation is done by passing each set of training and testing data to the individual models for 20 times. The average performance out of these 20 runs has been reported for both the dataset. For CEFLANN with order p, input size s, the number of associated parameters used in functional expansion is p(s+1) and number of weights between expanded pattern and output neuron is (p+s). Hence total number of unknown parameters need to be tuned by a learning algorithm is (p+s) + p(s+1). Using ELM the p(s+1) number of associated parameters are chosen randomly, and the remaining (p+s) number of parameters are obtained using the least square solution with regularization parameter. The performance of the proposed model depends on different factors like the order of expansion, value of regularization parameter, input 146

space size and so on. So initially through a number of simulations the controlling parameters of the model are derived. Table 6.3 Summary statistics of selected technical indicators Data set Technical Indicators Min Max Mean Std SMA 1.5782e+004 2.8200e+004 1.9515e+004 2.9019e+003 MACD -562.6344 597.0689 59.0154 218.5564 BSE SENSEX K% 1.6954 99.3916 56.2792 32.1840 D% 4.4787 97.3337 56.2341 29.2545 RSI 5.0617 95.4554 53.9376 18.0426 LW R% -98.3046-0.6084-43.7208 32.1840 SMA 1.0739e+003 2.0565e+003 1.4705e+003 286.2986 MACD -42.4684 25.6214 5.1836 12.0395 S&P 500 K% 0 100 64.7144 31.4893 D% 1.5690 99.1513 64.6599 28.1762 RSI 9.3436 99.2987 57.1475 16.5881 LW R% -100 0-35.2856 31.4893 The mean accuracy and F- measure obtained, out of the 20 independent runs are reported in Table 6.4 with 3 different expansion order and 4 different regularization parameter values for both the data set. With the higher expansion order no sign of improvement in the classification accuracy is observed. Again with higher expansion order, size of parameter space will be higher and accordingly the training time will be more. Fig. 6.3 and 6.4 shows the classification accuracy of CEFLANN with order 2 and different regularization parameter values for both the data sets respectively. Performance comparisons of the proposed model with two other familiar networks like Chebyshev FLANN and Radial Basis Function (RBF) Network are listed in Table 6.5. 147

Performance of all the three networks is compared with both back propagation and ELM learning techniques as shown in Fig. 6.5 and 6.6. Table 6.4 Performance comparison of CEFLANN+ELM with different parameter settings Data set Expansion order Regularization Parameter Training Testing Accuracy F- measure Accuracy F- measure 0.04 0.8338 0.8505 0.8355 0.8452 2 0.06 0.8336 0.8503 0.8368 0.8460 0.08 0.8349 0.8515 0.8355 0.8449 BSE SENSEX S&P 500 3 4 2 3 4 0.1 0.8345 0.8512 0.8353 0.8447 0.04 0.8362 0.8530 0.8344 0.8442 0.06 0.8345 0.8513 0.8347 0.8443 0.08 0.8351 0.8518 0.8346 0.8442 0.1 0.8353 0.8519 0.8344 0.8440 0.04 0.8360 0.8528 0.8334 0.8435 0.06 0.8366 0.8536 0.8346 0.8446 0.08 0.8364 0.8533 0.8335 0.8436 0.1 0.8367 0.8535 0.8339 0.8436 0.04 0.8117 0.8485 0.8193 0.8490 0.06 0.8100 0.8474 0.8189 0.8487 0.08 0.8084 0.8463 0.8187 0.8486 0.1 0.8080 0.8461 0.8172 0.8473 0.04 0.8126 0.8491 0.8186 0.8483 0.06 0.8107 0.8477 0.8185 0.8482 0.08 0.8101 0.8474 0.8180 0.8478 0.1 0.8085 0.8464 0.8179 0.8479 0.04 0.8131 0.8494 0.8181 0.8479 0.06 0.8117 0.8486 0.8168 0.8469 0.08 0.8109 0.8478 0.8175 0.8475 0.1 0.8096 0.8471 0.8165 0.8465 148

test accuracy test accuracy Table 6.5 Performance comparison of CEFLANN+ELM with other networks Dataset Network Learning Algorithm Training Testing Accuracy F- measure Accuracy F- measure BSE SENSEX S&P 500 CEFLANN CHFLANN RBF CEFLANN CHFLANN RBF ELM 0.8336 0.8503 0.8368 0.8460 BP 0.8283 0.8564 0.7926 0.8208 ELM 0.8292 0.8351 0.7961 0.7906 BP 0.7871 0.8319 0.7371 0.7929 ELM 0.7185 0.7842 0.7100 0.7636 BP 0.7311 0.7558 0.6789 0.6928 ELM 0.8117 0.8485 0.8193 0.8490 BP 0.8077 0.8479 0.7979 0.8352 ELM 0.8031 0.8048 0.8050 0.8016 BP 0.7951 0.8429 0.7914 0.8352 ELM 0.7634 0.8163 0.7650 0.8094 BP 0.6771 0.7387 0.6792 0.7210 classification accuracy of CEFLANN with order 2 for BSE SENSEX data set 0.825 0.825 classification accuracy of CEFLANN with order 2 for S&P 500 data set 0.82 0.82 0.815 0.815 0.81 0.81 0.805 0.805 0.8 0.8 0.795 0.795 0.79 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 regularization parameter values 0.79 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 regularization parameter values Fig. 6.3 Classification accuracy of CEFLANN with different regularization parameter values and order 2 (BSE SENSEX) Fig. 6.4 Classification accuracy of CEFLANN with different regularization parameter values and order 2 (S&P 500) 149

test accuracy test accuracy 0.9 0.8 Performace comparision of three classifiers over BSE SENSEX dataset ELM BP 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 1 2 3 1: CEFLANN 2:CHFLANN 3:RBF Fig. 6.5 Performance comparison of three networks over BSE SENSEX Data set 0.9 0.8 Performace comparision of three classifiers over S&P500 dataset ELM BP 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 1 2 3 1: CEFLANN 2:CHFLANN 3:RBF Fig. 6.6 Performance comparison of three networks over S&P500 data set Summarizing the results, the following inference is drawn: A comparison of back propagation and ELM learning over CEFLANN model shows clearly the superior performance of CEFLANN trained using ELM approach in comparison to back propagation. 150

Again from the experimental result analysis it is clearly apparent that the proposed model provides superior classification accuracy and F- measure value compared to CHFLANN and RBF model. Analyzing the performance of the proposed model with different expansion order and regularization parameter values, it is observed that, the model provides better result with order 2 and regularization parameter value 0.6 for BSE SENSEX dataset and with order 2 and regularization parameter value 0.4 for S&P500 dataset 6.4.2 Experimental Outputs and Result Analysis for Stock Trading After successful prediction of stock price index movement the CEFLANN network trained with ELM is used for predicting stock trading decision points. Same five years of historical stock index price values of two stock indices (BSE SENSEX and S&P 500) are used in this study. Initially the six technical indicators are extracted from the historical prices and normalized using min max normalization to be fed as input to the network. As the aim of the study is to derive short term trading points from trend analysis, so MA 15 has used for finding initial up down movements of the stock prices. Instead of using discrete value as output during training of the network, continuous trading signals are generated from the trend and used during training process. Both the data sets are divided into training and testing sets. For BSE data set the training set consists of 1000 patterns and remaining 208 patterns are used for testing and for S&P dataset the training set consists of 1000 patterns leaving the 221 patterns for testing. The simulation is done by passing each set of training and testing data to the individual models for 20 times. The average performance out of these 20 runs has been reported for both the dataset. The trading signal generated from CEFLANN model for both the dataset are shown in Fig. 6.7 and 6.8. Fig. 6.9 and 6.10 represents the initial trading points generated using the technical indicator MA 15. Trading points predicted by using the proposed model for both the data set are shown in Fig. 6.11 and 6.12. The overall performance of the model compared to other soft computing techniques like SVM, Naïve Bayesian, KNN and decision tree (DT) for the two dataset are shown in Table 6.6 and 6.7 respectively. Through a series of experimental tests, the proposed model consistently generates highest profit among others. 151

Closing price Closing price Trading signal generated from CEFLANN Trading signal generated from CEFLANN 1 0.9 Output of CEFLANN for BSE dataset trading signal avg of trading signal 0.9 0.8 Output of CEFLANN for S&P500 dataset trading signal avg of trading signal 0.8 0.7 0.7 0.6 0.6 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0 50 100 150 200 250 Days Fig. 6.7 Output trading signal obtained from CEFLANN model for BSE SENSEX data set 0.1 0 50 100 150 200 250 Days Fig. 6.8 Output trading signal obtained from CEFLANN model for S&P500 data set 2.9 x 104 Actual Buy and Sell signals (BSE) 2.8 2.7 2.6 2.5 2.4 2.3 2.2 closing price buy sel 2.1 2 0 50 100 150 200 250 Days Fig. 6.9 Initial Trading points generated using MA 15 for BSE SENSEX data set 2100 Actual Buy and Sell signals(s&p500) 2050 2000 1950 1900 1850 1800 closing price buy sel 1750 0 50 100 150 200 250 Days Fig. 6.10 Initial Trading points generated using MA 15 for S&P500 data set 152

Closing price Closing price 2.9 x 104 Buy and Sell signals generated from CEFLANN (BSE) 2.8 2.7 2.6 2.5 2.4 2.3 2.2 2.1 closing price buy sel 2 0 50 100 150 200 250 Days Fig. 6.11 Trading points from CEFLANN model for BSE SENSEX data set 2100 Buy and Sell signals generated from CEFLANN (S&P500) 2050 2000 1950 1900 1850 1800 closing price buy sel 1750 0 50 100 150 200 250 Days Fig. 6.12 Trading points from CEFLANN model for S&P500 data set Table 6.6 Performance comparison of stock trading models on BSE SENSEX data set Performance Metrics No. of Buy signals No. of hold signals No. of sell signals Actual (Using MA 15 ) CEFLANN SVM Naïve Bayesian KNN 7 11 6 8 13 9 194 186 196 192 182 190 7 11 6 8 13 9 Profit % 25.8282 47.2007 35.8099 42.3267 30.8015 33.4523 DT 153

Table 6.7 Performance comparison of stock trading models on S&P500 data set Performance Metrics No. of Buy signals No. of hold signals No. of sell signals Actual (Using MA 15 ) CEFLANN SVM Naïve Bayesian KNN 6 9 9 10 16 13 209 203 203 201 189 195 6 9 9 10 16 13 Profit % 8.6474 24.2872 17.5163 22.1668 13.6787 15.5161 DT 6.5 Summary Development of effective stock market trading strategies depends on accurate classification of stock price index movements. Successful classification of up and down movements in stock price index values usually affects the buying and selling decision of financial traders. It may promise attractive benefits for investors. Hence in this chapter, a classification model using the computationally efficient functional link artificial neural network (CEFLANN) with ELM learning approach is proposed for classifying the stock price index movements as up and down movements. Two other familiar networks like Chebyshev FLANN and Radial Basis Function (RBF) Networks are also used for comparative study. It is clearly demonstrated that the CEFLANN model completely outperforms the other two networks. Further the work is extended for generating the stock trading decisions. For stock trading the same CEFLANN model trained with ELM is used. The output from the CEFLANN model is transformed in to a simple trading strategy with buy, hold and sells signals using suitable rules. From the experimental result analysis it is clearly apparent that the proposed model provides superior profit percentage compared to some other known computationally intelligent techniques like support vector machine (SVM), Naive Bayesian model, K nearest neighbor model (KNN) and decision tree (DT) model. Hence instead of taking trading decision based on particular technical indicators, it is more profitable to take trading decision using combination of technical indicators with computational intelligence tools. 154