1
CHAPTER 1
INTRODUCTION
This chapter emphasizes the importance of prediction of stock
markets and presents an overview of the thesis. Stock market is a venue
where buyers and sellers trade shares, bonds and securities of publicly held
companies. Stock market prediction is the process used to estimate the future
value of a company stock or any other financial instrument that is traded on a
stock exchange. Once the stock market is predicted successfully the viable
prediction can yield high profits. The domain of financial markets is always
subjected to change and they keep fluctuating based on several conditions like
randomness, promulgation of information and volatility. Prediction of stock
markets also helps brokers and agents to guide the traders while taking
important decisions in business. The historical stock prices will also play a
1.1 EVOLUTION OF STOCK MARKETS
The idea of stock markets dates back to 1300s where Venetian
money lenders sold debt issues to individual investors. During 1500s Belgium
boasted of Stock exchanges which exclusively ran on promissory bonds and
notes. Later in the 1600s, the British, Dutch and the French companies gave
corporate charters to English East India Company. During the formation of
East India companies, they sold stocks that paid dividends on the entire
proceeds from the voyages the company undertook rather than taking
individual separate voyages. modern
2
collaborative-stock companies. This led to the growth of the fleets and also
generated greater demand for shares (Smith & Mark 2004).
The New York Stock Exchange (NYSE) is one of the largest and
oldest stock and securities exchange of the world which hosts 82% of the
Standard & P 500 and houses the biggest stock corporations of the
world. It traces its history back to 1792 with 24 brokers and merchants who
framed the rules for trading securities in Buttonwood Agreement. It was
initially named as New York Stock and Exchange Board which was later
called the New York Stock Exchange in 1863. NYSE became a non-profit
corporation in 1971 and in 2006 it became a publicly traded company.
Gradually the stock investors, brokers and even the general public started
using the electronic system to trade stock and securities and it became a
global organization (Smith & Mark 2004).
1.2 TYPES OF STOCK PREDICTION
Prediction techniques are used to calculate the future prices of the
stock in hand. Stock analysis methodologies can be broadly classified into
two types: Fundamental and Technical analysis. Fundamental analysis
focusses on estimation of the value of the underlying company. The intrinsic
value of the share, economic and financial conditions of the company,
management performance of the company are taken into consideration.
Fundamental analysis is generally done by examination of balance sheets,
revenues, income, future growth, return on equity, profit margins and
financial ratios which are the quantitative factors used to estimate the future
value of a stock. The key qualitative fundamentals which are important in
fundamental analysis are business model, competitive advantage,
management and corporate governance. Fundamental analysis is generally
used by long term trade investors to pinpoint rightly priced stocks with
favourable chances (Rouf Nusrat et al. 2021).
3
Technical analysis is a trading technique which is used to estimate
investments and figure out trading opportunities by examination of statistical
trends and patterns collected from charts of trading activity. The technical
analysts believe that historic trading patterns, fluctuations in the price of a
security are noteworthy indicators of predicting the future value of a stock
security. Technical analysis can be applied on stocks, commodities, fixed-
income and forex markets. Technical analysts focus on generating short term
trading signals and patterns. Price trends, Chart patterns, Volume and
momentum indicators, Oscillators, Moving averages, Support and resistance
levels are the types of indicators used in technical analysis.
Fundamental analysis is generally used by long term traders as the
decisions are taken based on both present and past statistically evaluated
information and technical analysis is generally used by swing traders and
short-term day traders as the decisions are taken based on the stock market
trends and prices pertaining to the past data only. Fundamental analysis employs
long duration of time to analyse stocks on comparison with technical analysis
because the value of the stocks will increase in the upcoming future years.
With the advent of machine learning technologies (Li et al. 2017)
and artificial intelligence algorithms, trading decisions are taken utilizing
these algorithms. The machine learning model forecasts the future based on
several inputs called predictors. Since the stock markets function based on
several internal factors is also prone to the butterfly effect. Any event of
importance like political events of the world, economic news, outbreak of war
in the world can affect the stock markets. Machine Learning (ML) models are
very well suited for stock prediction. There are many ML algorithms for
prediction and choosing the best machine learning model depends on the nature
of prediction needed at the hour. Time series data which is indexed at regular
intervals is the predominant data type used for machine learning models.
4
1.3 MACHINE LEARNING MODELS
The machine learning models used for prediction predominantly are
listed below (Li et al. 2017):
Linear Regression uses a set of input variables to predict the
target variable which is the future price of the stock.
Auto-Regressive Integrated Moving Average (ARIMA) is a
family of mathematical functions which uses lagged moving
averages to stabilize time series data.
Support Vector Regression (SVR) works on finding the best
fit hyperplane with a threshold value for high dimensional
dataset.
Artificial Neural Networks (ANN) is powered by back
propagation to solve non-linear complex timeseries problems
by adjusting the weights of inputs
Recurrent Neural Network (RNN) takes input from the current
as well as the past and as stock markets are dynamic, RNN
can be used for prediction process.
Convolutional Neural Network (CNN) uses convolution
operation to forecast the future stock prices.
Long Short-Term Memory (LSTM) has memory units which
is used for storage. It takes advantage of the complexity of
CNN, long term memory of ANN and short-term memory of
RNN to successfully predict the stock markets.
5
1.4 ADVANTAGES OF STOCK PREDICTION
Prediction of stock markets can yield valuable benefits of the stock
traders like:
Successful prediction of stock markets helps in removing the
investor bias. Prediction helps in finding the stocks which has
potential of generating profitable outcome for the investors.
This prevents them from choosing their favorite stock and
channelizes them to choose a correct stock. Analytical
decisions can be taken by the investors with precision.
Once the investors have started performing methods of
fundamental and technical analysis on the stocks this becomes
a practice before making every investment decision
Prior prediction of stock markets carried out after a detailed
study helps in minimizing the losses for the investors. They
familiarize themselves with the prediction strategies and this
yields huge benefits for the traders.
Stock prediction ensures consistency for the investors. Though
there are momentary losses during certain phases due to the
volatility of the market the prediction techniques ensure profit
for the investor than losses.
Prediction techniques help in identifying the entry and exit
points rightly pointing out when to enter and leave the markets
to capitalize the full potential of making revenue.
6
1.5 PROBLEM SPECIFICATION AND OBJECTIVE
Data pre-processing techniques like standardization, data cleaning
cannot be directly applied to stock data. The distribution of stock prices keeps
changing every year and this renders the financial time series extremely
volatile. Historic stock data is fixated with look ahead bias and lags in stock
observations. There are always effects like last day of the week effect,
changes in stop loss order strategy which affects the stock market. Multistep
ahead prediction of stock market is still a major work of concern. Algorithms
used for feature selection had the problem of being trapped in a local
minimum.
The objective of the research work is to
Build a stock prediction model focusing for short term
prediction which selects the optimal features for the stock
forecast using metaheuristic technique.
Generate fake price data by generator and discriminator
networks to overcome the problem of look ahead bias and
create a prediction model for long term prediction based on
the GAN model and technical indicators to overcome the
problem of lookahead bias.
Create a sentiment time series using reddit sentiments, news
headlines, economic indicators, stock securities and
fundamentals and use the sentiment time series for stock
prediction by Recurrent Neural Networks (RNN) to model the
volatility of the stock timeseries curve.
7
1.6 ORGANIZATION OF THE THESIS
Chapter 1 describes the overview and importance of stock market
prediction. The history of stock markets, various techniques of the prediction
model and the advantages of the prediction model are also discussed.
Chapter 2 presents the detailed literature review on prediction
techniques. Chapter 3 explains the metaheuristic-based regression model for
stock prediction.
Chapter 4 presents a detailed work on intelligent stock market
forecast by generative adversarial networks which focusses on generating fake
price data to overcome the problem of look ahead bias.
Chapter 5 provides building a sentimental analysis model for stock
prediction. Chapter 6 summarizes the conclusion of this research work and
gives suggestion on future work.