SlideShare a Scribd company logo
The forecasting of Shanghai Index trend Based on
Genetic Algorithm and Back Propagation Artificial
Neural Network Algorithm
Presented to:
Pro.Dr. : Magda B. Fayek
Date:1 April 2013
By Students :
Amr Abd El Latief Abd El Al
Allam Sheahata Hassanien Allam
Abdullah Shoukry Nagaty
2
Agenda
 Introduction
 Problem statement
 Methodology
 Experiment Results
 Conclustion
 Reference
Introduction
3
 Stock forecast, is a branch of economic forecasts,
which use the accurate survey statistics and stock
market information as the basis.
 If we can predict the stock's ups and downs, and
the stock market in a timely manner to reasonable
regulation and with health guide, it will continue to
develop our economy to provide a solid backing.
Introduction(cont)
4
 Existence of high yield and high-risk
characteristics in the stock market.
 people are continuing to explore its internal rules.
 many traditional time series analysis methods.
 Exponential smoothing method, ARMA (Auto
Regressive Moving Average Model) .
 ARCH (Auto Regressive Conditional
Heteroskedasticity Model)
Problem statement
 Paper presents a BP Artificial neural
network prediction modeling method for
forecasting the end of Shanghai index.
 Paper Uses the genetic algorithm to
optimize the BP network parameters,
weight and structure.
5
Methodology
6
Artificial Neural Network
7
Artificial Neural Network(Cont.)
Artificial Neural Network(Cont.)
 error back-propagation algorithm
 Its:
 error-correction learning rule.
 BP ANN Is Learning By Two
Teqhniques:
Supervised learning
Unsupervised learning
Genetic Algorithm
10
http://ib-poland.virtualave.net/ee/genetic1/3geneticalgorithms.htm
GA Steps To Optimize BP ANN:
 Intialization:
p , Crossover Scale – pc Crossover
Probability
Pm Mutation Probability
WIH(ji ) Connection Weights of Hidden L.
WHO(ji) Weights of Output L.
GA Steps To Optimize BP ANN:
 Coding :
Real Number Coding .
Initial Pobulation Takes 30
Fitness Function
. F(i) fitness value of indvidual i.
. Sum(E) sum of the squares errors
Fitness Function
 i=1…..N number of chromosomes.
 K= 1……4 for the number of output Layers
 P=1…….5 the study sample size
 T(k) Teacher Signal
Using genetic algorithm to optimize the
weights of the neural network
 1) Initialize: Initialize population P, including
crossover scale, Pc ,Pm and initialization for WIHij
and WHOji, Paper Author use the real number
coding, and the initial population take 30.
 2) Select and Computing fitness: each individual
evaluation function, and sort them; we can choose the
network by the probability value that show in
Formula; 15
Using genetic algorithm to optimize
the weights of the neural network
Using genetic algorithm to optimize the weights of
the neural network
 3) crossover: Individual G i and G i+1 crossover operation with probability Pc
to generate new individuals 'G i and , G i+1.
 4) mutate: Individual Gj mutate by probability Pm, and then produce new
individuals , Gj.
 5) evaluate new pop: Put the individuals into the new population P, and
calculate the new evaluation function of the individual.
 6) decide satisfactory: If you find a satisfactory individual, then the end, or
switch to 3).
 After achieve the required performance indicators, will eventually decode the
group's best individual you can get the optimized network connection weights.
17
Genetic algorithm to optimize the BP
network’s workflow
18
Establish Forecasting Model
 BP ANN :
 3 Layers ANN.
 parameters of Related Training
 start Training
 Use G A To Optimize ANN Weights
 Train the Optimized ANN Again
 Use the Optimized ANN To test Samples.
BP neural Network Weights
Optimization
 We need to use GA for BP weights to
be Optimized.
 Initialize Weights Encoding and Fitness
Calculations.
 Choose new Generation According to
Fitness.
 Repeat until Getting a set of Weights
to meet the Accuracy Req’s.
Training of BP ANN (again)
 Asseign the Weights and Threshold
Optimized to the BP ANN.
 Use training Sample To Train The BP
ANN again .
 Untill NN o/p and Sample o/p Tailed .
 Terminate the Trainig.
Experiment Results(Cont.)
 After a series of training, eventually selected parameters are:
a) Population scale: popu=30
b) Selection rate: opti=0.09
c) Crossover: arithXover
d) Crossover rate: Pc=0.95
e) Mutation: nonUnifMutation
f) Mutation rate: Pm=0.1
g) Genetic generations: gen=120
22
Experiment Results(Cont.)
 The training of the BP neural network after optimized Using genetic algorithm
