. That f-value is the optimal f the amount of thetotal account that should be invested for each trade.
Asimpler way of expressing optimal f the amount invested on a single trade, is given as”
f=(px(R+1)-1/R
where R= the ratio of average profit to average lossp= the probability of a winning trade
Therefore, if p =-.50, there is an equal chance of a profit or a loss, and the average profit is$400 while the average loss is $200 (giving R = 2.0), then f= (.50(2 + 1) - 1)/2 =.5/2=.25or 25% of the available capital. Given an equal chance of a profit or a loss, it is not likelythat there would be four losses.in a row, each of 25%; however, the theory of runs showsthat, out of every 100 trades, there should be one’ run of six. Eventually, there will be a runof four or five losses in a row. Optimal £ however; invests a fraction of the current equity;therefore, after a loss of 25%, the next investment, is 25% of the balance, or 18.75% of theinitial equity. If there are further losses, that amount drops to 14.06%. After three losses ina row, instead of having lost 75% of the initial equity, the investment has only dropped by57.81%. Over time, with profits twice as large as losses, and winning trades normally alter-nating with losing trades, the losses will be recovered.
Observations of Optimal f
According to Alex Elder,” there are some difficulties in using optimal f Because the valueis based on every historic trade, the ideal amount to invest on the next trade will keepchanging. In addition, if you trade a position larger than the optimal f with average results,you can expect to go broke eventually because you are overinvesting. On the other hand,if you invest less than the optimal amount, then your risk decreases arithmetically, but yourprofits decrease geometrically, which is another bad scenario. Because this process canbecome very complicated, the simple solution for most investors is to keep trading thesame amount, leaving a large reserve so you are not caught short.
On the positive side, Dr. Elder concludes that the most useful results of optimal f isthat it shows the important principles: —
1. Never average down.
2. Never meet margin calls. -3. Liquidate your worst position first.
Practically Speaking
Evaluating the risk and reward of a trading program, even using a number of years of actualperformance, rarely gives results that are statistically accurate. Markets change and the per-formance profile of any trading system can vary significantly over tong time periods. Deter-mining the amount to invest on a single trade based on the average risk and average return
® Robert B Rotella, The Elements of Successful Trading (The New York Institute of Finance, 1992, pp. $49-550).3) Dr, Alexander Elder, Trading for a Living (John Wiley & Sons, 1993).626 RISK CONTROLof past performance can lead to a tragic end. When investing 25% in each trade, a loss thatis twice what is expected, followed by a smaller profit and another large loss (in a morevolatile period), could exhaust your capital, regardless of the statistics.
In general, the less you risk, the safer you are. From time to time there are price shocksthat produce profits and losses far greater than the averages show. Although the theory ofan optimal fixed fraction may be correct, the numbers used in the calculation are not oftenreliable.
COMPARING EXPECTED AND ACTUAL RESULTS
In the development of an economic model or trading system, the final selection is usually theresult of a performance comparison of the completed models. Often the results are given interms of profit/loss ratios, annualized percentage profits, expected reliability (percentage ofprofitable trades to total trades), and potential risk. Although these statistics are common,their predictive qualities and sometimes their accuracy are not known. On occasion, theseresults are generated by a sample that is too small, and usually they are not the results of apredictive but an historic test. This does not mean that the model will be unsuccessful, butthat the pattern of success might vary far from the expected profit/loss ratio, reliability, andrisk. In actual trading, every speculator experiences a series of losses far exceeding anythingthat was expected; at that point, it is best to know whether this situation could occur withinthe realm of the system’s profile or whether the system has failed. For example, a movingaverage system is expected to have 1 out of 3 profitable trades with a profit/loss ratio of 4: 1.But the first 10 trades of the system are losers. Should trading be stopped?
Binomial Probability
Consider the application of a random-number sequence to the trading model. What is theprobability of / losses in n tries when the probability of a loss is p? Most of the work in thisarea of probability is credited to Bernoulli, whose study of a random walk is called aBernoulli process. A clear representation of a random walk is shown by the Pascal triangle(Figure 23-14), where each box represents the probability of being in a particular positionat a specific time in a forward random walk. The result of this process is called a binomialdistribution. ¥
The forward random walk has an analogy to price movement, with the far edges of Pas-cal’s triangle showing the probability of a continuous sequence of wins or losses using ran-dom numbers. The sequence 4%, %, %, ..., (%4)” is exactly the same as in the discussion ofthe Theory of Runs. The probability of successive losses can be calculated as the likelihoodof a run of the same length, (%)"*?.
 
