SlideShare a Scribd company logo
5
Most read
7
Most read
9
Most read
Stock Market Analysis using
Supervised Machine Learning
Paper by : Kunal Pahwa and Neha Agarwal
Presented by : Priyanshu Gandhi (C008)
● This paper proposes to use machine learning algorithm to predict the future
stock price for exchange by using open source libraries
● In this paper author has talked about:-
○ What is stock market?
○ How share price changing?
○ What data to use for training?
○ How to train your algorithm?
○ What are the result?
○ Some helpful hints.
○ Some common mistake people do.
Overview
Introduction
● Stock market is place where a normal person would trade stocks, make
investments and earn some money out of companies that sell a part of
themselves on this platform.
● A company lists its stock at a price called the IPO :- This is the offer price at
which the company sells the stock and raises money.
● Linear regression in statistics :- Identify the dependents and independent
variables and try to establish or identify an existing relationship amongst
them.
● Accuracy of your classifier ∝ to the amount of data provided and the attributes
selected.
Prediction Model
A. Data Analysis Stage
1. The attributes of the dataset include:
a. Open (Opening price of Stock)
b. High (Highest price possible at an instance of time)
c. Low (Lowest price possible at an instance of time)
d. Close (Closing price of stock)
e. Volume (Total times traded during a day)
f. Split ratio
1. The graphs made for stock analysis use the above attributes to plot them. Such
graphs are called OHLCV graphs
A. Data Analysis Stage
● Adj. Close:- This decides market opening price for the next day and volume
expectancy for the day.
● HL_PCT: This is a derived feature which is defined by:
● PCT_change: This is also a derived feature,defined by:
● Adj. Volume: The volume traded has the most direct impact on future stock
price than any other feature.
B. Training and Testing Stage
We shall preprocess the data to make the data which includes:
● Shifted values of the label attribute by the percentage you want to predict.
● Dataframe format is converted to Numpy array format.
● All NaN data values removed before feeding it to the classifier.
● The data is scaled such that for any value X,
● The data is split into test data and train data respective to its type i.e. label
and feature.
Linear regression is essentially uses the key features to predict relations between
variables based on their dependencies on other features.This form of prediction is
known as Supervised Machine learning.
C. Results
● We shall be plotting a graph of our results as
per our requirements
● There are some standard methods to calculate
accuracy in machine learning, some are as
follows:
○ R^2 value of the model.
○ Adjusted R^2 value
○ RMSE Value
○ Confusion matrix for classification problems.
○ And many more
C. Results
● Accuracy is the component which every
machine learning developer is always
committed to contribute towards.
● Let us look at some of the standard ways to
optimize a machine learning algorithm:
● Unconstrained Optimization
○ Gradient Decent
○ Newton’s Method
○ Batch Learning
○ Stochastic Gradient Decent
● Constrained Optimization
○ Lagrange Duality
○ SVM in primal and Dual forms
○ Constrained Methods
Helpful Hints
A. Requirements and Specification
B. Careful function Analysis
C. Implementation
D. Training & Testing
E. Optimization
Some Common Mistakes
● Bad annotation of training and testing datasets
● Poor understanding of algorithms’ assumptions
● Poor understanding of algorithms’ parameters
● Failure to understand objective
● Not understanding the data
● Avoid leakage (Features, information)
● Not enough data to train the classifier
● Using machine learning where it is not necessary
Conclusion
● Machine learning as we have seen till now, is a very powerful tool and as
evitable, it has some great application.
● Machine learning have found tremendous application and has evolved further
into deep learning and neural networks, but the core idea is more or less the
same for all of them.
● This paper is limited to only supervised machine learning, and tries to explain
only the fundamentals of this complex process.
References
1. Andrew McCallum, Kamal Nigam, Jason Rennie, Kristie Seymore “A Machine learning approach to Building
domain-specific Search engine”, IJCAI, 1999 - Citeseer
2. Yadav, Sameer. (2017). STOCK MARKET VOLATILITY - A STUDY OF INDIAN STOCK MARKET. Global
Journal for Research Analysis. 6. 629-632.
3. Montgomery, D.C., Peck, E.A. and Vining, G.G., 2012. Introduction to linear regression analysis (Vol. 821).
John Wiley & Sons.
4. Draper, N.R.; Smith, H. (1998). Applied Regression Analysis (3rd ed.). John Wiley. ISBN 0-471-17082-8.
5. Robert S. Pindyck and Daniel L. Rubinfeld (1998, 4h ed.). Econometric Models and Economic Forecasts
6. “Linear Regression”, 1997-1998, Yale University http://www.stat.yale.edu/Courses/1997-98/101/linreg.htm
7. Agarwal (July 14, 2017). "Introduction to the Stock Market". Intelligent Economist. Retrieved December 18,
2017.
8. Jason Brownlee, March 2016, “Linear Regression for machine learning”, Machine learning mastery, viewed
on December 2018, https://machinelearningmastery.com/linear-regression-for-machinelearning/
9. Google Developers, Oct 2018, “Decending into ML: Linear Regression”, Google LLC,
https://developers.google.com/machinelearning/crash-course/descending-into-ml/linear-regression
10. Fiess, N.M. and MacDonald, R., 2002. Towards the fundamentals of technical analysis: analysing the
information content of High, Low and Close prices. Economic Modelling, 19(3), pp.353-374.
11. Hurwitz, E. and Marwala, T., 2012. Common mistakes when applying computational intelligence and
machine learning to stock market modelling. arXiv preprint arXiv:1208.4429.
Thank You

