THE MATHEMATICS OF MONEY MANAGEMENT: RISK ANALYSIS TECHNIQUES FOR TRADERS by Ralph Vince Published by John Wiley & Sons, Inc. Library of Congress Cataloging-in-Publication Data Vince. Ralph. 1958-The mathematics of money management: risk analysis techniques for traders / by Ralph Vince. Includes bibliographical references and index. ISBN 0-471-54738-7 1. Investment analysis—Mathematics. 2. Risk management—Mathematics 3. Program trading (Securities) HG4529N56 1992 332.6'01'51-dc20 91-33547 Preface and Dedication The favorable reception of Portfolio Management Formulas exceeded even the greatest expectation I ever had for the book. I had written it to promote the concept of optimal f and begin to immerse readers in portfolio theory and its missing relationship with optimal f. Besides finding friends out there, Portfolio Management Formulas was surprisingly met by quite an appetite for the math concerning money management. Hence this book. I am indebted to Karl Weber, Wendy Grau, and others at John Wiley & Sons who allowed me the necessary latitude this book required. There are many others with whom I have corresponded in one sort or another, or who in one way or another have contributed to, helped me with, or influenced the material in this book. Among them are Florence Bobeck, Hugo Rourdssa, Joe Bristor, Simon Davis, Richard Firestone, Fred Gehm (whom I had the good fortune of working with for awhile), Monique Mason, Gordon Nichols, and Mike Pascaul. I also wish to thank Fran Bartlett of G & H Soho, whose masterful work has once again transformed my little mountain of chaos, my little truckload of kindling, into the finished product that you now hold in your hands. This list is nowhere near complete as there are many others who, to varying degrees, influenced this book in one form or another. This book has left me utterly drained, and I intend it to be my last. Considering this, I'd like to dedicate it to the three people who have influenced me the most. To Rejeanne, my mother, for teaching me to appre- ciate a vivid imagination; to Larry, my father, for showing me at an early age how to squeeze numbers to make them jump; to Arlene, my wife, part- ner, and best friend. This book is for all three of you. Your influences resonate throughout it. Chagrin Falls, Ohio R. V. March 1992 - 2 - Index Chapter 5 - Introduction to Multiple Simultaneous Positions under the Parametric Approach............................................................................62 Introduction.............................................................................................5 Estimating Volatility........................................................................62 Scope of this book..............................................................................5 Ruin, Risk and Reality......................................................................63 Some prevalent misconceptions..........................................................6 Option pricing models......................................................................63 Worst-case scenarios and stategy........................................................6 A European options pricing model for all distributions....................66 Mathematics notation..........................................................................7 The single long option and optimal f................................................67 Synthetic constructs in this text..........................................................7 The single short option.....................................................................70 Optimal trading quantities and optimal f............................................8 The single position in The Underlying Instrument...........................71 Chapter 1-The Empirical Techniques......................................................9 Multiple simultaneous positions with a causal relationship..............71 Deciding on quantity...........................................................................9 Multiple simultaneous positions with a random relationship...........73 Basic concepts....................................................................................9 Chapter 6 - Correlative Relationships and the Derivation of the Efficient The runs test.....................................................................................10 Frontier.................................................................................................74 Serial correlation...............................................................................11 Definition of The Problem................................................................74 Common dependency errors.............................................................12 Solutions of Linear Systems using Row-Equivalent Matrices..........77 Mathematical Expectation................................................................13 Interpreting The Results...................................................................78 To reinvest trading profits or not......................................................14 Chapter 7 - The Geometry of Portfolios...............................................81 Measuring a good system for reinvestment the Geometric Mean.....14 The Capital Market Lines (CMLs)...................................................81 How best to reinvest.........................................................................15 The Geometric Efficient Frontier.....................................................82 Optimal fixed fractional trading........................................................15 Unconstrained portfolios..................................................................84 Kelly formulas..................................................................................16 How optimal f fits with optimal portfolios.......................................85 Finding the optimal f by the Geometric Mean..................................16 Threshold to The Geometric for Portfolios.......................................86 To summarize thus far......................................................................17 Completing The Loop......................................................................86 Geometric Average Trade.................................................................17 Chapter 8 - Risk Management..............................................................89 Why you must know your optimal f.................................................18 Asset Allocation...............................................................................89 The severity of drawdown................................................................18 Reallocation: Four Methods.............................................................91 Modern portfolio theory...................................................................19 Why reallocate?................................................................................93 The Markovitz model.......................................................................19 Portfolio Insurance – The Fourth Reallocation Technique...............93 The Geometric Mean portfolio strategy............................................21 The Margin Constraint.....................................................................96 Daily procedures for using optimal portfolios..................................21 Rotating Markets..............................................................................97 Allocations greater than 100%..........................................................22 To summarize...................................................................................97 How the dispersion of outcomes affects geometric growth..............23 Application to Stock Trading...........................................................98 The Fundamental Equation of trading..............................................24 A Closing Comment.........................................................................98 Chapter 2 - Characteristics of Fixed Fractional Trading and Salutary APPENDIX A - The Chi-Square Test................................................100 Techniques............................................................................................26 APPENDIX B - Other Common Distributions...................................101 Optimal f for small traders just starting out......................................26 The Uniform Distribution...............................................................101 Threshold to geometric.....................................................................26 The Bernouli Distribution...............................................................101 One combined bankroll versus separate bankrolls............................27 The Binomial Distribution..............................................................102 Threat each play as if infinitely repeated..........................................28 The Geometric Distribution............................................................103 Efficiency loss in simultaneous wagering or portfolio trading.........28 The Hypergeometric Distribution...................................................104 Time required to reach a specified goal and the trouble with fractional The Poisson Distribution................................................................104 f.........................................................................................................29 The Exponential Distribution.........................................................105 Comparing trading systems..............................................................30 The Chi-Square Distribution..........................................................105 Too much sensivity to the biggest loss.............................................30 The Student's Distribution..............................................................106 Equalizing optimal f.........................................................................31 The Multinomial Distribution.........................................................107 Dollar averaging and share averaging ideas......................................32 The stable Paretian Distribution.....................................................107 The Arc Sine Laws and random walks.............................................33 APPENDIX C - Further on Dependency: The Turning Points and Phase Time spent in a drawdown................................................................34 Length Tests.......................................................................................109 Chapter 3 - Parametric Optimal f on the Normal Distribution..............35 The basics of probability distributions..............................................35 Descriptive measures of distributions...............................................35 Moments of a distribution.................................................................36 The Normal Distribution...................................................................37 The Central Limit Theorem..............................................................38 Working with the Normal Distribution.............................................38 Normal Probabilities.........................................................................39 Further Derivatives of the Normal....................................................41 The Lognormal Distribution.............................................................41 The parametric optimal f..................................................................42 The distribution of trade P&L's........................................................43 Finding optimal f on the Normal Distribution..................................44 The mechanics of the procedure.......................................................45 Chapter 4 - Parametric Techniques on Other Distributions...................49 The Kolmogorov-Smirnov (K-S) Test..............................................49 Creating our own Characteristic Distribution Function....................50 Fitting the Parameters of the distribution..........................................52 Using the Parameters to find optimal f.............................................54 Performing "What Ifs"......................................................................56 Equalizing f......................................................................................56 Optimal f on other distributions and fitted curves.............................57 Scenario planning.............................................................................57 Optimal f on binned data..................................................................60 Which is the best optimal f?.............................................................60 - 3 - - 4 - Readers will find this book to be more abstruse than its forerunner. Introduction Hence, this is not a book for beginners. Many readers of this text will have read Portfolio Management Formulas. For those who have not, Chapter 1 of this book summarizes, in broad strokes, the basic concepts SCOPE OF THIS BOOK from Portfolio Management Formulas. Including these basic concepts I wrote in the first sentence of the Preface of Portfolio Management allows this book to "stand alone" from Portfolio Management Formu- Formulas, the forerunner to this book, that it was a book about mathe- las. matical tools. Many of the ideas covered in this book are already in practice by This is a book about machines. professional money managers. However, the ideas that are widespread Here, we will take tools and build bigger, more elaborate, more among professional money managers are not usually readily available to powerful tools-machines, where the whole is greater than the sum of the the investing public. Because money is involved, everyone seems to be parts. We will try to dissect machines that would otherwise be black very secretive about portfolio techniques. Finding out information in boxes in such a way that we can understand them completely without this regard is like trying to find out information about atom bombs. I am having to cover all of the related subjects (which would have made this indebted to numerous librarians who helped me through many mazes of book impossible). For instance, a discourse on how to build a jet engine professional journals to fill in many of the gaps in putting this book can be very detailed without having to teach you chemistry so that you together. know how jet fuel works. Likewise with this book, which relies quite This book does not require that you utilize a mechanical, objective heavily on many areas, particularly statistics, and touches on calculus. I trading system in order to employ the tools to be described herein. In am not trying to teach mathematics here, aside from that necessary to other words, someone who uses Elliott Wave for making trading deci- understand the text. However, I have tried to write this book so that if sions, for example, can now employ optimal f. you understand calculus (or statistics) it will make sense and if you do However, the techniques described in this book, like those in Port- not there will be little, if any, loss of continuity, and you will still be folio Management Formulas, require that the sum of your bets be a able to utilize and understand (for the most part) the material covered positive result. In other words, these techniques will do a lot for you, but without feeling lost. they will not perform miracles. Shuffling money cannot turn losses into Certain mathematical functions are called upon from time to time in profits. You must have a winning approach to start with. statistics. These functions-which include the gamma and incomplete Most of the techniques advocated in this text are techniques that are gamma functions, as well as the beta and incomplete beta functions-are advantageous to you in the long run. Throughout the text you will en- often called functions of mathematical physics and reside just beyond counter the term "an asymptotic sense" to mean the eventual outcome of the perimeter of the material in this text. To cover them in the depth something performed an infinite number of times, whose probability necessary to do the reader justice is beyond the scope, and away from approaches certainty as the number of trials continues. In other words, the direction of, this book. This is a book about account management for something we can be nearly certain of in the long run. The root of this traders, not mathematical physics, remember? For those truly interested expression is the mathematical term "asymptote," which is a straight line in knowing the "chemistry of the jet fuel" I suggest Numerical Recipes, considered as a limit to a curved line in the sense that the distance be- which is referred to in the Bibliography. tween a moving point on the curved line and the straight line approaches I have tried to cover my material as deeply as possible considering zero as the point moves an infinite distance from the origin. that you do not have to know calculus or functions of mathematical Trading is never an easy game. When people study these concepts, physics to be a good trader or money manager. It is my opinion that they often get a false feeling of power. I say false because people tend to there isn't much correlation between intelligence and making money in get the impression that something very difficult to do is easy when they the markets. By this I do not mean that the dumber you are the better I understand the mechanics of what they must do. As you go through this think your chances of success in the markets are. I mean that intelli- text, bear in mind that there is nothing in this text that will make you a gence alone is but a very small input to the equation of what makes a better trader, nothing that will improve your timing of entry and exit good trader. In terms of what input makes a good trader, I think that from a given market, nothing that will improve your trade selection. mental toughness and discipline far outweigh intelligence. Every suc- These difficult exercises will still be difficult exercises even after you cessful trader I have ever met or heard about has had at least one experi- have finished and comprehended this book. ence of a cataclysmic loss. The common denominator, it seems, the Since the publication of Portfolio Management Formulas I have characteristic that separates a good trader from the others, is that the been asked by some people why I chose to write a book in the first good trader picks up the phone and puts in the order when things are at place. The argument usually has something to do with the marketplace their bleakest. This requires a lot more from an individual than calculus being a competitive arena, and writing a book, in their view, is analo- or statistics can teach a person. gous to educating your adversaries. In short, I have written this as a book to be utilized by traders in the The markets are vast. Very few people seem to realize how huge to- real-world marketplace. I am not an academic. My interest is in real- day's markets are. True, the markets are a zero sum game (at best), but world utility before academic pureness. as a result of their enormity you, the reader, are not my adversary. Furthermore, I have tried to supply the reader with more basic in- Like most traders, I myself am most often my own biggest enemy. formation than the text requires in hopes that the reader will pursue This is not only true in my endeavors in and around the markets, but in concepts farther than I have here. life in general. Other traders do not pose anywhere near the threat to me One thing I have always been intrigued by is the architecture of mu- that I myself do. I do not think that I am alone in this. I think most trad- sic -music theory. I enjoy reading and learning about it. Yet I am not a ers, like myself, are their own worst enemies. musician. To be a musician requires a certain discipline that simply In the mid 1980s, as the microcomputer was fast becoming the pri- understanding the rudiments of music theory cannot bestow. Likewise mary tool for traders, there was an abundance of trading programs that with trading. Money management may be the core of a sound trading entered a position on a stop order, and the placement of these entry stops program, but simply understanding money management will not make was often a function of the current volatility in a given market. These you a successful trader. systems worked beautifully for a time. Then, near the end of the decade, This is a book about music theory, not a how-to book about playing these types of systems seemed to collapse. At best, they were able to an instrument. Likewise, this is not a book about beating the markets, carve out only a small fraction of the profits that these systems had just and you won't find a single price chart in this book. Rather it is a book a few years earlier. Most traders of such systems would later abandon about mathematical concepts, taking that important step from theory to them, claiming that if "everyone was trading them, how could they work application, that you can employ. It will not bestow on you the ability to anymore?" tolerate the emotional pain that trading inevitably has in store for you, Most of these systems traded the Treasury Bond futures market. win or lose. Consider now the size of the cash market underlying this futures market. This book is not a sequel to Portfolio Management Formulas. Arbitrageurs in these markets will come in when the prices of the cash Rather, Portfolio Management Formulas laid the foundations for what and futures diverge by an appropriate amount (usually not more than a will be covered here. - 5 - few ticks), buying the less expensive of the two instruments and selling WORST-CASE SCENARIOS AND STATEGY the more expensive. As a result, the divergence between the price of The "hope for the best" part is pretty easy to handle. Preparing for cash and futures will dissipate in short order. The only time that the the worst is quite difficult and something most traders never do. Prepar- relationship between cash and futures can really get out of line is when ing for the worst, whether in trading or anything else, is something most an exogenous shock, such as some sort of news event, drives prices to of us put off indefinitely. This is particularly easy to do when we con- diverge farther than the arbitrage process ordinarily would allow for. sider that worst-case scenarios usually have rather remote probabilities Such disruptions are usually very short-lived and rather rare. An arbitra- of occurrence. Yet preparing for the worst-case scenario is something geur capitalizes on price discrepancies, one type of which is the rela- we must do now. If we are to be prepared for the worst, we must do it as tionship of a futures contract to its underlying cash instrument. As a the starting point in our money management strategy. result of this process, the Treasury Bond futures market is intrinsically You will see as you proceed through this text that we always build a tied to the enormous cash Treasury market. The futures market reflects, strategy from a worst-case scenario. We always start with a worst case at least to within a few ticks, what's going on in the gigantic cash mar- and incorporate it into a mathematical technique to take advantage of ket. The cash market is not, and never has been, dominated by systems situations that include the realization of the worst case. traders. Quite the contrary. Finally, you must consider this next axiom. If you play a game with Returning now to our argument, it is rather inconceivable that the unlimited liability, you will go broke with a probability that ap- traders in the cash market all started trading the same types of systems proaches certainty as the length of the game approaches infinity. Not a as those who were making money in the futures market at that time! Nor very pleasant prospect. The situation can be better understood by saying is it any more conceivable that these cash participants decided to all that if you can only die by being struck by lightning, eventually you will gang up on those who were profiteering in the futures market, There is die by being struck by lightning. Simple. If you trade a vehicle with no valid reason why these systems should have stopped working, or unlimited liability (such as futures), you will eventually experience a stopped working as well as they had, simply because many futures trad- loss of such magnitude as to lose everything you have. ers were trading them. That argument would also suggest that a large participant in a very thin market be doomed to the same failure as trad- Granted, the probabilities of being struck by lightning are extremely ers of these systems in the bonds were. Likewise, it is silly to believe small for you today and extremely small for you for the next fifty years. that all of the fat will be cut out of the markets just because I write a However, the probability exists, and if you were to live long enough, book on account management concepts. eventually this microscopic probability would see realization. Likewise, the probability of experiencing a cataclysmic loss on a position today Cutting the fat out of the market requires more than an understand- may be extremely small (but far greater than being struck by lightning ing of money management concepts. It requires discipline to tolerate and today). Yet if you trade long enough, eventually this probability, too, endure emotional pain to a level that 19 out of 20 people cannot bear. would be realized. This you will not learn in this book or any other. Anyone who claims to be intrigued by the "intellectual challenge of the markets" is not a trader. There are three possible courses of action you can take. One is to The markets are as intellectually challenging as a fistfight. In that light, trade only vehicles where the liability is limited (such as long options). the best advice I know of is to always cover your chin and jab on the The second is not to trade for an infinitely long period of time. Most run. Whether you win or lose, there are significant beatings along the traders will die before they see the cataclysmic loss manifest itself (or way. But there is really very little to the markets in the way of an intel- before they get hit by lightning). The probability of an enormous win- lectual challenge. Ultimately, trading is an exercise in self-mastery and ning trade exists, too, and one of the nice things about winning in trad- endurance. This book attempts to detail the strategy of the fistfight. As ing is that you don't have to have the gigantic winning trade. Many such, this book is of use only to someone who already possesses the smaller wins will suffice. Therefore, if you aren't going to trade in lim- necessary mental toughness. ited liability vehicles and you aren't going to die, make up your mind that you are going to quit trading unlimited liability vehicles altogether if and when your account equity reaches some prespecified goal. If and SOME PREVALENT MISCONCEPTIONS when you achieve that goal, get out and don't ever come back. You will come face to face with many prevalent misconceptions in We've been discussing worst-case scenarios and how to avoid, or at this text. Among these are: least reduce the probabilities of, their occurrence. However, this has not − Potential gain to potential risk is a straight-line function. That is, the truly prepared us for their occurrence, and we must prepare for the more you risk, the more you stand to gain. worst. For now, consider that today you had that cataclysmic loss. Your − Where you are on the spectrum of risk depends on the type of vehicle account has been tapped out. The brokerage firm wants to know what you are trading in. you're going to do about that big fat debit in your account. You weren't expecting this to happen today. No one who ever experiences this ever − Diversification reduces drawdowns (it can do this, but only to a very does expect it. minor extent-much less than most traders realize). Take some time and try to imagine how you are going to feel in − Price behaves in a rational manner. such a situation. Next, try to determine what you will do in such an in- The last of these misconceptions, that price behaves in a rational stance. Now write down on a sheet of paper exactly what you will do, manner, is probably the least understood of all, considering how devas- who you can call for legal help, and so on. Make it as definitive as pos- tating its effects can be. By "rational manner" is meant that when a trade sible. Do it now so that if it happens you'll know what to do without occurs at a certain price, you can be certain that price will proceed in an having to think about these matters. Are there arrangements you can orderly fashion to the next tick, whether up or down-that is, if a price is make now to protect yourself before this possible cataclysmic loss? Are making a move from one point to the next, it will trade at every point in you sure you wouldn't rather be trading a vehicle with limited liability? between. Most people are vaguely aware that price does not behave this If you're going to trade a vehicle with unlimited liability, at what point way, yet most people develop trading methodologies that assume that on the upside will you stop? Write down what that level of profit is. price does act in this orderly fashion. Don't just read this and then keep plowing through the book. Close the But price is a synthetic perceived value, and therefore does not act book and think about these things for awhile. This is the point from in such a rational manner. Price can make very large leaps at times when which we will build. proceeding from one price to the next, completely bypassing all prices The point here has not been to get you thinking in a fatalistic way. in between. Price is capable of making gigantic leaps, and far more fre- That would be counterproductive, because to trade the markets effec- quently than most traders believe. To be on the wrong side of such a tively will require a great deal of optimism on your part to make it move can be a devastating experience, completely wiping out a trader. through the inevitable prolonged losing streaks. The point here has been Why bring up this point here? Because the foundation of any effec- to get you to think about the worst-case scenario and to make contin- tive gaming strategy (and money management is, in the final analysis, a gency plans in case such a worst-case scenario occurs. Now, take that gaming strategy) is to hope for the best but prepare for the worst. sheet of paper with your contingency plans (and with the amount at which point you will quit trading unlimited liability vehicles altogether written on it) and put it in the top drawer of your desk. Now, if the - 6 - worst-case scenario should develop you know you won't be jumping out Pyramiding (adding on contracts throughout the course of a trade) is of the window. viewed in a money management sense as separate, distinct market sys- Hope for the best but prepare for the worst. If you haven't done tems rather than as the original entry. For example, if you are using a these exercises, then close this book now and keep it closed. Nothing trading technique that pyramids, you should treat the initial entry as one can help you if you do not have this foundation to build upon. market system. Each add-on, each time you pyramid further, constitutes another market system. Suppose your trading technique calls for you to add on each time you have a $1,000 profit in a trade. If you catch a MATHEMATICS NOTATION really big trade, you will be adding on more and more contracts as the Since this book is infected with mathematical equations, I have tried trade progresses through these $1,000 levels of profit. Each separate to make the mathematical notation as easy to understand, and as easy to add-on should be treated as a separate market system. There is a big take from the text to the computer keyboard, as possible. Multiplication benefit in doing this. The benefit is that the techniques discussed in this will always be denoted with an asterisk (*), and exponentiation will book will yield the optimal quantities to have on for a given market always be denoted with a raised caret (^). Therefore, the square root of a system as a function of the level of equity in your account. By treating number will be denoted as ^(l/2). You will never have to encounter the each add-on as a separate market system, you will be able to use the radical sign. Division is expressed with a slash (/) in most cases. Since techniques discussed in this book to know the optimal amount to add on the radical sign and the means of expressing division with a horizontal for your current level of equity. line are also used as a grouping operator instead of parentheses, that Another very important synthetic construct we will use is the con- confusion will be avoided by using these conventions for division and cept of a unit. The HPRs that you will be calculating for the separate exponentiation. Parentheses will be the only grouping operator used, and market systems must be calculated on a "1 unit" basis. In other words, if they may be used to aid in the clarity of an expression even if they are they are futures or options contracts, each trade should be for 1 contract. not mathematically necessary. At certain special times, brackets ({ }) If it is stocks you are trading, you must decide how big 1 unit is. It can may also be used as a grouping operator. be 100 shares or it can be 1 share. If you are trading cash markets or Most of the mathematical functions used are quite straightforward foreign exchange (forex), you must decide how big 1 unit is. By using (e.g., the absolute value function and the natural log function). One results based upon trading 1 unit as input to the methods in this book, function that may not be familiar to all readers, however, is the expo- you will be able to get output results based upon 1 unit. That is, you will nential function, denoted in this text as EXP(). This is more commonly know how many units you should have on for a given trade. It doesn't expressed mathematically as the constant e, equal to 2.7182818285, matter what size you decide 1 unit to be, because it's just an hypothetical raised to the power of the function. Thus: construct necessary in order to make the calculations. For each market EXP(X) = e^X = 2.7182818285^X system you must figure how big 1 unit is going to be. For example, if The main reason I have opted to use the function notation EXP(X) you are a forex trader, you may decide that 1 unit will be one million is that most computer languages have this function in one form or an- U.S. dollars. If you are a stock trader, you may opt for a size of 100 other. Since much of the math in this book will end up transcribed into shares. computer code, I find this notation more straightforward. Finally, you must determine whether you can trade fractional units or not. For instance, if you are trading commodities and you define 1 SYNTHETIC CONSTRUCTS IN THIS TEXT unit as being 1 contract, then you cannot trade fractional units (i.e., a unit size less than 1), because the smallest denomination in which you As you proceed through the text, you will see that there is a certain can trade futures contracts in is 1 unit (you can possibly trade quasifrac- geometry to this material. However, in order to get to this geometry we tional units if you also trade minicontracts). If you are a stock trader and will have to create certain synthetic constructs. For one, we will convert you define 1 unit as 1 share, then you cannot trade the fractional unit. trade profits and losses over to what will be referred to as holding pe- However, if you define 1 unit as 100 shares, then you can trade the frac- riod returns or HPRs for short. An HPR is simply 1 plus what you tional unit, if you're willing to trade the odd lot. made or lost on the trade as a percentage. Therefore, a trade that made a If you are trading futures you may decide to have 1 unit be 1 mini- 10% profit would be converted to an HPR of 1+.10 = 1.10. Similarly, a contract, and not allow the fractional unit. Now, assuming that 2 mini- trade that lost 10% would have an HPR of 1+(-.10) = .90. Most texts, contracts equal 1 regular contract, if you get an answer from the tech- when referring to a holding period return, do not add 1 to the percentage niques in this book to trade 9 units, that would mean you should trade 9 gain or loss. However, throughout this text, whenever we refer to an minicontracts. Since 9 divided by 2 equals 4.5, you would optimally HPR, it will always be 1 plus the gain or loss as a percentage. trade 4 regular contracts and 1 minicontract here. Another synthetic construct we must use is that of a market system. Generally, it is very advantageous from a money management per- A market system is any given trading approach on any given market (the spective to be able to trade the fractional unit, but this isn't always true. approach need not be a mechanical trading system, but often is). For Consider two stock traders. One defines 1 unit as 1 share and cannot example, say we are using two separate approaches to trading two sepa- trade the fractional unit; the other defines 1 unit as 100 shares and can rate markets, and say that one of our approaches is a simple moving trade the fractional unit. Suppose the optimal quantity to trade in today average crossover system. The other approach takes trades based upon for the first trader is to trade 61 units (i.e., 61 shares) and for the second our Elliott Wave interpretation. Further, say we are trading two separate trader for the same day it is to trade 0.61 units (again 61 shares). markets, say Treasury Bonds and heating oil. We therefore have a total of four different market systems. We have the moving average system I have been told by others that, in order to be a better teacher, I must on bonds, the Elliott Wave trades on bonds, the moving average system bring the material to a level which the reader can understand. Often on heating oil, and the Elliott Wave trades on heating oil. these other people's suggestions have to do with creating analogies be- tween the concept I am trying to convey and something they already are A market system can be further differentiated by other factors, one familiar with. Therefore, for the sake of instruction you will find numer- of which is dependency. For example, say that in our moving average ous analogies in this text. But I abhor analogies. Whereas analogies may system we discern (through methods discussed in this text) that winning be an effective tool for instruction as well as arguments, I don't like trades beget losing trades and vice versa. We would, therefore, break them because they take something foreign to people and (often quite our moving average system on any given market into two distinct mar- deceptively) force fit it to a template of logic of something people al- ket systems. One of the market systems would take trades only after a ready know is true. Here is an example: loss (because of the nature of this dependency, this is a more advanta- geous system), the other market system only after a profit. Referring The square root of 6 is 3 because the square root of 4 is 2 and 2+2 = back to our example of trading this moving average system in conjunc- 4. Therefore, since 3+3 = 6, then the square root of 6 must be 3. tion with Treasury Bonds and heating oil and using the Elliott Wave Analogies explain, but they do not solve. Rather, an analogy makes trades also, we now have six market systems: the moving average sys- the a priori assumption that something is true, and this "explanation" tem after a loss on bonds, the moving average system after a win on then masquerades as the proof. You have my apologies in advance for bonds, the Elliott Wave trades on bonds, the moving average system the use of the analogies in this text. I have opted for them only for the after a win on heating oil, the moving average system after a loss on purpose of instruction. heating oil, and the Elliott Wave trades on heating oil. - 7 - OPTIMAL TRADING QUANTITIES AND OPTIMAL F when they go to read it if they are subconsciously searching for a single heart. I make no apologies for this; this does not weaken the logic of the Modern portfolio theory, perhaps the pinnacle of money manage- text; rather, it enriches it. This book may take you more than one read- ment concepts from the stock trading arena, has not been embraced by ing to discover many of its hearts, or just to be comfortable with it. the rest of the trading world. Futures traders, whose technical trading ideas are usually adopted by their stock trading cousins, have been re- One of the many hearts of this book is the broader concept of deci- luctant to accept ideas from the stock trading world. As a consequence, sion making in environments characterized by geometric conse- modern portfolio theory has never really been embraced by futures trad- quences. An environment of geometric consequence is an environment ers. where a quantity that you have to work with today is a function of prior outcomes. I think this covers most environments we live in! Optimal f is Whereas modern portfolio theory will determine optimal weightings the regulator of growth in such environments, and the by-products of of the components within a portfolio (so as to give the least variance to a optimal f tell us a great deal of information about the growth rate of a prespecified return or vice versa), it does not address the notion of opti- given environment. In this text you will learn how to determine the op- mal quantities. That is, for a given market system, there is an optimal timal f and its by-products for any distributional form. This is a statisti- amount to trade in for a given level of account equity so as to maximize cal tool that is directly applicable to many real-world environments in geometric growth. This we will refer to as the optimal f. This book pro- business and science. I hope that you will seek to apply the tools for poses that modern portfolio theory can and should be used by traders in finding the optimal f parametrically in other fields where there are such any markets, not just the stock markets. However, we must marry mod- environments, for numerous different distributions, not just for trading ern portfolio theory (which gives us optimal weights) with the notion of the markets. optimal quantity (optimal f) to arrive at a truly optimal portfolio. It is this truly optimal portfolio that can and should be used by traders in any For years the trading community has discussed the broad concept of markets, including the stock markets. "money management." Yet by and large, money management has been characterized by a loose collection of rules of thumb, many of which In a nonleveraged situation, such as a portfolio of stocks that are not were incorrect. Ultimately, I hope that this book will have provided on margin, weighting and quantity are synonymous, but in a leveraged traders with exactitude under the heading of money management. situation, such as a portfolio of futures market systems, weighting and quantity are different indeed. In this book you will see an idea first roughly introduced in Portfolio Management Formulas, that optimal quantities are what we seek to know, and that this is a function of opti- mal weightings. Once we amend modern portfolio theory to separate the notions of weight and quantity, we can return to the stock trading arena with this now reworked tool. We will see how almost any nonleveraged portfolio of stocks can be improved dramatically by making it a leveraged portfo- lio, and marrying the portfolio with the risk-free asset. This will become intuitively obvious to you. The degree of risk (or conservativeness) is then dictated by the trader as a function of how much or how little lev- erage the trader wishes to apply to this portfolio. This implies that where a trader is on the spectrum of risk aversion is a function of the leverage used and not a function of the type of trading vehicle used. In short, this book will teach you about risk management. Very few traders have an inkling as to what constitutes risk management. It is not simply a matter of eliminating risk altogether. To do so is to eliminate return altogether. It isn't simply a matter of maximizing potential reward to potential risk either. Rather, risk management is about decision- making strategies that seek to maximize the ratio of potential reward to potential risk within a given acceptable level of risk. To learn this, we must first learn about optimal f, the optimal quan- tity component of the equation. Then we must learn about combining optimal f with the optimal portfolio weighting. Such a portfolio will maximize potential reward to potential risk. We will first cover these concepts from an empirical standpoint (as was introduced in Portfolio Management Formulas), then study them from a more powerful stand- point, the parametric standpoint. In contrast to an empirical approach, which utilizes past data to come up with answers directly, a parametric approach utilizes past data to come up with parameters. These are cer- tain measurements about something. These parameters are then used in a model to come up with essentially the same answers that were derived from an empirical approach. The strong point about the parametric ap- proach is that you can alter the values of the parameters to see the effect on the outcome from the model. This is something you cannot do with an empirical technique. However, empirical techniques have their strong points, too. The empirical techniques are generally more straightforward and less math intensive. Therefore they are easier to use and compre- hend. For this reason, the empirical techniques are covered first. Finally, we will see how to implement the concepts within a user- specified acceptable level of risk, and learn strategies to maximize this situation further. There is a lot of material to be covered here. I have tried to make this text as concise as possible. Some of the material may not sit well with you, the reader, and perhaps may raise more questions than it an- swers. If that is the case, than I have succeeded in one facet of what I have attempted to do. Most books have a single "heart," a central con- cept that the entire text flows toward. This book is a little different in that it has many hearts. Thus, some people may find this book difficult - 8 - 50,000/(5,000/.l) = 1 Chapter 1-The Empirical Techniques 12 This chapter is a condensation of Portfolio Management Formu- las. The purpose here is to bring those readers unfamiliar with these 10 empirical techniques up to the same level of understanding as those who are. 8 T DECIDING ON QUANTITY W 6 R Whenever you enter a trade, you have made two decisions: Not only have you decided whether to enter long or short, you have also decided 4 upon the quantity to trade in. This decision regarding quantity is always a function of your account equity. If you have a $10,000 account, don't 2 you think you would be leaning into the trade a little if you put on 100 gold contracts? Likewise, if you have a $10 million account, don't you 0 think you'd be a little light if you only put on one gold contract ? 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 Whether we acknowledge it or not, the decision of what quantity to have f values on for a given trade is inseparable from the level of equity in our ac- Figure 1-1 20 sequences of +2, -1. count. This divisor we will call by its variable name f. Thus, whether con- It is a very fortunate fact for us though that an account will grow the sciously or subconsciously, on any given trade you are selecting a value fastest when we trade a fraction of the account on each and every trade- for f when you decide how many contracts or shares to put on. in other words, when we trade a quantity relative to the size of our stake. Refer now to Figure 1-1. This represents a game where you have a However, the quantity decision is not simply a function of the eq- 50% chance of winning $2 versus a 50% chance of losing $1 on every uity in our account, it is also a function of a few other things. It is a play. Notice that here the optimal f is .25 when the TWR is 10.55 after function of our perceived "worst-case" loss on the next trade. It is a 40 bets (20 sequences of +2, -1). TWR stands for Terminal Wealth function of the speed with which we wish to make the account grow. It Relative. It represents the return on your stake as a multiple. A TWR of is a function of dependency to past trades. More variables than these just 10.55 means you would have made 10.55 times your original stake, or mentioned may be associated with the quantity decision, yet we try to 955% profit. Now look at what happens if you bet only 15% away from agglomerate all of these variables, including the account's level of eq- the optimal .25 f. At an f of .1 or .4 your TWR is 4.66. This is not even uity, into a subjective decision regarding quantity: How many contracts half of what it is at .25, yet you are only 15% away from the optimal and or shares should we put on? only 40 bets have elapsed! In this discussion, you will learn how to make the mathematically How much are we talking about in terms of dollars? At f = .1, you correct decision regarding quantity. You will no longer have to make would be making 1 bet for every $10 in your stake. At f = .4, you would this decision subjectively (and quite possibly erroneously). You will see be making I bet for every $2.50 in your stake. Both make the same that there is a steep price to be paid by not having on the correct quan- amount with a TWR of 4.66. At f = .25, you are making 1 bet for every tity, and this price increases as time goes by. $4 in your stake. Notice that if you make 1 bet for every $4 in your Most traders gloss over this decision about quantity. They feel that stake, you will make more than twice as much after 40 bets as you it is somewhat arbitrary in that it doesn't much matter what quantity they would if you were making 1 bet for every $2.50 in your stake! Clearly it have on. What matters is that they be right about the direction of the does not pay to overbet. At 1 bet per every $2.50 in your stake you make trade. Furthermore, they have the mistaken impression that there is a the same amount as if you had bet a quarter of that amount, 1 bet for straight-line relationship between how many contracts they have on and every $10 in your stake! Notice that in a 50/50 game where you win how much they stand to make or lose in the long run. twice the amount that you lose, at an f of .5 you are only breaking even! That means you are only breaking even if you made 1 bet for every $2 This is not correct. As we shall see in a moment, the relationship be- in your stake. At an f greater than .5 you are losing in this game, and it tween potential gain and quantity risked is not a straight line. It is is simply a matter of time until you are completely tapped out! In other curved. There is a peak to this curve, and it is at this peak that we words, if your fin this 50/50, 2:1 game is .25 beyond what is optimal, maximize potential gain per quantity at risk. Furthermore, as you will you will go broke with a probability that approaches certainty as you see throughout this discussion, the decision regarding quantity for a continue to play. Our goal, then, is to objectively find the peak of the f given trade is as important as the decision to enter long or short in the curve for a given trading system. first place. Contrary to most traders' misconception, whether you are right or wrong on the direction of the market when you enter a trade In this discussion certain concepts will be illuminated in terms of does not dominate whether or not you have the right quantity on. Ulti- gambling illustrations. The main difference between gambling and mately, we have no control over whether the next trade will be profit- speculation is that gambling creates risk (and hence many people are able or not. Yet we do have control over the quantity we have on. Since opposed to it) whereas speculation is a transference of an already exist- one does not dominate the other, our resources are better spent con- ing risk (supposedly) from one party to another. The gambling illustra- centrating on putting on the tight quantity. tions are used to illustrate the concepts as clearly and simply as possible. The mathematics of money management and the principles involved in On any given trade, you have a perceived worst-case loss. You may trading and gambling are quite similar. The main difference is that in the not even be conscious of this, but whenever you enter a trade you have math of gambling we are usually dealing with Bernoulli outcomes (only some idea in your mind, even if only subconsciously, of what can hap- two possible outcomes), whereas in trading we are dealing with the pen to this trade in the worst-case. This worst-case perception, along entire probability distribution that the trade may take. with the level of equity in your account, shapes your decision about how many contracts to trade. BASIC CONCEPTS Thus, we can now state that there is a divisor of this biggest per- ceived loss, a number between 0 and 1 that you will use in determining A probability statement is a number between 0 and 1 that specifies how many contracts to trade. For instance, if you have a $50,000 ac- how probable an outcome is, with 0 being no probability whatsoever of count, if you expect, in the worst case, to lose $5,000 per contract, and if the event in question occurring and 1 being that the event in question is you have on 5 contracts, your divisor is .5, since: certain to occur. An independent trials process (sampling with re- 50,000/(5,000/.5) = 5 placement) is a sequence of outcomes where the probability statement is constant from one event to the next. A coin toss is an example of just In other words, you have on 5 contracts for a $50,000 account, so such a process. Each toss has a 50/50 probability regardless of the out- you have 1 contract for every $10,000 in equity. You expect in the come of the prior toss. Even if the last 5 flips of a coin were heads, the worst case to lose $5,000 per contract, thus your divisor here is .5. If probability of this flip being heads is unaffected and remains .5. you had on only 1 contract, your divisor in this case would be .1 since: - 9 - Naturally, the other type of random process is one in which the out- C. The total number of runs in a sequence. We'll call this R. come of prior events does affect the probability statement, and naturally, 2. Let's construct an example to follow along with. Assume the fol- the probability statement is not constant from one event to the next. lowing trades: These types of events are called dependent trials processes (sampling -3 +2 +7 -4 +1 -1 +1 +6 -1 0 -2 +1 without replacement). Blackjack is an example of just such a process. The net profit is +7. The total number of trades is 12, so N = 12, to Once a card is played, the composition of the deck changes. Suppose a keep the example simple. We are not now concerned with how big the new deck is shuffled and a card removed-say, the ace of diamonds. Prior wins and losses are, but rather how many wins and losses there are and to removing this card the probability of drawing an ace was 4/52 or how many streaks. Therefore, we can reduce our run of trades to a sim- .07692307692. Now that an ace has been drawn from the deck, and not ple sequence of pluses and minuses. Note that a trade with a P&L of 0 is replaced, the probability of drawing an ace on the next draw is 3/51 or regarded as a loss. We now have: .05882352941. - + + - + - + + - - - + Try to think of the difference between independent and dependent As can be seen, there are 6 profits and 6 losses; therefore, X = trials processes as simply whether the probability statement is fixed 2*6*6 = 72. As can also be seen, there are 8 runs in this sequence; there- (independent trials) or variable (dependent trials) from one event to fore, R = 8. We define a run as anytime you encounter a sign change the next based on prior outcomes. This is in fact the only difference. when reading the sequence as just shown from left to right (i.e., chronologically). Assume also that you start at 1. THE RUNS TEST 1. You would thus count this sequence as follows: When we do sampling without replacement from a deck of cards, - + + - + - + + - - - + we can determine by inspection that there is dependency. For certain 1 2 3 4 5 6 7 8 2. Solve the expression: events (such as the profit and loss stream of a system's trades) where dependency cannot be determined upon inspection, we have the runs N*(R-.5)-X test. The runs test will tell us if our system has more (or fewer) streaks For our example this would be: of consecutive wins and losses than a random distribution. 12*(8-5)-72 The runs test is essentially a matter of obtaining the Z scores for the 12*7.5-72 win and loss streaks of a system's trades. A Z score is how many stan- 90-72 dard deviations you are away from the mean of a distribution. Thus, a Z 18 score of 2.00 is 2.00 standard deviations away from the mean (the ex- 3. Solve the expression: pectation of a random distribution of streaks of wins and losses). (X*(X-N))/(N-1) The Z score is simply the number of standard deviations the data is For our example this would be: from the mean of the Normal Probability Distribution. For example, a Z (72*(72-12))/(12-1) score of 1.00 would mean that the data you arc testing is within 1 stan- (72*60)/11 dard deviation from the mean. Incidentally, this is perfectly normal. 4320/11 The Z score is then converted into a confidence limit, sometimes 392.727272 also called a degree of certainty. The area under the curve of the Nor- 4. Take the square root of the answer in number 3. For our example this mal Probability Function at 1 standard deviation on either side of the would be: mean equals 68% of the total area under the curve. So we take our Z 392.727272^(l/2) = 19.81734777 score and convert it to a confidence limit, the relationship being that the 5. Divide the answer in number 2 by the answer in number 4. This is Z score is a number of standard deviations from the mean and the confi- your Z score. For our example this would be: dence limit is the percentage of area under the curve occupied at so 18/19.81734777 = .9082951063 many standard deviations. 6. Now convert your Z score to a confidence limit. The distribution of Confidence Limit (%) Z Score runs is binomially distributed. However, when there are 30 or more 99.73 3.00 trades involved, we can use the Normal Distribution to very closely 99 2.58 approximate the binomial probabilities. Thus, if you are using 30 or 98 2.33 more trades, you can simply convert your Z score to a confidence limit 97 2.17 based upon Equation (3.22) for 2-tailed probabilities in the Normal Dis- 96 2.05 tribution. 95.45 2.00 95 1.96 The runs test will tell you if your sequence of wins and losses con- 90 1.64 tains more or fewer streaks (of wins or losses) than would ordinarily be With a minimum of 30 closed trades we can now compute our Z expected in a truly random sequence, one that has no dependence be- scores. What we are trying to answer is how many streaks of wins tween trials. Since we are at such a relatively low confidence limit in (losses) can we expect from a given system? Are the win (loss) streaks our example, we can assume that there is no dependence between trials of the system we are testing in line with what we could expect? If not, is in this particular sequence. there a high enough confidence limit that we can assume dependency If your Z score is negative, simply convert it to positive (take the exists between trades -i.e., is the outcome of a trade dependent on the absolute value) when finding your confidence limit. A negative Z score outcome of previous trades? implies positive dependency, meaning fewer streaks than the Normal Here then is the equation for the runs test, the system's Z score: Probability Function would imply and hence that wins beget wins and (1.01) Z = (N*(R-.5)-X)/((X*(X-N))/(N-1))^(1/2) losses beget losses. A positive Z score implies negative dependency, meaning more streaks than the Normal Probability Function would im- where ply and hence that wins beget losses and losses beget wins. N = The total number of trades in the sequence. What would an acceptable confidence limit be? Statisticians gener- R = The total number of runs in the sequence. ally recommend selecting a confidence limit at least in the high nineties. X = 2*W*L Some statisticians recommend a confidence limit in excess of 99% in W = The total number of winning trades in the sequence. order to assume dependency, some recommend a less stringent mini- L = The total number of losing trades in the sequence. mum of 95.45% (2 standard deviations). Here is how to perform this computation: Rarely, if ever, will you find a system that shows confidence limits in excess of 95.45%. Most frequently the confidence limits encountered 1. Compile the following data from your run of trades: are less than 90%. Even if you find a system with a confidence limit A. The total number of trades, hereafter called N. between 90 and 95.45%, this is not exactly a nugget of gold. To assume B. The total number of winning trades and the total number of losing that there is dependency involved that can be capitalized upon to make a trades. Now compute what we will call X. X = 2*Total Number of substantial difference, you really need to exceed 95.45% as a bare Wins*Total Number of Losses. minimum. - 10 -
Description: