An Introduction to Algorithmic Trading - Edward Leshik - E-Book

An Introduction to Algorithmic Trading E-Book

Edward Leshik

2,1
44,99 €

oder
-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

Interest in algorithmic trading is growing massively - it's cheaper, faster and better to control than standard trading, it enables you to 'pre-think' the market, executing complex math in real time and take the required decisions based on the strategy defined. We are no longer limited by human 'bandwidth'. The cost alone (estimated at 6 cents per share manual, 1 cent per share algorithmic) is a sufficient driver to power the growth of the industry. According to consultant firm, Aite Group LLC, high frequency trading firms alone account for 73% of all US equity trading volume, despite only representing approximately 2% of the total firms operating in the US markets. Algorithmic trading is becoming the industry lifeblood. But it is a secretive industry with few willing to share the secrets of their success. The book begins with a step-by-step guide to algorithmic trading, demystifying this complex subject and providing readers with a specific and usable algorithmic trading knowledge. It provides background information leading to more advanced work by outlining the current trading algorithms, the basics of their design, what they are, how they work, how they are used, their strengths, their weaknesses, where we are now and where we are going. The book then goes on to demonstrate a selection of detailed algorithms including their implementation in the markets. Using actual algorithms that have been used in live trading readers have access to real time trading functionality and can use the never before seen algorithms to trade their own accounts. The markets are complex adaptive systems exhibiting unpredictable behaviour. As the markets evolve algorithmic designers need to be constantly aware of any changes that may impact their work, so for the more adventurous reader there is also a section on how to design trading algorithms. All examples and algorithms are demonstrated in Excel on the accompanying CD ROM, including actual algorithmic examples which have been used in live trading.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 340

Veröffentlichungsjahr: 2011

Bewertungen
2,1 (16 Bewertungen)
0
1
3
8
4
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Contents

Cover

Title page

Copyright page

Acknowledgments

Mission Statement

Part I: Introduction to Trading Algorithms

Chapter 1: History

Chapter 2: All About Trading Algorithms You Ever Wanted to Know …

Chapter 3: Algos Defined and Explained

Chapter 4: Who Uses and Provides Algos

Chapter 5: Why Have They Become Mainstream so Quickly?

Chapter 6: Currently Popular Algos

Chapter 7: A Perspective View From a Tier 1 Company

Chapter 8: How to Use Algos for Individual Traders

Alpha Algo

Chapter 9: How to Optimize Individual Trader Algos

Chapter 10: The Future – Where Do We Go from Here?

Part II: The Leshik-Cralle Trading Methods

Chapter 11: Our Nomenclature

Chapter 12: Math Toolkit

The Arithmetic Moving Average

Exponential Moving Average, EMA

Exponents and Logs

Curves Plus

Functional Notation

Slopes

Derivatives

Sets

Chapter 13: Statistics Toolbox

The Z-Score

Standard Deviation

Correlation

Chapter 14: Data – Symbol, Date, Timestamp, Volume, Price

Chapter 15: Excel Mini Seminar

Chapter 16: Excel Charts: How to Read Them and How to Build Them

Chapter 17: Our Metrics – Algometrics

1. Trade Price

2. %Range

3. Patterns

4. Absolute Deviation

5. Session Volume as % of Shares Outstanding

6. Shares/Transaction

7. Return

8. Sigma Ret

LC Roughness Index

Chapter 18: Stock Personality Clusters

Chapter 19: Selecting a Cohort of Trading Stocks

Chapter 20: Stock Profiling

Chapter 21: Stylistic Properties of Equity Markets

Chapter 22: Volatility

Chapter 23: Returns – Theory

Chapter 24: Benchmarks and Performance Measures

Chapter 25: Our Trading Algorithms Described – The ALPHA ALGO Strategies

1. Alpha-1 (DIFF)

1.a The Alpha-1 Algo Expressed in Excel Function Language

2. Alpha-2 (Ema Plus) V1 and V2

3. Alpha-3 (The Leshik-Cralle Oscillator)

4. Alpha-4 (High Frequency Real-Time Matrix)

