• No results found

Comparing the predictability of the next day stock trend between high volatile and low volatile stocks using a feedforward neural network

N/A
N/A
Protected

Academic year: 2022

Share "Comparing the predictability of the next day stock trend between high volatile and low volatile stocks using a feedforward neural network"

Copied!
42
0
0

Loading.... (view fulltext now)

Full text

(1)

INOM

EXAMENSARBETE TEKNIK, GRUNDNIVÅ, 15 HP

STOCKHOLM SVERIGE 2017,

Comparing the predictability of the next day stock trend between high volatile and low volatile stocks

using a feedforward neural network

FREDRIK GISSLÉN

JONATHAN GYLLENRAM

KTH

(2)

Comparing the predictability of the next day stock trend between high volatile and low

volatile stocks using a feedforward neural network

Fredrik Gissl´ en, Jonathan Gyllenram 2017-06-05

Degree Programme in Computer Science and Engineering Supervisor: Alexander Kozlov

Examiner: ¨Orjan Ekeberg

Swedish title: En unders¨okning av skillnaden i f¨oruts¨agarbarhet av

morgondagens trend mellan h¨ogvolatila och l˚agvolatila aktier med hj¨alp av ett feedforward neural network

School of Computer Science and Communication

(3)

Abstract

An ongoing debate is whether it is possible to predict future price movements for stocks by analysing the historical stock data. Accord- ing to the Effective Market Hypothesis and the Random Walk Theory this should not be possible and according to the Non Random Walk Theory it should be possible. A large group who also believe that it is possible to predict the market are all those traders who often use technical analysis as support in their daily investment decisions.

A commonly used recommendation among traders and technical an- alysts is to trade in stocks with high volatility to achieve maximum profit. If traders generally trade in high volatile stocks and also use similar analytical methods, then their analyzes and predictions may be self-fulfilling. This study investigate whether there is a difference between predicting tomorrow’s trend of high volatile stocks versus low volatile stocks. Machine learning and a feed forward artificial neural network was used as a tool for making the analyzes and predictions.

Ten stocks was selected on the Stockholm Stock Exchange, the five most volatile stocks and the five least volatile stocks. For each stock, stock data from 2001-03-01 until 2017-03-01 was downloaded from Ya- hoo Finance, where 70% of the data was used for training, 15% for validation and 15% for tests. For each stock the tests were repeated ten times and then the average hit rate for each stock was calculated, and also the average hit rate for each test group. The high volatile test group achieves an average hit rate of 59,3% and the low volatile test group achieves an average hit rate of 54,1%. A difference over 5% indicates that our theory holds and that it is easier to predict fu- ture price movements for a stock with high volatility than for a low volatility stock.

(4)

Sammanfattning

En p˚ag˚aende debatt ¨ar huruvida det ¨ar m¨ojligt att f¨oruts¨aga fram- tida kursr¨orelser f¨or aktier. Enligt den effektiva marknadshypotesen och Random Walk teorin s˚a b¨or inte detta vara m¨ojligt. Enligt Non Random Walk teorin s˚a ¨ar det dock m¨ojligt. En stor grupp som ocks˚a tror att det ¨ar m¨ojligt att f¨oruts¨aga marknaden ¨ar alla traders som ofta anv¨ander sig av teknisk analys som st¨od i sina dagliga investeringsbe- slut. En vanligt f¨orekommande rekommendation bland traders och de som till¨ampar teknisk analys ¨ar att handla i aktier med h¨og volatilitet f¨or att uppn˚a maximal vinst. Om traders generellt s¨oker sig till aktier med h¨og volatilitet och ¨aven anv¨ander sig av likartade analysmetoder, kan det vara s˚a att f¨oruts¨agelserna tenderar att bli sj¨alvuppfyllande.

I denna studie unders¨oks d¨arf¨or om det ¨ar n˚agon skillnad mellan att f¨oruts¨aga morgondagens trend f¨or aktier med h¨og volatilitet kontra ak- tier med l˚ag volatilitet. I studien anv¨ands machine learning och mer specifikt ett feed forward artificial neural network som ett verktyg f¨or att g¨ora analyserna och f¨oruts¨agelserna. Totalt valdes tio aktier ut p˚a stockholmsb¨orsen, de fem aktierna med h¨ogst volatilitet och de fem aktierna med l¨agst volatilitet. Aktiedata fr˚an 2001-03-01 fram till 2017-03-01 laddades ner f¨or varje aktie fr˚an Yahoo Finance d¨ar 70%

av datan anv¨ands f¨or tr¨aning, 15% f¨or validation samt 15% f¨or test.

F¨or varje aktie upprepades testerna tio g˚anger och sedan ber¨aknade den genomsnittliga hitraten f¨or varje aktie och d¨arefter den genom- snittliga hitraten f¨or respektive testgrupp. De h¨ogvolatila testgruppen uppn˚ar en genomsnitts hitrate p˚a 59,3 % och den l˚agvolatila testgrup- pen en genomsnitt hitrate p˚a 54,1%. En skillnad p˚a dryga 5% tyder p˚a att v˚aran teori h˚aller och att det ¨ar l¨attare att f¨oruts¨aga framtida kursr¨orelser f¨or en aktie med h¨og volatilitet ¨an f¨or en aktie med l˚ag volatilitet.

(5)

Contents

1 Introduction 1

1.1 Problem Statement . . . 1

1.2 Research Question . . . 2

2 Background 3 2.1 Analysis methods . . . 3

2.1.1 Fundamental analysis . . . 3

2.1.2 Technical analysis . . . 3

2.2 The predictability of the market . . . 3

2.2.1 Efficient Market Hypothesis . . . 4

2.2.2 Random Walk Theory . . . 4

2.2.3 Non-Random Walk Theory . . . 4

2.3 Artificial intelligence . . . 4

2.3.1 Supervised learning . . . 5

2.3.2 Artificial neural network . . . 5

2.3.3 Feed forward neural networks . . . 6

2.3.4 Learning phase . . . 7

2.4 Related work . . . 7

3 Method 8 3.1 Constraints . . . 8

3.2 Data selection . . . 8

3.3 Data processing . . . 9

3.4 Test environment . . . 10

3.4.1 Matlab . . . 10

3.4.2 Backpropagation method . . . 10

3.4.3 The hidden layer . . . 11

3.4.4 Tests . . . 11

4 Results 12 4.1 Results high volatile stocks . . . 12

4.1.1 Ortivus . . . 13

4.1.2 Fingerprint Cards . . . 14

4.1.3 Profilgruppen . . . 14

4.1.4 Bong . . . 15

4.1.5 Feelgood . . . 15

(6)

4.2 Results low volatile stocks . . . 16

4.2.1 Haldex . . . 17

4.2.2 Tele2 . . . 17

4.2.3 Telia Company . . . 18

4.2.4 Investor . . . 18

4.2.5 SEB . . . 19

4.3 Comparison between the two groups . . . 20

5 Discussion 21 5.1 Discussion about high volatility result . . . 21

5.2 Discussion about low volatility result . . . 21

5.3 Discussion about the overall result . . . 21

5.4 Possibility to use method in reality . . . 21

5.5 Reliability . . . 22

6 Conclusion 22 7 Referenses 24 8 Appendix 1 26 8.1 High volatility stocks . . . 26

8.2 Low volatility stocks . . . 31

(7)

1 Introduction

An ongoing debate is whether it is possible to predict future price move- ments for different types of exchange traded securities only by analyzing its historical data. According to the Effective Market Hypothesis (EMH) and the Random Walk Theory (RWT) this should not be possible. According to the Non Random Walk Theory (NRWT) it should be possible. Apparently none of the EMH and RWT can have a wider support among all those people who uses various analysis methods e.g Technical analysis (TA) as a basis for theirs investment decision. This is quite understandable as this hypothesis and theory in short, says that it is not possible to predict future price move- ments by analyzing historical stock data and there is therefore a waste of time to deal with, for example, TA.

