PDF Algorithmic Trading Strategies and the Dow Jones Industrial ...

Algorithmic Trading Strategies and the Dow Jones Industrial Average

Author Jesper Vestergaard

(JV90637) Supervisor ?zlem Dursun-de Neef (Assistant Professor) Department of Economics and Business Economics Characters: 113.607

Aarhus University Business and Social Sciences

July 2015

Abstract

Algorithmic trading or `Algo trading' is a widely used and popular term within the financial world. Huge resources are used to develop these algorithms which can assist and to some extent replace human capital in the stock selecting process.

The individual institutions can develop their own algorithm and customize it to suit their investment philosophy and risk appetite. This thesis sets out to investigate if such an algorithm can be developed and test different investment approaches by applying various strategies on the 30 stocks of the Dow Jones Industrial Average index.

The strategies are built on technical analysis and modern portfolio theory developed by Markowitz. The portfolio theory optimizes the Sharpe ratio to determine the optimal portfolio weights.

It is very interesting to see how a relatively simple algorithm performs compared to a simple buy and hold strategy and could be developed further to generate higher expected returns.

The thesis focuses on the period from 2005 to 2010. During this period the market experienced high volatility with both bull and bear markets.

The thesis concludes that pure technical strategies underperform compared to the buy and hold strategy with a magnitude of 1.5 percentage points for the `Golden Cross' strategy and 8.5 percentage points for a 5 year trailing simple moving average optimised strategy. The preferred strategies is to use either a combination of technical analysis and portfolio theory which outperforms buy and hold by more than 9 percentage points or a pure portfolio theory strategy which outperformed by 16 percentage points and was by far the best performing strategy!

The main discussion point of the thesis though was that a lot of initiative can be taken and incorporated into the algorithm, thus expecting to be able to create a strategy which would perform better than the technical strategies applied in thesis.

Contents

1. Introduction.................................................................................................................................... 1 1.1 Problem statement .................................................................................................................. 1 1.1.2 Research Questions........................................................................................................... 2 1.2 Delimitations ............................................................................................................................ 2 1.2.1 Data ................................................................................................................................... 2 1.2.2 Portfolio composition........................................................................................................ 3 1.2.3 Market effect..................................................................................................................... 4 1.3 Literature.................................................................................................................................. 4 1.4 Clarifications............................................................................................................................. 5

2. Methodology .................................................................................................................................. 7 3. An introduction to the programing aspect of the thesis................................................................ 8

3.1 The requirements for the software programme...................................................................... 8 3.2 Choosing programming language ............................................................................................ 8 3.3 The structure of the Programme ............................................................................................. 9

3.3.1 Precautions taken during the programming ................................................................... 12 3.3.2 General comments on the programming........................................................................ 13 4. Theory .......................................................................................................................................... 13 4.1 Technical Analysis................................................................................................................... 14 4.1.1 Simple Moving Average................................................................................................... 14 4.1.2 Relative Strength Index ................................................................................................... 16 4.1.3 Moving Average Convergence Divergence ..................................................................... 18 4.1.4 The technical indicator's implementation in the Trading Signal Algorithm.................... 19 4.2 Modern Portfolio Theory ....................................................................................................... 19 4.2.1 The cornerstone of Modern Portfolio Theory................................................................. 19 4.2.2 Sharpe Ratio .................................................................................................................... 22 4.2.3 The Solution Algorithm ................................................................................................... 26 4.3 How the theory helps answering the problem statement..................................................... 28 4.3.1 The risk free rate ............................................................................................................. 31 4.3.2 Applying Fama and French's work in a simulation.......................................................... 31 5. Empirical findings ......................................................................................................................... 35 5.1 Strategies analysed ................................................................................................................ 35 5.1.1 Identifying the optimal technical strategy based on SMA .............................................. 35

5.1.2 Trailing 5 year SMA Technical Analysis ........................................................................... 39 5.1.3 Trailing 10 year SMA Technical Analysis ......................................................................... 40 5.1.4 Golden Cross Technical Analysis ..................................................................................... 40 5.1.5 Modern Portfolio Theory using Sharpe Ratio ................................................................. 41 5.1.6 Technical Analysis in combination with Modern Portfolio Theory ................................. 42 5.1.7 Buy and hold.................................................................................................................... 44 5.2 Data ........................................................................................................................................ 45 5.3 Empirical results ..................................................................................................................... 48 5.3.1 Comments of the findings ............................................................................................... 51 5.4 Is the analysis performed on a `fair' foundation? .................................................................. 51 5.5 Prudent amendments to the analysis .................................................................................... 52 6. Discussion..................................................................................................................................... 55 6.1 Applicability of the paper's empirical findings ....................................................................... 55 6.2 Further improvements of the technical strategies ................................................................ 57 7. Conclusion .................................................................................................................................... 59 References........................................................................................................................................ 62 Appendix 1 ? Chart of Goldman Sachs with technical indicators .................................................... 64 Appendix 2 ? Graphical illustration of portfolio optimisation ......................................................... 65 Appendix 3 ? XOM with 50/200 SMA (Golden Cross) ...................................................................... 66 Appendix 4 ? Damaged Data............................................................................................................ 67

1. Introduction

The Quants are the new heroes of Wall Street! Contrary to earlier days the quantitative analysts who can develop and build trading strategies based on highly complex mathematics and with enormous computing power are impacting and shaping the financial sector.

The Quants develop trading algorithms which can make trading decisions based on different parameters such as the development in the stock price, fundamental changes of the company and/or market catalysts which are expected to move the stock of a company. (Economist 2007)

Locally the Danish bank Jyske Bank even has a tool called "Jyske Quant" which rates and gives recommendations on 10.000 stocks globally based on a wide range of market information (JyskeBank).

Investment bankers and stock analysts are expensive and their capabilities are limited in respect to the amount of stocks they can analyse within a given time span. A trading / stock selecting algorithm can ? to some degree ? replace the need for human capital and increase the number of analysis performed. However, one should incorporate the cost of the Quants to develop the model.

Based on this it is found very interesting to analyse if a master-level student with limited knowledge of programming can develop a trading algorithm which can beat the market and in other ways help the stock selection decision process.

1.1 Problem statement Founded in the above mentioned motivation the following problem statement has been formulated:

How can publicly available stock data be gathered and analysed in an effective way to create a trading algorithm based on technical analysis that can produce profitable buying and selling signals and how can modern portfolio theory be used to minimize risk and optimize return?

Page 1 of 67

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download