5. Alpha-5 (Firedawn)

6. ALPHA-6 (GENERAL PAWN)

The LC Adaptive Capital Protection Stop

Chapter 26: Parameters and How to Set Them

Chapter 27: Technical Analysis (TA)

Crossing Simple Moving Averages

Exponential Moving Averages

Momentum and % Momentum

Rsi

Trix Oscillator

Percentage Price Oscillator (PPO)

The Stochastic

Bollinger Bands

Williams %R

Momentum (Plain Vanilla)

The Arms Index or Trin

Chapter 28: Heuristics, AI, Artificial Neural Networks and Other Avenues to be Explored

Chapter 29: How We Design a Trading Alpha Algo

Chapter 30: From the Efficient Market Hypothesis to Prospect Theory

Chapter 31: The Road to Chaos (or Nonlinear Science)

Chapter 32: Complexity Economics

Chapter 33: Brokerages

Chapter 34: Order Management Platforms and Order Execution Systems

Chapter 35: Data Feed Vendors, Real-Time, Historical

Chapter 36: Connectivity

Chapter 37: Hardware Specification Examples

Chapter 38: Brief Philosophical Digression

Chapter 39: Information Sources

Websites, Journals, Blogs

Appendices

Appendix A: ‘The List’ of Algo Users and Providers

Instinet

Credit Suisse

Fidessa

Deutsche

Barclays

Goldman Sachs

Citigroup

Neonet

Ubs

Fidelity Capital Markets

Appendix B: Our Industry Classification SECTOR Definitions

Appendix C: The Stock Watchlist

Appendix D: Stock Details Snapshot

AAPL

ABT

ADBE

ADSK

AKAM

ALTR

AMAT

AMD

AMGN

AMZN

ANF

APOL

BA

BAIDU

BBBY

BIIB

BLK

CAT

CELG

CEPH

CME

DO

ESRX

ESV

FCX

FDX

FLR

GD

GE

GENZ

GILD

GLW

GOOG

GS

HAL

HESS

HUM

ICE

JNJ

MRK

NBR

NOC

OIH

OXY

PCAR

PFE

RIG

RTN

SBUX

SHLD

SNDK

TDW

TEVA

UPS

WYNN

YHOO

YUM

CD Files List

Bibliography

Index

This edition first published 2011.Copyright © 2011 John Wiley & Sons Ltd

Registered officeJohn Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ,United Kingdom

For details of our global editorial offices, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com.

The right of the author to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988.

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.

Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought.

For other titles in the Wiley Trading SeriesPlease see www.wiley.com/finance

A catalogue record for this book is available from the British Library

ISBN 978-0-470-68954-7 (hardback); ISBN 978-0-470-97935-8 (ebk);ISBN 978-1-119-97509-0 (ebk); ISBN 978-1-119-97510-6 (ebk)

Acknowledgments

Edward

Thanks go to Gerry Prosser, Rob Bruce, Ian Kaplan, Dr. Mivart Thomas, Sebastian Thomas, Jason Sharland, Dan Fultz and the late Gillian Ferguson. To dearest Diana go thanks for fifty years of enthusiasm, encouragement, wisdom and insight – truly a ‘woman for all seasons’.

EDWARD LESHIKLondon, England

My acknowledgements from the western world:

Jane

Could not have done it without you folks –

Lisa Cralle Foster, J. Richard (Rick) Kremer, FAIA, Alan H. Donhoff, Lisa Luckett Cooper, Rose Davis Smith, Helen D. Joseph, Shelly Gerber Tomaszewski, Brad Kremer, Jenny Scott Kremer and the late John Ed Pearce. Then there is Mr. Linker, President of Linker Capital Management Inc., an honor to his father, the late Samuel Harry Linker.

JANE CRALLEKentucky, USA

Both Edward and Jane

Our sincere thanks go to Aimee Dibbens for her encouragement and enthusiasm in getting this book written. Special thanks to the great team at Wiley, Peter Baker, Vivienne Wickham, Caroline Valia-Kollery, Felicity Watts and the anonymous reviewers who helped shape this book.