FIGURE 23-14  Pascal’s triangle.
 COMPARING EXPECTE: «ND ACTUAL RESULTS 627
 
A binomial distribution is useful in considering the total number of losses that canoccur in any order within a sequence of trades; it is the probability of getting to a specificpoint at the base of Pascal’s triangle when there is a high probability of moving to the left(losses) rather than the right (profits). The formula for the binomial probability is:
n}B(p,n) = ————p' (A - p)"!Cp) = TG? a -P)where / is the number of lossesn is the total number of triesp is the probability of a loss
and the symbol “!” is the factorial (e.g.,5!=5 x 4x3. x2x 1).
Consider the first 5 trades of a system with a probability of success of 4. How manylosses should be expected? To answer the question, find the binomial probability B for allpossibilities and form a distribution function. Let / = 4. Then,
B(4:.667,5) = 2667 (333)!
218, 19792) (.333= Sp % (1979296333),
=5 x .0659 = .32954
The binomial probability of having 4 losses out of the first 5 trades is about 33%. Thefollowing table shows the probability of losses for the first 5, 10, and 15 trades of a system,with a % predicted reliability. Results show the highest probability of occurrence of loss isat the % point (mean) for each sequence, but the standard deviation gives the range of vari-ance about the mean, so that from 2.3 to 4.4, losses are expected in every 5 trades, 5.2 to8.2 in 10 trades, and 8.2 to 11.8 losses in 15 trades (Table 23-7).
Note that in the 5-trade example, the chances of no losses is only 1%, and there is a13% chance of all losses. For the purpose of evaluation, it is easier to look at the maximumrather than the minimum number of losses. For 15 trades, there is an 8% chance of 13 ormore losses; if the system has produced more than 12 losses in that period, there is some-thing wrong with the predicted reliability. 7
In addition to the Pascal! distribution, the reader may find the Poisson and variousskewed distribution functions have application to system evaluation.
~43—Chi-Square Test
Once a system has been traded and there is enough data to give a performance profile, thesignificance between these actual results and the expected results can be found using thechi-square test. First, there must be enough data for a relevant answer. From the section onsampling, the formula for error is WN, where N is the number of items sampled. If thereare 25 trades, the expected error in the calculation is v25, or 20%; 160 trades would giveresults accurate to 10%. . .
Assume that the real trading results show a reliability of 20% (1 out of 5) as comparedwith the expected reliability of 35%. What are the chances of getting these results? The chi-square test is
2 (O- EY --  £E
where O is the observed, or actual result, and £ is the expected or theoretical result. Then,628- RISK CONTROL
 
 
TABLE 23-7 The ProBability of a Specific Number of Losses
 
 
 
  
5 Trades 10 Trades 15 TradesProbability Probability ProbabilityLosses (%) Losses (%) Losses (%)0 | 9 0 0| 4 | 0 I2 16 2 0 23 33 3 2 34 33 4 5 45 13 5 14 56 23 67 26 78 19 89 9 910 2 10Ul121314ISm* = 34sdt = 1.05 .* Mean,* Standard deviation.2 (20-35) + (80 = 65)?ves 65- by (15)?35 65225 +225= + = 6.428 + 3.46 ‘35 65 3= 9,89
The percentage of actual winning trades is compared with the anticipated winningtrades and the losing trades with the expected losing-trades. The answer must be found inthe first row of Table 23-8, which gives the distribution of x’.
The probability is distributed unequally in the table because the results are only sig-nificant if the probability is small, showing less likelihood of the results occurring bychance. For this simple two-element test, the result P is classified as
Highly significant —_ if P > 10.83 (.1% or 1/1,000) ~~Significant: if P > 6.64 (1% or 1/100)Probably significant if P 2 3.84 (5% or 1/20)
The answer x? = 9.89 is between .1% and 1% showing significance. For a large sample, theactual reliability should not have been 20% when 35% was expected.
The chi-square test can be used to compare actual price movement with random pat-terns to see whether there is appreciable variation. In the section on the Theory of Runs,Table 23-9 showed:COMPARING EXPECTED AND ACTUAL RESULTS 629
 
TABLE 23-8 Distribution of x?
 
Probability of Occurring by Chance
 
 
CasesLess | 70 -50 -30 .20 10 05 02 Ol 001I AS 46 1,07 1.64 271 3.84 5.41 6.64 10.832 7 1,39 2.41 3.22 4.6) 5.99 7.82 9.21 13.823 1,42 2.37 3.67 4.64 6.25 7.82 9.84 11.34 16.274 2.20 3,36 488 5.99 778 9.49 11.67 13.28 18.475 3.00 435 6.06 7.29 9.24 11.07 13.39 15.09 20.526 3.83 5.35 7.23 8.56 10.65 12.59 15.03 16.81 22.467 4.67 635 8.38 9.80 12.02 14.07 16.62 18.48 24,328 5.53 7.34 9.52 11,03 13.36 15.51 18.17 20.09 26.139 6.39 8,34 10.66 12.24 14.68 16.92 19.68 21.67 27.8810 7.27 9.34 11.78 13.44 15.99 18,31 21.16 23.21 29.59
 
 
TABLE 23-9. Results from Analysis
of RunsExpected Actual:Length Results Resultsof Run {E) (0)i 1225 12142 612 6203 306 3It4 183 1675 77 676 38 417 19 168 10 59 5 3210 4 SL. > Bt 19 3
 
* The ast groups were combined in order not to dis-tort the results based on a small sample.
Applying the actual data for runs of one through eight against a random distribution,
5 (O, ~En)*ved )
 
 
a Bn_ {1214 = 1225)" | 620-612" | G11 ~ 306)° | (167 ~ 153)""= 1225 612 — 306 153_ 2 _ 2 _ 2 _ 271-77 , 41-38)? | 6-19) | (13 ~ 19)7 38 19 19@ 2) (3) a (5)
= 09877 + .10457 + .08169 + 1.2810 + 1.2987
= (6) me) (8) ‘ tae.23684 + .47368 + 1.8947
= 5.470630 RISK CONTROLROLTable 23-8 gives the probability of about 55% for 8 cases. The results are not significant; theTheory of Runs shows that all cases taken together give the same patterns as chance move-ment. Individual runs or sets of two or three adjacent runs can be inspected for distortion,In both cases, the results are further from normal but not mathematically significant. Thetwo runs that differed the most were 4 to 5 days, which showed an 11% probability ofoccurring by chance.
Highly significant price runs can be found in the occurrence of extended runs, forexample, 20 days, which is experienced occasionally in trending markets. By looking at theasymmetry of price movement, where a reverse run of 1 day is of negligible value, the sig-nificance of these runs will dramatically increase. Price movement is not a simple matter ofrandom runs and equal payout.. APPENDIX ||
Statistical Tables
PROBABILITY DISTRIBUTIONS TABLES
 
