ML Project
ML Project
DEPARTMENT OF
COMPUTER
ENGINEERING YEAR 2023-24
Semester – VII
Machine Learning
[410242]
BE-B COMPUTER ENGG.
Done By:
Name Roll No
Aditya Mohite 11
KJ COLLEGE OF
ENGINEERING
AND
MANAGEMENT RESEARCH
CERTIFICATE
This is certify that the project entitled
Date: / /
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
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.
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.
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:
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.
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:
Normalizing Dataset:
Splitting Dataset:
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