Team 6 Project Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Stock Value Prediction

Indira Bobburi ([email protected])


Niral Koradia ([email protected])
Sowmya Gowrishankar ([email protected])
Vijay Yadav ([email protected])
Charles Davidson College of Engineering @San Jose State University
One Washington Square, San Jose, California -95192-0080, USA

Abstract — The stock market has always been attracting people researchers in the domain field to delve and develop new
with its high returns but with it comes challenges and risks. A forecasting models. Time series data analysis techniques use
stock exchange market depicts savings and investments that are verifiable information as the premise for evaluating future
advantageous to increase the effectiveness of the national results. Time series data can be defined as numerical data
economy. The future stock returns have some predictive
relationships with the publicly available information of present
collected in a sequence over a period at regular intervals. The
and historical stock market indices. FB PROPHET is a statistical time series data can include the values collected at the end of
model which is known to be efficient for time series forecasting every week, month, quarter, or year etc. The intention is to find
especially for short-term prediction. In this paper, we propose a if there is any link between the data collected so far and in
model for forecasting the stock market trends based on the what way does the data changes. To reduce the risk of
technical analysis using historical stock market data and FB investment, exchange of securities between the seller and buyer
PROPHET model. This model will automate the process of are facilitated by the stock exchanges. A stock exchange is an
predicting the direction of future stock price indices, thereby, organization or a place where the stock traders or investors can
helping the financial specialists choose better timing for deal with stocks. Some of the examples for stock market
purchasing and/or selling of stocks. The results are shown in
terms of web-application as frontend and using Python
organizations include NASDAQ, NYSE, BSE, NSE etc.
programming language. The obtained results reveal that the FB Python is a programming language for statistical
PROPHET model has a strong potential for short-term processing.
prediction of stock market trends.

Index Terms— Time Series Data, Stock Market, Stock Price II. SYSTEM ANALYSIS
Prediction, Data Mining, FB Prophet, Python.

I. INTRODUCTION A. Problem Statement


