SlideShare a Scribd company logo
1 of 22
Sambhram Institute of Technology
Department of Computer Science & Engineering
Stock Market Prediction
USING
MACHINE LEARNING
Akshay R 1ST14CS010
Aravind B 1ST14CS023
Arun Kumar 1ST14CS025
Ashok S 1ST14CS027
Under the guidance of
Dr. T John Peter
H.O.D, Dept. of CSE
Agenda
Introduction
Existing Methods
Proposed System
System Design
Implementation
Abstract
Results & Discussions
Stock Market Prediction
Performance
Future Enhancement
Conclusion
Abstract
 Time series forecasting has been widely used to determine the future prices of stock, and the analysis and
modelling of finance time series importantly guide investors’ decisions and trades
 This work proposes an intelligent time series prediction system that uses sliding-window
optimization for the purpose of predicting the stock prices
 The system has a graphical user interface and functions as a stand-alone application.
 The proposed model is a promising predictive technique for highly non-linear time series, whose
patterns are difficult to capture by traditional models.
Stock Market Prediction
Introduction
 Financial markets are highly volatile and generate huge amounts of data daily
 It is the most popular financial market instrument and its value changes quickly
 Stock prices are predicted to determine the future value of companies’ stock or other
financial instruments that are marketed on financial exchanges
 However, the stock market is influenced by many factors such as political events, economic
conditions and traders’ expectation
Stock Market Prediction
What is Machine Learning
Machine Learning is the field of study that gives computers the ability to learn without being
explicitly programmed
More formally, it can defined as,
A computer program is said to learn from experience E with respect to some class of
tasks T and performance measure P, if its performance at tasks in T, as measured by P,
improves with experience E
Example: playing checkers.
E = the experience of playing many games of checkers
T = the task of playing checkers.
P = the probability that the program will win the next game.
Stock Market Prediction
Machine Learning in Stock Prediction
 The field of Machine Learning is vast and plays a key role in a wide range of critical
applications.
 The concept of Support Vector Machines (SVM) have advanced features that are
reflected in their good generalization capacity and fast computation.
 Predicting the stock market involves predicting the closing prices of a company’s
stock for any given number of days ahead.
 SVMs can be used to perform Linear Regression on previous stock data to predict
the closing prices using Time series forecasting and other optimization algorithms
Stock Market Prediction
Existing Methods
 Time series forecasting consists of a research area designed to solve various
problems, mainly in the financial area
 Support vector regression (SVR), a variant of the SVM, is typically used to solve
nonlinear regression problems by constructing the input-output mapping function.
 The least squares support vector regression (LSSVR) algorithm is a further
development of SVR and its use considerably reduces computational complexity and
increases efficiency compared to standard SVR.
 The Firefly Algorithm (FA), which is a nature-inspired metaheuristic method, has
recently performed extremely well in solving various optimization problems.
Stock Market Prediction
Disadvantages
 The existing system focuses on the stock price market in Taiwan, but does not
generalize for other markets worldwide.
 The system does not allow the import of raw data directly
 The existing system cannot be used to analyze multi-variate time series
 Lastly, the system does not have a user-interface which can be distributed as a web
app to users for personal use
Stock Market Prediction
Proposed System
 To generalize the application of the existing system, our work uses the system to
estimate other stocks in similar emerging markets and mature markets
 The system can be extended to analyze multivariate time series data and import
raw dataset directly
 Profit can be maximized even when the corporate stock market is has lower value
 The development of a web-based application has been considered to improve the
