stock market forecasting

Download Stock Market Forecasting

If you can't read please download the document

Post on 27-Apr-2015




5 download

Embed Size (px)


Stock Market Forecasting

Stock Exchange Forecasting

Supervisor: Mr. Manish Kumar

Group Members: G. Aravind (R200503) Manam Kiran (R200515) G. Sravan Kumar (R200533)


Stock Market Forecasting

List of contents

o Candidates declaration o Certificate o Acknowledgemento o o o o

3 3 4 5 5 5 6 7 8 9 10 12 13 15 15 15 16 17

Topic Motivation Problem Definition Literature Survey Course of work

Designing of the neural network Designing of the mining system Training the system Using the system for forecasting


Snapshots of GUI

o Platform, tools, language o Challenges o Scope for future work o Referenceso

Comments of the Mid-Sem evaluation board


Stock Market Forecasting Delta of hidden layer node Delta of input layer node Delta of hidden layer node Main GUI Selecting an input file Prediction Actual vs predicted prices 11 11 12 14 14 15 15

Candidates Declaration We hereby declare that the work presented in this project entitled Stock Market Forecasting using Neural Networks submitted towards completion of mini-project in Sixth Semester of B.Tech(IT) at the IIIT-Allahabad, Amethi campus, is an authentic record of our original work carried out under the guidance of Mr. Manish Kumar, M.Tech(Computer Science), Lecturer, IIIT-Allahabad.

Place: Amethi Date:


Stock Market Forecasting

This is to certify that the above declaration made by the candidates is correct to the best of my knowledge and belief.

Mr. Manish Kumar M.Tech(Comp. Science) Place: Amethi Date: Lecturer, IIIT-Allahabad Devghat, Jhalwa, Allahabad


Stock Market Forecasting


We would like to express our sincere gratitude to our project supervisor, Mr. Manish Kumar, M.Tech(Computer Science), Lecturer, IIIT-Allahabad. We were privileged to experience a sustained enthusiasm and involved interest from his side. This fueled our interest even further and encouraged us to boldly step into what was a totally dark and unexplored expanse before us. We would also like to thank our batch-mates and friends who were ready with their inputs at all times, whether it was an offhand comment to encourage us or a constructive piece of criticism. Last but not least, we would like to thank the IIITA staff members and the institute, in general, for extending a helping hand at every juncture of need.

G. Aravind (R200503) Manam Kiran (R200515) G. Sravan Kumar (R200533)


Stock Market Forecasting

Topic: Stock exchange forecasting with the use of neural networks.

Motivation: There are numerous motivating factors for trying to predict the future stock market trends. The basic factor of motivation for us is the interest in building a system that could consistently guide us through the dynamic and ever changing stock market and support decision making with respect to investments. Such a system would be a great support for the individuals/corporations who like to take calculated risks in investing their capital. Also before the invention of computers, the stock market trends were forecasted by a set of highly qualified individuals or by pure instinct. The purpose of this project is to automate the process of forecasting. Neural networks have been chosen to model the stock market because of their ability to learn the non-linear mappings between inputs and outputs. The stock market is considered to be highly chaotic model, which cannot be understood by the human mind, and thus cant be easily expressed. However, with the neural networks ability to learn chaotic and nonlinear systems, it is possible to solve many more problems which could not be solved by simple traditional analysis or current computer methodologies. In addition to financial market predictions, neural networks have been already put to use by many organizations for handling different financial tasks [1]. Some banks use neural networks to scan credit and loan applications to predict bankruptcy probabilities. Though the neural networks were primarily used as a tool in the financial domain, many improvements, with respect to the design issues and the training of neural networks have been achieved during research and the implementation.

Problem Definition: Our aim is to implement stock market forecasting using neural networks, with multi-layer back-propagation, for the stock market data as a time series. The objective of the implementation is to forecast the future trends of the stocks, on the base of the previous or past prices. The implementation is planned to be done using JAVA.


Stock Market Forecasting Literature Survey: From the beginning of mankind, man has always been trying to make his life easy. The computers were also invented for making calculations easier and possibly automate them. It is also a common notion that wealth gives luxury and makes life easier. There have been many attempts, both partly successful and unsuccessful, to forecast the future trends of the stock markets. Y. Yoon, et al. [3], proposed a system for stock market prediction using neural networks. The inputs used were the phrases extracted out of the Presidents (of the organization) report to its shareholders. The system based its predictions on the types and frequencies of the phrases occurring in the presidents report. Kamijo, et al. [4], developed a neural network that trained on price chart information. They used a recurrent network model for forecasting. G. Tsibouris, et al. [5] developed a simple system that used only the past stock prices to forecast the future stock prices. K. Bergerson, et al. [6], proposed a system that was trained on human designed chart information. This reduced the learning time as the input had knowledge about the patterns already known. This system used hybrid architecture, combining neural networks with expert systems. The neural networks were used to predict the future trends and the expert system contained knowledge base of rules that validated the output of the network. If the output violated any of the expert systems rules, the output was simply rejected. This hybrid architecture showed great promise as it combined the nonlinear prediction of neural networks and the rule based knowledge of expert systems. Kimoto, et al. [7], designed a network that was to predict the Tokyo stocks. They used daily data (prices) for training the network for about 33 months. They proposed a variation of back-propagation for the system, called supplementary learning. The weights in the network were updated based on the sum of all errors for all the patterns. During training they used moving simulation, where prediction is done while moving the target learning and prediction periods [1]. They used a modular network consisting of 4 backpropagation neural networks, trained on different data sets. Wilson [8], used a combination of technical, adaptive (based on limited support functions), and statistical indicators as inputs, for his self-organizing system. It was designed to construct a nonlinear and chaotic model of the stock market based on the volume and price data. The system itself extracted the features from the data, and classified them. He used two self organizing systems in tandem, one for feature extraction and the other for pattern classification.


Stock Market Forecasting Ajith Abraham, et al. [9], used soft computing techniques and connectionist paradigms for modeling chaotic behavior of the stock markets. They experimented with the system on the data of NASDAQ stock market and NIFTY stock exchange. They used four different methods to model the markets and compared the results from each of them. Chan Man-Chung, et al. [10], proposed a variation of learning algorithm, the conjugate gradient learning algorithm with a restart procedure.

Course of work: The implementation is based on the algorithm suggested in the paper by Defu Zhang, et al [2]. The paper deals with financial data mining using multi-layer back propagation, a neural network technique commonly used for time series forecasting. Though the paper does not prescribe any suggested method for back propagation but have given the type of inputs to be taken like learning rate is given to be 0,5 and weights are first adjusted to range from -0.5 to 0.5. The implemented algorithm though deviates in three ways:1) Paper predicts next 30days values based on last few years trend but the training takes

about 3-4 days so we assumed that tomorrows value is depended on last 30 days data, which reduces the time taken to train the network.2) Error function used is mean square error which is not very accurate in our case as we

predict only one value, hence we used a non linear function to transfer out put by using sigmoid function and then error is calculated.3) Since we are using sigmoid function we mapped the input data to range of 0 to 0.5 and

then later the results are remapped which increases the error by the mapping function but is accurate enough if input values are in not too big.

The implementation is divided into four phases: Designing the neural network Designing the mining system for forecasting Training the network with past data Using the network for forecasting the future trends of the stock based on the present and past data8

Stock Market Forecasting

Designing the neural network: The neural network architecture has to be decided upon before going on with the designing of the mining system for forecasting. Feed-forward networks are the most widely used architecture as they provide good generalization capabilities and are readily implementable. So, a feed-forward network with three layers is chosen as the architecture to model the forecasting task. The parameters defining the architecture


View more >