Generally when you ask a trader who uses TA if they can recommend some stocks to trade in they often say that you should look for stocks with high volatility. This recommendation is also very common if you read about TA in books or websites about TA. For an example you can read the following on Investopedia.com: “Trading the most volatile stocks is an efficient way to trade, because theoretically these stocks offer the most profit potential”

(Mitchell, 2014).

Assuming that traders generally trades in high volatility stocks, use the same analytical methods (such as TA) and consequently follow the same pattern in the historical stock data, then it may be that their analysis and predictions is self-fulfilling. Therefore our hypothesis is that there is a difference between high volatile stocks and low volatile stocks with respect to the predictability of future price movements. This study are going to examine if our hypothesis is true.

1.1 Problem Statement

This report are going to examine whether there is a difference in the accu- racy of a prediction based on the analysis of historical stock data using a feed forward neural network (FFNN) for stocks with high volatility versus stocks with low volatility.

Due to the size of this study, the problem to predict the next day stock trend

(8)

is simplified to a pattern recognition/classification problem. With some given historical stock data, a classification will be made whether it is up data or down data. Up data is defined as that the stock trend is positive the next trade day, and down data is defined as that the stock trend is negative the next trade day.

For the analysis of the historical stock data, machine learning and more specifically a Feed Forward Artificial Neural Network will be used, which is a model typical used for pattern-recognition/classification problems (C. M.

Bishop. 2006, 226). This tool will be excellent for the analysis since it is desired to identify patterns in the data but don not care how the patterns actually look like. The initial thought was that this tool is able to do much better analyses than what is able to do manually.

The central part of this study is to analyze whether there is a difference in accuracy between trying to predict the price movement of a stock with high volatility compared with a low volatility stock. And because of that the focus is not on optimizing the result and therefore standard models and parameters are going to be used as much as possible in the test environment.

In this study it is considered that if there is a difference in predictability then the difference should be emphasized as long as the tests are done systemati- cally, correctly and that a suitable method for the analysis is used.

1.2 Research Question

The research question for this thesis follows:

“Is there a difference in predictability of high volatile and low volatile stocks with respect to the next day stock trend using a feedforward neural network?”

(9)

2 Background

2.1 Analysis methods

If one does believe that it is possible to predict an asset’s future price trend there are generally two types of analysis methods that can be used: funda- mental analysis and technical analysis. Below the two mentioned analysis methods will be shortly described.

2.1.1 Fundamental analysis

Fundamental analysis (FA) involves analyzing the characteristics of a com- pany in order to estimate its value (Kuepper, 2017a). FA is the process of measuring a security’s intrinsic value by evaluating all aspects of a busi- ness or market (Kuepper, 2017a). FA helps you determine the underlying health of a company by examining the business’ core numbers: its income statements, its earnings releases, its balance sheet, and other indicators of economic health. From these “fundamentals” investors evaluate if a stock is under- or overvalued (Kuepper, 2017a).

2.1.2 Technical analysis

Technical analysis is the evaluation of securities by studying statistics gen- erated by market activity, such as past prices and volume (Kuepper, 2017b).

Technical analysts do not attempt to measure a security’s intrinsic value but instead use stock charts to identify patterns and trends that may suggest how stock price will change in the future (Kuepper, 2017b). This means that a technical analysts is only interested in the price movements in the market and doesn’t care about the intrinsic value of an asset.

2.2 The predictability of the market

Whether it is possible or not to predict an asset’s future price movement is something that always has been a debated topic. As often in economics, there is no definitive answer to the question whether it is possible or not.

Both sides of the debate have different economic theories and hypotheses as the basis for their position on the issue. What speaks for the no-side is the EMH and the RWT. On the yes side there is the NRWT. Bellow, the EMH, RWT and NRWT are shortly described.

(10)

2.2.1 Efficient Market Hypothesis

