0% found this document useful (0 votes)
12 views9 pages

Project Synopsis

This project focuses on creating a web application using the Dash framework and machine learning models to visualize and forecast stock prices based on user input. It employs supervised machine learning techniques, specifically Support Vector Regression and LSTM, on a dataset from Yahoo Finance to predict stock prices and display relevant company information. The methodology includes data extraction, cleaning, and regression analysis to enhance prediction accuracy and provide visual representations of stock price trends.

Uploaded by

Suraj Verma
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)
12 views9 pages

Project Synopsis

This project focuses on creating a web application using the Dash framework and machine learning models to visualize and forecast stock prices based on user input. It employs supervised machine learning techniques, specifically Support Vector Regression and LSTM, on a dataset from Yahoo Finance to predict stock prices and display relevant company information. The methodology includes data extraction, cleaning, and regression analysis to enhance prediction accuracy and provide visual representations of stock price trends.

Uploaded by

Suraj Verma
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

Visualization and

Forecasting Stocks using


Dash

PROJECT SYNOPSIS
OF LAB. PROJECT

BACHELOR OF TECHNOLOGY
Computer Science and Engineering (Data Science)
Semester 5th

SUBMITTED BY: SUBMITTED TO:


Shushant Sharma Mr. Mohit Chowdhary
2000971540053
Priyanshu Sahay
2000971540042
Rajat
2000971540043

Galgotias College of Engineering & Technology


Greater Noida, Uttar Pradesh
India-201306
INTRODUCTION:
Stock investments provide one of the highest returns in the market. Even though they are
volatile in nature, one can visualize share prices and other statistical factors which helps the
keen investors carefully decide on which company they want to spend their earnings on.

A correct prediction of stocks can lead to huge profits for the seller and the broker.
Frequently, it is brought out that prediction is chaotic rather than random, which means it can
be predicted by carefully analyzing the history of respective stock market. Machine learning
is an efficient way to represent such processes. It predicts a market value close to the
tangible value, thereby increasing the accuracy. Introduction of machine learning to the area
of stock prediction has appealed to many researches because of its efficient and accurate
measurements.
The vital part of machine learning is the dataset used. The dataset should be as concrete as
possible because a little change in the data can perpetuate massive changes in the outcome.
In this project, supervised machine learning is employed on a dataset obtained from Yahoo
Finance. This dataset comprises of following five variables: open, close, low, high and
volume. Open, close, low and high are different bid prices for the stock at separate times
with nearly direct names. The volume is the number of shares that passed from one owner to
another during the time period. The model is then tested on the test data. Regression models
are engaged for this conjecture separately. Regression involves minimizing error and LSTM
contributes to remembering the data and results for the long run. Finally, the graphs for the
fluctuation of prices with the dates (in case of Regression based model) and between actual
and predicted price (for the LSTM based model) are plotted.
Developing this simple project idea using the Dash library (of Python), we can make
dynamic plots of the financial data of a specific company by using the tabular data provided
by yfinance python library. On top of it, we can use a machine learning algorithm to predict
the upcoming stock prices.

OBJECTIVE:
 To create a web application using Dash (a python framework) and some machine
learning models (Support Vector Regression Model) which will show company
information (logo, registered name and description) and stock plots based on the
stock code given by the user.

 Also, the ML model will enable the user to get predicted stock prices for the date
inputted by the user.

 This project will also help us to understand some machine learning concepts much
better as learning programmers and also to how these concepts in the real-world
problems.
LITERATURE REVIEW:

In 2018 Jai Jagwani et al. [6] suggested that to identify the relationship between different
existing time series algorithms namely ARIMA and Holt Winter and the stock prices is the
main objective of the proposed work, for the investments a good risk-free range of stock
prices are analyzed and therefore better accuracy of the model can be seen. To find
distinguished results for shares in the stock market, the combination of two different time
series analysis models is opted by producing a range of prices to the consumer of the stocks.
Not complex in nature and estimation of values which are purely based on the past stock
prices for non-seasonal or seasonal is the main advantage of these models. In this
experiment, some limitations are, the work that never takes into consideration and other
circumstances like news about any new market strategy or media release relevant to any
company which may get affected by the prices of stocks.

