Project Review
on
INVESTMENT VALUE FORECASTING
Batch No: B12
20FE1A05A3 - M.H.V. Sai Prakash
20FE1A0585 - K . Mahesh Gupta
20FE1A0582 - K.V.S.S. Hemanth
20FE1A0588 - K.V.V.K. Prasad
Under the Guidance of
Dr.G.V.V.Nagaraju
ABSTRACT
In the ever-changing world of stock markets, guessing where prices will go is tough but
really important. This project looks into predicting stock prices using a method called time
series forecasting, with a main focus on the Prophet algorithm. We use a tool called
Yfinance in Python to get real-time stock data and keep our model up-to-date.
Prophet is great at analyzing time series data, helping us catch tricky patterns, seasonal
trends, and changes in stock prices. But since stocks are influenced by lots of things, we
also look at news articles to see how they affect stock prices. By combining our prediction
model with news, we hope to understand how big events impact stock prices.
We don't just rely on old stock data, we also consider how people feel about the market
and breaking news that might affect stock prices. Our goal is to make our stock price
predictions as accurate and timely as possible, giving investors a useful tool for navigating
the unpredictable world of financial markets.
INTRODUCTION
Since ancient times, people have search ways to live comfortably and enjoy luxurious lives.
Many believe that wealth is the key to achieving such a lifestyle. Among the various ways
to make money, investing in the stock market is widely regarded as a promising path. In this
discussion, we explore what investing in the stock market entails and its potential for
improving one's quality of life. The stock market is like a marketplace where people buy and
sell shares of companies. When you buy a share of a company, you essentially own a tiny
piece of that company. Investors hope that the company will do well, and the value of their
shares will increase over time. Additionally, some companies pay their shareholders a
portion of their profits, known as dividends, which can provide investors with regular
income.
Investing in the stock market offers several advantages. Firstly, it provides the opportunity
for significant returns on your investment. Historically, stocks have generated higher returns
compared to other investment options like savings accounts or bonds. Secondly, stocks are
relatively easy to buy and sell, offering investors flexibility and liquidity. You can buy or
sell shares of a company whenever you want, making it convenient to manage your
investments. Moreover, investing in stocks allows you to build wealth over time. By
investing regularly and allowing your investments to grow, you can benefit from the power
of compounding. This means that your money earns returns, which in turn generate more
returns, leading to exponential growth over time. Additionally, investing in stocks can help
protect your money from losing value due to inflation, ensuring that your purchasing power
remains intact.
Despite its potential benefits, investing in the stock market comes with risks. Stock prices
can be volatile, meaning they can go up and down rapidly. This volatility can sometimes
result in significant losses for investors, especially during periods of
economic uncertainty or market downturns. Additionally, picking the right stocks to invest
in and knowing when to buy or sell them can be challenging. It requires research, patience,
and a good understanding of the market. Furthermore, external factors such as changes in
government policies, economic conditions, or global events can impact stock prices and
investor confidence. These uncertainties can make it difficult to predict market movements
accurately, exposing investors to unexpected risks.
LITERATURE SURVEY
Guiying Wei, Weiwei Zhang and Lei Zhou [1]The challenge of stock market prediction
by combining traditional methods based on technical indicators with the analysis of
public sentiment from microblogs. Acknowledging the complexity and volatility of the
stock market, the authors propose a system that integrates historical stock price data with
the influence of public opinion, particularly from social networks like microblogs. The
research highlights the impact of national policy, economic conditions, and unexpected
events on stock prices. By employing the support vector machine (SVM) and sentiment
analysis on microblogs, the proposed system aims to enhance the effectiveness of stock
price trend predictions. The study emphasizes the role of social media in influencing
investor behavior and demonstrates that combining sentiment analysis with existing
prediction methods can yield higher accuracy compared to a single-source system.
F. Liu, X. Li and L. Wang [2] The challenge of stock prediction by introducing a novel
approach that leverages cluster stocks in addition to traditional information. The authors
propose a deep learning model for stock prediction, combining a Long Short-Term
Memory (LSTM) model with an attention mechanism. The use of cluster stocks is
emphasized to enhance the accuracy of stock predictions. The study recognizes the
complexity of the stock market, influenced by economic, political, market, and
psychological factors. The proposed method aims to improve investor decision-making
by incorporating deep learning techniques, which have shown promising results in various
fields. The experiments conducted on data from the Wind Financial Terminal demonstrate
the effectiveness of exploring cluster stocks based on deep learning, providing a valuable
enhancement for stock prediction accuracy.
G. Bathla [3] Traditional methods such as Linear Regression and Support Vector
Regression have been found inadequate for accurate stock price prediction. The study
introduces LSTM due to icapability to capture dependencies in time-series data,
overcoming limitations present in Recurrent Neural Networks (RNN). The experiments
utilize various stock index datasets, including S&P 500, NYSE, NSE, BSE, NASDAQ,
and Dow Jones Industrial Average. The analysis concludes that LSTM outperforms SVR
in terms of accuracy for stock price prediction, demonstrating the promising potential of
deep learning techniques in financial analytics.
S. Mohan, S. Mullapudi, S. Sammeta, P. Vijayvergia and D. C. Anastasiu [4] It
focuses on enhancing stock price prediction accuracy by incorporating a large dataset of
time series data and financial news articles using deep learning models. Traditional
approaches to predicting stock prices based on historical or textual data alone have shown
limitations in accuracy. The study leverages cloud computing to handle the extensive
dataset, which includes daily stock prices for S&P500 companies over five years and
more than 265,000 related financial news articles. By employing deep learning models,
the research aims to provide investors with an automated system that analyzes real-time
financial news alongside historical data to predict stock prices more effectively. The
importance of news sentiment in influencing stock prices is highlighted, and the
utilization of cloud resources is emphasized for real-time model training and inference.
V. Turchenko, P. Beraldi, F. De Simone and L. Grandinetti [5] The features of short-
term stock price prediction using a multi-layer perceptron in a moving simulation
application. The study emphasizes the importance of analyzing input data for accurate
predictions and presents the developed architecture of the predicting model. The
simulation modeling results showcase high prediction accuracy on the historical stock
prices of Fiat company. The introduction highlights the pervasive uncertainty in financial
markets and the critical role of accurate stock price prediction. The paper positions neural
networks, especially multi-layer perceptrons, as promising tools for capturing the
dynamic and nonlinear features of stock market prediction. It refers to previous studies
and surveys that affirm the effectiveness of neural network-based solutions in the
financial field. The conclusion underscores the significance of input data analysis for
improving prediction accuracy in the context of chaotic time series like stock prices.
H. Chen and P. Dyke [6] Time series analysis, modeling, and prediction of stock prices
using the Extended Least Squares (ELS) method for system identification. The approach
treats stock price dynamics as an unknown stochastic dynamic system, with technical
analysis data such as MACD, RSI, MFI, and ATR considered as system inputs. The UK
Lloyds TSB data is used as an example to demonstrate the performance of the modeling
and prediction results. The paper addresses the impact of recent financial crises and the
increasing use of innovative strategies for improved trading performance. The authors
aim to quantitatively assess the effects of technical analysis data on stock market
dynamics and predictability. The simulation results suggest that stock market indicators
may vary in different time periods and with different stocks, highlighting the complexity
of stock market dynamics. The study employs system identification methodology to
estimate unknown parameters and make predictions, contributing insights into the
quantitative relationship between stock prices and technical analysis data.
S. -Q. Wu, C. -C. Tsao, P. -C. Chang, C. -Y. Fan, M. -H. Chen and X. Zhang [7] The
complexity and uncertainty of stock price prediction by incorporating both financial
indicators and patent analysis as evaluation indicators. Patents are considered influential
in assessing a company's innovation activities, impacting stock price turbulence and
fluctuations. The research aims to predict stock prices by collecting patent and financial
data as attributes for regression analysis. The proposed approach utilizes support vector
regression and machine learning techniques. The experimental results demonstrate the
accuracy of the approach in predicting companies' stock prices, emphasizing the
significance of integrating patent analysis alongside traditional financial indicators for
more robust stock price forecasting. The study contributes to the ongoing efforts to
enhance the efficiency of stock price prediction models, acknowledging the intricate
dynamics, complexity, turbulence, and fluctuations inherent in stock markets.
S. Ravikumar and P. Saraf [8] The prediction of stock prices, a crucial aspect of the
dynamic and complex stock market. The study emphasizes the importance of accurate
predictions for aiding investors in making informed decisions and assisting companies
during Initial Public Offerings (IPOs). Notably, the research leverages machine learning
techniques, specifically regression and classification methods, to forecast stock prices.
The regression method predicts the closing stock prices of companies, while the
classification method determines whether the closing prices will increase or decrease the
next day. The paper highlights the significant role of machine learning, addressing the
challenges posed by the vast amount of financial market data. The authors provide insights
into the potential of machine learning to uncover patterns and insights crucial for making
accurate predictions in the volatile stock market. The literature survey references various
studies, emphasizing the application of regression models, 2-tier models for feature
selection, the effectiveness of Support Vector Machine algorithm, and the impact of social
media mining on stock price prediction. The increasing relevance of deep learning models,
particularly Artificial Neural Networks, is underlined for achieving high prediction
accuracy.
K. Ryota and N. Tomoharu [9] The authors propose a stock market prediction method
based on interrelated time series data. While existing prediction models often focus on
individual stock data, this method aims to discover and utilize interrelationships between
the predicted stock and various time series data, such as other stocks, world stock market
indices, foreign exchanges, and oil prices. The proposed approach involves two phases:
an interrelation discovery phase and a prediction phase. The interrelation discovery phase
focuses on extracting interrelationships of changes in stock prices from real data, and the
prediction phase utilizes these discovered interrelationships to predict the daily up and
down changes in the closing value of stocks. The experimental results demonstrate the
effectiveness of the method, particularly in the manufacturing industry, showcasing its
potential for accurate stock market predictions.
S. N. T. Nishitha, S. Bano, G. G. Reddy, P. Arja and G. L. Niharika [10] Stock market
price prediction, a popular research topic across various disciplines. It highlights the
challenges posed by the volatile nature of share markets, influenced by investor
sentiments, economic policies, political changes, and external factors. While
mathematical and statistical approaches, along with computer applications, have been
employed, the advent of artificial intelligence (AI) and machine learning (ML)
algorithms has brought new possibilities. The project presented aims to enhance the
precision and accuracy of share price predictions by utilizing special algorithms,
particularly Recurrent Neural Networks (RNN) with a focus on improving Long-Short
Term Memory (LSTM) applications. The authors emphasize the efficiency of LSTM in
handling datasets with extreme, larger, and minimal fluctuating data. The introduction
underscores the significant impact of stock markets on a nation's economy, emphasizing
the need for accurate predictions to guide investor decisions.
M. Ouahilal, M. El Mohajir, M. Chahhou and B. E. El Mohajir [11] The challenge of
predicting stock prices, proposing a novel hybrid approach that combines Support Vector
Regression (SVR) and the Hodrick-Prescott filter. The closing price in the stock market
is crucial for assessing market sentiment, and economic time series often involve various
components, making it challenging to identify fundamental movements. The paper
emphasizes the need for noise filtering in financial time series to enhance trend analysis
and prediction accuracy. Leveraging regression algorithms, the proposed hybrid model
aims to optimize stock price prediction by incorporating SVR and the Hodrick-Prescott
filter. The research focuses on Maroc Telecom (IAM) financial time series data collected
between 2004 and 2016. Experimental results demonstrate the effectiveness of the hybrid
model in predicting stock prices, highlighting its potential for decision support in
financial forecasting.
I. Parmar et al., [12] This paper addresses the intricate task of predicting stock prices by
combining historical and real-time data analysis with sentiment analysis of news articles.
Acknowledging the complexity of stock market behavior influenced by numerous
factors, the proposed approach integrates Long Short-Term Memory (LSTM), a
successful Recurrent Neural Network (RNN) architecture, for efficient time series
processing. LSTM excels in assigning distinct weights to examples, emphasizing relevant
memory for predicting future outcomes. By leveraging LSTM, the model achieves high
accuracy in forecasting stock market trends and estimating stock prices. Additionally, the
system incorporates sentiment analysis of live news to capture the impact of major events
on traders' decisions, recognizing the significance of sentiments in guiding investment
choices. The integration of LSTM and sentiment analysis provides a comprehensive and
informed recommendation for future stock price movements.
Y. Wei and V. Chaudhary [13] "The Directionality Function Defect of Performance
Evaluation Method in Regression Neural Network for Stock Price Prediction,"This study
challenges the conventional evaluation of Neural Network for Stock Price Prediction
(NNSPP) based on prediction error (PE) metrics, emphasizing the importance of
considering the directionality of stock price movements. Unlike traditional evaluation
methods that focus on the absolute value of prediction error, which lacks financial trading
relevance, the study proposes that predicting the direction (rise or fall) of stock prices is a
fundamental attribute. The authors argue that PE alone cannot effectively evaluate
financial time series due to its inability to reflect the directional movement of stock prices.
A methodology involving six types of neural networks and diverse parameters is
employed, using stock data from Chinese and American markets. The study concludes
that relying solely on PE for evaluating stock prediction models may mislead investors
and result in significant economic losses.
J. H. Moedjahedy, R. Rotikan, W. F. Roshandi and J. Y. Mambu [14] "Stock Price
Forecasting on Telecommunication Sector Companies in Indonesia Stock Exchange Using
Machine Learning Algorithms," This research focuses on stock price prediction in the
telecommunications sector, specifically for five companies: Bakrie Telecom Tbk (BTEL),
PT. XL Axiata Tbk (EXCL), PT. Smartfren Telecom Tbk (FREN), PT. Telekomunikasi
Indonesia Tbl (TLKM), and PT. Indosat Tbk (ISAT). Utilizing machine learning
algorithms, Gaussian Process and SMOreg, the study analyzes stock prices based on a
training dataset from January 1, 2017, to December 31, 2019. The results show that
SMOreg outperforms Gaussian Process, achieving a lower RMSE value of 0.00005,
MAPE of 1.88%, and MBE of 0.00025. The research emphasizes the significance of
effective stock price prediction for informed decision-making in stock trading within the
dynamic market.
L. M and P. Gnanasekaran [15] "Prediction of Stock Price Using Machine
Learning(Classification) Algorithms," This study explores the dynamic and intricate
nature of the stock market, with a primary focus on predicting stock prices through
machine learning techniques. The research acknowledges the complexity of stock market
trends and aims to assist investors in making informed decisions by forecasting stock
prices based on historical data. The proposed system employs two methods, regression
and classification, to predict the closing price of a company's stock and determine whether
the closing price will increase or decrease the next day. The application of machine
learning, particularly deep learning, is highlighted as a game-changer in predicting stock
values, leveraging its potential to uncover patterns and insights previously unnoticed.
EXISTING SYSTEM
Many existing systems rely heavily on historical price data, predefined datasets, and
standard machine learning algorithms. These systems typically train models solely on the
provided datasets and then predict future values based on this training. However, they
often lack the ability to adapt to new and live data of stock prices for companies.
DISADVANTAGES OF EXISTING SYSTEM
• Limited Information: Old models often rely solely on historical price data,
overlooking valuable information from other sources such as news sentiment, social
media, or macroeconomic indicators.
• Lack of Adaptability: These models may struggle to adapt to changing market
conditions or unexpected events since they are trained on historical data and may
not account for novel situations.
• Limited Forecast Horizon: Some old models may have a limited forecast horizon,
making them less useful for long-term investment strategies or for capturing trends
beyond a certain timeframe.
• Lack of Real-Time Analysis: Traditional models often do not incorporate real-time
data updates, which can hinder their ability to react quickly to market changes or
emerging trends.
• Difficulty in Incorporating External Factors: Integrating external factors such as
geopolitical events, regulatory changes, or technological advancements into old
models can be challenging, limiting their predictive accuracy.
PRPOSED SYSTEM
To address the limitations of existing systems, we introduce a novel stock market forecasting
model that leverages time series forecasting, news sentiment analysis, and real-time stock
market data. By integrating these components, our model effectively mitigates the
shortcomings inherent in traditional approaches.
ADVANTAGES OF PROPOSED SYSTEM
• Comprehensive Information Integration: Our model integrates a wide range of
data sources, including historical price data, news sentiment, live stock market data
allowing for a more holistic view of market dynamics and enhancing predictive
accuracy.
• Enhanced Adaptability: By incorporating real-time data and leveraging advanced
algorithms, our model can quickly adapt to changing market conditions and
unforeseen events, ensuring robust performance even in volatile environments.
• Extended Forecast Horizon: With our model, investors can benefit from an
extended forecast horizon, enabling more informed long-term investment decisions
and better capturing trends beyond short-term fluctuations.
• Real-Time Analysis Capability: Our model incorporates real-time data updates,
enabling timely analysis and quick responses to market changes or emerging trends,
enhancing decision-making effectiveness and agility.
• Seamless Integration of Live news: Our model seamlessly integrates live news
that affects the particular stock, enhancing predictive accuracy and providing a
more comprehensive understanding of market movements.
SYSTEM ARCHITECTURE
Algorithm for Training Model/System:
1. Start:
• Begin the training process.
2. Data Collection:
• Collect historical stock data from yfinance and news sentiment data
from News API.
• Combine data sets for integration.
3. Data Preprocessing:
• Clean and preprocess data, handling missing values and aligning
timestamps.
4. Feature Engineering:
• If considering news sentiment, incorporate sentiment scores into the
data.
5. Machine Learning Model Initialization (Prophet):
• Initialize the Prophet machine learning model.
6. Model Training:
• Train the model using historical stock data, incorporating news
sentiment as a regressor if applicable.
7. Future Date Generation:
• Generate a set of future dates for prediction.
8. Make Predictions:
• Use the trained model to make predictions for stock prices.
9. Evaluation:
• Evaluate the accuracy and performance of the model using validation
data.
10. Model Update:
• If necessary, update the model parameters based on performance and
feedback.
11. Stop:
• End the training process.
PREDICTION
INPUT: User can enter any company name
OUTPUT PREDICTION: