SlideShare a Scribd company logo
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 05 Issue: 11 | Nov 2018 www.irjet.net p-ISSN: 2395-0072
© 2018, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1151
Analysis of Various Machine Learning algorithms for Stock Value
Prediction
Abhit Sudhakar Sawwalakhe1, Sukhada Shrirang Kulkarni2
1,2Student, Department of CSE, Government College of Engineering Amravati, Maharashtra India
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - Accuracy plays an important role in stock
market prediction. Although many algorithms are available
for this purpose, selecting the most accurate one continues to
be the fundamental task in getting the best results. In order to
achieve this, in this paper we have comparedandanalyzed the
performance of various available algorithms such as Linear
regression, SVM, kNN, etc. This involves training the
algorithms, executing them, getting the results, comparing
various performance parameters of these algorithms and
finally obtaining the most accurate one.
Key Words: Machine learning, Stock Market prediction
1. INTRODUCTION
We are always intrigued by any work which will provide us
opportunity to peeks in the future and if there is some kind
of financial benefit involved in this prediction then it
becomes lot more exciting. Stock market is one of the
examples of such an opportunity of gaining money by
investing in the right stock so as to reap maximum benefit.
However, it is kind of a gamble aswehumanscannotprocess
such large data of stocks and predict the future of one
particular stock. Hence many researchers have worked in
this field in an attempt to guess the price of stock using
various methods. Stock market prediction is the task aimed
at guessing the future value of a company's stock. The
successful prediction will maximize the benefit of the
customer. In this paper we have discussed various
algorithms to predict the same.
In this paper we used stock data of five companies from the
Huge Stock market dataset consisting of data ranging from
2011 to 2017 to train different machine learningalgorithms.
Hence we compared the accuracy of different machine
learning algorithms.
2. RELATED WORK
There is a wide variety of machine learning algorithms used
for stock prediction. In [1] Logistic regression model is used
to predict stock market. In [2] it has beenillustratedthathow
linear regression outperforms polynomial regression due to
over fitting problem of former one in some cases. In [3], the
efficiency of SVM as powerful predictive tool has been
discussed. In [4], decision tree algorithm has beenusedtofor
the prediction. In [5], kNN has been stated as stable and
robust and the prediction were similar to actual value.
3. STOCK VALUE DATASET
The Stock Market dataset [6] has stock value of various
companies over decades. Each company stock has five
attributes listed .They are Date, Open, High, Low, Close,
Volume, OpenInt which are further described in the table 1.
We have selected five companies namely IBM(IBM), Coca-
Cola Co (KO), American Airlines Group Inc (AAL) , American
Water Works Company Inc (AWK) , Walmart Inc (WMT) to
apply various machine learning algorithms.
Table -1: Sample Table format
Sr. No Attribute Description
1 Date Date of the stock value
2 High Highest point of the price of a stock
at the exchange
3 Low Lowest point of the price of a stock
at the exchange
4 Open Opening price of a stock at the
exchange
5 Close Closing price of a stock at the
exchange
6 Volume Volume of stock is average of total
traded stocks at the exchange over a
period of time.
4. Performance analysis of algorithms
In this research paper we compared machine learning
algorithms using stock market dataset. We performed
experimentswithvariousalgorithmsonstockmarketdataset
and observed the mean square error to predict accuracy
using four algorithms namely Linear regression, Logistic
regression, k-Nearest neighbor, and Decision tree. We used
Python libraries such as pandas, numpy to load the dataset
and to perform mathematical calculations respectively and
we used sklearn to model different machine learning
algorithms. We used 0.20 of our whole dataset to test our
model. We calculated mean square values for each of five
companies using each algorithm which is illustrated in table
2. From table 2, we can conclude that SVM, Decision tree and
kNN have better accuracies. We have plotted three of five
best performing algorithms’ mean square error for each
company to compare performance of each algorithm. SVM,
kNN and Decision tree yielded best result. The result can
further be enhanced by processing data properlyasthereare
large fluctuations in stock market.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 05 Issue: 11 | Nov 2018 www.irjet.net p-ISSN: 2395-0072
© 2018, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1152
Table -2: Mean Square Error of different companies for
different algorithms
Fig -1: American Airlines Group Inc (AAL)
Fig -2: American Water (AWK)
Fig -3: International Business Machines Corporation (IBM)
Fig -4: The Coca-Cola Co. (KO)
Fig -5: Walmart Inc (WMT)
Algorithms IBM KO AAL AWK WMT
Linear
Regression
222.24 2.30 45.9 33.87 84.419
Logistic
Regression
409.04 127.71 146.01 862.94 1141.73
k-Near
Neighbors
5.84 0.248 2.07 0.489 0.522
Decision
Tree
5.98 0.248 2.07 0.49 0.54
Support
Vector
Machine
13.45 0.398 7.50 1.243 1.890
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 05 Issue: 11 | Nov 2018 www.irjet.net p-ISSN: 2395-0072
© 2018, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1153
3. CONCLUSION
Support Vector Machine (SVM), DecisionTreeandk-Nearest
Neighbor (kNN) give the most accurate predictions while
Linear regression and Logistic regression cannotbeusedfor
prediction as they have shown prediction values very far
from actual values for most of the data. We can infer that k-
Nearest Neighbor and Decision Tree are most precise
algorithms to predict the stock market value.
REFERENCES
1) Jibing Gong, B. Gawali, Shengtao Sun, “A New
Approach of Stock Price Trend Prediction Based on
Logistic Regression Model,” New Trends in
Information and Service Science, 2009. NISS '09.
2) Lucan Nunno, “Stock Market Price Prediction Using
Linear and Polynomial Regression Models,”
3) Z. Hu, J. Zhu and K. Tse, "Stocks market prediction
using Support Vector Machine," 2013 6th
International Conference on Information
Management, Innovation Management and
Industrial Engineering, Xi'an, 2013, pp. 115-118.
4) Use Decision Trees in Machine Learning to Predict
Stock Movements
5) Khalid Alkhatib, Hassan Najadat, Ismail Hmeidi,
Mohammed K. Ali Shatnawi “Stock Price Prediction
Using K-Nearest Neighbor (kNN) Algorithm”,
International Journal of Business, Humanities and
Technology Vol. 3 No. 3; March 2013
6) https://www.kaggle.com/borismarjanovic/price-
volume-data-for-all-us-stocks-etfs

