Training Neural Network with Genetic Algorithm for Stock Prediction

advertisement
Training Neural Network with
Genetic Algorithm for Stock
Prediction
Student : Dah-Sheng Lee
Professor: Hahn-Ming Lee
Date:11 October 2003
1
Outline




Original Network Architecture (1992)
Modified Neural Network 1 (1997)
Modified Neural Network 2 (2000)
Reference
2
Original Network Architecture


The Neural Network has 2 hidden layer, 15
input unit and 1 output unit (15 - ? - ? - 1)
input unit :
3
Original Network Architecture(cont…)

Output unit : a number between 0 to 1
4
Original Network Architecture(cont…)

Learning
Algorithm:
5
Modified Neural Network 1 (1997)

The Neural Network has 1 hidden layer, 5 input
unit and 1 output unit (5 - 6 - 1)
Share comprehension index in shanghais share
Exchange from 3/28/1994 to 8/1/1994
Input unit :


1.
2.
3.
4.
5.
Industry Share(IS)
Commerce Share(CS)
Real Estate Share(RES)
Utility Share(US)
Comprehensive Share(CS)
6
Modified Neural Network 1 (1997)(cont…)

Output unit: Share Price Index

Learning Algorithm
wi  L * (VS  127) / 127  w jo




Wi - the value of No I Node ,
L - the width of weigh space, initial data is 20
Wjo - the media value of the No I node space, initial data is 0
VS - the value of the 8-bytes binary string,
7
Modified Neural Network 1 (1997)(cont…)

Fitness function:
F = 1/(1+SE)
SE   (Yi  Di )






2
SE – the square sum of error
Yi – the output of NN
Di – the expect output of NN
Single-point break cross
Cross probability is 0.8
Mutation probability is 0.02
8
Modified Neural Network 1 (1997)(cont…)
W11
W
 21
A  W31

W41
W51

W12
W22
W32
W42
W52
...
...
...
...
...
W16 
W26 
W36 

W46 
W56 
The input data is matrix B,
Let matrix C  B  A 
B  ( X 1... X 5 )
'
'
( X 1... X 6 )
X i   wij * X i
9
Modified Neural Network 1 (1997)(cont…)
1... X 6 )  ( X 1 ... X 6 )
D

F
(
X
Let matrix
'
'
''
''
 16W
 W
 26 
 36W
 E
 46W
 56W
 
 66W
Let Y '  D  E 
''
w
x
 jk
Output is Y  F (Y )
'
10
Modified Neural Network 1 (1997)(cont…)

Simulation Result
11
Modified Neural Network 2 (2000)

The Neural Network has 1 hidden layer, 8 input
unit and 2 output unit (8 - 15 - 2)
Tokyo Stock Exchange Price Indexes (TOPIX)
from 11/1995 to 10/1997
Input unit :


1.
2.
3.
4.
5.
6.
Changes of TOPIX
PBR
Changes of the turnover by foreign traders
Changes of the currency rate (Yen - Dollar)
Changes of the turnover Tokyo Stock Market
etc.
12
Modified Neural Network 2 (2000)(cont…)

Output unit: highest and lowest value of TOPIX till 4
weeks in the future
13
Modified Neural Network 2 (2000)(cont…)

Learning Algorithm
14
Modified Neural Network 2 (2000)(cont…)

Simulation Result
Utilize the above chromosome for the dealings of TOPIX
during the period from November 1996 to October 1997.
In this period, TOPIX changed from 1556 yen to 1360 yen.
This means that we would have lost about 13% of our
investments if we had not executed dealings. However, we
have succeeded in keeping our investments by following
the dealing rule obtained by Gas. (The total amount of
money has been changed as follows: 10.00 billion yen ->
10.41 billion yen.)
15
Reference



[1] “An intelligent forecasting system of stock price using neural networks” Baba,
N.; Kozaki, M.;
Neural Networks, 1992. IJCNN., International Joint Conference on , Volume: 1 , 7-11
June 1992
Page(s): 371 -377 vol.1
[2] “Training neural network with genetic algorithms for forecasting the stock price
index”
Fu Kai; Xu Wenhua; Intelligent Processing Systems, 1997. ICIPS '97. 1997 IEEE
International Conference on , Volume: 1 , 28-31 Oct. 1997
Page(s): 401 -403 vol.1
[3] “Utilization of neural networks and GAs for constructing reliable decision
support systems to deal stocks” Baba, N.; Inoue, N.; Asakawa, H.;
Neural Networks, 2000. IJCNN 2000, Proceedings of the IEEE-INNS-ENNS
International Joint Conference on , Volume: 5 , 24-27 July 2000
Page(s): 111 -116 vol.5
16
Download