Stock-Market Data Inspection and Future-Stock Prediction using NN

DOI : 10.17577/IJERTCONV9IS05033

Download Full-Text PDF Cite this Publication

Text Only Version

Stock-Market Data Inspection and Future-Stock Prediction using NN

1 M. Aparna M. Tech

Asst.Prof. in Dept. Of CSE Narasaraopet Engineering College

3 E. Ravindra ReddyM. Tech

Asst.Prof. in Dept. Of CSE MPES Engineering College

2 M. Siva naga Raju M. Tech

Asst.Prof. in Dept. Of CSE Narasaraopet Engineering College

4 K Narasimha Reddy M. Tech

Asst.Prof. in Dept. Of CSE Narasaraopet Engineering College

Abstract Share market is one in every of the foremost unpredictable and place of high interest within the world. There arent any vital ways exist to predict the share value. Principally individuals use 3 ways like elementary analysis, applied math analysis and machine learning to predict the share value of share market however none of those ways are proved as a systematically acceptable prediction tool. Therefore developing a prediction tool is one in every of the difficult tasks as share value depends on several important issue and options. during this paper, we have a tendency to propose a sturdy technique to predict the share rate victimization Neural Network (NN) primarily based model and compare however it disagree with the particular value. For that we have a tendency to collect the share market information of last half dozen months of ten firms of various classes, cut back their high spatiality victimization Principal Component Analysis (PCA) in order that the Back- propagation Neural Network (NN) are able to train quicker and with efficiency and create a comparative analysis between Hyderabad exchange (HSE) algorithmic program and our technique for prediction of next day share value. so as to justify the effectiveness of the system, totally different check information of firms stock are wont to verify the system. we have a tendency to introduce a sturdy technique which may cut backtheinformationspatialityandpredicttheworthsupported artificial neuralnetwork.

