ebook img

Quantitative Technical Analysis PDF

447 Pages·2015·20.79 MB·English
by  Bandy
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Quantitative Technical Analysis

Auantitative Technical Analysis Ouantitative Tech nlca Analysis An Integrated Approach to Trading System Development and Trade Management Howard B. Bandy Blue Owl Press, Inc. Copyright @ 2015 Howard B. Bandy All rights reserved. First edition 2015 No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any mezrns/ electronic, me- chanical, photocopying, recording, or otherwise without the prior writ- ten permission of the copyright holder, except brief quotations used in a revlew. ISBN-13: 978-W7918385-0 LCCN: 2013952750 Published by Blue Owl Press 3zzo Crescent Avenue, #65 Eugene, OR 974o8 Published zor5 Printed in the United States t8 1716t5 a23456789ro Disclaimer This book is an educational document. Nothing in this book is intend- ed as, nor should it be construed to be, investment advice. The views expressed herein are the personal views of Dr. Howard B. Bandy. Neither the author nor the publisher, Blue Owl Press, Inc., have any commercial interest in any of the products mentioned. All of the products described were purchased by the author at regular retail Prrces. lnvesting and trading is risky and can result in loss of principal. Nei- ther this book in its entirety, nor any portion thereof, nor any follow-on discussion or correspondence related to this book is intended to be a recorrunendation to invest or trade mufual funds, stocks, comrnodities, optionq or any other financial instrument. Neither the author nor the publisher will accept any responsibility for losses which might result from applications of the ideas expressed in the book or from techniques or trading systems described in the book. All results shown are from simulations. None are the results from acfual trades. Neither past acfual performance, nor simulations of performance, assure similar future results, or even profitable fufure results. Prog ra ms The programs used as examples have been tested and are believed to be correct. However, errors may still remain. Programs are"as is" and without support beyond correction of errors. It is the readels respon- sibility to verify the accuracy and correctness of all programs before using them to trade. Results will depend on the specific data series used, and will vary with changes in settings such commission, slip- page and delay between signal and transaction. Programs have been written for clarity and educational value. Com- putational efficienry is not a consideration. Each and every method, technique, and program has many possible options and alternative implementations. No effort has been made to consider all of them, or to provide computer code to anticipate or accofirnodate them. In an effort to maintain ease of understanding the basic concepts il- lustrated by the prograrns, code for detecting and gracefully handling run-time errors has been omitted. Algorithms and prograrns are not guaranteed to be either without error or suitable for use. Do careful and complete testing and validation of all methods, techniques, and programs on your ow'n computer using your owrr data before using any in live trading. Program code that has a "Figure" or "Listtng" number can be down- loaded from the book's website: http : / /www.QuantitativeTechnicalAnalysis .con/ Pnognams. html When copying and pasting any programcode, be awareof twocommon causes of introduced errors: . line wrap o quotation marks Errata If you find an error, please report it in an e-mail to: suppo rt@BIue0wlPress . com Corrections will be posted to the errata file: http : / /www.QuantitativeTechnicatAnalysis. com/Ennata. html Questions, comments, discussion Post questions and comments, share ideas and results, and participate in a discussion of concepts and techniques at the Blue Owl Press blog site: http: / /www.BlueOwlPness. com/WondPress/ Contents 1 Introduction 15 The Goal .. 1.6 Major Changes 't6 The Process t6 Premises of Technical Analysis t7 Two of Trading 17 Position 19 Development ..2'1. + Data ..21 ..21 The Data .22 Primary data ...22 Auxiliary data .......... ...23 Assume nothing about distribution ...23 Distributions ...23 ...24 in time sequence ...24 List of trades ....24 Distribution of trades ....24 Pattems 26 Non-stationary 26 Synchronization 26 Signal and Noise 27 Data Series are Not Interchangeable 27 7 8 Quantitative Technical Analysis Leaming .27 Subjectivity and Objective Functions ....28 Rank Alternative Systems ....29 Estimate Distributions of Perforrnance ....29 Trader Psychology ....30 Trading Management ....31 Risk Tolerance ....31 Why Traders Stop Trading ....31 Results are too good ....32 Results are not worth the effort ....32 Results are not worth the stress ....32 She has enough money ....32 There is a serious drawdown .. ....32 Confidence .-..JJ Decisions and Uncertainty ....35 Why This is So Hard ....35 Low signal to noise ratio ....35 Nonstationary ....35 Time Series is Different ....36 Feedback ....36 Trend Following ....36 Limited Profit Potential ....36 Different Systems, Same Trades ....36 Very Large ....37 Out-of-sam ....37 Financial Rewards ....37 Competition ....37 Summary ....38 2 Risk and Risk Tolerance ....39 Measurement and Management ....39 Drawdown Defined ....40 Frequency of Action ....41. Minimum Holding Period ....42 Trade Exits ..42 Maximum Adverse Excursion (MAE) ..43 MAE for a single day ..43 MAE for a two-daytrade ..M MAE for amulti-day trade ..45 Intra-day prices are visible ...... ..45 Intra-day prices are invisible ................ ...45 MAE for a series of trades .46 Maximum Favorable Excursion .48 Accumulated MAE .48 Bad Stuff Can Happen ............... .49 Management and measurement should coincide ... .49 Does intra-trade drawdown matter? .49 Contents 9 Mark-to-Market Equivalence 51 Risk Tolerance ......52 Statement of Risk Tolerance 52 Account Size 52 Forecast Horizon 53 Maximum Drawdown ... 53 Degree of Certainty 53 A Chart Illustrating Risk Tolerance ... 53 Tail Risk and Black Swans .55 Estimate of Risk .55 .56 .57 Position Size - safe-f ..... .58 Using Final Equity as a Metric 62 Evaluating Mark-to-Market Equivalence 64 No Guarantee 66 Technique for Risk Management ...... 67 Trade Quality 67 Example System 67 Summary 74 Program Listing 75 3 Programming Environments 77 Trading System Development Platform 78 Default Database 80 Database Setup - End-of-Day 81 Free Database using AmiQuote 82 Data Updates 85 Sources of Free Data 85 ASCII 85 Yahoo Data Download 87 ASCII Import Wizard 87 ASCII Import ...... 88 Subscription Data Providers 88 Data Science and Machine Leaming 90 Python 90 Environments 91 Enthought Canopy 93 Spyder 101 Google ......104 Tutorials 4 ......107 Fundamental Data 108 Over-the-counter Data 110 Data Sources ..... 10 Quantitative Technical Analysis Read and Write Data Files ...........114 AmiBroker ...................1,1.4 Read data seres from disk ........ .....114 Write data series to disk .....114 Write trades to disk .....116 Python ...................117 Read end-of-day history from Yahoo Finance ...........117 Canopy IDE 118 118 119 1.19 Write csv file to disk 122 Read csv file from disk .......... 122 5 Issue Selection 123 Market Research 123 Risk and Profit Potential 124 Simulation Outline ........ 125 Sidebar - Calculating CAR 127 Drawdown as a Function ofHolding Period 129 Profit Potential 131 Risk in Being Short 132 What the Prospector Found 134 Which Issues are "Best?" 138 Universal Objective Function 138 Holding Longer 138 Long and Short 143 Portfolios 143 Summary 145 Estimating Profit Potential - Program A Monte Carlo Simulation ....146 Program Listing ..................... 148 6 Model Development - Preliminaries 153 Introduction 153 A Mining Analogy 1.54 The Past and the Future 155 Two Processes to be Modeled 155 Aspects of Model Development ... 156 Goal 157 Pattem Recognition ........................ 158 Signals to Patterns 158 Sea of Noise 158 Data.... 159 Bar Types 159 Daily Bars 1.59 Intra-day Bars 160

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.