0% found this document useful (0 votes)
9 views

ML Project

Uploaded by

manojpiselonar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

ML Project

Uploaded by

manojpiselonar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

KJ's Educational Institute

KJ COLLEGE OF ENGINEERING AND


MANAGEMENT RESEARCH
Affiliated to Savitribai Phule Pune University (SPPU), Approved by Govt. of
Maharashtra, Recognized by AICTE, New Delhi.

DEPARTMENT OF
COMPUTER
ENGINEERING YEAR 2023-24
Semester – VII

Machine Learning
[410242]
BE-B COMPUTER ENGG.

Project Title: “Predict future stock price returns based on


Indian Market datafrom 2000 to 2020”

Done By:
Name Roll No
Aditya Mohite 11
KJ COLLEGE OF
ENGINEERING
AND
MANAGEMENT RESEARCH

DEPARTMENT OF COMPUTER ENGINEERING

CERTIFICATE
This is certify that the project entitled

“Predict future stock price returns based on Indian Market data


from 2000 to 2020”
submitted by
Aditya Mohite B11

is a record of bonafide work carried out by them, in the partial


fulfilment of the requirement for the award of Degree of Bachelor of
Engineering (Computer Engineering) at KJ COLLEGE OF
ENGINEERING AND MANAGEMENT RESEARCH, Pune under the
University of Pune. This work is done during year 2023-2024, under our
guidance.

Date: / /

Prof. Tanvi. A. Ghodke Dr.Nikita Kulkarni


ABSTRACT

The stock market plays a pivotal role in the global economy, and understanding
and predicting stock price returns is of paramount importance for investors,
financial institutions, and policymakers. This study aims to forecast future stock
price returns in the Indian market using historical data spanning the years 2000 to
2020.
To achieve this goal, we employ a comprehensive dataset of Indian stock market
prices, trading volumes, and economic indicators. The dataset encompasses a
diverse set of stocks representing various sectors, providing a holistic view of the
Indian stock market's performance over two decades. We apply state-of-the-art
machine learning and statistical techniques to extract insights and build predictive
models.
The research begins by conducting exploratory data analysis to identify key trends,
correlations, and factors that influence stock price returns in the Indian market. We
assess the impact of macroeconomic variables, market sentiment, and external
events on stock performance.
ACKNOWLEDGEMENT

I take this opportunity to express my sincere gratitude and respect to KJ


COLLEGE OF ENGINEERING AND MANGEMENT RESEARCH, Pune for
providing me a platform to pursue my studies and carry out my final year project.
I would like to thank Dr. Nikita Kulkarni, Professor and Head, Department of
Computer Engineering, KJ COLLEGE OF ENGINEERING AND
MANGEMENT RESEARCH, Pune who has been a constant support and
encouragement throughout the course of this project.
I consider it a privilege and honor to express my sincere gratitude to my guide
Tanvi. A. Ghodke, Associative professor, Department of Computer Engineering,
for the valuable guidance throughout the tenure of this review.
I also extend my thanks to all the faculty of Computer Engineering who directly or
indirectly encouraged me.
CONTENTS

Sr.No. Title Of Chapter Page No.

1. Problem Statement 5

2. Introduction 6

3. Theory 7

4. Result 10

5. Conclusion 14

6. References 14
PROBLEM STATEMENT

The goal of this project is to develop a predictive model that can anticipate
future stock pricereturns based on historical market data from 2000 to 2020.
The financial market is inherently dynamic and influenced by various factors,
making it challenging to predict stock price movements accurately. In the
context of the Indian market, analyzing historical data from 2000 to 2020 can
provide valuable insights into trends, patterns, and potential indicators that
affect stock prices.
INTRODUCTION

In Stock Market Prediction, the aim is to predict the future value of the financial
stocks of a company. The recent trend in stock market prediction technologies is
the use of machine learning which makes predictions based on the values of
current stock market indices by training on their previous values. Machine
learning itself employs different models to make prediction easier and authentic.
The paper focuses on the use of Regression and LSTM based Machine learning
to predict stock values. Factors considered are open, close, low, high and
volume.
The financial markets, particularly the stock market, represent a dynamic
ecosystem shaped by a myriad of factors, including economic indicators,
geopolitical events, and investor sentiment.Understanding historical market data
is pivotal for unraveling patterns, trends, and potential indicators that can
significantly impact stock prices. This project embarks on a journey to analyze
the ups and downs of the Indian stock market from the year 2000 to 2020,
employing advanced data analysis techniques to predict future stock price
returns.
THEORY

Description of dataset:
Data is scraped on 08 June 2020. every file includes Date, Open, High, Low, Close, Volume.
Note that prices have been adjusted for dividends.

Model/Tools used -in details description:


Pandas: Pandas is an open-source library that is made mainly for working with relational or
labeled data both easily and intuitively. It provides various data structures and operations for
manipulating numerical data and time series. This library is built on top of the NumPy
library.

Numpy: NumPy is a Python library used for working with arrays. It also has functions for
working in the domain of linear algebra, fourier transform, and matrices. NumPy was created
in 2005 by Travis Oliphant. It is an open source project and you can use it freely.

Seaborn: Seaborn is an amazing visualization library for statistical graphics plotting in


Python. It provides beautiful default styles and color palettes to make statistical plots more
attractive.
It is built on the top of matplotlib library and also closely integrated to the data structures
from pandas.

Logistic Regression: This type of statistical model (also known as logit model) is often used
for classification and predictive analytics. Logistic regression estimates the probability of an
event occurring, such as voted or didn’t vote, based on a given dataset of independent
variables. Since the outcome is a probability, the dependent variable is bounded between 0
and 1. In logistic regression, a logit transformation is applied on the odds—that is, the
probability of success divided by the probability of failure. This is also commonly known as
the log odds, or the natural logarithm of odds, and this logistic function is represented by the
following formulas:

Fig 1. Logistic Regression

Naive Bayes: Naive Bayes methods are a set of supervised learning algorithms based on
applying Bayes’ theorem with the “naive” assumption of conditional independence between
every pair of features given the value of the class variable. Bayes’ theorem states the
following relationship, given class variable and dependent feature vector.

Fig 2. Naive Bayes


Long Short-Term Memory (LSTM) Model:

LSTM is designed to address the vanishing gradient problem in traditional RNNs, allowing
for more effective learning and retention of information over longer sequences.
LSTM models are popular in predicting stock prices due to their ability to capture complex
patterns and dependencies in historical stock data. When using LSTMs for stock price
prediction, it's essential to preprocess the data appropriately, experiment with model
architectures, and carefully validate the results to ensure meaningful and accurate predictions.
RESULT
Output is shown below:

Importing The Libraries:

Read CSV File and Print Dataset:

Print The Total Count Of Missing Values


Setting Target Variables And Selecting Features:

Normalizing Dataset:

Splitting Dataset:

Processing Data For LSTM:


Building The LSTM Model:
LSTM Prediction:

Predicted vs True Value:


CONCLUSION

The analysis of ups and downs in the Indian stock market from 2000 to 2020, coupled with
attempts to predict future stock price returns, has yielded valuable insights. This endeavor has
encompassed various stages, from data collection and preprocessing to model development
and evaluation.
Hence, we have successfully analyze ups and downs in the market and predict future stock
price returns based on Indian Market data from 2000 to 2020.

REFERENCES

 https://towardsdatascience.com/predicting-the-survival-of-titanic-
passengers 30870ccc7e8

 https://www.kaggle.com/datasets/sagara9595/stock-data

You might also like