Stock Trading Research
Stock Trading Research
Submitted by:
MARC ALESTER P. NICOLAS
Abstract
The primary challenges with stock trading are the identification of the profitable stocks and trading
those stocks without human errors and interference of personal sentiments in order to reap better
returns. In this paper, we propose the automated stock trading in a semi-automated manner .
1. Introduction
Companies or businesses improve their capital via the problem and subscription of stocks
through exchanges or over-the-counter markets via way of means of giving traders a slice of
possession in the company. A trader seeks to profit from the price fluctuations of the shares held.
Trading in the stock market can be very profitable or painfully unprofitable based on the stock-
picking methodology. In order to select profitable stocks, basically there are two different stock
picking methodology namely fundamental and technical analysis. Fundamental analysis takes
into account the overall economy, industry conditions, financial conditions and management of
the organizations whereas in technical analysis instead of measuring the intrinsic value it mainly
studies the stock charts to identify patterns and trend of the stock market. These two techniques
are generally considered as two sides of a coin. It is always a debate which methodology is best.
With the advent of information technology, trading methods have considerably evolved from an
open outcry manner on the stock exchange floor of the stock market to modern stock trading
conducted via electronic exchanges. In early 2000 the e-trading has taken a new dimension
where trades are planned and executed by complex algorithms rather than humans. Auto trading
executes trading systematically by eliminating the human emotional impacts and errors which
results in increased profit for the trader and market liquidity. Another major advantage is that can
trade continuously on all opened markets in the same time, applying the same algorithms over
and over again, without any pause. Technical analysis is the foundation for Auto trading.
Currently there are decision making algorithms such as Pairs Trading, Automated Gaming and
Execution Algorithms such as Iceberg, Volume Weighted Average Price are implemented for
algorithmic trading.
Algorithmic trading is widely used by investment banks, pension funds, mutual funds, and other
buy-side (investordriven) institutional traders, to divide large trades into several smaller trades to
manage market impact and risk. Also algorithmic trading helps banks to trade foreign currency
in order to reduce the risk encountered by the misconduct by human traders. Motivation of
automated trading strategy dates back to 1950’s with portfolio optimization theory by Harry
Markowitz in which he explains how an investor should allocate his wealth over risky securities
so as to maximize his expected utility of total wealth. The second remarkable milestone is the
development of Capital Asset Pricing model by Sharpe (1964), Lintner (1965) and Mossin
(1966). This model determines theoretically appropriate required rate of return of an asset, if that
asset is to be added to an already well-diversified portfolio, given that non-diversifiable risk of
the asset. The third milestone is the linear multifactor risk model by Rosenberg (1974) in which
individual stock returns were assumed to be related to a smaller number of common factors
which was statistical and computational. A relatively recent innovation in financial trading is
high frequency trading a form of automated trading that utilize the computational innovation and
advancement in telecommunication. This trading accounts for 40 to 60% of all trading activity
across the financial markets, including stocks, derivatives and liquid foreign currencies. The
major benefits rendered by auto trading to the financial markets operating are liquidity,
transaction costs and the efficiency of market prices. The purpose of this paper is to provide you
with correct inventory selections the use of gadget studying algorithm, alternate the ones picked
shares with the aid of using the use of buying and selling guidelines within side the semi-
computerized technique with inside the Australian Stock Market.
2. Literature Review
In the authors have proposed an algorithmic stock trading model that combines the signals from
different technical indicators such as Moving Average Convergence-Divergence MCDM, Price
Rate of Change and Stochastic Oscillator in order to provide more accurate trading signals.
Further in the authors have simulated an artificial market in which the different types of traders
such as random agents, human agents, market makers agent and strategic agent trade based on
certain rules. In addition, in the authors have studied the four algorithmic trading strategies. The
first strategy is based on Static Order Book Imbalance in which the volume weighted averages of
the prices are computed in the buy and sell order books. Then two differences are computed from
each average and the last price of the exchange. Depending upon the difference in the sell/buy
side greater than the threshold buy/sell order is placed. The second strategy is based on the
volume average weighted prices in which the weighted prices for the entire market is computed
and compared with the average price for the first orders in the buy book. Based on the
higher/lower than the threshold hold value buy/sell order placed. The third strategy is based on
the trend following which depends only on the price movements. In this, two trend lines, with the
help of regression is computed based on the 4 hour and 1 hour window. If the slope of the two
trend line matches then a buy order is placed. The final strategy is reverse strategy in which buy
order is placed when the price is falling and sell order is placed when the price is rising. It has
been concluded that SOBI, reverse and TF are better.
Also in, the authors have combined the technical analysis with the nearest neighbour
classification. The technical indicators such as moving averages, Relative strength index and
Stochastics and Bollinger bands have been considered in this work. Apart from these indicators,
the features extracted from the price history and trading volumes of the stocks has been used as
input to K-NN algorithm. Based on the output from K-NN, stock is either bought/sold. Also
stop/loss criteria has also been considered.
All of the above authors have all successfully demonstrated the algorithmic trading strategies of
stocks. They have all used only the technical indicators based on past price and volume to predict
the stock performance. It is a fact that only a good technical indicators do not always lead to
better returns. Same holds good for fundamentals too. An organization which is having upper
trend in the stock movement currently but if it does not have good fundamental say management
effectiveness then the trend would not be a long standing one. In our research we intend to use
both fundamental and technical indicator data in order to reap the benefits of both the
methodologies. Also we have used the machine learning algorithm, support vector machine to
predict the trend of the stocks. Finally we hypothetically trade the top 5 stocks suggested by
SVM using the auto trading application developed based on the trading rules such as stop/loss
criteria.
4. Methodology
4.1. Market Selection
The purpose of this paper is to provide you with correct inventory selections the use of gadget studying
algorithm, alternate the ones picked shares with the aid of using the use of buying and selling guidelines
within side the semi-computerized technique within side the Australian Stock Market.
For Health Care sector the trend is upwards which means it is a good sign. The energy sector trend is
depicted in figure 3 and the trend is downwards which means it is not a good sector to choose. There
are totally 98 stocks in health care sector.
The Trend variable is accumulated from ASX. When the fashion is upward as proven in parent 5,
this suggests an amazing inventory and subsequently the variable fashion is coded as 1. If the
fashion is downwards as proven in parent 6 then it indicated now no longer an amazing inventory
and subsequently the variable fashion is coded as zero for such stocks.
In our study for each of the stocks, we tried to infer the monthly trend of the stock by comparing
the current day stock price with the previous day stock price. If the current day stock price is
greater than the previous day stock price for about 40% of the trading days in a month then we
conclude that the stock is having upward trend else it is considered to have downward trend for
that particular month.
Support Vector Machines (SVMs) are supervised learning models that analyse and recognize data for
classification and regression analysis. A support vector machine constructs a hyper plane or set of hyper
planes in a high- or infinitedimensional space, which can be used for classification, regression, or other
tasks .
When there are numerous machine learning algorithms, the reason for choosing SVM is to address the
unbalanced data problem more efficiently. The unbalanced classification problem occurs when there are
many more samples of some classes than others. In our case we have 88% of stocks with downward
trend and 12% stocks with upward trend. The standard classifiers tend to be overwhelmed by the
largescale classes and ignore the small ones and tend to classify any example as belonging to the
majority-class. Even though this is highly accurate under the standard measure of accuracy such a
classifier is useless because it will be able to predict which stocks will tend to have downward trend and
not the upward trend. We are more interested in the stock with upward price trend than downward
price trend as we are interested to know the most profitable stock for investment.
Also in one of the previous research study, it was proved that SVM outperforms the other classification
methods in the predictability of financial movement direction were they forecasted the weekly
movement direction of NIKKEI 225 index .
5. Statistical Analysis Results The results of trend following and performance of the machine learning
algorithms are visualized using confusion matrix . The upward and downward trends are denoted by 1
and 0 respectively. Sensitivity measures the proportion of upward trend stocks that are correctly
identified. Specificity measures the proportion of downward trend stocks that are correctly identified.
Accuracy is the proportion of both upwards and downward trend stock resulting among the total
number of stocks examined.
The highlighted top 5 stocks are recommended for inventory trading. The stocks expected the
usage of Jan, Feb, and March 2015 statistics are used for the Feb, Mar, and April computerized
trading respectively. Based at the stop-loss rule as soon as an inventory goes out of the portfolio,
subsequent inventory with inside the listing will pass into the portfolio.
6. Paper Trading
Based on the stocks predicted by SVM, hypothetically paper trading was done following the stop loss
criteria and we were able to achieve around 16.64% revenue at the end of 3 months. The algorithm
outperformed the ASX returns and this is shown in the below visualization.
Figure 10. Visualization of returns from Paper Trading shown from Feb to April 2015.
Figure 12. The below interactive chart provides visualization of the individual stock daily returns of the
portfolio.
8. Conclusion
So far with inside the research, have completed in screening the 2000+ shares within side the
Australian inventory marketplace primarily based totally at the good appearing sectors and are
available right all the way down to 98 stocks in health care sector. Out of those 98 stocks with
the assist of statistical modelling strategies we've got similarly come right all the way down to
five best stocks for every of the months particularly Jan, Feb, and March 2015. Thus completed
to systematically select out few high go back shares (needles) from the hay of 2000+ stocks.
These shares had been traded with the assist of the auto trading software without human error
and human sentiments interference to yield earnings with the aid of using configuring the trading
guidelines in the application