More Related Content

PDF
IRJET- Future Stock Price Prediction using LSTM Machine Learning Algorithm
PPTX
Stock Price Prediction
DOCX
Stock Market Analysis and Prediction
PDF
Stock Price Trend Forecasting using Supervised Learning
PPTX
stock market prediction
PPT
STOCK MARKET PRREDICTION WITH FEATURE EXTRACTION USING NEURAL NETWORK TEHNIQUE
PDF
Stock Market Price Prediction Using Technical Analysis
PPTX
stockmarket_analysis_and _prediction_using_lstm
IRJET- Future Stock Price Prediction using LSTM Machine Learning Algorithm
Stock Price Prediction
Stock Market Analysis and Prediction
Stock Price Trend Forecasting using Supervised Learning
stock market prediction
STOCK MARKET PRREDICTION WITH FEATURE EXTRACTION USING NEURAL NETWORK TEHNIQUE
Stock Market Price Prediction Using Technical Analysis
stockmarket_analysis_and _prediction_using_lstm

What's hot (20)

PDF
Stock price prediction using Neural Net
PPTX
Stock Price Prediction PPT
PDF
Deep Learning for Stock Prediction
PPTX
Stock Market Prediction using Machine Learning
PDF
IRJET- Stock Market Prediction using Machine Learning
PPTX
Stock Market Prediction
PPTX
Machine learning prediction of stock markets
PPT
STOCK MARKET PREDICTION
PPTX
Presentation1
PPTX
Stock market prediction technique:
PPTX
Machine learning: Stock Price Prediction
PPT
STOCK MARKET PREDICTION
PDF
Google Stock Price Forecasting
PDF
Stock Market Analysis
PDF
STOCK MARKET PREDICTION USING MACHINE LEARNING METHODS
PDF
Stock Market Prediction.pptx
PDF
Informed search
PPTX
Neural Networks for Pattern Recognition
PDF
Lecture 1: What is Machine Learning?
PDF
Human Activity Recognition
Stock price prediction using Neural Net
Stock Price Prediction PPT
Deep Learning for Stock Prediction
Stock Market Prediction using Machine Learning
IRJET- Stock Market Prediction using Machine Learning
Stock Market Prediction
Machine learning prediction of stock markets
STOCK MARKET PREDICTION
Presentation1
Stock market prediction technique:
Machine learning: Stock Price Prediction
STOCK MARKET PREDICTION
Google Stock Price Forecasting
Stock Market Analysis
STOCK MARKET PREDICTION USING MACHINE LEARNING METHODS
Stock Market Prediction.pptx
Informed search
Neural Networks for Pattern Recognition
Lecture 1: What is Machine Learning?
Human Activity Recognition
Ad