TABLE Ai-! Normal Curve Areas
 
 
 
 
 
z 00 Of 02 03 .04 05 06 07 -08 .090.0 70000 0040 -0080 0120 0160 0199 0239 0279 0319 03590.1 0398 0438 .0478 0517 0557 0596 0636 0675 0714 07530.2 0793 0832 .0871 0910 0948 0987 -1026 1064 1103 114)0.3 79 1217 +1255 -1293 1331 1368 -1406 1443 -1480 ASH70.4 1554 «1591 1628 1664 1700 1736 772 -1808 1844 18790.5 ADS 1950 1985 2019 .2054 -2088 -2123 2157 2190 2224
0.6 +2257 -2291 2324 2357 .2389 2422 2454 2486 2517 25490.7 +2580 2612 2642 -2673 2704 2734 ~ 2764 2794. .2823 28520.8 -2881 2910 -2939 2967 2995 -3023 3051 3078 3106 31330:9 3159 3186 3212 3238 -3264 3289 3315 3340 3365 33891.0 3413 3438 3461 3485 3508 3531 3554 3577 3599 3621
il 3643 3665 3686 3708 3729 3749 3770 3790 3810 -38201.2 3849 3869 3888 3907 3925 3944 +3962 3980 3997 01S1.3 -4032 4049 4066 4082 4099 ALIS 4131 A147 4162 ATT14 4192 4207 4222 4236 4251 4265 4279 4292 4306 A31915 4332 4345 4357 4370 4382 4394 4406 4418 4429 4441
1.6 4452 4463 A474 A484 A4IS 4505 A515 ~4525 4535 454517 4554 4564 4573 4582 4591 4599 -4608 4616 4625 463318 4641 4649 A656 4664 -4671 4678 4686 4693 4699 4706lg ANB ATID 4726 4732 4738 AT44 4750 A756 4761 A76720 AT72 4778 4783 4788 4793 AT9B 4803 4808: 4812 4817
21 4821 -4826 4830 4834 4838 4842 4846 4850 4854 48572.2 4861 4864 4868 4871 4875 4878. .4881 4884 4887 -489023 4893 4896 4898 4901 4904 4906 4909 AI 4913 AIG24 AIS +4920 4922 4925 4927 4929 4931 4932 4934 493625 4938 4940 4941 4943 4945 S46 4948 4949 A951 4952
2.6 4953 4955 4956 AIST 4959 4960 A961 4962 4963 A96427 4965, A966 4967 4968 4969 4970 4971 4972 4973 497428 A974 4975 4976 4977 A977 4978 4979 4979 4980 498)29 4981 4982" 4982 -4983 4984 4984 4985, 4985 4986. .49863.0 4987 4987 4987 4988 4988 4989 4989 4989 4990 4990
 
 632 ©
 
 