user-friendliness and usability of the expert system.
Stock Market Prediction
USE CASE DIAGRAM
1. Data is initially collected from
online sources or the stock exchange
2. The data is then used to train the
system
3. Trained model is saved
4. User views the trade exchange and
stock of a company
5. Using the model, closing prices are
predicted
Stock Market Prediction
Architecture
System Design
Architecture
Input : Company Fetch Data Plot Data
Train model
(LSSVR)
Predict Stock for n
Days
Plot Predicted
Results
Save Model
Stock Market Prediction
Data Flow Diagram
SEQUENCE DIAGRAM
1. User visits the website/webapp
2. Previously saved model is loaded
3. User requests for a company's stock
data
4. He requests for prediction to be made
5. The Stock Market Prediction System
trains a model using the data from the
database
6. The model is saved for further use
and closing price is predicted
7. Result is displayed along with graph
Stock Market Prediction
Architecture
Sequence Diagram
Implementation
Algorithm
Algorithm : StockPrediction
Input : COMP, D_RANGE, N_PRED [company, date range, n-day predictions]
Output : A vector of predicted prices and graph, RESULTS
1. data ← fetch stock for COMP in date range D_RANGE
2. plot(data)
3. train_data ← slidingWindow(data) //perform sliding window operation on data
4. RESULTS ← 0 //set accuracy vector to zeroes
5. for each day in N_PRED :
1. model ← LSSVM(train_data) //pass the training data to LSSVM
2. pred ← predict(model,day) //predict the price given model and day
3. remove first item from train_data //removing last item and adding predicted value
4. train_data ← add pred to train_data //Last In, First Out.
5. RESULTS ← add pred to RESULTS
6. end for
7. print(RESULTS)
8. plot(RESULTS)
9. return
Stock Market Prediction
Implementation
Least Squares Support Vector Regression
The least squares version of the SVM classifier is obtained by reformulating the minimization problem as
For the kernel function K(𝑥, 𝑥𝑖) one typically has the Radial Basis Function
• The LSSVR algorithm is a further development of SVR by Suykens (2001) and involves equality instead of inequality
constraints, and works with a least squares objective function.
• The LSSVR approach considerably reduces computational complexity and increases efficiency compared to standard
SVM.
• LSSVR solves linear equations instead of a quadratic programming problem
LSSVR Formulation
Stock Market Prediction
Implementation
Sliding-Window
Algorithm : slidingWindow
Input : data [stock data]
Output : A data frame of a lagged stock
data
1. LAG ← 1
2. y ← remove first LAG rows from data
3. reset row indices of y
4. x ← remove last LAG rows from data
5. train ← merge (x,y) into a dataframe
6. rename column name to x and y
7. return train
Stock Market Prediction
Time Price
1 100
2 110
3 108
4 115
5 120
Re-organizing the time series dataset this way, we obtain the
table as above, on the right
Using previous time steps as input variables and use the next
time step as the output variable, we obtain the following table on the left
X Y
? 100
100 110
110 108
108 115
115 120
120 ?
Results & Discussions Stock Market Prediction
Performance Stock Market Prediction
Performance Stock Market Prediction
Screenshot
Stock Market Prediction
Future Enhancement
• The limitation of the proposed system is its computational speed, especially with respect
to sliding-window validation as the computational cost increases with the number of
forward day predictions.
• The proposed model does not predict well for sudden changes in the trend of stock data.
• This occurs due to external factors and real-world changes affecting the stock market.
• We can overcome this by implementing Sentiment Analysis and Neural Networks to
enhance the proposed model.
• We can modify the same system to an online-learning system that adapts in real-time.
Stock Market Prediction
Conclusion
Thus, as we can see above in our proposed method, we train the data using existing
stock dataset that is available. We use this data to predict and forecast the stock price of
n-days into the future.
The average performance of the model decreases with increase in number of days, due
to unpredictable changes in trend.
The current system can update its training set as each day passes so as to detect newer
trends and behave like an online-learning system that predicts stock in real-time.
Stock Market Prediction
Thank You
Stock Market Prediction

More Related Content

What's hot

Stock Market Analysis and Prediction
Stock Market Analysis and PredictionStock Market Analysis and Prediction
Stock Market Analysis and PredictionAnil Shrestha
 
STOCK MARKET PRREDICTION WITH FEATURE EXTRACTION USING NEURAL NETWORK TEHNIQUE
STOCK MARKET PRREDICTION WITH FEATURE EXTRACTION USING NEURAL NETWORK TEHNIQUESTOCK MARKET PRREDICTION WITH FEATURE EXTRACTION USING NEURAL NETWORK TEHNIQUE
STOCK MARKET PRREDICTION WITH FEATURE EXTRACTION USING NEURAL NETWORK TEHNIQUERicha Handa
 
Stock Market Prediction
Stock Market Prediction Stock Market Prediction
Stock Market Prediction SalmanShezad
 
Stock market prediction technique:
Stock market prediction technique:Stock market prediction technique:
Stock market prediction technique:Paladion Networks
 
STOCK MARKET PREDICTION USING MACHINE LEARNING METHODS
STOCK MARKET PREDICTION USING MACHINE LEARNING METHODSSTOCK MARKET PREDICTION USING MACHINE LEARNING METHODS
STOCK MARKET PREDICTION USING MACHINE LEARNING METHODSIAEME Publication
 