Similar to Stock market analysis using supervised machine learning (20)

PDF
Improved stock prediction accuracy using ema technique
PPTX
Stock prediction1600759770283_ak.ppt.pptx
PPTX
updated stock market ppt.pptx stock market presentation
PDF
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUES
PDF
Performance Comparisons among Machine Learning Algorithms based on the Stock ...
PDF
Stock Market Prediction using Machine Learning
PDF
IRJET - Stock Market Prediction using Machine Learning Algorithm
PDF
STOCK PRICE PREDICTION USING ML TECHNIQUES
PDF
RETRIEVING FUNDAMENTAL VALUES OF EQUITY
PDF
IRJET- Data Visualization and Stock Market and Prediction
PPTX
Final PPT.pptx
PDF
STOCK PRICE PREDICTION USING MACHINE LEARNING [RANDOM FOREST REGRESSION MODEL]
PPTX
python web development ppt with code and the output.pptx
PDF
STOCK MARKET PREDICTION USING MACHINE LEARNING IN PYTHON
PDF
IRJET- Stock Market Forecasting Techniques: A Survey
PDF
Survey Paper on Stock Prediction Using Machine Learning Algorithms
PPTX
Stock-market-prediction.pptx
PDF
Predicting Stock Market Price Using Support Vector Regression
PDF
Rachit Mishra_stock prediction_report
PDF
Stock Price Prediction Using Sentiment Analysis and Historic Data of Stock
Improved stock prediction accuracy using ema technique
Stock prediction1600759770283_ak.ppt.pptx
updated stock market ppt.pptx stock market presentation
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUES
Performance Comparisons among Machine Learning Algorithms based on the Stock ...
Stock Market Prediction using Machine Learning
IRJET - Stock Market Prediction using Machine Learning Algorithm
STOCK PRICE PREDICTION USING ML TECHNIQUES
RETRIEVING FUNDAMENTAL VALUES OF EQUITY
IRJET- Data Visualization and Stock Market and Prediction
Final PPT.pptx
STOCK PRICE PREDICTION USING MACHINE LEARNING [RANDOM FOREST REGRESSION MODEL]
python web development ppt with code and the output.pptx
STOCK MARKET PREDICTION USING MACHINE LEARNING IN PYTHON
IRJET- Stock Market Forecasting Techniques: A Survey
Survey Paper on Stock Prediction Using Machine Learning Algorithms
Stock-market-prediction.pptx
Predicting Stock Market Price Using Support Vector Regression
Rachit Mishra_stock prediction_report
Stock Price Prediction Using Sentiment Analysis and Historic Data of Stock
Ad

More from Priyanshu Gandhi (14)

PPT
introduction to business marketing
PPTX
demand forecasting
PDF
Miles Online TravelingAgent
PPTX
Foundation to indivudal behaviour personality theories
PPTX
Stress management
PPTX
Introduction to organizational behavior (OB)
PPTX
Motivation theories and application
PPTX
Foundations of individual decision making, groups, teams
PPTX
Traditional or religious
PPTX
Stickers Application Report
PDF
Marketing Concepts
PDF
Miles - Travel Agent
PPTX
Reasons Behind Indian Traditions & Culture
PDF
Broken access control
introduction to business marketing
demand forecasting
Miles Online TravelingAgent
Foundation to indivudal behaviour personality theories
Stress management
Introduction to organizational behavior (OB)
Motivation theories and application
Foundations of individual decision making, groups, teams
Traditional or religious
Stickers Application Report
Marketing Concepts
Miles - Travel Agent
Reasons Behind Indian Traditions & Culture
Broken access control

Recently uploaded (20)