Our special thanks go to Nick Atar whose enthusiastic encouragement and hospitality at the Waffle helped make this book a reality.

Mission Statement

The goal of this book is to:

1. Demystify algorithmic trading, provide some background on the state of the art, and explain who the major players are.

2. Provide brief descriptions of current algorithmic strategies and their user properties.

3. Provide some templates and tools for the individual trader to be able to learn a number of our proprietary strategies to take up-to-date control over his trading, thus level the playing field and at the same time provide a flavor of algorithmic trading.

4. Outline the math and statistics we have used in the book while keeping the math content to a minimum.

5. Provide the requisite Excel information and explanations of formulas and functions to be able to handle the algorithms on the CD.

6. Provide the reader with an outline ‘grid’ of the algorithmic trading business so that further knowledge and experience can be ‘slotted’ into this grid.

7. Use a ‘first principles’ approach to the strategies for algorithmic trading to provide the necessary bedrock on which to build from basic to advanced strategies.

8. Describe the proprietary ALPHA ALGOS in Part II of the book to provide a solid foundation for later running of fully automated systems.

9. Make the book as self-contained as possible to improve convenience of use and reduce the time to get up and running.

10. Touch upon relevant disciplines which may be helpful in understanding the underlying principles involved in the strategy of designing and using trading algorithms.

11. Provide a detailed view of some of our Watchlist of stocks, with descriptions of each company’s operations. Provide a framework for analyzing each company’s trading characteristics using our proprietary metrics. It is our belief that an intimate knowledge of each stock that is traded provides a competitive advantage to the individual trader enabling a better choice and implementation of algo strategies.

Part I

INTRODUCTION TO TRADING ALGORITHMS

Preface to Part I

Fabrizzio hit the SNOOZE he was dreaming he hit the TRADE key and within 15 milliseconds hundreds of algorithms whirred into life to begin working his carefully prethought commands. ALARM went off again, time to get up with the haze of the dream session End of day lingering, net for the day $10 000 000 … not bad, not bad at all, he smiled as he went into his ‘getting to work routine.’

Can we trade like that? Answering this question is what this book is all about.

Algorithmic trading has taken the financial world by storm. In the US equities markets algorithmic trading is now mainstream.

It is one of the fastest paradigm shifts we have seen in our involvement with the markets over the past 30 years. In addition there are a number of side developments operated by the Tier 1 corporations which are currently the subject of much controversy and discussion – these are based, to a great extent, on ‘controversial’ practices available only to the Tier 1 players who can deploy massive resources which disadvantage the individual, resource-limited, market participant.

No doubt the regulatory machinery will find a suitable compromise in the near future and perhaps curtail some of the more flagrant breaches of ethics and fair play – an area in which Wall Street has rarely excelled and now could well do with some help to restore the dented confidence of the mass public.

Notwithstanding these side issues, the explosive growth of algorithmic trading is a fact, and here to stay.

Let us examine some of the possible reasons for such a major and dramatic shift.

We believe the main reasons for this explosive growth of algorithmic trading are: Rapid cost reduction; better controls; reduction of market impact cost; higher probability of successful trade execution; speed, anonymity and secrecy all being pushed hard by market growth; globalization and the increase in competition; and the huge strides in advancing sophisticated and available technology.

In addition there is also the conceptual and huge advantage in executing these carefully ‘prethought’ strategies at warp speed using computer automation all of which would be well beyond the physical capability of a human trader.

Algorithmic trading offers many advantages besides the ability to ‘prethink’ a strategy. The human trader is spared the real-time emotional involvement with the trade, one of the main sources of ‘burn out’ in young talented traders. So in the medium term there is a manpower saving which, however, may be offset by the requirement for a different type of employee with more expensive qualifications and training.

Algos can execute complex math in real time and take the required decisions based on the strategy defined without human intervention and send the trade for execution automatically from the computer to the Exchange. We are no longer limited by human ‘bandwidth.’ A computer can easily trade hundreds of issues simultaneously using advanced algorithms with layers of conditional rules. This capability on its own would be enough to power the growth of algorithmic trading due to cost savings alone.