IRJET- Future Stock Price Prediction using LSTM Machine Learning Algorithm
IRJET-  	  Future Stock Price Prediction using LSTM Machine Learning AlgorithmIRJET-  	  Future Stock Price Prediction using LSTM Machine Learning Algorithm
IRJET- Future Stock Price Prediction using LSTM Machine Learning AlgorithmIRJET Journal
 
Stock Price Prediction
Stock Price PredictionStock Price Prediction
Stock Price PredictionManisha Mishra
 
House Sale Price Prediction
House Sale Price PredictionHouse Sale Price Prediction
House Sale Price Predictionsriram30691
 
Prediction of heart disease using machine learning.pptx
Prediction of heart disease using machine learning.pptxPrediction of heart disease using machine learning.pptx
Prediction of heart disease using machine learning.pptxkumari36
 
Machine learning prediction of stock markets
Machine learning prediction of stock marketsMachine learning prediction of stock markets
Machine learning prediction of stock marketsNikola Milosevic
 
SPEECH BASED EMOTION RECOGNITION USING VOICE
SPEECH BASED  EMOTION RECOGNITION USING VOICESPEECH BASED  EMOTION RECOGNITION USING VOICE
SPEECH BASED EMOTION RECOGNITION USING VOICEVamshidharSingh
 
Credit card fraud detection using machine learning Algorithms
Credit card fraud detection using machine learning AlgorithmsCredit card fraud detection using machine learning Algorithms
Credit card fraud detection using machine learning Algorithmsankit panigrahy
 
Stock-market-prediction.pptx
Stock-market-prediction.pptxStock-market-prediction.pptx
Stock-market-prediction.pptxrikritiKoirala1
 
House Price Estimates Based on Machine Learning Algorithm
House Price Estimates Based on Machine Learning AlgorithmHouse Price Estimates Based on Machine Learning Algorithm
House Price Estimates Based on Machine Learning Algorithmijtsrd
 

What's hot (20)

Stock Market Analysis and Prediction
Stock Market Analysis and PredictionStock Market Analysis and Prediction
Stock Market Analysis and Prediction
 
STOCK MARKET PRREDICTION WITH FEATURE EXTRACTION USING NEURAL NETWORK TEHNIQUE
STOCK MARKET PRREDICTION WITH FEATURE EXTRACTION USING NEURAL NETWORK TEHNIQUESTOCK MARKET PRREDICTION WITH FEATURE EXTRACTION USING NEURAL NETWORK TEHNIQUE
STOCK MARKET PRREDICTION WITH FEATURE EXTRACTION USING NEURAL NETWORK TEHNIQUE
 
Stock Market Prediction
Stock Market Prediction Stock Market Prediction
Stock Market Prediction
 
STOCK MARKET PREDICTION
STOCK MARKET PREDICTIONSTOCK MARKET PREDICTION
STOCK MARKET PREDICTION
 
STOCK MARKET PREDICTION
STOCK MARKET PREDICTIONSTOCK MARKET PREDICTION
STOCK MARKET PREDICTION
 
Stock market prediction technique:
Stock market prediction technique:Stock market prediction technique:
Stock market prediction technique:
 
STOCK MARKET PREDICTION USING MACHINE LEARNING METHODS
STOCK MARKET PREDICTION USING MACHINE LEARNING METHODSSTOCK MARKET PREDICTION USING MACHINE LEARNING METHODS
STOCK MARKET PREDICTION USING MACHINE LEARNING METHODS
 
IRJET- Future Stock Price Prediction using LSTM Machine Learning Algorithm
IRJET-  	  Future Stock Price Prediction using LSTM Machine Learning AlgorithmIRJET-  	  Future Stock Price Prediction using LSTM Machine Learning Algorithm
IRJET- Future Stock Price Prediction using LSTM Machine Learning Algorithm
 
supervised learning
supervised learningsupervised learning
supervised learning
 
Stock Price Prediction
Stock Price PredictionStock Price Prediction
Stock Price Prediction
 
Presentation1
Presentation1Presentation1
Presentation1
 
House Sale Price Prediction
House Sale Price PredictionHouse Sale Price Prediction
House Sale Price Prediction
 
Prediction of heart disease using machine learning.pptx
Prediction of heart disease using machine learning.pptxPrediction of heart disease using machine learning.pptx
Prediction of heart disease using machine learning.pptx
 