Efficient Market Hypothesis is an idea partly developed in the 1960s by Eu- gene Fama. EHM states that it is impossible to beat the market because prices already incorporate and reflect all relevant information. This means that supporters of this model believe it is pointless to search for underval- ued stocks or try to predict trends in the market through fundamental or technical analysis. EMH says that, any time you buy and sell securities, you are engaging in a game of chance, not skill. So If markets are efficient and current, the EMH tells us that prices always reflect all information and that the current price also is the correct price.

2.2.2 Random Walk Theory

Random Walk Theory is a stock market theory was developed by Burton Malkiel (2016) during the early 70’s. It states that the past movement or direction of the price of a stock or overall market cannot be used to predict its future movement. RWT says that stocks take a random and unpredictable path. The chance of a stock’s future price going up is the same as going down. A follower of RWT believes that it is impossible to outperform the market without assuming additional risk. A follower of the RWT preaches that both technical analysis and fundamental analysis are largely a waste of time.

2.2.3 Non-Random Walk Theory

In 2001 Andrew W. Lo and A. Craig MacKinlay (2001) wrote the book A Non-Random Walk Down Wall Street. They argue that price movements are not all that random and that predictable components do indeed exist. A Non- Random Walk Down Wall Street is a collection of essays offering empirical evidence that valuable information can be extracted from security prices. Lo and MacKinlay used powerful computers and advanced econometric analysis to test the randomness of security prices. This book presents the predictable components in stock prices.

2.3 Artificial intelligence

Artificial intelligence (AI) was coined by John McCarthy 1955 (Woo, 2011) and has the purpose of creating machines that perceives their environment

(11)

and acts so that the act maximizes its chances of success or maximizes its own utility. Some of the main problems in AI is problem solving, learning, reasoning, inference, deduction and so on. Machine learning is the main branch in AI and involves development and design of algorithms that allow systems to learn through examples or through experience. The algorithms in machine learning can be categorized into different areas. Some of them are unsupervised learning, semi-supervised learning, supervised learning and active learning. There are two base models in machine learning. The first is the generative model and the second is the discriminative model. Discrimina- tive model looks like a black box. Examples of discriminative models include logistic regression, linear regression, neural networks, and so on. Artificial intelligence and machine learning can be applied to many different problem areas, some examples are data mining, robotics, web search engine, human computer interaction, manufacturing, bioengineering, and stock forecasting (Qiu et al. 2012, 283-284).

2.3.1 Supervised learning

If the learning process occurs with a set of input samples and respective an- swers or output samples the learning process is said to be supervised (Suresh, Sundararajan, Savitha, 2013, 8). In supervised learning the system learns a function from the training data. The training data consists of a set of training examples. Each training example consists of an input object together with the desired output value. Algorithm that uses supervised learning then uses the knowledge that it has gotten from the training data and tries to predict the output on new unseen data. A popular algorithm that uses supervised learning is Artificial neural networks (ANN) (Qiu et al. 2012, 293-297).

2.3.2 Artificial neural network

ANN tries to learn in the same way as the human brain is learning. The idea is to imitate the behavior of the neurons in the brain. The human brain consists of billions of neurons (Herculano-Houzel, 2009).

The ANN usually consists of an input layer, a hidden layer and an output layer. Between them there are couplings with corresponding weights (Josef Burger. 2013). The ANN is an adaptive system that is used to model a rela- tionship between input data and output data. The mathematical expression

(12)

Figure 1: Downloaded from http://pages.cs.wisc.edu/ bolo/shipyard/neural/local.html

of the simplest ANN is

o = f (

N

X

n=1

wnxn)

where x1, x2, ..., xN is input values, w1, w2, ..., wN is corresponding weights and o is the output. f is an activation function (Qiu et al. 2012, 294).

2.3.3 Feed forward neural networks

A FFNN is a neural network that consists of a number of neurons (i.e. func- tions) that are distributed in different layers. Each neuron is coupled with every neuron in the previous layer. These couplings is not worth the same but is weighted with weights. That is that the different inputs from the pre- vious neurons are worth different in the current neuron.