In 2018 Ishita Parmar et al. [7] suggested that the use [3] of Regression and LSTM based
Machine learning to forecast stock prices. Factors measured are open, close, low, high and
volume. This paper was an attempt to determine the future prices of the stocks of a company
with improved accuracy and reliability using machine learning techniques. LSTM algorithm
resulted in a positive outcome with more accuracy in predicting stock prices.

In 2018 Youxun Lei et al. [8] suggested that [4] multi-category news events are used as
features to develop stock price trend prediction, model. The multi-category events are based
on already defined feature word dictionary. And we have employed both neural networks
and SVM models to analyze the relationship between stock price movements and specific
multi-category news. Experimental results showed that the predefined multi-category news
events are more improved than the baseline bag-of-words feature to predict stock price trend.
As compared to long term prediction, short term prediction is better based on this study.

In 2018 Jeevan B et al. [9] suggested that predicting the share price using Long Short-Term
Memory (LSTM) and Recurrent Neural Networks (RNN) to forecast the stock value on NSE
data using various factors such as current market price, price-earnings ratio, base value and
other anonymous events. The efficiency of the model is analyzed by comparing the true data
and the predicted data using an RNN graph. Machine learning to predict stock price as see
the model is able to predict the stock price very close to the actual price where this model
captures the detailed feature and uses different strategies to make a prediction. The model
train for all the NSE data from the internet and recognize the input and group them and
provide input according to the user configuration this RNN based architecture proved very
efficient in forecasting the stock price by changing the configuration accordingly which also
use backpropagation mechanism while gathering and grouping data to avoid the mixing of
data.

In 2019 Nikou et al. [10] suggested that reduction of future movement of stock prices has
always been a challenging task for the researchers. While the advocates of the efficient
market hypothesis (EMH) believe that it is impossible to design any predictive framework
that can accurately predict the movement of stock prices, there are seminal work in the
literature that have clearly demonstrated that the seemingly random movement patterns in the
time series of a stock price can be predicted with a high level of accuracy. Design of such
predictive models requires choice of appropriate variables, right transformation methods of
the variables, and tuning of the parameters of the models. In this work, we present a very
robust and accurate framework of stock price prediction that consists of an agglomeration of
statistical, machine learning and deep learning models. We use the daily stock price data,
collected at five minutes interval of time, of a very well-known company that is listed in the
National Stock Exchange (NSE) of India

PROBLEM STATEMENT:
Create a machine learning model that will take the ticker of a company stock and the starting
date and the days of number to predict the closing price of the stock of that particular
company and also visually represent the line chart of the predicted closing price of the stocks
with higher accuracy.

.
METHODOLOGY:
 To create a multi-page web application, we will use the dash framework with its
multiple components like dash_core_components dash_html_components, and
dash_bootstrap_components in the python language.

 Stock market prediction seems a complex problem because there are many factors
that have yet to be addressed and it doesn’t seem statistical at first. But by proper use
of machine techniques, one can relate previous data to the current data and train the
machine to learn from it and make appropriate assumptions. Machine learning as
such has many models but this paper focuses on two most important of them and
made the predictions using them.

Figure 1. Flowchart for Regression Based Model

 Regression is used for predicting continuous values through some given independent
values. The project is based upon the use of linear regression algorithm for predicting
correct values by minimizing the error function as given in Figure1. This operation is
called gradient descent. Regression uses a given linear function for predicting
continuous values:

V = a + bK + error

Where, V is discontinuous value;


K represents known independent values;
and, a, b are coefficients.
 Work was carried out on data collected via yfinance module in python through panda library
and calculated the parameter which is to be predicted, the price of the stocks with respect to
time. The data is divided into different train sets for cross validation to avoid over fitting. The
test set is generally kept 20% of the whole dataset. Linear regression as given by the above
equation is performed on the data and then predictions are made, which are plotted to show
the results of the stock market prices vs time.

SYSTEM DESIGN:

The system will take ticker name, starting date and the no. of days to predict as the input,
with the help of ticker name the information and the stock history will be fetched.
In the system the dataset should be as concrete as possible because a little change in the data
can perpetuate massive changes in the outcome. In this project, supervised machine learning
is employed on a dataset obtained from Yahoo Finance (yfinance).

From yfinance API


module

Extracting Close
Ticker Price column and
Name company’s info.
Graph Of
Predicted
Close Prices
Starting
Date 80% data 20% data