program assign the weights and threshold (W1, B1, B2 W2) that after
optimized to the BP neural network.
 Use the training sample, to train BP network again, each 2,000 times, until
network output and sample output tallied, terminate the training.
 Stock Index Forecast Using the established GA-BP neural network based
stock index forecasting model to predict the stock price index Output the
results of the model predicted values and target values, and draw curve, to
used to verify the prediction accuracy, operability and practicability.
23
Experiment result(Cont.)
24
Experiment result(Cont.)
 R .. BP ANN Target Value
 P .. Predicted Value
 E .. Absolute Error.
Experiment result(Cont.)
26
Conclusion
 GA-BP algorithm used to avoid the BP algorithm into a local minimum,
slow convergence problem, and also to overcome the GA in a similar
form of exhaustive search for optimal solution search time caused by
long, slow shortcomings, is a fast, reliable method.
 Paper results shows that BP neural network using GA for the learning of
rules and to optimize the network weights and weights of the network and
the fixed threshold can improve the accuracy of stock index prediction
model.
27
References
 [1] Shen Bing. Equity Investment Analysis [M]. Chongqing: Chongqing
Publishing House, 2002: 94.
 [2] Chu Yuan. Securities Investment Principles [M]. Beijing: Lixin Accounting
Book Publishing ,2003:74-78.
 [3] Liu Yong. China's stock market and the empirical relationship between
macroeconomic variables [J]. Finance and Trade Economics, 2004 (4): 21-27.
 [4] Zhang Ling Song, Tao Chongen. Stock technical analysis tool [M]. Beijing:
China Encyclopedia Publishing House, 1994: 52-56 .
 [5] Ma Weihua, LI Yu-hong. Stock index futures and stock market development
in China [J]. Finance Teaching and Research, 2004, (5): 50-54.
 [6] E.W. Saad, D. V. Prokhorov, D.C. Wunsch. Comparative Study of Stock
Trend Prediction Using Time Delay, Recurrent and Probability Neural Networks.
IEEE Trans on Nerual Netowrks, 1998, 9(6): 1 4561 470.
28
Questions
?
Thank You

More Related Content

PPTX
Stock market prediction technique:
PDF
A LINEAR REGRESSION APPROACH TO PREDICTION OF STOCK MARKET TRADING VOLUME: A ...
PPTX
Stock market analysis using supervised machine learning
PDF
Stock Market Prediction and Investment Portfolio Selection Using Computationa...
PPTX
Presentation1
PDF
Stock market analysis
PDF
STOCK MARKET PREDICTION USING MACHINE LEARNING METHODS
PPTX
Financial forecastings using neural networks ppt
Stock market prediction technique:
A LINEAR REGRESSION APPROACH TO PREDICTION OF STOCK MARKET TRADING VOLUME: A ...
Stock market analysis using supervised machine learning
Stock Market Prediction and Investment Portfolio Selection Using Computationa...
Presentation1
Stock market analysis
STOCK MARKET PREDICTION USING MACHINE LEARNING METHODS
Financial forecastings using neural networks ppt

What's hot (20)

PPTX
stock market prediction
PPT
STOCK MARKET PREDICTION
PDF
Improved stock prediction accuracy using ema technique
PDF
IRJET- Stock Price Prediction using Long Short Term Memory
PPTX
PERFORMANCE ANALYSIS and PREDICTION of NEPAL STOCK MARKET (NEPSE) for INVESTM...
PPTX
Performance analysis and prediction of stock market for investment decision u...
PPTX
Stock market prediction using data mining
PDF
Predicting Stock Market Price Using Support Vector Regression
PPTX
Stock Price Prediction
PDF
Stock prediction system using ann
PPTX
Stock Market Prediction
PDF
IRJET- Prediction in Stock Marketing
DOC
Aditya report finaL
PDF
IRJET- Stock Market Prediction using Machine Learning
PDF
Indian Stock Market Using Machine Learning(Volume1, oct 2017)
PDF
IRJET - Stock Market Prediction using Machine Learning Algorithm
PPTX
Fuzzy Presentation
PDF
Stock Market Prediction Using ANN
PPTX
DEVELOPMENT OF INTELLIGENT PREDICTIVE MODEL FOR STOCK DATA PREDICTION WITH FE...
PDF
IMPROVED TURNOVER PREDICTION OF SHARES USING HYBRID FEATURE SELECTION
stock market prediction
STOCK MARKET PREDICTION
Improved stock prediction accuracy using ema technique
IRJET- Stock Price Prediction using Long Short Term Memory
PERFORMANCE ANALYSIS and PREDICTION of NEPAL STOCK MARKET (NEPSE) for INVESTM...
Performance analysis and prediction of stock market for investment decision u...
Stock market prediction using data mining
Predicting Stock Market Price Using Support Vector Regression
Stock Price Prediction
Stock prediction system using ann
Stock Market Prediction
IRJET- Prediction in Stock Marketing
Aditya report finaL
IRJET- Stock Market Prediction using Machine Learning
Indian Stock Market Using Machine Learning(Volume1, oct 2017)
IRJET - Stock Market Prediction using Machine Learning Algorithm
Fuzzy Presentation
Stock Market Prediction Using ANN
DEVELOPMENT OF INTELLIGENT PREDICTIVE MODEL FOR STOCK DATA PREDICTION WITH FE...
IMPROVED TURNOVER PREDICTION OF SHARES USING HYBRID FEATURE SELECTION
Ad

