From: John Conover <john@email.johncon.com>

Subject: Re: portfolio management

Date: Sat, 19 Sep 1998 01:59:53 -0700

John Conover writes: > > There is a formula, rms = 2P - 1, which if satisfied, will result in > optimal and maximal growth. (All three of these formulas are derived > in the tsinvest(1) manual page.) If rms > 2P - 1, the growth will be > very large-for a while-and then "crash" down, (Netscape is an > example.) If rms < 2P - 1, then the growth will be stilted, (Boeing is > an example.) Both solutions will yield less long term growth than the > optimal, where rms = 2P - 1. > The tsinvest program is for simulating the optimal gains of multiple equity investments. The program decides which of all available equities to invest in at any single time, by calculating the instantaneous Shannon probability and statistics of all equities, and then using statistical estimation techniques to estimate the accuracy of the calculated statistics. Bottom line, it is for programmed trading (PT) of stocks. The C sources are freely available as Open Source software on http://www.johncon.com/ntropix/archive/tsinvest.tar.gz. A fragment, specific to this discussion, of the manual page is attached ... John -- John Conover, john@email.johncon.com, http://www.johncon.com/ DERIVATION As a tutorial, the derivation will start with a simple compound interest equation. This equation will be extended to a first order random walk model of equity prices. Finally, optimizations will derived based on the random walk model that are useful in optimizing equity portfolio performance. If we consider capital, V, invested in a savings account, and calculate the growth of the capital over time: V(t) = V(t - 1)(1 + a(t)) ......................(1.1) where a(t) is the interest rate at time t, (usually a con- stant[1].) In equities, a(t) is not constant, and fluctu- ates, perhaps being negative at certain times, (meaning that the value of the equity decreased.) This fluctuation in an equity's value can be represented by modifying a(t) in Equation (1.1): a(t) = f(t) * F(T) ............................(1.2) where the product f * F is the fluctuation in the equity's value at time t. An equity's value, over time, is similar to a simple tossed coin game [Sch91, pp. 128], where f(t) is the fraction of a gambler's capital wagered on a toss of the coin, at time t, and F(t) is a random variable[2], signifying whether the game was a win, or a loss, ie., whether the gambler's capital increased or decreased, and by how much. The amount the gambler's capital increased or decreased is f(t) * F(t). In general, F(t) is a function of a random variable, with an average, over time, of avgf, and a root mean square value, rmsf, of unity. Note that for simple, time invari- ant, compound interest, F(t) has an average and root mean square, both being unity, and f(t) is simply the interest rate, which is assumed to be constant. For a simple, sin- gle coin game, F(t) is a fixed increment, (ie., either +1 V(t) = V(t - 1)(1 + f(t) * F(t)) ...............(1.3) and subtracting V(t - 1) from both sides: V(t) - V(t - 1) = V(t - 1) (1 + f(t) * F(t)) - V(t - 1) .......................................(1.4) and dividing both sides by V(t - 1): V(t) - V(t - 1) --------------- = V(t - 1) V(t - 1) (1 + f(t) * F(t)) - V(t - 1) ------------------------------------- ..........(1.5) V(t - 1) and combining: V(t) - V(t - 1) --------------- = V(t - 1) (1 + f(t) * F(t) ) - 1 = f(t) * F(t) ...........(1.6) We now have a "prescription," or process, for calculating the characteristics of the random process that determines an equity's price, over time. That process is, for each unit of time, subtract the value of the equity at the pre- vious time from the value of the equity at the current time, and divide this by the value of the equity at the previous time. The root mean square[4] of these values are the root mean square value of the random process. The average of these values are the average of the random pro- cess, avgf. The root mean square of these values can be calculated by any convenient means, and will be repre- sented by rms. The average of these values can be found by any convenient means, and will be represented by avg[5]. Therefore, if f(t) = f, and assuming that it does not vary over time: rms = f ........................................(1.7) which, if there are sufficiently many samples, is a metric of the equity's price "volatility," and: avg = f * F(t) .................................(1.8) and if there are sufficiently many samples, the average of F(t) is simply avgf, or: avg = f * avgf .................................(1.9) which are the metrics of the equity's random process. Note that this is the "effective" compound interest rate from Equation (1.1). Equations (1.7) and (1.9) are important equations, since they can be used in portfolio management. For example, Equation (1.7) states that portfolio volatil- ity is calculated as the root mean square sum of the indi- vidual volatilities of the equities in the portfolio. Equation (1.9) states that the averages of the normalized increments of the equity prices add together linearly[6] in the portfolio. Dividing Equation (1.9) by Equation (1.7) results in the two f's canceling, or: avg --- = avgf ....................................(1.10) rms There may be analytical advantages to "model" F(t) as a simple tossed coin game, (either played with a single coin, or multiple coins, ie., many coins played at one time, or a single coin played many times[7].) The number of wins minus the number of losses, in many iterations of a single coin tossing game would be: P - (1 - P) = 2P - 1 ..........................(1.11) where P is the probability of a win for the tossed coin. (This probability is traditionally termed, the "Shannon probability" of a win.) Note that from the definition of F(t) above, that P = avgf. For a fair coin, (ie., one that comes up with a win 50% of the time,) P = 0.5, and there is no advantage, in the long run, to playing the game. However, if P > 0.5, then the optimal fraction of capital wagered on each iteration of the single coin tossing game, f, would be 2P - 1. Note that if multiple coins were used for each iteration of the game, we would expect that the volatility of the gambler's capital to increase as the square root of the number of coins used, and the growth to increase linearly with the number of coins used, irregard- less of whether many coins were tossed at once, or one coin was tossed many times, (ie., our random generator, F(t) would assume a binomial distribution and if the num- ber of coins was very large, then F(t) would assume, essentially, a Gaussian distribution.) Many equities have a Gaussian distribution for the random process, F(t). It may be advantageous to determine the Shannon probability avg --- = avgf = 2P - 1 ...........................(1.12) rms or: avg --- + 1 = 2P ..................................(1.13) rms and: avg --- + 1 rms P = ------- ...................................(1.14) 2 where only the average and root mean square of the normal- ized increments need to be measured, using the "prescrip- tion" or process outlined above. Interestingly, what Equation (1.12) states is that the "best" equity investment is not, necessarily, the equity that has the largest average growth. A better investment criteria is to choose the equity that has the largest growth, while simultaneously having the smallest volatil- ity. Continuing with this line of reasoning, and rearranging Equation (1.12): avg = rms * (2P - 1) ..........................(1.15) which is an important equation since it states that avg, (and the parameter that should be maximized,) is equal to rms, which is the measure of the volatility of the equity's value, multiplied by the quantity, twice the likelihood that the equity's value will increase in the next time interval, minus unity. As derived in the Section, OPTIMIZATION, below, the opti- mal growth occurs when f = rms = 2P - 1. Under optimal conditions, Equation (1.14) becomes: rms + 1 P = ------- ...................................(1.16) 2 or, sqrt (avg) = rms, (again, under optimal conditions,) and substituting into Equation (1.14): sqrt (avg) + 1 P = -------------- ............................(1.17) 2 giving three different computational methods for measuring the statistics of an equity's value. Note that, from Equations (1.14) and (1.12), that since avgf = avg / rms = (2P - 1), choosing the largest value of the Shannon probability, P, will also choose the largest value of the ratio of avg / rms, rms, or avg, respec- tively, in Equations (1.14), (1.16), or (1.17). This sug- gests a method for determination of equity selection cri- teria. (Note that under optimal conditions, all three equations are identical-only the metric methodology is different. Under non-optimal conditions, Equation (1.14) should be used. Unfortunately, any calculation involving the average of the normalized increments of an equity value time series will be very "sluggish," meaning that practical issues may prevail, suggesting a preference for Equation (1.17).) However, this would imply that the equities are known to be optimal, ie., rms = 2P + 1, which, although it is nearly true for most equities, is not true for all equities. There is some possibility that optimality can be verified by metrics: 2 if avg < rms then rms = f is too large in Equation (1.12) 2 else if avg > rms then rms = f is too small in Equation (1.12) 2 else avg = rms and the equities time series is optimal, ie., rms = f = 2P - 1 from Equation (1.36), below HEURISTIC APPROACHES There have been several heuristic approaches suggested, for example, using the absolute value of the normalized increments as an approximation to the root mean square, rms, and calculating the Shannon probability, P by Equa- tion (1.16), using the absolute value, abs, instead of the rms. The statistical estimate in such a scheme should use the same methodology as in the root mean square. Another alternative is to model equity value time series as a fixed increment fractal, ie., by counting the up movements in an equity's value. The Shannon probability, P, is then calculated by the quotient of the up movements, divided by the total movements. There is an issue with this model, however. Although not common, there can be adjacent time intervals where an equity's value does not change, and it is not clear how the accounting procedure should work. There are several alternatives. For example, no changes can be counted as up movements, or as down movements, or disregarded entirely, or counted as both. The statistical estimate should be performed as in Equa- tion (1.14), with an rms of unity, and an avg that is the Shannon probability itself-that is the definition of a fixed increment fractal. MARKET We now have a "first order prescription" that enables us to analyze fluctuations in equity values, although we have not explained why equity values fluctuate the way they do. For a formal presentation on the subject, see the bibliog- raphy in [Art95] which, also, offers non-mathematical insight into the subject. Consider a very simple equity market, with only two people holding equities. Equity value "arbitration" (ie., how equity values are determined,) is handled by one person posting (to a bulletin board,) a willingness to sell a given number of equities at a given price, to the other person. There is no other communication between the two people. If the other person buys the equity, then that is the value of the equity at that time. Obviously, the other person will not buy the equity if the price posted is too high-even if ownership of the equity is desired. For example, the other person could simply decide to wait in hopes that a favorable price will be offered in the future. What this means is that the seller must consider not only the behavior of the other person, but what the other person thinks the seller's behavior will be, ie., the seller must base the pricing strategy on the seller's pricing strategy. Such convoluted logical processes are termed "self referential," and the implication is that the market can never operate in a consistent fashion that can be the subject of deductive analysis [Pen89, pp. 101][8]. As pointed out by [Art95, Abstract], these types of inde- terminacies pervade economics[9]. What the two players do, in absence of a deductively consistent and complete theory of the market, is to rely on inductive reasoning. They form subjective expectations or hypotheses about how the market operates. These expectations and hypothesis are constantly formulated and changed, in a world that forms from others' subjective expectations. What this means is that equity values will fluctuate as the expecta- tions and hypothesis concerning the future of equity val- ues change[10]. The fluctuations created by these indeter- minacies in the equity market are represented by the term f(t) * F(t) in Equation (1.3), and since there are many such indeterminacies, we would anticipate F(t) to have a Gaussian distribution. This is a rather interesting con- clusion, since analyzing the aggregate actions of many "agents," each operating on subjective hypothesis in a market that is deductively indeterminate, can result in a system that can not only be analyzed, but optimized. OPTIMIZATION The only remaining derivation is to show that the optimal wagering strategy is, as cited above: f = rms = 2P - 1 ..............................(1.18) where f is the fraction of a gambler's capital wagered on each toss of a coin that has a Shannon probability, P, of winning. Following [Rez94, pp. 450], consider that the gambler has a private wire into the future, (ie., an inductive hypothesis,) who places wagers on the outcomes of a game of chance. We assume that the side information which he receives has a probability, P, of being true, and of 1 - P, of being false. Let the original capital of gambler be V(0), and V(n) his capital after the n'th wager. Since the gambler is not certain that the side information is entirely reliable, he places only a frac- tion, f, of his capital on each wager. Thus, subsequent to n many wagers, assuming the independence of successive tips from the future, his capital is: w l V(n) = (1 + f) (1 - f) V (0) ................(1.19) where w is the number of times he won, and l = n - w, the number of times he lost. These numbers are, in general, values taken by two random variables, denoted by W and L. According to the law of large numbers: 1 lim - W = P .........................(1.20) n -> infinity n 1 lim - L = q = 1 - P .................(1.21) n -> infinity n The problem with which the gambler is faced is the deter- mination of f leading to the maximum of the average expo- nential rate of growth of his capital. That is, he wishes to maximize the value of: 1 V(n) G = lim - ln ---- ...................(1.22) n -> infinity n V(0) with respect to f, assuming a fixed original capital and specified P: W L G = lim - ln (1 + f) + - ln (1 - f) .(1.23) n -> infinity n n or: G = P ln (1 + f) + q ln (1 - f) ...............(1.24) which, by taking the derivative with respect to f, and equating to zero, can be shown to have a maxima when: dG P - 1 1 - P -- = P(1 + f) (1 - f) - df 1 - P - 1 (1 - P)(1 - f) (1 + f)P = 0 ..........(1.25) combining terms: P - 1 1 - P 0 = P(1 + f) (1 - f) - P P (1 - P)(1 - f) (1 + f ) .....................(1.26) and splitting: P - 1 1 - P P(1 + f) (1 - f) = P P (1 - P)(1 - f) (1 + f) ......................(1.27) then taking the logarithm of both sides: ln (P) + (P - 1) ln (1 + f) + (1 - P) ln (1 - f) = ln (1 - P) - P ln (1 - f) + P ln (1 + f) ......(1.28) and combining terms: (P - 1) ln (1 + f) - P ln (1 + f) + (1 - P) ln (1 - f) + P ln (1 - f) = ln (1 - P) - ln (P) ...........................(1.29) or: ln (1 - f) - ln (1 + f) = ln (1 - P) - ln (P)...........................(1.30) and performing the logarithmic operations: 1 - f 1 - P ln ----- = ln ----- ...........................(1.31) 1 + f P and exponentiating: 1 - f 1 - P ----- = ----- .................................(1.32) 1 + f P which reduces to: P(1 - f) = (1 - P)(1 + f) .....................(1.33) and expanding: P - Pf = 1 - Pf - P + f .......................(1.34) or: P = 1 - P + f .................................(1.35) and, finally: f = 2P - 1 ....................................(1.36) Note that Equation (1.24), which, since rms = f, can be rewritten: G = P ln (1 + rms) + (1 - P) ln (1 - rms) .....(1.37) where G is the average exponential rate of growth in an equity's value, from one time interval to the next, (ie., the exponentiation of this value minus unity[11] is the "effective interest rate", as expressed in Equation (1.1),) and, likewise, Equation (1.36) can be rewritten: rms = 2P - 1 ..................................(1.38) and substituting: G = P ln (1 + 2P - 1) + (1 - P) ln (1 - (2P - 1)) .................(1.39) or: G = P ln (2P) + (1 - P) ln (2 (1 - P)) ....................(1.40) using a binary base for the logarithm: G = P ln (2P) + 2 (1 - P) ln (2 (1 - P)) ....................(1.41) 2 and carrying out the operations: G = P ln (2) + P ln (P) + 2 2 (1 - P) ln (2) + (1 - P) ln (1 - P)) ......(1.42) 2 2 which is: G = P ln (2) + P ln (P) + 2 2 ln (2) - P ln (2) + (1 - P) ln (1 - P) ....(1.43) 2 2 2 and canceling: G = 1 + P ln (P) + (1 - P) ln (1 - P) .........(1.44) 2 2 if the gambler's wagering strategy is optimal, ie., f = rms = 2P - 1, which is identical to the equation in [Schroder, pp. 151]. BIBLIOGRAPHY [Art95] W. Brian Arthur. "Complexity in Economic and Financial Markets." Complexity, 1, pp. 20-25, 1995. Also available from http://www.santafe.edu/arthur, February 1995. [Pen89] Roger Penrose. "The Emperor's New Mind." Oxford University Press, New York, New York, 1989. [Rez94] Fazlollah M. Reza. "An Introduction to Informa- tion Theory." Dover Publications, New York, New York, 1994. [Sch91] Manfred Schroeder. "Fractals, Chaos, Power Laws." W. H. Freeman and Company, New York, New York, 1991.

Copyright © 1998 John Conover, john@email.johncon.com. All Rights Reserved. Last modified: Fri Mar 26 18:54:06 PST 1999 $Id: 980919020007.6622.html,v 1.0 2001/11/17 23:05:50 conover Exp $