Inputs in the form of patterns passes through the graph, layer by layer, until it arrives to the output layer. There is no feedback backwards, i.e. there is no loops in the graph. The data only travels in a one way direction. That’s the reason why the network is called FFNN (Paul Boersma. 2004).

(13)

2.3.4 Learning phase

During FFNNs learning phase the weights of the couplings between neurons are modified. The weight are modified in a way that given an input the correct category in output will have the highest value. The network is using a supervised learning algorithm. Except the input pattern the network also needs to know which output category the pattern belongs to. The learning phase proceeds as follows:

1. A pattern is given as input

2. The pattern changes during the time it passes through the layers until it arrives to the output layer.

3. The output category is compared to the expected category.

4. The weights are modified a little so that if an exact copy of that input pattern is given as input again it will return the correct output category.

The difference between the real outputs and the expected outputs are back propagated from the top layer to lower layers in order to be used to modify the weights. There are many different types of back propagating methods but the details of the different ones is not focused on in this report.

When the network has gone through all the input patterns and respective output categories one say that the network have done an epoch of learning.

The expectation is that after a large amount of epochs the network will be able to remember the pattern-category pairs and after the training is done hopefully even be able to generalize and classify correct when new patterns that it never seen before is presented to the network (Paul Boersma. 2004).

2.4 Related work

There are a lot of studies done on the subject of stock forecasting and machine learning. However, studies that investigate whether there is a difference in accuracy between predicting price movements of low volatile stocks compared to high volatile stocks has not been found.

(14)

3 Method

This study started with a literature study about the stock market, differ- ent kinds of economical theories and whether it is possible to predict future changes in the price of a stock. Then different kind of methods and tools, used to analyze historical stock data and predict future price movements on the stock market was studied.

In the study, the goal was to analyze many different stocks and with a large amount of data. To get this done in a efficient and systematic way it was considered that an appropriate simplification was to define the problem as a classification/pattern recognition problem. Machine learning was used and more specifically a FFNN as a tool for the analysis which is model typical used for pattern-recognition/classification problems (C. M. Bishop. 2006, 226).

3.1 Constraints

The central part of this study was to analyze whether there is a difference in accuracy between trying to predict the price movement of a stock with high volatility compared with a low volatile stock. Because of that the focus was not to optimize the result and therefore standard models and parameters was used in the tests as much as possible. In this report it is consider that if there is a difference in predictability then the difference should be emphasized as long as the tests are done systematically, correctly and a suitable method is used for the analysis.

3.2 Data selection

Yahoo Finance was used to collect the historical data. The data for each stock and day consist of the following entries: Open price, Highest price, Lowest price, Closing price and Volume.

Ten stocks was selected, the five with the highest volatility and the five with the lowest volatility the last 30 days on the Stockholm Stock Exchange. The stocks are listed on either Large Cap, Mid Cap or Small Cap. Most stocks had a historical data from at least 2001-03-01, the stocks with less historical data than that where sorted out and changed to stocks with similar volatility

(15)

and with historical data from at least 2001-03-01. In this study it is assumed that the FFNN will make better predictions, the more data it has to train on. The graphs for the stocks for this period is attached in appendix 1.

The tables below shows the stocks that were selected:

Table 1: High volatile stocks

High volatile stock Volatility Marketplace

Ortivus B 179 Small Cap Stockholm

Fingerprint Cards B 120.05 Large Cap Stockholm Profilgruppen B 78.56 Small Cap Stockholm

Bong 65.39 Small Cap Stockholm

Feelgood 59.33 Small Cap Stockholm

Table 2: Low volatile stocks

High volatile stock Volatility Marketplace

Haldex 5.55 Mid Cap Stockholm

Tele2 B 8.4 Large Cap Stockholm

Telia Company 8.72 Large Cap Stockholm Investor B 12.92 Large Cap Stockholm

SEB A 19.88 Large Cap Stockholm

3.3 Data processing

The historical stock data was processed as following: An input 10 × n matrix and a target 2 × n matrix was created for each stock (in the figure below the columns of the input and target matrices are ilustrated). A column in the input matrix consits of two subsequent days of stock data. In this section this two days is named ”yesterday” and ”today”. Each column in the target matrix consits of information whether the next day stock trend after ”today”

