Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
Optimal Weight Selection of ANN to Predict the Price of the General Index for Amman Stock Exchange

Optimal Weight Selection of ANN to Predict the Price of the General Index for Amman Stock Exchange

Ratings: (0)|Views: 129|Likes:
Journal of Computing, ISSN 2151-9617, http://www.journalofcomputing.org
Journal of Computing, ISSN 2151-9617, http://www.journalofcomputing.org

More info:

Published by: Journal of Computing on Apr 11, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/03/2014

pdf

text

original

 
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 3, MARCH 2011, ISSN 2151-9617HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/ WWW.JOURNALOFCOMPUTING.ORG 64
Optimal Weight Selection of ANN to Predictthe Price of the General Index for AmmanStock Exchange
K. Eghnam, A. Sheta, S. Bani-Ahmad
 
Abstract
Artificial neural networks (ANNs) have been successfully used to solve variety of problem in prediction, recognition, pat-tern classification, modeling and simulation of dynamic systems. Unfortunately, it was reported that the optimization of the ANN weightsrepresents a challenge. The reason is traditional ANN learning algorithms such as the back propagation algorithm can stuck by localminimum. There is no guarantee that the produced weights are the optimal set to solve the problem under study. Genetic Algorithms(GAs) were able to provide solutions for diversity of parameter optimization problems. In this study, we encoded the ANN weights asparameters (i.e. chromosome) for GAs to optimize. This simple idea significantly helps in solving a challenge problem in stock ex-change. A financial data set for Banks Participation, Insurance Participation, Service Participation, and Industry Participation for the pe-riod 1992-2005 was collected from Amman Stock Exchange (ASE). This data set was used as a training data set for the proposedANNs-GAs model. The developed results show that the proposed model out-performs the traditional Multiple Linear Regression model(MLR) with 4.95%. The experimental results are promising.
Index Terms
— Prediction, Neural Networks, Genetic Algorithms, Stock Market, Amman Stock Exchange.
——————————
 
 
——————————
1 I
NTRODUCTION
HE ability to predict the direction of the stock marketis very important factor when investing in the finan-cial market [1]. There are several motivations to ex-plore the stock market prediction problem. Academicresearchers and business practitioners and many othershave developed many types of prediction methods andtechniques in an attempt to find a reliable and effectivesolution of the stock market exchange. Detecting trends ofstock data helps decision maker to take the correct actionto increase the profit [3]. No one technique or combina-tion of techniques has been successful enough to beat themarket [2].In recent years, the concept of Soft-Computing tech-niques has provided a good tool to model time series [3].Artificial neural network (ANNs) proved to be one of themost effective Soft-Computing techniques. Mainly, itsability to discover nonlinear relationship and irregulari-ties in input data makes them ideal for predicting thestock market [4].Empirical results have shown that ANNs outperformsregression model [5, 6, and 7]. There are many majorproblems associated with using ANN in the prediction ofthe stock market index. They include the determination ofthe ANN size, the selection of the best weights of theNetwork and the selection of the initial weights to startthe weight adjustment process. It was found the GAs hasthe applicability to solve these types of problems. GAs ispractically good at efficiently searching large and com-plex spaces to find nearly global optima. As the complexi-ty of the search space increase, GA presents an attractivealternative to traditional learning techniques such asback-propagation. Even better, GA are good complementto gradient-based techniques for complex search space. In[12], the authors were proposed and implemented a fu-sion model by combining the Hidden Markov Model(HMM), ANN and GA to forecast financial market beha-vior. In [13; 14], ANNs were used to predict the stockprices.The objective of this research is to explore the use ofGenetic Algorithms (GAs) to train a feed-forward ANN,to find the near optimal weights, to predict the price ofthe general index for Amman stock exchange (ASE). Weplan also to compare our results against the multiple li-near regression (MLR) models. The proposed predictionmodel will be used to test the ability of GAs to find theoptimal set of weights for ANN.
1.1 Amman Stock Exchange (ASE)
ASE was established in March 1999 as a non-profit in-stitution with administrative and financial autonomy [16].It is authorized to function as an exchange for the tradingof securities. The exchange is governed by a seven-member board of directors. A chief executive officer over-sees day-to-day responsibilities and reports to the board.The un-weighted index is supplemented by sub-indicesfor the four sectors (see table 1); Banks Participation, In-
————————————————
 
 
K. Eghnam is with the Information Technology Department , Al-BalqaApplied University, Salt, Jordan.
 