TABLEAI-2 T-Distribution
 
    
10 05 05
3.078 6.314 12.706 34.821 63.657
 
t2 1,886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182, 4.541 5.8414 1.533 2.132 2.776 3.747 4.6045 1476 2.015 2.571 3.365 4.0326 1.440 1.943 2.447 3.143 3.7077 L415 1.895 2365 2.998 3.4998 1.397 1.860 2.306 2.896 3.3559 1.383 1.833 2.262 2.821 3.25010 1372 4.812 2.228 2.764 3.169ul 1.363 1.796 2.201 2.718 3.10612 1,356 1.782 279 2.681 3.05513 1350 1.771 2.160 2.650 3.01214 1.345 1.761 2.145 2.624 2.97715 1.341 1.753 2.131 2.602 2.947
16 1.337 1.746 2120 2.583 2.921I7 1.333 1.740 2140 2.567 2.898,18 1.330 1.734 2.101 2.552 2.878‘ 19 1.328 1.729 2.093 2.539 2.86120 1.325 4.725 2.086 2.528 2.845
- 21 1.323 1.725 2.080 2518 2.83122 1.321 L717 2.074 2.508 2.81923 1319 L714 2.069 2.500 2.80724 (318 L7it 2.064 2.492, 2.797
25 1.316 1.708 2.060 2.485 2.787
26 L315 1.706 2.056 2479 2.77927 C314 1.703 2.052 2.473 277128 1343 1.70) "2.048 2.467 2.763
29° «1311 1699-20045 2.462 2.756
30, «41310-1697 2.0042, 2457 2.750
- 40 1.303.684 2.021 2423 2.704- 60 1.296 1.671 2.000 2390 2.660
120 1.289 1.658 1.980 2358 2617
~ °° 1.282 1.645 1.960 2.326 2.576
 
Source: Hoel, Elementary Statistics, 3d ed. (John Wiley & Sons, New York,1971)
APPENDIX |APPENDIX | ~ 633
 
TABLE OF UNIFORM RANDOM NUMBERS
 
1 2 3 4 5 é 7 8 9 10 Wy
10480 15011 01536 02011 81647 91646 69179 14194 62590 36207 2096922368 «46573. 25595 85393 30995 «89198 9=- 27982-53402 93965 «= 34095 55266624130 48360 «22527-97265 «= 76393-64809 ««1SI79_ = 24830. 49340 «32081 += 3068042167 93093 06243 61680 07856 16376 39440 53537 71341 $7004 0084937570 39975 81837 16656 «= 06121. Ss «91782 60468 )=— 81305. 49684 9=—60672_—s 14110
77921 «06907, 11008 = 42751-27756 «= $3498) -18602 70659 )=— 90655. 15033-2191699562 72905 56420 69994 98872 31016 71194 18738 44013 44840 6321396301 91977 05463 07972 18876 20922 94595 56869 69014 60045 1842589579 14342 63661 10281 17453 18103 57740 94378 2533) 12566 5867810 85475 36857 53342 53988 )§=53060 959533 38867 §=—62300 08158 = 17893 16439
11 28918 69578 88231 33276 70997 79936 56865 05859 90106 31595 9154712 63553 40961 48235 03427 49626 69445 18663 72695 52180 20847 1223443 09429 93969 52636 «= 92737: «88974-33488 «= 36320 S«:17617, 30015 -07272—s 84 11514 10365 61129 87529-85689 48237. 52267 «67689 «93394 «01511 =. 26358 = 851041S 07119 97336 71048 08178 77233 13916 47564 81056 97735 85977 29372
16 51085 12765 51821 51259 77452 16308 60756 92144 49442 53900 7096017 02368 21382 52404 60268 89368 19885 55322 44819 Of1