was positive or negative. In this section this day is named ”next day”. Each column in the target matrix consist of two cells: one cell for “up” and one for

“down”. If the closing price of the ”next day” day was higher than ”today”

the up cell was given the value 1 and the down cell value 0 and vice versa if the closing price of ”next day” was lower than ”today”. This was repated

(16)

over the whole dataset.

Tests where made where the number of days in the input matrix was varied from one up to five, and our conclusion was that two days gave the best result. Test with more days than five was not possible to implemate because the training process of the networks became extremely time consuming with more days than that.

Figure 2: Illustration of the columns in the input and output matrices

3.4 Test environment

3.4.1 Matlab

Matlab R2016a and its built-in neural network toolbox was used for the test environment, wich provides algorithms, features and tools for creating, training, visualizing and simulating neural networks.

3.4.2 Backpropagation method

As backpropagation method Bayesian Regularization (BR) was used. The standard backpropagation method in Matlab’s NNtool for pattern recog- nition/classification problem is scaled conjugate gradient backpropagation (SCG). At first SCG was used in the tests but the FFNN did not find a pattern in any of the stocks, the FFNN just guessed on the most common case during the training period. According to Matlab BR can be good for

(17)

more challenging problems, so therfore the tests was remade with BR instead, which also turned out to work much better than SCG.

3.4.3 The hidden layer

The hidden layer size (the number of neurons) was set to ten which is the default configuration in Matlab. In Figure 3 there is a graphical illustration of the FFNN that was used in this study.

Figure 3: The neural network that was used 3.4.4 Tests

In Matlab a FFNN was trained for each stock with its coresponding input- and target matrix. 70% of the data was used for training, 15% for validation and 15% for tests, which is the default configuration in Matlab. The FFNN was retrained ten times for each stock, and then the mean value hit rate was calculated for each stock, and also the overall mean value hitrate for each group was calculated.

(18)

4 Results

In this section, the results for the high volatile group and the low volatile group are first reported separately and further down the results are compared between the two groups.

The meaning of results is defined as the accuracy of test data for the next day’s price trend prediction in the stock.

For each stock two confusion matrices is reported showing the test result for the test that gave the best result and the test that gave the worst result.

Down below is a figure that explains the content of the confusion matrices.

Figure 4: Explenation of the content in the confusion matrices

4.1 Results high volatile stocks

The overall average hit rate for the high volatile stocks was 59.3%. The highest accuracy was obtained on the predictions on Profilgruppen, with an average of 62,9%. The lowest accuracy was obtained on the predictions on Fingerprint Cards B with an average of 53,9%.

Down below is a table with the test results from all ten tests on each stock in the group of high volatile stocks:

(19)

Figure 5: Results for the high volatile stocks

Below are the confusion matrices for each stock from the tests that gave the worst result and the best result:

4.1.1 Ortivus

Figure 6: Ortivus

(20)

4.1.2 Fingerprint Cards

Figure 7: Fingerprint Cards 4.1.3 Profilgruppen

Figure 8: Profilgruppen

(21)

4.1.4 Bong

Figure 9: Bong 4.1.5 Feelgood

Figure 10: Feelgood

(22)

4.2 Results low volatile stocks

The overall average hit rate for the low volatile stocks was 54.1%. The high- est accuracy was obtained on the predictions on Haldex with an average of 56,4%. The lowest accuracy was obtained on the predictions made on Telia with an average of 50,9%.

If one looks at the confusion matrices then one sees that the network hasn’t found any pattern for some of the volatile stocks, but only focuses on the most common option. Down below is a table with the test results from all ten tests on each stock in the group of low volatile stocks:

Figure 11: Results for the low volatile stocks

Below are the confusion matrices for each stock from the tests that gave the worst result and the best result:

(23)

4.2.1 Haldex

Figure 12: Haldex 4.2.2 Tele2

Figure 13: Tele2

(24)

4.2.3 Telia Company