As the developments in computer technology facilitated the real-time analysis of price movement combined with the introduction of various other technologies, this all culminated in algorithmic trading becoming an absolute must for survival – both for the Buy side and the Sell side and in fact any serious major trader has had to migrate to the use of automated algorithmic trading in order to stay competitive.

A Citigroup report estimates that well over 50% of all USA equity trades are currently handled algorithmically by computers with no or minimal human trader intervention (mid-2009). There is considerable disagreement in the statistics from other sources and the number of automated algorithmic trades may be considerably higher. A figure of 75% is quoted by one of the major US banks. Due to the secrecy so prevalent in this industry it is not really possible to do better than take an informed guess.

On the cost advantage of the most basic automated algorithmic trading alone (estimated roughly at 6 cents per share manual, 1 cent per share algorithmic) this is a substantial competitive advantage which the brokerages cannot afford to ignore. Exponential growth is virtually assured over the next few years.

As the markets evolve, the recruitment and training of new algo designers is needed. They have to be constantly aware of any regulatory and systemic changes that may impact their work. A fairly high level of innate intellectual skill and a natural talent for solving algorithmic area problems is a ‘must have’ requirement.

This is changing the culture of both the Buy side and Sell side companies. Many traders are replaced by ‘quants’ and there is a strong feeling on the Street of ‘physics’ envy. A rather misplaced and forlorn hope that the ability to handle 3rd order differential equations will somehow magically produce a competitive trading edge, perhaps even a glimpse of the ‘Holy Grail,’ ALPHA on a plate.

As the perception grows in academic circles that the markets are ‘multi-agent adaptive systems’ in a constant state of evolution, far from equilibrium, it is quite reasonable and no longer surprising when we observe their highly complex behavior in the raw.

‘Emergence,’ which we loosely define as a novel and surprising development of a system which cannot be predicted from its past behavior, and ‘phase transition’ which is slightly more capable of concise definition as ‘a precise set of conditions at which this emergent behavior occurs,’ are two important concepts for the trading practitioner to understand. ‘Regime’ shifts in market behavior are also unpredictable from past market behavior, at least at our present state of knowledge, but the shifts are between more or less definable states.

Financial companies and governments from across the world are expected to increase their IT spending during 2010.

Findings from a study by Forrester (January 2010) predicted that global IT investment will rise by 8.1% to reach more than $1.6 trillion this year and that spending in the US will grow by 6.6% to $568 billion.

This figure may need revising upward as the flood of infrastructure vendors’ marketing comes on stream.

As one often quoted Yale professor (Andrew Lo) remarked recently: ‘It has become an arms race.’

Part I of this book is devoted mainly to the Tier 1 companies. We shall first describe in broad outline what algorithms are, describe some of the currently popular trading algorithms, how they are used, who uses them, their advantages and disadvantages. We also take a shot at predicting the future course of algorithmic trading.

Part II of this book is devoted to the individual trader. We shall describe the Leshik-Cralle ALPHA Algorithmic trading methodology which we have developed over a period of 12 years. This will hopefully give the individual trader some ammunition to level the trading playing field. We shall also provide a basic outline of how we design algorithms, how they work and how to apply them as an individual trader to increase your ability to secure your financial future by being in direct and personal control of your own funds.

In general we have found that successful exponents of algorithmic trading work from a wide interdisciplinary knowledge-base. We shall attempt to provide some thoughts and ideas from various disciplines we have visited along the way, if only in the briefest of outlines. Hopefully this will help to provide an ‘information comfort zone’ in which the individual trader can work efficiently and provide a route for deeper study.

Chapter 1

History

The origin of the word ‘Algorithm’ can be traced to circa 820 AD when Al Kwharizmi, a Persian mathematician living in what is now Uzbekistan, wrote a ‘Treatise on the Calculation with Arabic Numerals.’ This was probably the foundation stone of our mathematics. He is also credited with the roots of the word ‘algebra,’ coming from ‘al jabr’ which means ‘putting together.’