Viewers also liked (20)

PPTX
Neural network & its applications
PDF
Artificial neural networks
PPTX
Artificial neural network
PDF
Advancing Climate Prediction Science – Decadal Prediction
PPTX
Artificial Neural Networks for Storm Surge Prediction in North Carolina
PPT
Nural network ER. Abhishek k. upadhyay
PDF
Presentation: Wind Speed Prediction using Radial Basis Function Neural Network
PPTX
Application of cgpann in solar irradiance
PPT
Goswami Climate Change And Indian Monsoon Cse Workshop
PPT
DisEMBL - Artificial neural network prediction of protein disorder
PDF
Rudi hartanto tutorial 01 rapid miner 5.3 decision tree
PDF
NS2 3.5 Weather Forecasting
PPT
Neural networks for the prediction and forecasting of water resources variables
PPTX
PPT
FORECASTING OF RENEWABLE ENERGY PRODUCTION BY USING GENETIC ALGORITHM (GA) FO...
PPT
Short-term Load Forecasting based on Neural network and Local Regression
PDF
Advanced Predictive Modeling with R and RapidMiner Studio 7
PPT
Neural Networks
PPT
Back propagation
PPTX
RapidMiner: Data Mining And Rapid Miner
Neural network & its applications
Artificial neural networks
Artificial neural network
Advancing Climate Prediction Science – Decadal Prediction
Artificial Neural Networks for Storm Surge Prediction in North Carolina
Nural network ER. Abhishek k. upadhyay
Presentation: Wind Speed Prediction using Radial Basis Function Neural Network
Application of cgpann in solar irradiance
Goswami Climate Change And Indian Monsoon Cse Workshop
DisEMBL - Artificial neural network prediction of protein disorder
Rudi hartanto tutorial 01 rapid miner 5.3 decision tree
NS2 3.5 Weather Forecasting
Neural networks for the prediction and forecasting of water resources variables
FORECASTING OF RENEWABLE ENERGY PRODUCTION BY USING GENETIC ALGORITHM (GA) FO...
Short-term Load Forecasting based on Neural network and Local Regression
Advanced Predictive Modeling with R and RapidMiner Studio 7
Neural Networks
Back propagation
RapidMiner: Data Mining And Rapid Miner
Ad

Similar to Stock market analysis using ga and neural network (20)

PDF
A tutorial on applying artificial neural networks and geometric brownian moti...
PPTX
Artificial Neural Network
PDF
Application of Hybrid Genetic Algorithm Using Artificial Neural Network in Da...
PPTX
GABPN genetic algorithm based back propogation networknew.pptx
PDF
Rachit Mishra_stock prediction_report
PPT
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.ppt
PDF
IRJET-Performance Enhancement in Machine Learning System using Hybrid Bee Col...
PPS
Stock Ranking - A Neural Networks Approach
PPTX
Amnestic neural network for classification
PDF
40120130405012
PDF
Diagnosis Chest Diseases Using Neural Network and Genetic Hybrid Algorithm
PDF
Heuristic design of experiments w meta gradient search
PPTX
Impact of Learning Functions on Prediction of Stock Data
PDF
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
PPTX
Feature Selection in Machine Learning
PDF
Price movement prediction in Hong Kong equity market
PDF
A COMPARATIVE STUDY OF BACKPROPAGATION ALGORITHMS IN FINANCIAL PREDICTION
PPTX
Regression and Classification: An Artificial Neural Network Approach
PDF
Hs3613611366
PDF
Hs3613611366
A tutorial on applying artificial neural networks and geometric brownian moti...
Artificial Neural Network
Application of Hybrid Genetic Algorithm Using Artificial Neural Network in Da...
GABPN genetic algorithm based back propogation networknew.pptx
Rachit Mishra_stock prediction_report
Artificial Neural Networks_Bioinsspired_Algorithms_Nov 20.ppt
IRJET-Performance Enhancement in Machine Learning System using Hybrid Bee Col...
Stock Ranking - A Neural Networks Approach
Amnestic neural network for classification
40120130405012
Diagnosis Chest Diseases Using Neural Network and Genetic Hybrid Algorithm
Heuristic design of experiments w meta gradient search
Impact of Learning Functions on Prediction of Stock Data
Prediction of Euro 50 Using Back Propagation Neural Network (BPNN) and Geneti...
Feature Selection in Machine Learning
Price movement prediction in Hong Kong equity market
A COMPARATIVE STUDY OF BACKPROPAGATION ALGORITHMS IN FINANCIAL PREDICTION
Regression and Classification: An Artificial Neural Network Approach
Hs3613611366
Hs3613611366