Figure 14: Telia Company 4.2.4 Investor

Figure 15: Investor

(25)

4.2.5 SEB

Figure 16: SEB

(26)

4.3 Comparison between the two groups

For the high volatile stocks, the FFNN had an accuracy of 59.3%, while the low volatile stocks had an accuracy of 54.1% ie. a difference of 5.2%.

Table 3: Results

Hitrate high volatile stocks Hitrate low volatile stocks

59.3% 54.1%

Figure 17: Comparison of the groups

(27)

5 Discussion

5.1 Discussion about high volatility result

The accuracy of the tests on the stocks with high volatility was on average 59.3%, which we consider to be a very good result and better than we ex- pected. However, EMH and the RWT say that it should not be possible to predict the future of the stock market by analyzing historical data. The expected value should be around 50% according to these theories.

5.2 Discussion about low volatility result

The accuracy of the tests on the low volatile stocks was on average 54.1%, which is 5.2% less than for the high volatile stocks. In Haldex and Investor the accuracy reached 56%, which seems to be very high. But if one look at the confusion matrices, one sees that the network does not seem to find any pattern in those stocks. In some of the tests the FFNN just guesses on the most common case. It therefore seems that no pattern can be found in the historical stock data for some of the low volatile stocks. This supports the theory of the RWT.

5.3 Discussion about the overall result

The difference between the high volatile and low volatile tests was about 5.2 perecentage points. We think this are quite a big difference since both should actually be around 50% according to the random walk theory. As it appears from our results, there is a significant difference between high volatility and low volatile stocks when it comes to trying to predict the next day’s stock trend.

5.4 Possibility to use method in reality

Although the accuracy of the high volatile stocks is high, it can be difficult to actually use the methods in real life to earn money. This is because it may be difficult to form a trading strategy that works in the long term. If one is sure that a stock will go up tomorrow, one have to buy the stock before that upturn has already taken place to take advantage of it. The result of this study is based on the fact that one has received today’s stock data

(28)

before trying to predict the trend of tomorrow. So with this in mind, the only possibility to take advantage of the prediction is to try to buy the stock before the rise of tomorrow has already taken place. The only possibility is therfore to bid on the stock before the next day market opening and simply hope that one can buy the stock at a favorable price.

It may also be that one have to trade in heavy leverage products because of the fact that otherwise there will be about no money gain at small percent increases, which means that the losses in case of incorrect forecasts will be high. Whether or not leverage products is used, it is hard to calculate how big the losses will be when the predtictions is wrong.

5.5 Reliability

Our tests show that there is a significant difference in hit rate between the two different groups. The only factor that were of interest in the study when selecting the test stocks was volatility. It is possible that there are other common factors between the stocks than volatility. One common factor that can be observed is that in the group of high volatile stocks 4 out of 5 stocks are listed on the small cap and in the low volatile group 4 out of 5 stocks are listed on the large cap. No other common factor has been found, but we have not made a more detailed comparison. In this study we did tests on ten stocks that were all listed on Stockholm Stock Exchange. It would be interesting to make a larger study with more stocks and maybe even from both Swedish and foreign markets.

The stock data downloaded from Yahoo Finance included the following entries: Open price, Highest price, Lowest price, Closing price and Volume.

Perhaps we could have achieved higher hit rate if we had used more variables in the input data. For example, one could test various TA indicators and oscillators in the input to improve the hit rate.

6 Conclusion

Our study suggests that there actually is a difference in predictability be- tween the high volatile and low volatile stocks we have chosen to make tests on. In the group of high volatile stocks we received an average hit rate of 59.3% and in the low volatile shares we received an average hit rate of 54.1%.

This supports our hypothesis where the expected hit rate should be around

(29)

50%, but for the high volatile it actually was close to 60%. In our tests, we also saw that the nFFNN actually found a pattern, mainly in the high volatile stocks, while in some of the low volatile it did not find any pattern at all but only guessed on the most common case during testing period. In our test case, it appears that four out of five stocks in the low volatile test group were listed on the large cap, while four out of five stocks in the high volatile test group were listed on the small cap. If this was just an occasion, we do not know. It may also be that there are more common factors among the different stocks in each test group but we have not identified that.