Housing price prediction
Housing price predictionHousing price prediction
Housing price prediction
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Machine learning prediction of stock markets
Machine learning prediction of stock marketsMachine learning prediction of stock markets
Machine learning prediction of stock markets
 
SPEECH BASED EMOTION RECOGNITION USING VOICE
SPEECH BASED  EMOTION RECOGNITION USING VOICESPEECH BASED  EMOTION RECOGNITION USING VOICE
SPEECH BASED EMOTION RECOGNITION USING VOICE
 
Credit card fraud detection using machine learning Algorithms
Credit card fraud detection using machine learning AlgorithmsCredit card fraud detection using machine learning Algorithms
Credit card fraud detection using machine learning Algorithms
 
Stock-market-prediction.pptx
Stock-market-prediction.pptxStock-market-prediction.pptx
Stock-market-prediction.pptx
 
House Price Estimates Based on Machine Learning Algorithm
House Price Estimates Based on Machine Learning AlgorithmHouse Price Estimates Based on Machine Learning Algorithm
House Price Estimates Based on Machine Learning Algorithm
 

Similar to Stock Market Prediction using Machine Learning

IRJET - Stock Market Prediction using Machine Learning Algorithm
IRJET - Stock Market Prediction using Machine Learning AlgorithmIRJET - Stock Market Prediction using Machine Learning Algorithm
IRJET - Stock Market Prediction using Machine Learning AlgorithmIRJET Journal
 
IRJET- Stock Market Prediction using Machine Learning
IRJET- Stock Market Prediction using Machine LearningIRJET- Stock Market Prediction using Machine Learning
IRJET- Stock Market Prediction using Machine LearningIRJET Journal
 
Rachit Mishra_stock prediction_report
Rachit Mishra_stock prediction_reportRachit Mishra_stock prediction_report
Rachit Mishra_stock prediction_reportRachit Mishra
 
BATCH 1 FIRST REVIEW-1.pptx
BATCH 1 FIRST REVIEW-1.pptxBATCH 1 FIRST REVIEW-1.pptx
BATCH 1 FIRST REVIEW-1.pptxSurajRavi16
 
AIRLINE FARE PRICE PREDICTION
AIRLINE FARE PRICE PREDICTIONAIRLINE FARE PRICE PREDICTION
AIRLINE FARE PRICE PREDICTIONIRJET Journal
 
Stock Price Prediction using Machine Learning Algorithms: ARIMA, LSTM & Linea...
Stock Price Prediction using Machine Learning Algorithms: ARIMA, LSTM & Linea...Stock Price Prediction using Machine Learning Algorithms: ARIMA, LSTM & Linea...
Stock Price Prediction using Machine Learning Algorithms: ARIMA, LSTM & Linea...IRJET Journal
 
STOCK PRICE PREDICTION USING ML TECHNIQUES
STOCK PRICE PREDICTION USING ML TECHNIQUESSTOCK PRICE PREDICTION USING ML TECHNIQUES
STOCK PRICE PREDICTION USING ML TECHNIQUESIRJET Journal
 
Predicting Stock Market Price Using Support Vector Regression
Predicting Stock Market Price Using Support Vector RegressionPredicting Stock Market Price Using Support Vector Regression
Predicting Stock Market Price Using Support Vector RegressionChittagong Independent University
 
Performance Comparisons among Machine Learning Algorithms based on the Stock ...
Performance Comparisons among Machine Learning Algorithms based on the Stock ...Performance Comparisons among Machine Learning Algorithms based on the Stock ...
Performance Comparisons among Machine Learning Algorithms based on the Stock ...IRJET Journal
 
Real Estate Investment Advising Using Machine Learning
Real Estate Investment Advising Using Machine LearningReal Estate Investment Advising Using Machine Learning
Real Estate Investment Advising Using Machine LearningIRJET Journal
 
STOCK MARKET PREDICTION USING MACHINE LEARNING IN PYTHON
STOCK MARKET PREDICTION USING MACHINE LEARNING IN PYTHONSTOCK MARKET PREDICTION USING MACHINE LEARNING IN PYTHON
STOCK MARKET PREDICTION USING MACHINE LEARNING IN PYTHONIRJET Journal
 
Stock Market Prediction using Long Short-Term Memory
Stock Market Prediction using Long Short-Term MemoryStock Market Prediction using Long Short-Term Memory
Stock Market Prediction using Long Short-Term MemoryIRJET Journal
 