More Related Content

PPT
Six Sigma Mechanical Tolerance Analysis 1
PDF
IRJET- Solving Supply Chain Network Design Problem using Center of Gravit...
PDF
Modeling of multiversion concurrency control
PPTX
Flight Delay Prediction Model (2)
DOCX
Job shop scheduling problem using genetic algorithm
PDF
IRJET- Supply Chain Network Design for Plant Location and Selection of Capaci...
PDF
IRJET- Distribution Selection for Pump Manufacturing Companies
PDF
IRJET- Different Data Mining Techniques for Weather Prediction
Six Sigma Mechanical Tolerance Analysis 1
IRJET- Solving Supply Chain Network Design Problem using Center of Gravit...
Modeling of multiversion concurrency control
Flight Delay Prediction Model (2)
Job shop scheduling problem using genetic algorithm
IRJET- Supply Chain Network Design for Plant Location and Selection of Capaci...
IRJET- Distribution Selection for Pump Manufacturing Companies
IRJET- Different Data Mining Techniques for Weather Prediction

What's hot (14)

PDF
Novel Heuristics for no-Wait Two Stage Multiprocessor Flow Shop with Probable...
PPTX
Supplier Selection : Gray Relational Analysis
PDF
Conference_Paper
PDF
IRJET- Particle Swarm Intelligence based Dynamics Economic Dispatch with Dail...
PDF
ON Fuzzy Linear Programming Technique Application
PPTX
Ahp model
PPSX
Psat toolbox-8631349
PDF
Planning and Scheduling of a Corrugated Cardboard Manufacturing Process in IoT
PPTX
Siad el quliti economic scheduling the construction of electric transmission
PDF
Size measurement and estimation
PDF
Shape functions
PDF
A Simulation Based Approach for Studying the Effect of Buffers on the Perform...
PDF
14.05.12 Analysis and Prediction of Flight Prices using Historical Pricing Da...
Novel Heuristics for no-Wait Two Stage Multiprocessor Flow Shop with Probable...
Supplier Selection : Gray Relational Analysis
Conference_Paper
IRJET- Particle Swarm Intelligence based Dynamics Economic Dispatch with Dail...
ON Fuzzy Linear Programming Technique Application
Ahp model
Psat toolbox-8631349
Planning and Scheduling of a Corrugated Cardboard Manufacturing Process in IoT
Siad el quliti economic scheduling the construction of electric transmission
Size measurement and estimation
Shape functions
A Simulation Based Approach for Studying the Effect of Buffers on the Perform...
14.05.12 Analysis and Prediction of Flight Prices using Historical Pricing Da...
Ad

Similar to IRJET- Analysis of Various Machine Learning Algorithms for Stock Value Prediction (20)