A. Sheta is with The World Islamic Sciences and Education University(WISE), Amman, Jordan.
 
S. Bani-Ahmad is with the Information Technology Department, Al-BalqaApplied University.
T
 
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 3, MARCH 2011, ISSN 2151-9617HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/ WWW.JOURNALOFCOMPUTING.ORG 65
surance Participation, Service Participation, and IndustryParticipation. The base was changed to 1000 as of January1st 2004.
TABLE
 
1S
NAPSHOT OF THE INPUT DATA
:
 
A
MMAN
S
TOCK
E
XCHANGEINDEX PRICE
,
 
J
ANUARY
2004
Day Bank Insurance Security Industry Index Price1 4515.7 2299.1 1308.6 1507.4 2668.22 4565.4 2301.8 1300.3 1504.6 2680.53 4592.6 2317.8 1319.3 1530.8 2708.34 4592.6 2317.8 1319.3 1530.8 2708.35 4781.2 2348.1 1396.3 1575.4 2818.36 4876.6 2373.4 1440.9 1623.4 2887.37 4816.4 2381.5 1411.8 1617.9 2854.88 4774.6 2439.8 1409.9 1605.2 2835.59 4736 2483.3 1378.4 1608.5 2813.810 4659.4 2509.1 1397.1 1630.8 280511 4696.8 2522.6 1399 1655.1 2829.112 4707.1 2552.5 1405.5 1637.2 2826.913 4657.5 2517 1366.3 1616 2787.214 4600.8 2502.9 1331.5 1581.8 2740.715 4628.9 2475.9 1368.8 1588.3 2765.616 4630.4 2508.8 1378.2 1597.7 277417 4649.8 2541.8 1371.9 1584.3 2772.918 4719.5 2531.5 1390.7 1601 2809.919 4732.9 2494.2 1384.6 1601.7 2812.120 4756.9 2499.4 1389.4 1602 282221 4836.3 2513.5 1404.4 1622.9 2863.2
1.2 Models to Predict Stock Exchange
In the following sections, we will provide three modelsused to predict the price of the stock exchange. They are1) Multiple Linear Regression model 2) Neural Networkmodel and 3) ANN tuned GAs model. We will formulateeach case to suitably fit to the ASE
1.3 Multiple Linear Regression Model
Regression analysis is one of the most widely usedtechniques for analyzing multifactor data. This is becauseof its ability to assess which factors to include and whichto exclude, in order to develop alternate models with dif-ferent factors. In this method, the multiple regressionmodels can be presented as follows:
 
4422110
...
xxxy
(1)where:
y
is the price of the general index for ASE,
 
1
x
is the Banks Participation,
 
2
x
is the Insurance participation,
 
3
x
is the Service Participation,
 
4
x
is the Industry participation,
 
0
is the intercept of the regression equation,
 