After a number of translations in the 12th century, the word ‘algorism’ morphed into our now so familiar ‘algorithm.’

The word ‘algorithm’ and the concept are fundamental to a multitude of disciplines and provide the basis for all computation and creation of computer software.

A very short list of algorithms (we will use the familiar abbreviation ‘algo’ interchangeably) in use in the many disciplines would cover several pages. We shall only describe some of those which apply to implementing trading strategies.

If you are interested in algorithms per se, we recommend Steven Skiena’s learned tome, ‘The Algorithmic Design Manual’ – but be warned, it’s not easy reading. Algos such as ‘Linear Search,’ ‘Bubble Sort,’ ‘Heap Sort,’ and ‘Binary Search’ are in the realm of the programmer and provide the backbone for software engineering (please see Bibliography).

As promised above, in this book (you may be relieved to know) we shall be solely concerned with algorithms as they apply to stock trading strategies. In Part I we deal with the Tier 1 companies (the major players) and in Part II of this book we consider how algorithmic strategies from basic to advanced may best be used, adapted, modified, created and implemented in the trading process by the individual trader.

The earliest surviving description of what we now call an ‘algorithm’ is in Euclid’s Elements (c. 300 BC).

It provides an efficient method for computing the greatest common divisor of two numbers (GCD) making it one of the oldest numerical formulas still in common use. Euclid’s algo now bears his name.

The origin of what was to become the very first algorithmic trade can be roughly traced back to the world’s first hedge fund, set up by Alfred Winslow Jones in 1949, who used a strategy of balancing long and short positions simultaneously with probably a 30:70 ratio of short to long. The first stirring of quant finance …

In equities trading there were enthusiasts from the advent of computer availability in the early 1960s who used their computers (often clandestinely ‘borrowing’ some computer time from the mainframe of their day job) to analyze price movement of stocks on a long-term basis, from weeks to months.

Peter N. Haurlan, a rocket scientist in the 1960s at the Jet Propulsion Laboratory, where he projected the trajectories of satellites, is said to be one of the first to use a computer to analyze stock data (Kirkpatrick and Dahlquist, pp. 135). Combining his technical skills he began calculating exponential moving averages in stock data and later published the ‘Trade Levels Reports.’

Computers came into mainstream use for block trading in the 1970s with the definition of a block trade being $1 million in value or more than 10 000 shares in the trade. Considerable controversy accompanied this advance.

The real start of true algorithmic trading as it is now perceived can be attributed to the invention of ‘pair trading,’ later also to be known as statistical arbitrage, or ‘statarb,’ (mainly to make it sound more ‘cool’), by Nunzio Tartaglia who brought together at Morgan Stanley circa 1980 a multidisciplinary team of scientists headed by Gerald Bamberger.

‘Pair trading’ soon became hugely profitable and almost a Wall Street cult. The original team spawned many successful individuals who pioneered the intensive use of computing power to obtain a competitive edge over their colleagues. David Shaw, James Simons and a number of others’ genealogy can be traced back to those pioneers at Morgan Stanley.

The ‘Black Box’ was born.

As computer power increased almost miraculously according to Moore’s Law (speed doubles every eighteen months, and still does today, well over a third of a century after he first promulgated the bold forecast) and computers became mainstream tools, the power of computerized algorithmic trading became irresistible. This advance was coupled with the invention of Direct Market Access for non Exchange members enabling trades to be made by individual traders via their brokerages.

Soon all major trading desks were running algos.

As Wall Street (both the Buy side mutual funds etc. with their multi-trillion dollar vaults and the aggressive Sell side brokerages) soon discovered that the huge increase in computer power needed different staffing to deliver the promised Holy Grail, they pointed their recruiting machines at the top universities such as Stanford, Harvard and MIT.

The new recruits had the vague misfortune to be labelled ‘quants’ no matter which discipline they originated from – physics, statistics, mathematics …

This intellectual invasion of the financial space soon changed the cultural landscape of the trading floor. The ‘high personality’ trader/brokers were slowly forced to a less dominant position. Technology became all-pervasive.

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!