AlgoB – Cryptocurrency price prediction system using LSTM
AlgoB – Cryptocurrency price prediction system using LSTMAlgoB – Cryptocurrency price prediction system using LSTM
AlgoB – Cryptocurrency price prediction system using LSTMIRJET Journal
 
House price prediction
House price predictionHouse price prediction
House price predictionSabahBegum
 
Data-Driven Approach to Stock Market Prediction and Sentiment Analysis
Data-Driven Approach to Stock Market Prediction and Sentiment AnalysisData-Driven Approach to Stock Market Prediction and Sentiment Analysis
Data-Driven Approach to Stock Market Prediction and Sentiment AnalysisIRJET Journal
 
Project report on Share Market application
Project report on Share Market applicationProject report on Share Market application
Project report on Share Market applicationKRISHNA PANDEY
 
Turnover Prediction of Shares Using Data Mining Techniques : A Case Study
Turnover Prediction of Shares Using Data Mining Techniques : A Case Study Turnover Prediction of Shares Using Data Mining Techniques : A Case Study
Turnover Prediction of Shares Using Data Mining Techniques : A Case Study csandit
 
stock market prediction and analysis using python
stock market prediction and analysis using pythonstock market prediction and analysis using python
stock market prediction and analysis using pythonstudanimo
 

Similar to Stock Market Prediction using Machine Learning (20)

IRJET - Stock Market Prediction using Machine Learning Algorithm
IRJET - Stock Market Prediction using Machine Learning AlgorithmIRJET - Stock Market Prediction using Machine Learning Algorithm
IRJET - Stock Market Prediction using Machine Learning Algorithm
 
IRJET- Stock Market Prediction using Machine Learning
IRJET- Stock Market Prediction using Machine LearningIRJET- Stock Market Prediction using Machine Learning
IRJET- Stock Market Prediction using Machine Learning
 
Rachit Mishra_stock prediction_report
Rachit Mishra_stock prediction_reportRachit Mishra_stock prediction_report
Rachit Mishra_stock prediction_report
 
BATCH 1 FIRST REVIEW-1.pptx
BATCH 1 FIRST REVIEW-1.pptxBATCH 1 FIRST REVIEW-1.pptx
BATCH 1 FIRST REVIEW-1.pptx
 
AIRLINE FARE PRICE PREDICTION
AIRLINE FARE PRICE PREDICTIONAIRLINE FARE PRICE PREDICTION
AIRLINE FARE PRICE PREDICTION
 
Stock Price Prediction using Machine Learning Algorithms: ARIMA, LSTM & Linea...
Stock Price Prediction using Machine Learning Algorithms: ARIMA, LSTM & Linea...Stock Price Prediction using Machine Learning Algorithms: ARIMA, LSTM & Linea...
Stock Price Prediction using Machine Learning Algorithms: ARIMA, LSTM & Linea...
 
STOCK PRICE PREDICTION USING ML TECHNIQUES
STOCK PRICE PREDICTION USING ML TECHNIQUESSTOCK PRICE PREDICTION USING ML TECHNIQUES
STOCK PRICE PREDICTION USING ML TECHNIQUES
 
Predicting Stock Market Price Using Support Vector Regression
Predicting Stock Market Price Using Support Vector RegressionPredicting Stock Market Price Using Support Vector Regression
Predicting Stock Market Price Using Support Vector Regression
 
Performance Comparisons among Machine Learning Algorithms based on the Stock ...
Performance Comparisons among Machine Learning Algorithms based on the Stock ...Performance Comparisons among Machine Learning Algorithms based on the Stock ...
Performance Comparisons among Machine Learning Algorithms based on the Stock ...
 
Real Estate Investment Advising Using Machine Learning
Real Estate Investment Advising Using Machine LearningReal Estate Investment Advising Using Machine Learning
Real Estate Investment Advising Using Machine Learning
 
STOCK MARKET PREDICTION USING MACHINE LEARNING IN PYTHON
STOCK MARKET PREDICTION USING MACHINE LEARNING IN PYTHONSTOCK MARKET PREDICTION USING MACHINE LEARNING IN PYTHON
STOCK MARKET PREDICTION USING MACHINE LEARNING IN PYTHON
 