KeywordsArtificial Neural Network, PCA, Stock Market, Stock Market Prediction, DSE

  1. INTRODUCTION

    Predicting something is that the most mysterious and toughest task in our world. sensible prediction makes things sensible and unhealthy prediction makes a large loss. stock exchange prediction is one in every of the toughest tasks for everybody United Nations agency deals with it. Prediction withonethousandthaccuracyiskindofnotpossible.sensible prediction suggests that prediction with sensible average calculation. once some ones prediction is healthier at average, thenhe/shemaybeasensibleanalyst.Fromthestartof world its been our common goal to form our life easier and comfy. The prevailing notion in society is that wealth brings comfort and luxury, there has been such a lot work done on waysthat to predict the stock markets. Varied ways, techniques and ways that are projected and used with variable results. stock exchange prediction is to predict the longer term stock victimizationthemarket statistics of past years. However, no technique or combination of techniques

    has been productive enough to systematically beat the market. In my analysis work I havegot used neural network, because it is that the most powerful tool to predict and analyze knowledge. The conception of the neural network comes from the conception ofour biological brain.

    its excellent at recognizing complicated pattern and discover the unknown relation amongcompletely different variables of knowledge.

    In this paper, we have a tendency to studied heapconcerning the stock exchange statistics. we have a tendency to use Hyderabad stock market, Peoples Republic of Andhra Pradesh as our knowledge supply. we have a tendency to choose ten firms from completely different class and collect their last six months knowledge. This knowledge archive contains Brobdingnagian quantity of knowledge with multiple dimensions. As a research worker we have a tendency to apply a applied mathematicstool Principal part Analysis referred to as PCA to scale back the information dimension. Reducing knowledge dimension is critical as a result of massive dataset needed longer to coach in Neural Network(NN). when reducing knowledge dimension we have a tendency to implement neural network to coach the information set and neural network notice the relation between completely different variables. when productive coaching we have a tendency to are able to check our network victimization existing knowledge however well it will predict victimization different plotting and victimization different diagram. we have a tendency to calculate the error rate and the way a lot of knowledge are foretold in quietly just about the firstknowledge.

  2. SYSTEM ARCHITECHTURE

    Analysis of the large quantity of information of stock exchange is that the main challenge for United States asthere is sizable amount of organizations and company concerned available exchange. As our goal is to predict the value and compare those with stock markets own rule and testing that whether or not our system works higher or not. The coaching method for the Back-propagation neural network is competitive. initial of all we tend to apply Principal Component Analysis (PCA) technique on information to scale back dimension. once reducing information dimension, we tend to fed it in neural network for coaching. One vegetative cell can win for every coaching set and itll have its weight adjusted so itll react even a lot of powerfully to the input within the next

    time. As for various coaching set, completely differentneuronswinandtheirabilitytorecognize that specific set are raised. currently we tend to are describing the procedure employed in our stock exchange analyzing system.

    • Study the Hyderabad stock exchange and collect the previous stock of ten completely different classesorga- nization.

    • Storetheirsixmonthsinformationinsurpasssheet.

    • This information has multipledimensionalities.

    • Scale back the spatial property mistreatment Principal partAnalysis.

    • Implement Hyderabad securities market rule called HSErule.

    • Train the reduced information set mistreatment neural network.

    • Assesstheperformanceofourprojectedsystem.

    • ComparebetweenourruleandHSErule.

    • Experimental Result Analysis The effectiveness of the rule has been even by mistreatment completely different organizations information. The Experiments are applied on AMD A8-6120 2GHz laptop with eight GB RAM. The rule has been enforced inMATLAB 2016.

  3. PROCESSING

    1. Acquisition of information from securitiesmarket

      As we tend to study and work with exchange knowledge, initially we want a many previous knowledge of exchange. weve got studied and analyzed the Hyderabad Stock Exchange as an information supply for our analysis work. we tend to choose City Bank, ACI, Grameen-Phone, AZIZ- PIPES, BAN- GAS, BEXIMCO, as our knowledge supply. when learning these firms we tend to store their last half dozen months

      knowledgeonsurpasssheetforadditionalprocess.

      Figure 1 shows the sequence of steps of our system

      Collect stock data from HSE data archive

      Implement Principal Component Analysis

      Reduce data dimensionality using PCA

      Implement HSE algorithm

      Train reduced data set using neural network

      Training using BPNN

      Trained Recognizer

      Preprocessing Recognition Output

      Unknown stock rate Performance Evaluation using different graph and

      diagram

      Fig 1. System Architecture

      Fig 2. Data archive of Grameen-Phone

    2. Reduction of informationspatiality

    To tain the network victimisation neural network, reduc- tion of information spatiality is important for higher and quickcoaching.wevegotadatasetcomposedbyacollection of properties. several of those options can live connected properties and then are redundant. Therefore, we should always take away this redundancy and describe every with less property. this can be precisely what PCA aims to try and do. The rule really constructs new set of propertiessupported combination of the previous ones. Mathematically speaking, PCA performs a linear transformation moving the first set of optionstoabrandnewhousecomposedbyprincipalpart.

    Fig 3. Score Plot of data of Grameen-Phone

    After applying PCA on our every and each dataset we tend to got the chemist matrix.

    Fig 4. chemist Matrix

    Fig 5. Normalized values for properties

    Fig 6. SampleHistogram for var4

    For the information of our every elect company we tend to apply PCA on them and acquire the foremost authoritative properties. when flourishing implementation of Principal parts Analysis we tend to write the reducedinformationon Microsoft stand out sheet. currently our information are ready as AN input for neural network.

    Fig 7 shows the information archive before Applying

    PCA on Grameen-Phone company data:

    Fig 7. Data archive of Grameen-Phone

    After applying PCA:

    Fig 8. After applying PCA on data of GrameenPhone

  4. PERFORMANCE EVALUATION AND EXPERIMENT RESULTANALYSIS

    1. Implement Hyderabad Stock Exchange (HSE)formula

      At the start we tend to discuss concerning thevarious varieties of prediction, basic analysis is one in all them. As we tend to choose national capital exchange as our knowledge supply, we discover they need own formula for stock rate prediction. to match it with our system initially we tend to implement the HSE formula in MATLAB and write the solution and foretold price in another file. The short description of HSE formula as follows.

      LTP = Last Traded Price CLOSEP = Closing Price

      YCP = Yesterdays Closing Price

      OAP = Open Adjusted Price Index calculation algorithm(accordingtoIOSCOIndexMethodology):

      Current M.Cap = ( LTP Total no. of indexed shares) Closing M.Cap = ( CP Total no. of indexed shares ) Abbreviations and Acronyms M.Cap – Market Capitaliza- tion HSE – Hyderabad Stock Exchange IOSCO – International Organization of Securities Exchange Commissions (IOSCO) LTP – Last Traded Price CP – Closing Price

      Here we give a sample example of Grameen-Phone after implementing HSE algorithm for next day prediction:

      Fig 9. Result after HSE algorithm Implementation for Grameen-

      Mobile

      is set and weight updates happen through back propagation with a read to reduce the error later on. once all patterns in pattern set are fed into the network and weights are updated as expressed earlier, this constitutes one epoch as per the definition of literature.

      Updated Weight = weight (old) + learning rate * output error * output (neurons i) * output (neurons i+1) * (1 – Output (neurons i+1)).

      Fig10. Networkarchitecture

      Hidden layer somatic cell generate the ultimate output that is that the compared with the $64000 output and calculate miscalculation signal e. Unless calculable reaches satisfactory level measured supported error threshold as mere before, epochs are continued . during this work, ten totally different corporations are trained on an individual basis and their results are analyzed.

    2. Training

      When we tend to apply principal element analysis in our information set we got the foremost potent information properties. These options are used as Associate in Nursing input vector for our neural network. For our neural network we tend to use terms list of last vi months of specific organization as a target vector. The value-price- terms-damage is that the final price at that a security is listed on a given mercantilism day. The terms represents the foremost up-to- date valuation of a security till mercantilism commences once more on the subsequent mercantilism day. Hence inour system the amount of neurons in input layer is 124*5, neuronsininputlayerforneuralnetworkandvariety

      of neurons in hidden layer is twenty, and eventually the neurons in output layer is 124. the amount of neurons in hidden layer will vary from twenty five to fiftieth of its input neurons.InourTraining:

      Numberofneuronininputlayer: 124*5 Number of neuron in hidden layer : 20 Number of neuron in output layer : 124

      Learning rate () :0.001 and threshold () : 0.9 Epoch : 2000

      After specification of those experimental parameters we tend to get into the implementation of Back-propagation neural network (BPNN). At first, initial weights are at random generated for the network.Infeedforwardstep,inputpatternsarepropagated through the network one by one and actual outputs are calculated. scrutiny between actual and target outputs, in keeping with BPNN algorithmic rule, magnitude of error

      Fig 11. Training the network

      After a 1000 iteration the coaching is stopped and error rate is in minimum convergence level.

      At 201 epochs best coaching performance is found.

    3. Testing

    The performance of a network is usually measured sup- ported however well the system predicts market direction. Ideally, the system ought to predict market direction higher than current ways with less error. Some neuralnetworks are trained to check. If a neural network will vanquish the market systematically or predict its direction with cheap accuracy, the validity of network is questionable. alternative neural networks were developed to vanquish current applied mathematics and regression techniques. Most of the neural networks used for predicting stock costs. so as to justify the performance of the neural network, varied experiments are

    distributed. All experiments are performed with for coach- ing the system for recognition. theres no overlap between the coaching and check information sets. when productive completion of the coaching completely different companys information, neural network is employed to acknowledge unknown information each as a full and on an individual basis.

    Figure12.BestTrainingPerformance Wehaveallotted the experiment for ten totally different

    class firms and determined their last six months information, apply PCA on themtocutbackinformationdimensionandatlasttrain them with neural network and predict their information looking on their previous day rate. at that time we have a tendency to compare their performance exploitation mean sq. error. The data set is partitioned off into 2 components. the primary one

    isemployedforcoachingthesystemandthereforethesecond for take a look at the system so as to guage the performance. for every organization, options are computed, reduced and hold on for coaching the network. 3 layers Back-propagation neuralnetwork(BPNN),i.e.oneinputlayer,onehiddenlayer and one output layer are taken. If range of neurons within the hidden layer is accrued, then a controversy of allocation of needed memory is occurred. Also, if the worth of error tolerance is high, desired results dont seem to be obtained, thus dynamic worth-the worth of error tolerance in a very minimum value, high accuracy rate is obtained. Additionally the network takes additional range of epochs to betold once the error tolerance worth is a smaller amount instead of within the case of high worth of error tolerance within which network learns in less range of cycles and then the educational isnt terribly fine. The result additionally varies for every organization. Numerous experiments are allotted to justify the performance of the system. All experiments are performed with set of coaching information andfullytotally different information set for take a look at. theres no overlap between the coaching and take a look at information sets. The neural network is trained exploitation the default learning parameter settings (learning rate zero.001, threshold zero.9) for one thusand epochs.

    Table I Predicted Price of Grameen-Phone

    Date

    LTP

    Ope n Pric e

    Clos e Pric e

    Predicte d Close Price

    Erro r Rate (%)

    04/07/2018

    375.5

    378

    375.4

    377

    0.42621

    05/07/2018

    382

    378

    383.9

    379.7

    1.09403

    08/07/2018

    390

    387

    387.8

    385.5

    0.59309

    09/07/2018

    388

    389

    387.9

    387.2

    0.18046

    10/07/2018

    380

    390.6

    379.5

    382.4

    0.76416

    11/07/2018

    382

    380

    380.7

    379.1

    0.42028

    12/07/2018

    388.6

    385

    388.5

    385.7

    0.72072

    15/07/2018

    381

    390

    383.1

    386.4

    0.86139

    16/07/2018

    386.3

    390

    388

    389.2

    0.30928

    17/07/2018

    399

    392

    397.7

    392

    1.43324

    Our prediction for Grameen-Phone for ten days in month of Gregorian calendar month shows however it closely associated with our foretold value and its actual value. Grameen-Phone is associate degree A class company. Following plot shows however target knowledge fits with trainknowledge.

    Fig13.Snapshotofhowtarget-datafitstowiththe train Data Error Histogram for Grameen-Phone Company is shown below:

    Fig14. Error Histogram for Grameen-Phone with 20bins

    Fig 15. Predicted price of Grameen-Phone for 10 days The experimental results show that this strong methodol- ogy is effective and economical in prediction stock costs compared with HSE formula for stock exchange prediction. Now weve got thought-about one B class company. For our analysis work we elect Company named Azizpipes. As like Grameen-Phone we have a tendency to apply PCA on that for knowledge dimension reduction, than applyHSE formula on that. afterward we have a tendency to trained the reduced knowledge mistreatment Back-propagation neural network.onceno- hitcoachingwehaveatendencytocheckit mistreatment some sample knowledge and compared it with itsactualvalue.

    TableIIPredictedPriceofAziz-Pipes

    Date

    LTP

    Open Price

    Close Price

    Predicted Close Price

    Error Rate (%)

    01/02/2018

    148.6

    155

    151

    152

    0.66

    04/02/2018

    143.5

    151.9

    142.3

    145.5

    2.25

    05/02/2018

    141

    145

    140.9

    139

    1.35

    06/02/2018

    143

    144

    142.4

    144

    1.12

    07/02/2018

    143.1

    142.2

    144.7

    145

    0.21

    08/02/2018

    143.1

    145

    143

    140

    2.10

    Fig 16. Predicted price of Aziz-Pipes for 6 days Here, we observed that for some sample our predicted price is so close to actual price.

  5. CONCLUSION Themainpurposeofactingonsecuritiesmarketprediction is to