PDF
Bitcoin Layer August 2025: Power Laws of Bitcoin: The Core and Bubbles
PDF
ABriefOverviewComparisonUCP600_ISP8_URDG_758.pdf
PPTX
kyc aml guideline a detailed pt onthat.pptx
PDF
financing insitute rbi nabard adb imf world bank insurance and credit gurantee
PPTX
Introduction to Essence of Indian traditional knowledge.pptx
PPTX
The discussion on the Economic in transportation .pptx
PDF
way to join Real illuminati agent 0782561496,0756664682
PDF
Mathematical Economics 23lec03slides.pdf
PDF
Understanding University Research Expenditures (1)_compressed.pdf
PDF
Chapter 9 IFRS Ed-Ed4_2020 Intermediate Accounting
PPTX
Unilever_Financial_Analysis_Presentation.pptx
PPTX
Introduction to Customs (June 2025) v1.pptx
PDF
Why Ignoring Passive Income for Retirees Could Cost You Big.pdf
PDF
discourse-2025-02-building-a-trillion-dollar-dream.pdf
PDF
Topic Globalisation and Lifelines of National Economy.pdf
PPTX
Session 11-13. Working Capital Management and Cash Budget.pptx
PDF
ssrn-3708.kefbkjbeakjfiuheioufh ioehoih134.pdf
PDF
caregiving tools.pdf...........................
PPTX
Globalization-of-Religion. Contemporary World
PDF
NAPF_RESPONSE_TO_THE_PENSIONS_COMMISSION_8 _2_.pdf
Bitcoin Layer August 2025: Power Laws of Bitcoin: The Core and Bubbles
ABriefOverviewComparisonUCP600_ISP8_URDG_758.pdf
kyc aml guideline a detailed pt onthat.pptx
financing insitute rbi nabard adb imf world bank insurance and credit gurantee
Introduction to Essence of Indian traditional knowledge.pptx
The discussion on the Economic in transportation .pptx
way to join Real illuminati agent 0782561496,0756664682
Mathematical Economics 23lec03slides.pdf
Understanding University Research Expenditures (1)_compressed.pdf
Chapter 9 IFRS Ed-Ed4_2020 Intermediate Accounting
Unilever_Financial_Analysis_Presentation.pptx
Introduction to Customs (June 2025) v1.pptx
Why Ignoring Passive Income for Retirees Could Cost You Big.pdf
discourse-2025-02-building-a-trillion-dollar-dream.pdf
Topic Globalisation and Lifelines of National Economy.pdf
Session 11-13. Working Capital Management and Cash Budget.pptx
ssrn-3708.kefbkjbeakjfiuheioufh ioehoih134.pdf
caregiving tools.pdf...........................
Globalization-of-Religion. Contemporary World
NAPF_RESPONSE_TO_THE_PENSIONS_COMMISSION_8 _2_.pdf