Stock Market Prediction using Long Short-Term Memory
Stock Market Prediction using Long Short-Term MemoryStock Market Prediction using Long Short-Term Memory
Stock Market Prediction using Long Short-Term Memory
 
AlgoB – Cryptocurrency price prediction system using LSTM
AlgoB – Cryptocurrency price prediction system using LSTMAlgoB – Cryptocurrency price prediction system using LSTM
AlgoB – Cryptocurrency price prediction system using LSTM
 
House price prediction
House price predictionHouse price prediction
House price prediction
 
IC2IT 2013 Presentation
IC2IT 2013 PresentationIC2IT 2013 Presentation
IC2IT 2013 Presentation
 
IC2IT 2013 Presentation
IC2IT 2013 PresentationIC2IT 2013 Presentation
IC2IT 2013 Presentation
 
Data-Driven Approach to Stock Market Prediction and Sentiment Analysis
Data-Driven Approach to Stock Market Prediction and Sentiment AnalysisData-Driven Approach to Stock Market Prediction and Sentiment Analysis
Data-Driven Approach to Stock Market Prediction and Sentiment Analysis
 
Project report on Share Market application
Project report on Share Market applicationProject report on Share Market application
Project report on Share Market application
 
Turnover Prediction of Shares Using Data Mining Techniques : A Case Study
Turnover Prediction of Shares Using Data Mining Techniques : A Case Study Turnover Prediction of Shares Using Data Mining Techniques : A Case Study
Turnover Prediction of Shares Using Data Mining Techniques : A Case Study
 
stock market prediction and analysis using python
stock market prediction and analysis using pythonstock market prediction and analysis using python
stock market prediction and analysis using python
 

Recently uploaded

英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 

Recently uploaded (20)

英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 