Company’s
No. of Info.
Regression Line
days to
predict

List of Predicted
Stock Prices

Figure 3. System Design

This dataset comprises of following five variables: open, close, low, high and volume.
Open, close, low and high are different bid prices for the stock at separate times with nearly
direct names. The volume is the number of shares that passed from one owner to another
during the time period. In data cleaning process useless columns will be removed from the
data-frame and it will be used to predict the stock’s closing price using the regression model.
The obtained data will be represented in the form of the graph with the help of the dash
framework along with the information about the company also.
REQUIREMENT:

Hardware Requirement:
Processor : Pentium-IV and above
Processor Speed : 2.4GHz
Hard Disk : 40 GB and above
RAM : 512 MB and above

Software Requirement:
Operating System : Microsoft Windows 7/8/8.1/10/Xp/Vista
Programming Language Used : Python, HTML, CSS
IDE Tool : VS Code
Interpreter : CPython, Jypython, or PyPy
Framework : Dash Framework

Required Libraries:
 dash= 1.16.2
 Flask= 1.1.2
 Flask-Compress==1.5.0
 gunicorn- 20.0.4
 1xml==4.5.2
 numpy==1.18.5
 pandas==1.1.2
 plotly=-4.10.0
 scikit-learn==0.23.2
 Scipy ==1.5.2
 Sklearn == 0.0
 yfinance == 0.1.54
REFERENCES:

[1] “Stock price prediction using LSTM, RNN and CNN-sliding window model – IEEE
Conference Publication.” [Link] (accessed Dec. 27,
2019).

[2] J. Jagwani, M. Gupta, H. Sachdeva, and A. Singhal, “Stock Price Forecasting Using Data
from Yahoo Finance and Analyzing Seasonal and Nonseasonal Trend,” in 2018 Second
International Conference on Intelligent Computing and Control Systems (ICICCS), Madurai,
India, Jun. 2018, pp. 462–467, Doi: 10.1109/ICCONS.2018.8663035.

[3] I. Parmar et al., “Stock Dec. 2018, pp. 574–576, doi:10.1109/ICSCCC.2018.8703332.

[4] Y. Lei, K. Zhou, and Y. Liu, “Multi-Category Events Driven Stock Price Trends
Prediction,” in 2018 5th IEEE International Conference on Cloud Computing and
Intelligence Systems (CCIS), Nanjing, China, Nov. 2018, pp. 497–501, Doi:
10.1109/CCIS.2018.8691392.

[5] B. Jeevan, E. Naresh, B. P. V. Kumar, and P. Kambli, “Share Price Prediction using
Machine Learning Technique,” in 2018 3rd International Conference on Circuits, Control,
Communication and Computing (I4C), Bangalore, India, Oct. 2018, pp. 1–4, Doi:
10.1109/CIMCA.2018.8739647.

[6] Jagwani, J., Gupta, M., Sachdeva, H., & Singhal, A. (2018, June). Stock price forecasting
using data from Yahoo finance and analysing seasonal and nonseasonal trend. In 2018
Second International Conference on Intelligent Computing and Control Systems
(ICICCS) (pp. 462-467). IEEE.

[7] Parmar, I., Agarwal, N., Saxena, S., Arora, R., Gupta, S., Dhiman, H., & Chouhan, L.
(2018, December). Stock market prediction using machine learning. In 2018 first
international conference on secure cyber computing and communication (ICSCCC) (pp. 574-
576). IEEE.

[8] Lei, Y., Zhou, K., & Liu, Y. (2018, November). Multi-category events driven stock price
trends prediction. In 2018 5th IEEE International Conference on Cloud Computing and
Intelligence Systems (CCIS) (pp. 497-501). IEEE.

[9] Jeevan, B., Naresh, E., & Kambli, P. (2018, October). Share price prediction using
machine learning technique. In 2018 3rd International Conference on Circuits, Control,
Communication and Computing (I4C) (pp. 1-4). IEEE.

[10] Nikou, M., Mansourfar, G., & Bagherzadeh, J. (2019). Stock price prediction using
DEEP learning algorithm and its comparison with machine learning algorithms. Intelligent
Systems in Accounting, Finance and Management, 26(4), 164-174.

You might also like