Stock market analysis using supervised machine learning

  • 1. Stock Market Analysis using Supervised Machine Learning Paper by : Kunal Pahwa and Neha Agarwal Presented by : Priyanshu Gandhi (C008)
  • 2. ● This paper proposes to use machine learning algorithm to predict the future stock price for exchange by using open source libraries ● In this paper author has talked about:- ○ What is stock market? ○ How share price changing? ○ What data to use for training? ○ How to train your algorithm? ○ What are the result? ○ Some helpful hints. ○ Some common mistake people do. Overview
  • 3. Introduction ● Stock market is place where a normal person would trade stocks, make investments and earn some money out of companies that sell a part of themselves on this platform. ● A company lists its stock at a price called the IPO :- This is the offer price at which the company sells the stock and raises money. ● Linear regression in statistics :- Identify the dependents and independent variables and try to establish or identify an existing relationship amongst them. ● Accuracy of your classifier ∝ to the amount of data provided and the attributes selected.
  • 4. Prediction Model A. Data Analysis Stage 1. The attributes of the dataset include: a. Open (Opening price of Stock) b. High (Highest price possible at an instance of time) c. Low (Lowest price possible at an instance of time) d. Close (Closing price of stock) e. Volume (Total times traded during a day) f. Split ratio 1. The graphs made for stock analysis use the above attributes to plot them. Such graphs are called OHLCV graphs
  • 5. A. Data Analysis Stage ● Adj. Close:- This decides market opening price for the next day and volume expectancy for the day. ● HL_PCT: This is a derived feature which is defined by: ● PCT_change: This is also a derived feature,defined by: ● Adj. Volume: The volume traded has the most direct impact on future stock price than any other feature.
  • 6. B. Training and Testing Stage We shall preprocess the data to make the data which includes: ● Shifted values of the label attribute by the percentage you want to predict. ● Dataframe format is converted to Numpy array format. ● All NaN data values removed before feeding it to the classifier. ● The data is scaled such that for any value X, ● The data is split into test data and train data respective to its type i.e. label and feature. Linear regression is essentially uses the key features to predict relations between variables based on their dependencies on other features.This form of prediction is known as Supervised Machine learning.
  • 7. C. Results ● We shall be plotting a graph of our results as per our requirements ● There are some standard methods to calculate accuracy in machine learning, some are as follows: ○ R^2 value of the model. ○ Adjusted R^2 value ○ RMSE Value ○ Confusion matrix for classification problems. ○ And many more
  • 8. C. Results ● Accuracy is the component which every machine learning developer is always committed to contribute towards. ● Let us look at some of the standard ways to optimize a machine learning algorithm: ● Unconstrained Optimization ○ Gradient Decent ○ Newton’s Method ○ Batch Learning ○ Stochastic Gradient Decent ● Constrained Optimization ○ Lagrange Duality ○ SVM in primal and Dual forms ○ Constrained Methods
  • 9. Helpful Hints A. Requirements and Specification B. Careful function Analysis C. Implementation D. Training & Testing E. Optimization Some Common Mistakes ● Bad annotation of training and testing datasets ● Poor understanding of algorithms’ assumptions ● Poor understanding of algorithms’ parameters ● Failure to understand objective ● Not understanding the data ● Avoid leakage (Features, information) ● Not enough data to train the classifier ● Using machine learning where it is not necessary
  • 10. Conclusion ● Machine learning as we have seen till now, is a very powerful tool and as evitable, it has some great application. ● Machine learning have found tremendous application and has evolved further into deep learning and neural networks, but the core idea is more or less the same for all of them. ● This paper is limited to only supervised machine learning, and tries to explain only the fundamentals of this complex process.
  • 11. References 1. Andrew McCallum, Kamal Nigam, Jason Rennie, Kristie Seymore “A Machine learning approach to Building domain-specific Search engine”, IJCAI, 1999 - Citeseer 2. Yadav, Sameer. (2017). STOCK MARKET VOLATILITY - A STUDY OF INDIAN STOCK MARKET. Global Journal for Research Analysis. 6. 629-632. 3. Montgomery, D.C., Peck, E.A. and Vining, G.G., 2012. Introduction to linear regression analysis (Vol. 821). John Wiley & Sons. 4. Draper, N.R.; Smith, H. (1998). Applied Regression Analysis (3rd ed.). John Wiley. ISBN 0-471-17082-8. 5. Robert S. Pindyck and Daniel L. Rubinfeld (1998, 4h ed.). Econometric Models and Economic Forecasts 6. “Linear Regression”, 1997-1998, Yale University http://www.stat.yale.edu/Courses/1997-98/101/linreg.htm 7. Agarwal (July 14, 2017). "Introduction to the Stock Market". Intelligent Economist. Retrieved December 18, 2017. 8. Jason Brownlee, March 2016, “Linear Regression for machine learning”, Machine learning mastery, viewed on December 2018, https://machinelearningmastery.com/linear-regression-for-machinelearning/ 9. Google Developers, Oct 2018, “Decending into ML: Linear Regression”, Google LLC, https://developers.google.com/machinelearning/crash-course/descending-into-ml/linear-regression 10. Fiess, N.M. and MacDonald, R., 2002. Towards the fundamentals of technical analysis: analysing the information content of High, Low and Close prices. Economic Modelling, 19(3), pp.353-374. 11. Hurwitz, E. and Marwala, T., 2012. Common mistakes when applying computational intelligence and machine learning to stock market modelling. arXiv preprint arXiv:1208.4429.