A stock exchange market depicts savings and
investments that are advantageous to increase the effectiveness
Today we live and breathe data. Forecasting the stock of national economic. The future stock returns have some
exchange data is an important financial subject which involves predictive relationships with the publicly available information
an assumption that the fundamental information publicly of present and historical stock market indices. The investors
available in the past has some predictive relationships to the decide the better time to sell/buy/hold a share in stock market
future stock returns. Stock market forecasting contains based on the former relationship. Every investor is interested in
uncovering the market trends, planning investment tactics, predicting the future stock prices, whether the investor may be
identifying the best time to purchase the stocks and which a long-term investor or a day-trader. This possesses a major
stocks to purchase. A stock exchange or equity business sector challenge to design and develop an effective and efficient
is a non-direct, non-parametric framework that is difficult to predictive model that assists the investors to take appropriate
model with any sensible exactness. It is the mix of speculators decisions.
who need to purchase or offer or hold a share at a specific time.
Prediction will continue to be an exciting locale of research,
making scientists in the analytics field always desiring to B. Existing Systems
enhance the existing forecasting models. The motivation is that One of the significant financial subject that has
companies and individuals are empowered to make investment engrossed the researcher’s attention for many years is
decisions to develop viable system about their future forecasting the stock returns. Investors in the stock market
endeavors. have been attempting to discover an answer to estimate the
Stock trend forecasting is considered as one of the most stock trends to decide the better timing to buy or sell or
difficult tasks to achieve in money related gauging because of hold a share. Forecasting the stock trends have been done
the difficulty in the multifaceted world of stock market. Many both on qualitative analysis and quantitative analysis.
of the investors in the stock market are finding a technique that There are many statistical models available for forecasting
could guarantee easy profiting by forecasting the stock trends stock trends and choosing an appropriate model for a
and minimize the risk of investing. This motivates the forecasting application depends on the format of the data.
C. Proposed Study problem description and a preparatory system to accomplish
In this work we propose a prediction model for the the expectations. The objective of our project is neither to build
time series stock market data. This model will automate a system that makes billions nor to waste billions too. But the
the process of change of stock price indices based on objective is to develop a system that finds the direction of
technical analysis and helps with financial specialists to change of stock price indices based on the co-relations between
choose the better timing for purchasing and selling stocks. stock prices and help the investors in the stock market in taking
Data mining techniques are used to develop the prediction a decision whether to buy/sell/hold a stock by providing the
model and Python programming language is used for results in-terms of visualizations.
visualization of results.
B. Data Collection
III. IMPLEMENTATION Once the understanding of the objective is over, the next
step is to collect the data. Data collection involves the
understanding of initial observations of the data to identify the
Data mining can be interpreted as a knowledge useful subsets from hypotheses of the hidden information. Here
discovery process. Data mining techniques are devised to we use Python script to collect the data from Yahoo finance.
address the problems by providing a reliable model with data
mining features. To construct a model that investigates the
stock patterns by utilizing the past stock exchange trends; FB C. Data Pre-processing: Data Wrangling
PROPHET package has been used. The data pre-processing stage involves all the activities
to prepare the final dataset from the preparatory raw
System architecture is a model that defines the information. The data preparation tasks can be performed
behavior of a system in the conceptual model. The huge several times as there is no specific order. These tasks include
systems are decomposed into subordinate systems to provide the selection of a record, table, attribute and cleaning of data
similar set of services. The beginning layout strategy of for modeling tools. In our methodology, the input data will be
perceiving these sub-systems and building up a structure for converted into a combined value vector list or differentiated
sub-systems control and cooperation is called architecture value vector list. So, for this purpose we use c{base} that refers
design. As shown above, Fig. 3.1 includes major steps to to the combined values vector or list.
implement the system and each step is explained below.
D. Data Processing: Data Training
The complete architecture of the system is shown below. In technical analysis investors use the auto regressive
and moving average models to forecast the stock trends. Major
steps involved here are identification, parameter estimation and
forecasting. These steps are repeated until an appropriate
model is identified for prediction. To process the data, we use
FB PROPHET model.

We have used Prophet because of two main advantages:

1. Prophet makes it much more straightforward to create


a reasonable, accurate forecast. The forecast package
includes many different forecasting techniques
(ARIMA, exponential smoothing, etc), each with their
own strengths, weaknesses, and tuning parameters.
We have found that choosing the wrong model or
parameters can often yield poor results, and it is
unlikely that even experienced analysts can choose
the correct model and parameters efficiently given this
array of choices.

2. Prophet forecasts are customizable in ways that are


intuitive to non-experts. There are smoothing
Fig 1. System architecture parameters for seasonality that allow you to adjust
how closely to fit historical cycles, as well as
A. Understanding the Objective smoothing parameters for trends that allow you to
The first step in developing a project is to understand adjust how aggressively to follow historical trend
the objective which involves an understanding of the intent and changes. For growth curves, you can manually specify
essentials of a system. This comprehension is used as a “capacities” or the upper limit of the growth curve,
allowing you to inject your own prior information H. SCREEN SHOTS
about how your forecast will grow (or decline).
Finally, you can specify irregular holidays to model
like the dates of the Super Bowl, Thanksgiving and
Black Friday.

At its core, the Prophet procedure is an additive regression


model with four main components:

• A piecewise linear or logistic growth curve trend.


Prophet automatically detects changes in trends by
selecting changepoints from the data.
• A yearly seasonal component modeled using Fourier
series.
• A weekly seasonal component using dummy
variables.
• A user-provided list of important holidays. Fig 2. Home Page

E. Forecasting Results
The process of making predictions of the future by
relying upon the past and present data is known as forecasting.
Various prediction techniques are used by the stock analysts to
evaluate the future stock trends value. Prediction also offers a
significant standard for organizations that have a long-term
perception of actions. We use ‘forecast’ package for predicting
the future stock trends based on the analysis of past trends.
This ‘forecast’ package provides several forecasting functions
for displaying the time series predictions along with
exponential smoothing and space models.