i
is the regression coefficients,
i
1,2,3,4, and
 
 
is independent
),0(
2
  
.We may write the sample regression model cor-responding to Eq. 2.
510
jiijj
xy
 
(2)
2.
 
A
RTIFICIAL
N
EURAL
N
ETWORK
M
ODEL
 
In the following we will define main elements of ANNarchitecture with three layers. The ANN has an
n
in-put nodes, single output node and
p
hidden units(nodes). The neural network input consists of a set offinancial inputs factors
},,.........,{
21
n
xxxx
, where
n
is the financial vector inputs. Each sample
i
x
in set
x
is an
m
-dimensional financial vector inputs. A one-dimensional actual output vec-tor
},,.........,{
21
p
yyyy
, where
p
is equal to thenumber of hidden layer units.
hi
w
, is
pn
matrix ofsynaptic weights connecting the inputs and hiddenlayers and
oh
w
, is
1
P
matrix of synaptic weightsconnecting the hidden and output layers, and for sim-plicity. We assume that
^
y
is the desired response ofthe ANN. The ANN is shown in Figure 1.Back-propagation is commonly used to train ANN formany cases [3]. Classical back-propagation adoptsfirst-order steepest descent technique as a learning al-gorithm. Weights are modified in a direction that cor-responds to the negative gradient of the error surface.Gradient is an extremely local pointer and does notpoint to global minimum [9]. Newton-based algo-rithms often converge faster than gradient method.Unfortunately; it is complex and expensive to com-pute. The Levemburge-Marquardt learning algorithmis considered to be the fastest method for trainingmoderate-sized back-propagation neural networks butit has a drawback since it requires the storage of somematrix that can be quite large for certain problems [3;7]. If the network is very large then we may run out ofmemory.
ANN Tuned GAs Model 
To use GAs to solve the above described problem. Weneed to follow the following steps. They are:
Fig. 1. The proposed ANN
 
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 3, MARCH 2011, ISSN 2151-9617HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/ WWW.JOURNALOFCOMPUTING.ORG 66
 
Representation 
The first phase is to decide the representation ofweights. A floating point representation of connectionweights will be used in our case to represent the ANNweights. Thus, the chromosome representation can begiven in Figure 2.
 
1
 
 
2
 
 
n*p
 
 
(n*p)+1
 
 
(n*p)+2
 
 
(n*p)+p
 
Fig. 2. A Chromosome representation
Fitness Function Selection 
Secondly, evaluate the fitness of these connectionweights (chromosome) by computing its fitness usingthe mean square error (MSE) function as given in equ-ation 3.
  
n
yy nMSE 
1
)()( 1
(3)The fitness of an individual is determined by the totalMSE. The higher the error is the lower the fitness.
y
isthe actual neurons output for the inputs training sam-ples at the output layer, while
y
as its desired re-sponse. For empirical test, Equation 4 is the modifiedfitness function.
MSE 
efitness
(4)In order to evaluate the performance of our modelagainst the MLR model, the variance-Account-for(VAF) was chosen as given in Equation 3.
1 var( ) / var( )
V A F y y y
(5)
Tuning Parameters for GAs 
Start the evolutionary process by selection, crossover,and mutation operation by GA. The best individualssurvive to the next generation.
Termination Criteria 
Finally, the evolution terminates when the generationnumber reached it maximum value or the optimalvalues are reached. To summarize the evolutionprocess of GAs in selecting the best set of weights ofan ANN for solving the stock market prediction prob-lem we followed the procedure give in Figure 3.
3.
 
E
XPERIMENTS AND
D
ISCUSSION
A fully connected feed foreword ANN was usedwith input, single hidden and output layers. Eachlayer consists of nodes, which are either inputs data,connection points where summation of data occurs, oroutput data. Specifically, to take an extreme case asingle hidden layer comprising N units (nodes). Apopulation of weight set is initiated randomly (uni-form distributed in the interval [-1, 1]).We run GA for 50 generations to obtain the optimalset of weights. GA with various tuning parameters,population size, crossover and mutation probabilities,were used. In Table 2, we show the computed VAF forvarious population sizes.
TABLE
 
2C
OMPUTED
VAF
WITH VARIOUS POPULATION SIZE
 
Population size VAF
50 99.971100 99.9642200 99.9342
The experimental results show that it is possible tomodel the stock price based on historical trading databy using a three layer neural networks. The ANN-GAmodel was able to model 400 days of trading for Am-man stock exchange with a high VAF. The model wasable to predict the price of the index as of January2004. The price of general index for Amman stock ex-change is well predicted by the model with high de-gree of variance-Account-for (VAF=99%).In order to get a deeper understanding of the resultswe made some statistical analysis. The ANN-GA mod-el was tested with various numbers of nodes in thehidden layer. For example, it was tested for 4, 8, 12 and16 nodes, and they where tested respectively (see Table3). These tests were considered as an indication to thesuccess of the developed model in providing outstand-ing results in our case.The ANN-GA model achieved a high variance-Account-for up to 99% when the hidden layer has 8nodes (see Figure 4). In order to improve the perfor-mance of the model we explored the increase of thepopulation size of the GAs. We found that the perfor-
 
Yes
 
No
 
ENDSTART
 
Initialize
 
Network
 
Is
 
termination
 
criteria
 
satisfied?
 
Stop
 
GA
 
Training
 
GA
 
Training
 
Weight
 
Prediction
 
of 
 
Neural
 
Network
 
Fig. 3. Framework of combining GAs and ANNs.

Activity (3)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Imsai Arasan liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->