(30)

7 Referenses

C. M. Bishop. 2006. Pattern Recognition And Machine Learning.

Cory, Mitchell. 2014.Trading Volatile Stocks with Technical Indicators. In- vestopedia.

http://www.investopedia.com/articles/active-trading/060514/finding-and-trading- volatile-stocks-technical-indicators.asp

(Downloaded 2017-05-02)

Josef Burger. 2013. A Basic Introduction To Neural Networks. Univer- sity Of Wisconsin-Madison.

http://pages.cs.wisc.edu/˜bolo/shipyard/neural/local.html (Downloaded 2017-05-02).

Justin Kuepper. 2017a. Technical Analysis: Fundamental Vs. Technical Analysis. Investopedia.

http://www.investopedia.com/university/technical/techanalysis2.asp#ixzz4ZyyrysaW (Downloaded 2017-05-02)

Justin Kuepper. 2017b. Basics Of Technical Analysis. Investopedia.

http://www.investopedia.com/university/technical/#ixzz4Zyvp8LcE (Downloaded 2017-05-02)

Lo, Andrew W and MacKinlay, A Craig. 2001. A Non-Random Walk Down Wall Street. 1. uppl.Princeton: Princeton University Press.

M. Ghiassi, C. Burnley. 2009 vol 37. Expert Systems with Applications.

Measuring effectiveness of a dynamic artificial neural network algorithm for classification problems.

Malkiel, Burton G. 2016. A Random Walk Down Wall Street. 11. uppl.

New York: WW Norton & Co.

Paul Boersma. 2004. Feed Forward Neural Networks. University Of Ams- terdam.

http://www.fon.hum.uva.nl/praat/manual/Feedforward neural networks.html (Downloaded 2017-05-02).

(31)

Robert C. Qiu, Zhen Hu, Husheng Li, Michael C. Wicks 2012. Cognitive Radio Communications and Networking: Principles and Practice.

Sundaram Suresh, Narasimhan Sundararajan, Ramasamy Savitha 2013. Su- pervised Learning with Complex-valued Neural Networks.

Suzana Herculano-Houzel 2009. The human brain in numbers: a linearly scaled up primate brain.

Woo, Elaine (October 28, 2011). John McCarthy dies at 84; the father of artificial intelligence. Los Angeles Times

(32)

8 Appendix 1

8.1 High volatility stocks

Figure 18: Ortivus B, Volatility: 179

(33)

Figure 19: Fingerprint Cards, Volatility: 120.05

(34)

Figure 20: Profilgruppen, Volatility: 78.6

(35)

Figure 21: Bong, Volatility: 65.4

(36)

Figure 22: Feelgood, Volatility: 59.3

(37)

8.2 Low volatility stocks

Figure 23: Haldex, Volatility: 5.6

(38)

Figure 24: Tele2 B, Volatility: 8.4

(39)

Figure 25: Telia Company, Volatility: 8.7

(40)

Figure 26: Investor B, Volatility: 12.9

(41)

Figure 27: SEB, Volatility: 19.9

(42)

References

Related documents

Similarly, for the interest rate regressions, the standard short-run fixed effects estimate is used rather than the pooled estimator for recursively demeaned data since

Since this API is not written for material detection specifically, a feed forward neural network was created using Tensorflow and trained with the output from Google Cloud

Since both Hypotheses 1 and 3 was confirmed, the result indicated that the Artificial Neural Network method can be used instead of ARIMA to predict the price of the

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

Both Brazil and Sweden have made bilateral cooperation in areas of technology and innovation a top priority. It has been formalized in a series of agreements and made explicit

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

While the resulting accuracy is not as high as other models, this paper might prove useful for those interested in further developing neural networks using data with high resolution

Synthetic data set, Generating synthetic data set, Machine learning, Deep Learning, Convolutional Neural Networks, Machine learning model, Character recognition in natural