F. Plot Visualizations
Data visualization is a graphical representation of the
numerical data. In our methodology, after forecasting the stock
Fig 3. The Prediction with the Company’s Wiki Entry Gist
market trends we visualize the results for short-term investment
assistance in-terms of line charts, candlesticks charts, bar
charts, and histograms. Here x-axis shows the time in-terms of
year/months/days and y-axis shows the stock price values.

G. View and Analyze Results


Once after plotting the results in-terms of
visualizations we can find out the correlations to get the
short-term predictions. In the next section we provide
some of the screen shots by which the investor can analyze
and predict the future stock trends of a company at a
specific time. So, the investors in the stock market can use
this as assistance to sell/buy/hold a share.

Fig 4. The Predicted Stock Price for tomorrow. Figure also


shows the plot of the actual stock price against the predictions
[3] Li Bing, Chan, K. C. C., C. Ou, "Public sentiment analysis in
Twitter data for prediction of a company's stock price
movements", 11th IEEE International Conference on e-Business
Engineering (ICEBE), November 2014, pp. 232-239.
[4] Tao Xing, Yuan Sun, Qian Wang, Guo Yu, “The analysis and
prediction of stock prices”, IEEE International Conference on
Granular Computing (GrC), December 2013, pp. 368–373.
[5] L. M. Patnaik, "Forecasting stock time-series using data
approximation and pattern sequence similarity", International
Journal of Information Processing (IJIP), September 2013, pp.
90-100.
[6] Ayodele A. Adebiyi, Aderemi O. Adewumi, Charles K. Ayo,
"Stock price prediction using the PROPHET model", 16th IEEE
International Conference on Computer Modelling and
Simulation (UKSim), March 2014, pp. 106 -112.
Fig 5. Snippets of the Top 10 news about the company
[7] Qasem A. Al-radaideh, Adel Abu Asaf, Eman Alnagi,
“Predicting stock prices using data mining techniques”, The
International Arab Conference on Information Technology
2013.
[8] Li Zhe; “Research on China's stock exchange markets: problems
and improvements”, International Conference on Education and
Management Technology, 2010. pp 465-469.
[9] Hazem M. El-Bakry, and Wael A. Awad, “Fast forecasting of
stock market prices by using new high speed time delay neural
networks”, International Journal of Computer and Information
Engineering, February 2010, pp. 138-144.
[10] Han, J., Kamber, M., Jian P., “Data mining concepts and
techniques”. San Francisco, CA: Morgan Kaufmann Publishers,
2011.
[11] Enke, D., Thawornwong, S., “The use of data mining and neural
networks for forecasting stock market returns”, Expert Systems
with Applications, 2005, pp. 927-940.
Fig 6. Backend Processing of Data in Prophet

IV. CONCLUSION
In this paper we tried to develop a prediction model for
forecasting the stock market trends based on the technical
analysis using historical time series stock market data and data
mining techniques. The experimental results obtained
demonstrated the potential of PROPHET model to predict the
stock price indices on short-term basis. This could guide the
investors in the stock market to make profitable investment
decisions whether to buy/sell/hold a share. With the results
obtained PROPHET model can compete reasonably well with
emerging forecasting techniques in short-term prediction.

ACKNOWLEDGEMENT
Thanks to Prof. Rakesh Ranjan for his devoted guidance.
The clarity of his comments helped us to make the web
application more useful so that it can be used by general public.
REFERENCES
[1] https://research.fb.com/prophet-forecasting-at-scale/
[2] Banerjee, D., "Forecasting of Indian stock market using time-
series PROPHET model", 2nd IEEE International Conference
on Business and Information Management (ICBIM), January
2014, pp. 131-135.

You might also like