More from Amr Abd El Latief (12)

PPTX
master-journey.pptx
PPTX
Micro frontend
PPTX
I feel presentation [autosaved]
PPTX
Design p atterns
PPTX
AngularJs advanced Topics
PPTX
Angular js slides
PPTX
Data mining concepts and work
PPTX
Test vector compression
PPTX
Designing energy efficient lte
DOCX
Chromium os architecture report
PPTX
Marketing plane of cadbry bupply kids
PPTX
Test vector compression in Digital Testing
master-journey.pptx
Micro frontend
I feel presentation [autosaved]
Design p atterns
AngularJs advanced Topics
Angular js slides
Data mining concepts and work
Test vector compression
Designing energy efficient lte
Chromium os architecture report
Marketing plane of cadbry bupply kids
Test vector compression in Digital Testing

Recently uploaded (20)

PPTX
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
Introduction to Knowledge Engineering Part 1
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PDF
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PPTX
Computer network topology notes for revision
PPT
Quality review (1)_presentation of this 21
PPT
ISS -ESG Data flows What is ESG and HowHow
PDF
Mega Projects Data Mega Projects Data
PPTX
climate analysis of Dhaka ,Banglades.pptx
PPTX
IB Computer Science - Internal Assessment.pptx
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PDF
Foundation of Data Science unit number two notes
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PDF
annual-report-2024-2025 original latest.
PDF
Lecture1 pattern recognition............
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
.pdf is not working space design for the following data for the following dat...
Introduction to Knowledge Engineering Part 1
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
IBA_Chapter_11_Slides_Final_Accessible.pptx
Galatica Smart Energy Infrastructure Startup Pitch Deck
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
STUDY DESIGN details- Lt Col Maksud (21).pptx
Computer network topology notes for revision
Quality review (1)_presentation of this 21
ISS -ESG Data flows What is ESG and HowHow
Mega Projects Data Mega Projects Data
climate analysis of Dhaka ,Banglades.pptx
IB Computer Science - Internal Assessment.pptx
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
Foundation of Data Science unit number two notes
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
annual-report-2024-2025 original latest.
Lecture1 pattern recognition............

