Professional Documents
Culture Documents
Financial Trends Prediction Using The Back Propagation Neural Network and YQL
Financial Trends Prediction Using The Back Propagation Neural Network and YQL
20
International Journal of Computer Applications (0975 – 8887)
Volume 144 – No.10, June 2016
YQL API 2.2.1Prepare two arrays, one is for input and hidden unit and
the second is for output unit.
𝑥𝑗 = 𝑦𝑖 𝑊𝑖𝑗
Data Normalization
𝑖=0
Data Normalization: The received data is in different scales of In Error Fluctuations computation connection into output
commerce. Therefore its necessary to scale in a similar scale for unit is required:
better understanding about the hidden patterns of the 𝜕𝐸 𝜕𝐸 𝜕𝑋𝑗
participating attributes. In the proposed system the data is 𝐸𝑊𝑖𝑗 = = = = 𝐸𝐼𝑗 𝑦𝑖
normalized for scaling the attribute values between 0-1. 𝜕𝑊𝑖𝑗 𝜕𝑋𝑗 𝜕𝑊𝑖𝑗
Therefore the following formula is used for normalization
Overall Influence of the error:
process.
𝑣 − 𝑚𝑖𝑛 𝜕𝐸 𝜕𝐸 𝜕𝑥𝑗
𝑣′ = 𝐸𝐴𝑖 = = 𝑋 = 𝐸𝐼𝑗 𝑊𝑖𝑗
𝑚𝑎𝑥 − 𝑚𝑖𝑛 𝜕𝑦𝑖 𝜕𝑥𝑗 𝜕𝑦𝑖
𝑗 𝑗
Where 𝑣 ′ is the new scaled value between 0- 1 Trained Model: After learning with the specified financial data
V= the actual dataset value set the back propagation neural network turn out to be trained
and now this system can be used for forecasting the upcoming
Min = the minimum value that contains by a given attributes financial trends.
Max = the maximum value in the defined attribute
21
International Journal of Computer Applications (0975 – 8887)
Volume 144 – No.10, June 2016
Accuracy %
forecasting the performance of classifier is cross validated to
find the forecast precision. The obtained results of the 60
classifier’s performance are stock up in database for upcoming
results analysis. Therefore in this pace four parameters are 40
computed namely accuracy, error rate, memory used and the
time consumption of the system. 20
Predicted values: These values are new values that are
forecasted by the trained data model, and are the final outcome 0
of the proposed system.
10 50 100 300 700 1000 2000
3. PROPOSED ALGORITHM Dataset Size
The proposed system of forecasting the stock market price can
Proposed technique
be summarized using the suitable steps for understanding. The
table 1 shows the summarize algorithm for the proposed Traditional Technique
concept.
Table 1. Proposed Algorithm Fig 2: Accuracy Performance
Input: Dataset D, learning cycle 𝑒𝑝𝑜𝑐ℎ, Recent pattern 𝑅𝑝 In above figure 2shows the comparison of the proposed and
base system. X-axis obtain amount of data files and Y-axis
Output: predicted value P shows accuracy in terms of percentage. Additionally to
represent the performance of both the implemented classifiers
Process:
are reported thus the blue line shows the performance of
1. 𝑅𝑑 = 𝑅𝑒𝑎𝑑𝐷𝑎𝑡𝑎𝑠𝑒𝑡(𝐷) classical approach and the red line shows the performance of
the proposed approach. By obtaining performance of the graph
2. 𝑟𝑜𝑤, 𝑐𝑜𝑙 = 𝑛𝑜𝑟𝑚𝑎𝑙𝑖𝑧𝑒𝐷𝑎𝑡𝑎(𝑅𝑑 ) proposed system gives high accuracy and precise data
𝑒 𝑥 −𝑒 −𝑥
efficiently while base method less accurate for the final results.
3. 𝐴𝑐𝑡𝑖𝑣𝑎𝑡𝑖𝑜𝑛 =
𝑒 𝑥 +𝑒 −𝑥 Table 2. Accuracy Performance
4. 𝑇𝑚𝑜𝑑𝑒𝑙 = 𝐵𝑃𝑁. 𝑇𝑟𝑎𝑖𝑛(𝑅𝑑 , 𝐴𝑐𝑡𝑖𝑣𝑎𝑡𝑖𝑜𝑛, 𝑒𝑝𝑜𝑐ℎ)
Dataset Size Proposed Base method
5. 𝑃 = 𝐵𝑃𝑁. 𝑃𝑟𝑒𝑑𝑖𝑐𝑡(𝑇𝑚𝑜𝑑𝑒𝑙 , 𝑅𝑝 ) Method
6. 𝑅𝑒𝑡𝑢𝑟𝑛 𝑃
10 85.63 65.37
50 87.51 70.77
4. RESULT ANALYSIS
The given chapter provides the results expansion and the
100 88.65 75.16
performance analysis of the proposed and base algorithm.
Therefore to compare the performance essential performance
factors are evaluated and their results are reported. 300 90.13 80.38
22
International Journal of Computer Applications (0975 – 8887)
Volume 144 – No.10, June 2016
𝐸𝑟𝑟𝑜𝑟 𝑅𝑎𝑡𝑒 to the given results the proposed technique consume less time
𝑇𝑜𝑡𝑎𝑙 𝐼𝑛𝑐𝑜𝑟𝑟𝑒𝑐𝑡𝑙𝑦 𝐶𝑙𝑎𝑠𝑠𝑖𝑓𝑖𝑒𝑑 𝑝𝑎𝑡𝑡𝑒𝑟𝑛 for training of input of stock market as compared to the base
= 𝑋100 method. Therefore the proposed system is less time consuming
𝑇𝑜𝑡𝑎𝑙 𝑃𝑎𝑡𝑡𝑒𝑟𝑛 𝑡𝑜 𝑐𝑙𝑎𝑠𝑠𝑖𝑓𝑦 for prediction of the data patterns.
40 100
35 90
30 80
70
Time in ms
25
Error Rate
60
20 50
15 40
30
10
20
5
10
0 0
10 50 100 300 700 1000 2000 10 50 100 300 700 1000 3000
Learning Dataset Size Amount of Dataset
Base Proposed
Proposed Method Base Method
23
International Journal of Computer Applications (0975 – 8887)
Volume 144 – No.10, June 2016
work made for designing of the proposed system. In addition of the proposed technique is an offline prediction technique,
that the future extension of the proposed work is also provided. therefore in near future the following modification proposed to
incorporate with the proposed technique.
5.1 Conclusion
The data mining and machine learning practice are used in a 5.2.1 Stock market depends on diverse real world factors also
number of purposes for automatic data analysis and recovery of therefore in near future the different real world factors are
essential patterns. These patterns are used to approximate the also suggested to include for getting better predictive
future trends of the business and other functional area of accuracy of the system.
purposes. The data mining practice supports the analysis of both
kinds’ i.e. supervised and unsupervised learning techniques. 5.2.2 Stock market also varies with the news and their impact
The key advantage to employ the supervised learning on the active economy therefore that is must to include
approaches for the predictive data analysis is their accuracy as the opinion mining concepts for enhancing the prediction
compared to unsupervised learning approaches. In the proposed of the existing system.
work the supervised learning technique is employed and the
small modification is performed for improving the existing 6. REFERENCES
classifiers performance. Additionally their functional area is [1] Choudhary, Rohit&Garg, Kumkum, “A Hybrid Machine
reported in stock market price forecasting application. Learning System for Stock Market Forecasting”, World
Academy of Science, Engineering and Technology, Vol.
The proposed system involves the artificial neural network 39, PP. 315-318, 2008
technique for pattern learning of stock market trends. Therefore
a considerable amount of learning data is required to perform [2] Han, Ingoo& Kim, Kyoung-jae, “Genetic algorithms
learning of the proposed classifier. To train the historical Approach to feature Discretization in artificial neural
patterns of the proposed classifier the YQL (yahoo query networks for the prediction of stock price index”, Expert
language) for financial data base is used. This is basically the Systems with Applications, Vol. 10, No. 5, PP. 120-122.,
yahoo based API (application programming interface) for 2000.
finding the historical records of the stock exchange. This data is [3] Mahesh S. Khadka, K. M. George, N. Park and J. B. Kim,
further pre-processed and the requisite patterns are stock up on “Performance Analysis of Hybrid Forecasting Model in
the local data base. Further the proposed neural network is Stock Market Forecasting”, International Journal of
applied for training. In the proposed neural network system two Managing Information Technology (IJMIT), Vol.4, No.3,
main modifications are projected first change in the activation August 2012.
function and secondly the use of normalized data to scale up the
training values into a predefined range. Through which the [4] ZabirHaider Khan, TasnimSharminAlin, Md.
learning capability of the learning algorithm is enhanced. AkterHussain, “Price Prediction of Share Market using
Artificial Neural Network (ANN)”, International Journal
The implementation of the proposed system is performed using of Computer Applications (0975 – 8887) Volume 22–
the JAVA technology and with the help of YQL API. After No.2, May 2011
implementation of the proposed technique a traditional back
propagation algorithm is also implemented to compare the [5] KainazBomiSheriwala, “Data Mining Techniques in Stock
performance with the proposed modified system. The Market”, INDIAN JOURNAL OF APPLIED RESEARCH,
comparative analysis of both the implemented classifiers is Volume 4, August 2014.
performed with the help of accuracy, error rate, time
[6] S. L. Pandhripande and Aasheesh Dixit, “Prediction of 2
consumption and space complexity. The obtained performance
Scrip Listed in NSE using Artificial Neural Network”,
summary of the both the techniques are demonstrated below
International Journal of Computer Applications (IJCA),
using table 2:
Volume 134, No.2, January 2016.
Table 4. Performance Summary [7] Data Mining - Classification & Prediction, available online:
S. Parameters Proposed Traditional http://www.tutorialspoint.com/data_mining/dm_classificati
No. on_prediction.htm, [accessed 27 April 2016].
24
International Journal of Computer Applications (0975 – 8887)
Volume 144 – No.10, June 2016
available online: [21] Forecasting of Indian Stock Market Index Using Artificial
https://arxiv.org/ftp/arxiv/papers/1311/1311.4771.pdf. Neural Network, [Online],
http://nseindia.com/content/research/proposal_206.pdf,
[13] Haiqin Yang, Laiwan Chan, and Irwin King, “Support [accessed: 19 April 2016].
Vector Machine Regression for Volatile Stock Market
Prediction”, Intelligent Data Engineering and Automated [22] ZabirHaider Khan, TasnimSharminAlin, and Md.
Learning IDEAL, PP. 391- 396, Springer-Verlag Berlin AkterHussain, “Share Market Price Prediction Using
Heidelberg 2002 Artificial Neural Network (ANN)”.
[14] Investopedia US, A Division of Value Click, Inc., [23] ArkaGhosh, “Comparative study of Financial Time Series
“Investopedia” "http://www.investopedia.com Prediction By Artificial Neural Network with Gradient
/articles/05/032905.asp",05 March 2013. Descent Learning”.
[15] Mrs. Keerti. S. Mahajan 1 & R. V. Kulkarni, “A REVIEW: [24] Kyoung-jae Kim, “Artificial neural networks with
APPLICATION OF DATAMINING TOOLS FOR evolutionary instance selection for financial forecasting”,
STOCK MARKET”, International Journal Computer Expert Systems with Applications, PP. 519 – 526, 2006.
Technology & Applications, Volume 4, PP. 19-27, 2013.
[25] ShwetaTiwari, RekhaPandit and VineetRichhariya,
[16] TIM BERRY, “What Is a Market Forecast, available “Predicting future trends in stock market by decision tree
online: http://articles.bplans.com/what-is-a-market- rough-set based hybrid system with HHMM”, International
forecast/, [accessed on 27 April 2016]. Journal of Electronics and Computer Science Engineering ,
PP. 1578 – 1587, 2012.
[17] Selvan Simon and ArunRaoot, “ACCURACY DRIVEN
ARTIFICIAL NEURAL NETWORKS IN STOCK [26] Selvan Simon and ArunRaoot, “ACCURACY DRIVEN
MARKET PREDICTION”, International Journal on Soft ARTIFICIAL NEURAL NETWORKS IN STOCK
Computing (IJSC), Vol.3, No.2, May 2012. MARKET PREDICTION”, International Journal on Soft
Computing (IJSC), Volume3, No.2, May 2012.
[18] D. VenugopalSetty, T.M.Rangaswamy and
K.N.Subramanya, “A Review on Data Mining [27] Mr. Amit B. Suthar, Ms. Hiral R. Patel, and Dr. Satyen M.
Applications to the Performance of Stock Marketing”, Parikh, “A Comparative Study on Financial Stock Market
international Journal of Computer Applications (IJCA), Prediction Models”, the International Journal of
Volume 1, No. 3, PP. 24-34, 2010. Engineering and Science (IJES), Volume 1 PP. 188-191,
2012
[19] ShradhaTulankar , Dr Rahul Athale and SandeepBhujbal,
“Sentiment Analysis of Equities using Data Mining [28] Sam Mahfoud and Ganesh Mani, “FINANCIAL
Techniques and Visualizing the Trends”, IJCSI FORECASTING USING GENETIC ALGORITHMS”,
International Journal of Computer Science Issues, Vol. 10, Applied Artificial Intelligence, PP. 543 - 565, 1996.
No 2, July 2013.
[29] Wanjawa, Barack Wamkaya, Muchemi and Lawrence,
[20] AkinwaleAdio T, Arogundade O.T. and Adekoya Adebayo “ANN Model to Predict Stock Prices at Stock Exchange
F., “TRANSLATED NIGERIA STOCK MARKET Markets”, available online:
PRICES USING ARTIFICIAL NEURAL NETWORK https://arxiv.org/ftp/arxiv/papers/1502/1502.06434.pdf
FOR EFFECTIVE PREDICTION”, Journal of Theoretical [accessed 28 April 2016]..
and Applied Information Technology, PP. 36-43.
IJCATM : www.ijcaonline.org
25