Stock Market Prediction using Machine Learning

  • 1. Sambhram Institute of Technology Department of Computer Science & Engineering Stock Market Prediction USING MACHINE LEARNING Akshay R 1ST14CS010 Aravind B 1ST14CS023 Arun Kumar 1ST14CS025 Ashok S 1ST14CS027 Under the guidance of Dr. T John Peter H.O.D, Dept. of CSE
  • 2. Agenda Introduction Existing Methods Proposed System System Design Implementation Abstract Results & Discussions Stock Market Prediction Performance Future Enhancement Conclusion
  • 3. Abstract  Time series forecasting has been widely used to determine the future prices of stock, and the analysis and modelling of finance time series importantly guide investors’ decisions and trades  This work proposes an intelligent time series prediction system that uses sliding-window optimization for the purpose of predicting the stock prices  The system has a graphical user interface and functions as a stand-alone application.  The proposed model is a promising predictive technique for highly non-linear time series, whose patterns are difficult to capture by traditional models. Stock Market Prediction
  • 4. Introduction  Financial markets are highly volatile and generate huge amounts of data daily  It is the most popular financial market instrument and its value changes quickly  Stock prices are predicted to determine the future value of companies’ stock or other financial instruments that are marketed on financial exchanges  However, the stock market is influenced by many factors such as political events, economic conditions and traders’ expectation Stock Market Prediction
  • 5. What is Machine Learning Machine Learning is the field of study that gives computers the ability to learn without being explicitly programmed More formally, it can defined as, A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E Example: playing checkers. E = the experience of playing many games of checkers T = the task of playing checkers. P = the probability that the program will win the next game. Stock Market Prediction
  • 6. Machine Learning in Stock Prediction  The field of Machine Learning is vast and plays a key role in a wide range of critical applications.  The concept of Support Vector Machines (SVM) have advanced features that are reflected in their good generalization capacity and fast computation.  Predicting the stock market involves predicting the closing prices of a company’s stock for any given number of days ahead.  SVMs can be used to perform Linear Regression on previous stock data to predict the closing prices using Time series forecasting and other optimization algorithms Stock Market Prediction
  • 7. Existing Methods  Time series forecasting consists of a research area designed to solve various problems, mainly in the financial area  Support vector regression (SVR), a variant of the SVM, is typically used to solve nonlinear regression problems by constructing the input-output mapping function.  The least squares support vector regression (LSSVR) algorithm is a further development of SVR and its use considerably reduces computational complexity and increases efficiency compared to standard SVR.  The Firefly Algorithm (FA), which is a nature-inspired metaheuristic method, has recently performed extremely well in solving various optimization problems. Stock Market Prediction
  • 8. Disadvantages  The existing system focuses on the stock price market in Taiwan, but does not generalize for other markets worldwide.  The system does not allow the import of raw data directly  The existing system cannot be used to analyze multi-variate time series  Lastly, the system does not have a user-interface which can be distributed as a web app to users for personal use Stock Market Prediction
  • 9. Proposed System  To generalize the application of the existing system, our work uses the system to estimate other stocks in similar emerging markets and mature markets  The system can be extended to analyze multivariate time series data and import raw dataset directly  Profit can be maximized even when the corporate stock market is has lower value  The development of a web-based application has been considered to improve the user-friendliness and usability of the expert system. Stock Market Prediction
  • 10. USE CASE DIAGRAM 1. Data is initially collected from online sources or the stock exchange 2. The data is then used to train the system 3. Trained model is saved 4. User views the trade exchange and stock of a company 5. Using the model, closing prices are predicted Stock Market Prediction Architecture System Design
  • 11. Architecture Input : Company Fetch Data Plot Data Train model (LSSVR) Predict Stock for n Days Plot Predicted Results Save Model Stock Market Prediction Data Flow Diagram
  • 12. SEQUENCE DIAGRAM 1. User visits the website/webapp 2. Previously saved model is loaded 3. User requests for a company's stock data 4. He requests for prediction to be made 5. The Stock Market Prediction System trains a model using the data from the database 6. The model is saved for further use and closing price is predicted 7. Result is displayed along with graph Stock Market Prediction Architecture Sequence Diagram
  • 13. Implementation Algorithm Algorithm : StockPrediction Input : COMP, D_RANGE, N_PRED [company, date range, n-day predictions] Output : A vector of predicted prices and graph, RESULTS 1. data ← fetch stock for COMP in date range D_RANGE 2. plot(data) 3. train_data ← slidingWindow(data) //perform sliding window operation on data 4. RESULTS ← 0 //set accuracy vector to zeroes 5. for each day in N_PRED : 1. model ← LSSVM(train_data) //pass the training data to LSSVM 2. pred ← predict(model,day) //predict the price given model and day 3. remove first item from train_data //removing last item and adding predicted value 4. train_data ← add pred to train_data //Last In, First Out. 5. RESULTS ← add pred to RESULTS 6. end for 7. print(RESULTS) 8. plot(RESULTS) 9. return Stock Market Prediction
  • 14. Implementation Least Squares Support Vector Regression The least squares version of the SVM classifier is obtained by reformulating the minimization problem as For the kernel function K(𝑥, 𝑥𝑖) one typically has the Radial Basis Function • The LSSVR algorithm is a further development of SVR by Suykens (2001) and involves equality instead of inequality constraints, and works with a least squares objective function. • The LSSVR approach considerably reduces computational complexity and increases efficiency compared to standard SVM. • LSSVR solves linear equations instead of a quadratic programming problem LSSVR Formulation Stock Market Prediction
  • 15. Implementation Sliding-Window Algorithm : slidingWindow Input : data [stock data] Output : A data frame of a lagged stock data 1. LAG ← 1 2. y ← remove first LAG rows from data 3. reset row indices of y 4. x ← remove last LAG rows from data 5. train ← merge (x,y) into a dataframe 6. rename column name to x and y 7. return train Stock Market Prediction Time Price 1 100 2 110 3 108 4 115 5 120 Re-organizing the time series dataset this way, we obtain the table as above, on the right Using previous time steps as input variables and use the next time step as the output variable, we obtain the following table on the left X Y ? 100 100 110 110 108 108 115 115 120 120 ?
  • 16. Results & Discussions Stock Market Prediction
  • 20. Future Enhancement • The limitation of the proposed system is its computational speed, especially with respect to sliding-window validation as the computational cost increases with the number of forward day predictions. • The proposed model does not predict well for sudden changes in the trend of stock data. • This occurs due to external factors and real-world changes affecting the stock market. • We can overcome this by implementing Sentiment Analysis and Neural Networks to enhance the proposed model. • We can modify the same system to an online-learning system that adapts in real-time. Stock Market Prediction
  • 21. Conclusion Thus, as we can see above in our proposed method, we train the data using existing stock dataset that is available. We use this data to predict and forecast the stock price of n-days into the future. The average performance of the model decreases with increase in number of days, due to unpredictable changes in trend. The current system can update its training set as each day passes so as to detect newer trends and behave like an online-learning system that predicts stock in real-time. Stock Market Prediction