extend the capitalist available market and build the many profit by predicting the market rate. In our planned system, we tend to developed a model to predict the stock rate of a particular company by coaching their previous information in neural network. to coach our system quicker, we tend to initially scale back the info dimensionexploitation PCA. Once self-made reduction of the info dimension we tend to got the foremost important options of information. once coaching, we tend to check our system however with success it predict the stock rate. We tend to ascertained that if we tend to use additional information to coach the network then the performance are raised considerably. For our system we tend to used Back-propagation neural network that is one among the most effective neural network. It reduces a blunder between the particular output and desired output during a gradient descent manner. Performance isnt continually satisfactory as a result of itll be quite tough to predict with a thousandthaccuracy.

REFERENCES

  1. Fungi-PAD (Perner et al. 2006, Perner and Bühring 2004) [Purpose: Classification, Knowledge acquisition/management]

  2. FrakaS (Cordier et al. 2007) [Purpose: Diagnosis, Knowledge acquisition/ management]

  3. GerAmi (Corchado, Bajo, and Abraham 2008) [Purpose: Planning, Knowledge acquisition/ management] Geriatric AmbientIntelligence

  4. The KASIMIR project (D'Aquin, Lieber, and Napoli 2006) [Purpose: Diagnosis, Classification, Knowledge acquisition/management]

  5. HEp2-PAD (Plata et al. 2008; Perner 2006a; Perner management

  6. Case-Based Reasoning System to Attention-Deficit Hyperactivity Disorder. In CBR research and development: 6th International Conference on CBR, 122-136.ICCBR05.

  7. Cordier, A.; Fuchs, B; Lieber, J.; & Mille, A. 2007. On- Line Domain Knowledge Management for Case-Based Medical Recommendation. In Workshop on CBR in the Health Sciences, pp. 285-294.ICCBR07

  8. Ahmed, M. U.; Begum, S.; Funk, P.; Xiong, N.; and Schéele, B. von. 2008. A Three Phase Computer Assisted Biofeedback Training System Using Case- Based Reasoning, In 9th European Conference on Case- based Reasoning workshop proceedings. Trier, Germany.

  9. Ahmed, M. U.; Begum, S.; Funk, P.; Xiong, N.; and Schéele, B. von. 2008a. Case-based Reasoning for Diagnosis of Stress using EnhancedCosine and Fuzzy Similarity, Transactions on Case- Based Reasoning on Multimedia Data, vol 1, nr 1, IBaI Publishing, ISSN: 1864-9734

  10. CaseBook (McSherry 2007) [Purpose: Diagnosis, Classification] is a hypothetico-deductive CBR system for classification and diagnosis that applies hypothetic deductive reasoning (HDR) in conversational CBRsystems.

Leave a Reply