PDF
Survey Paper on Stock Prediction Using Machine Learning Algorithms
PDF
Performance Comparisons among Machine Learning Algorithms based on the Stock ...
PDF
STOCK PRICE PREDICTION USING ML TECHNIQUES
PDF
IRJET- Stock Market Prediction using Machine Learning
PDF
IRJET- Stock Market Forecasting Techniques: A Survey
PDF
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUES
PDF
IRJET - Stock Market Prediction using Machine Learning Algorithm
PDF
Stock Market Prediction Analysis
PDF
Visualizing and Forecasting Stocks Using Machine Learning
PDF
STOCK MARKET PREDICTION USING MACHINE LEARNING IN PYTHON
PDF
ACCESS.2020.3015966.pdf
PDF
Predicting Stock Market Price Using Support Vector Regression
PPTX
Stock prediction1600759770283_ak.ppt.pptx
PDF
Stock Market Prediction using Machine Learning
PPTX
BATCH 1 FIRST REVIEW-1.pptx
PDF
IRJET- Data Visualization and Stock Market and Prediction
PDF
Stock Price Prediction Using Sentiment Analysis and Historic Data of Stock
PDF
Stock Market Prediction using Machine Learning
PDF
IRJET- Future Stock Price Prediction using LSTM Machine Learning Algorithm
PPTX
updated stock market ppt.pptx stock market presentation
Survey Paper on Stock Prediction Using Machine Learning Algorithms
Performance Comparisons among Machine Learning Algorithms based on the Stock ...
STOCK PRICE PREDICTION USING ML TECHNIQUES
IRJET- Stock Market Prediction using Machine Learning
IRJET- Stock Market Forecasting Techniques: A Survey
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUES
IRJET - Stock Market Prediction using Machine Learning Algorithm
Stock Market Prediction Analysis
Visualizing and Forecasting Stocks Using Machine Learning
STOCK MARKET PREDICTION USING MACHINE LEARNING IN PYTHON
ACCESS.2020.3015966.pdf
Predicting Stock Market Price Using Support Vector Regression
Stock prediction1600759770283_ak.ppt.pptx
Stock Market Prediction using Machine Learning
BATCH 1 FIRST REVIEW-1.pptx
IRJET- Data Visualization and Stock Market and Prediction
Stock Price Prediction Using Sentiment Analysis and Historic Data of Stock
Stock Market Prediction using Machine Learning
IRJET- Future Stock Price Prediction using LSTM Machine Learning Algorithm
updated stock market ppt.pptx stock market presentation
Ad

More from IRJET Journal (20)

PDF
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
PDF
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
PDF
Kiona – A Smart Society Automation Project
PDF
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
PDF
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
PDF
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
PDF
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
PDF
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
PDF
BRAIN TUMOUR DETECTION AND CLASSIFICATION
PDF
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
PDF
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
PDF
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
PDF
Breast Cancer Detection using Computer Vision
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
Kiona – A Smart Society Automation Project
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
BRAIN TUMOUR DETECTION AND CLASSIFICATION
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
Breast Cancer Detection using Computer Vision
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...

Recently uploaded (20)

PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Welding lecture in detail for understanding
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
web development for engineering and engineering
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT
Project quality management in manufacturing
PDF
Well-logging-methods_new................
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
CYBER-CRIMES AND SECURITY A guide to understanding
Embodied AI: Ushering in the Next Era of Intelligent Systems
Welding lecture in detail for understanding
Automation-in-Manufacturing-Chapter-Introduction.pdf
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
web development for engineering and engineering
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
UNIT 4 Total Quality Management .pptx
Sustainable Sites - Green Building Construction
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Project quality management in manufacturing
Well-logging-methods_new................
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Internet of Things (IOT) - A guide to understanding
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx

IRJET- Analysis of Various Machine Learning Algorithms for Stock Value Prediction

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 05 Issue: 11 | Nov 2018 www.irjet.net p-ISSN: 2395-0072 © 2018, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1151 Analysis of Various Machine Learning algorithms for Stock Value Prediction Abhit Sudhakar Sawwalakhe1, Sukhada Shrirang Kulkarni2 1,2Student, Department of CSE, Government College of Engineering Amravati, Maharashtra India ---------------------------------------------------------------------***--------------------------------------------------------------------- Abstract - Accuracy plays an important role in stock market prediction. Although many algorithms are available for this purpose, selecting the most accurate one continues to be the fundamental task in getting the best results. In order to achieve this, in this paper we have comparedandanalyzed the performance of various available algorithms such as Linear regression, SVM, kNN, etc. This involves training the algorithms, executing them, getting the results, comparing various performance parameters of these algorithms and finally obtaining the most accurate one. Key Words: Machine learning, Stock Market prediction 1. INTRODUCTION We are always intrigued by any work which will provide us opportunity to peeks in the future and if there is some kind of financial benefit involved in this prediction then it becomes lot more exciting. Stock market is one of the examples of such an opportunity of gaining money by investing in the right stock so as to reap maximum benefit. However, it is kind of a gamble aswehumanscannotprocess such large data of stocks and predict the future of one particular stock. Hence many researchers have worked in this field in an attempt to guess the price of stock using various methods. Stock market prediction is the task aimed at guessing the future value of a company's stock. The successful prediction will maximize the benefit of the customer. In this paper we have discussed various algorithms to predict the same. In this paper we used stock data of five companies from the Huge Stock market dataset consisting of data ranging from 2011 to 2017 to train different machine learningalgorithms. Hence we compared the accuracy of different machine learning algorithms. 2. RELATED WORK There is a wide variety of machine learning algorithms used for stock prediction. In [1] Logistic regression model is used to predict stock market. In [2] it has beenillustratedthathow linear regression outperforms polynomial regression due to over fitting problem of former one in some cases. In [3], the efficiency of SVM as powerful predictive tool has been discussed. In [4], decision tree algorithm has beenusedtofor the prediction. In [5], kNN has been stated as stable and robust and the prediction were similar to actual value. 3. STOCK VALUE DATASET The Stock Market dataset [6] has stock value of various companies over decades. Each company stock has five attributes listed .They are Date, Open, High, Low, Close, Volume, OpenInt which are further described in the table 1. We have selected five companies namely IBM(IBM), Coca- Cola Co (KO), American Airlines Group Inc (AAL) , American Water Works Company Inc (AWK) , Walmart Inc (WMT) to apply various machine learning algorithms. Table -1: Sample Table format Sr. No Attribute Description 1 Date Date of the stock value 2 High Highest point of the price of a stock at the exchange 3 Low Lowest point of the price of a stock at the exchange 4 Open Opening price of a stock at the exchange 5 Close Closing price of a stock at the exchange 6 Volume Volume of stock is average of total traded stocks at the exchange over a period of time. 4. Performance analysis of algorithms In this research paper we compared machine learning algorithms using stock market dataset. We performed experimentswithvariousalgorithmsonstockmarketdataset and observed the mean square error to predict accuracy using four algorithms namely Linear regression, Logistic regression, k-Nearest neighbor, and Decision tree. We used Python libraries such as pandas, numpy to load the dataset and to perform mathematical calculations respectively and we used sklearn to model different machine learning algorithms. We used 0.20 of our whole dataset to test our model. We calculated mean square values for each of five companies using each algorithm which is illustrated in table 2. From table 2, we can conclude that SVM, Decision tree and kNN have better accuracies. We have plotted three of five best performing algorithms’ mean square error for each company to compare performance of each algorithm. SVM, kNN and Decision tree yielded best result. The result can further be enhanced by processing data properlyasthereare large fluctuations in stock market.
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 05 Issue: 11 | Nov 2018 www.irjet.net p-ISSN: 2395-0072 © 2018, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1152 Table -2: Mean Square Error of different companies for different algorithms Fig -1: American Airlines Group Inc (AAL) Fig -2: American Water (AWK) Fig -3: International Business Machines Corporation (IBM) Fig -4: The Coca-Cola Co. (KO) Fig -5: Walmart Inc (WMT) Algorithms IBM KO AAL AWK WMT Linear Regression 222.24 2.30 45.9 33.87 84.419 Logistic Regression 409.04 127.71 146.01 862.94 1141.73 k-Near Neighbors 5.84 0.248 2.07 0.489 0.522 Decision Tree 5.98 0.248 2.07 0.49 0.54 Support Vector Machine 13.45 0.398 7.50 1.243 1.890
  • 3. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 05 Issue: 11 | Nov 2018 www.irjet.net p-ISSN: 2395-0072 © 2018, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1153 3. CONCLUSION Support Vector Machine (SVM), DecisionTreeandk-Nearest Neighbor (kNN) give the most accurate predictions while Linear regression and Logistic regression cannotbeusedfor prediction as they have shown prediction values very far from actual values for most of the data. We can infer that k- Nearest Neighbor and Decision Tree are most precise algorithms to predict the stock market value. REFERENCES 1) Jibing Gong, B. Gawali, Shengtao Sun, “A New Approach of Stock Price Trend Prediction Based on Logistic Regression Model,” New Trends in Information and Service Science, 2009. NISS '09. 2) Lucan Nunno, “Stock Market Price Prediction Using Linear and Polynomial Regression Models,” 3) Z. Hu, J. Zhu and K. Tse, "Stocks market prediction using Support Vector Machine," 2013 6th International Conference on Information Management, Innovation Management and Industrial Engineering, Xi'an, 2013, pp. 115-118. 4) Use Decision Trees in Machine Learning to Predict Stock Movements 5) Khalid Alkhatib, Hassan Najadat, Ismail Hmeidi, Mohammed K. Ali Shatnawi “Stock Price Prediction Using K-Nearest Neighbor (kNN) Algorithm”, International Journal of Business, Humanities and Technology Vol. 3 No. 3; March 2013 6) https://www.kaggle.com/borismarjanovic/price- volume-data-for-all-us-stocks-etfs