Stock market analysis using ga and neural network

  • 1. The forecasting of Shanghai Index trend Based on Genetic Algorithm and Back Propagation Artificial Neural Network Algorithm Presented to: Pro.Dr. : Magda B. Fayek Date:1 April 2013 By Students : Amr Abd El Latief Abd El Al Allam Sheahata Hassanien Allam Abdullah Shoukry Nagaty
  • 2. 2 Agenda  Introduction  Problem statement  Methodology  Experiment Results  Conclustion  Reference
  • 3. Introduction 3  Stock forecast, is a branch of economic forecasts, which use the accurate survey statistics and stock market information as the basis.  If we can predict the stock's ups and downs, and the stock market in a timely manner to reasonable regulation and with health guide, it will continue to develop our economy to provide a solid backing.
  • 4. Introduction(cont) 4  Existence of high yield and high-risk characteristics in the stock market.  people are continuing to explore its internal rules.  many traditional time series analysis methods.  Exponential smoothing method, ARMA (Auto Regressive Moving Average Model) .  ARCH (Auto Regressive Conditional Heteroskedasticity Model)
  • 5. Problem statement  Paper presents a BP Artificial neural network prediction modeling method for forecasting the end of Shanghai index.  Paper Uses the genetic algorithm to optimize the BP network parameters, weight and structure. 5
  • 9. Artificial Neural Network(Cont.)  error back-propagation algorithm  Its:  error-correction learning rule.  BP ANN Is Learning By Two Teqhniques: Supervised learning Unsupervised learning
  • 11. GA Steps To Optimize BP ANN:  Intialization: p , Crossover Scale – pc Crossover Probability Pm Mutation Probability WIH(ji ) Connection Weights of Hidden L. WHO(ji) Weights of Output L.
  • 12. GA Steps To Optimize BP ANN:  Coding : Real Number Coding . Initial Pobulation Takes 30
  • 13. Fitness Function . F(i) fitness value of indvidual i. . Sum(E) sum of the squares errors
  • 14. Fitness Function  i=1…..N number of chromosomes.  K= 1……4 for the number of output Layers  P=1…….5 the study sample size  T(k) Teacher Signal
  • 15. Using genetic algorithm to optimize the weights of the neural network  1) Initialize: Initialize population P, including crossover scale, Pc ,Pm and initialization for WIHij and WHOji, Paper Author use the real number coding, and the initial population take 30.  2) Select and Computing fitness: each individual evaluation function, and sort them; we can choose the network by the probability value that show in Formula; 15
  • 16. Using genetic algorithm to optimize the weights of the neural network
  • 17. Using genetic algorithm to optimize the weights of the neural network  3) crossover: Individual G i and G i+1 crossover operation with probability Pc to generate new individuals 'G i and , G i+1.  4) mutate: Individual Gj mutate by probability Pm, and then produce new individuals , Gj.  5) evaluate new pop: Put the individuals into the new population P, and calculate the new evaluation function of the individual.  6) decide satisfactory: If you find a satisfactory individual, then the end, or switch to 3).  After achieve the required performance indicators, will eventually decode the group's best individual you can get the optimized network connection weights. 17
  • 18. Genetic algorithm to optimize the BP network’s workflow 18
  • 19. Establish Forecasting Model  BP ANN :  3 Layers ANN.  parameters of Related Training  start Training  Use G A To Optimize ANN Weights  Train the Optimized ANN Again  Use the Optimized ANN To test Samples.
  • 20. BP neural Network Weights Optimization  We need to use GA for BP weights to be Optimized.  Initialize Weights Encoding and Fitness Calculations.  Choose new Generation According to Fitness.  Repeat until Getting a set of Weights to meet the Accuracy Req’s.
  • 21. Training of BP ANN (again)  Asseign the Weights and Threshold Optimized to the BP ANN.  Use training Sample To Train The BP ANN again .  Untill NN o/p and Sample o/p Tailed .  Terminate the Trainig.
  • 22. Experiment Results(Cont.)  After a series of training, eventually selected parameters are: a) Population scale: popu=30 b) Selection rate: opti=0.09 c) Crossover: arithXover d) Crossover rate: Pc=0.95 e) Mutation: nonUnifMutation f) Mutation rate: Pm=0.1 g) Genetic generations: gen=120 22
  • 23. Experiment Results(Cont.)  The training of the BP neural network after optimized Using genetic algorithm program assign the weights and threshold (W1, B1, B2 W2) that after optimized to the BP neural network.  Use the training sample, to train BP network again, each 2,000 times, until network output and sample output tallied, terminate the training.  Stock Index Forecast Using the established GA-BP neural network based stock index forecasting model to predict the stock price index Output the results of the model predicted values and target values, and draw curve, to used to verify the prediction accuracy, operability and practicability. 23
  • 25. Experiment result(Cont.)  R .. BP ANN Target Value  P .. Predicted Value  E .. Absolute Error.
  • 27. Conclusion  GA-BP algorithm used to avoid the BP algorithm into a local minimum, slow convergence problem, and also to overcome the GA in a similar form of exhaustive search for optimal solution search time caused by long, slow shortcomings, is a fast, reliable method.  Paper results shows that BP neural network using GA for the learning of rules and to optimize the network weights and weights of the network and the fixed threshold can improve the accuracy of stock index prediction model. 27
  • 28. References  [1] Shen Bing. Equity Investment Analysis [M]. Chongqing: Chongqing Publishing House, 2002: 94.  [2] Chu Yuan. Securities Investment Principles [M]. Beijing: Lixin Accounting Book Publishing ,2003:74-78.  [3] Liu Yong. China's stock market and the empirical relationship between macroeconomic variables [J]. Finance and Trade Economics, 2004 (4): 21-27.  [4] Zhang Ling Song, Tao Chongen. Stock technical analysis tool [M]. Beijing: China Encyclopedia Publishing House, 1994: 52-56 .  [5] Ma Weihua, LI Yu-hong. Stock index futures and stock market development in China [J]. Finance Teaching and Research, 2004, (5): 50-54.  [6] E.W. Saad, D. V. Prokhorov, D.C. Wunsch. Comparative Study of Stock Trend Prediction Using Time Delay, Recurrent and Probability Neural Networks. IEEE Trans on Nerual Netowrks, 1998, 9(6): 1 4561 470. 28