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

Subject: Quantitative Analysis of Non-Linear High Entropy Economic Systems Notes and Asides

Date: 28 Oct 2013 08:39:47 -0000

From Quantitative
Analysis of Non-Linear High Entropy Economic Systems I, in a
simple fixed increment geometric progression of the gambler's capital,

is the fraction of the gambler's
capital waged on each bet in the calculation of the "standard
derivation," of the increments of the gambler's capital. If the game
is not fair, the time series of the marginal increments of the
gambler's capital will have an offset,
**f**

. And, the gambler's capital will
increase, or decrease, by **avg**

for a
win, and **avg + f**

for a loss.**avg - f**

Making a time series of

,**1/3**

,**-1/3**

,**1/3**

,**-1/3**

,**1/3**

,
... repeating forever, should yield **1/3**

, and **P = 4/6 = 2/3 =
0.666666666**

, and, the average should be
**(2 * P) - 1 =
1/3**

, and the root-mean-square
**0.111111111**

; **0.333333333**

(1)
and *tsavg*

(1)
return these correct values, indicating that the average should NOT be
subtracted from the calculation of the sum of the squares of the
marginal increments of the gambler's capital.*tsrms*

Note that:

**
V(t) - V(t-1)
------------- ......................................(I-1.21)
V(t-1)
**

is the fraction of the increment between the previous value, and
the current value, of the gambler's capital, which, by definition, is
the fraction of the capital,

, that the
gambler wagered, in the **f**

'th
interval.**t**

If the marginal increments of the gambler's capital are not fixed and form a Gaussian/Normal distribution, then Half-normal_distribution, (see, also, Absolute_deviation, which is the same formula) calculations can be used, and the expectation is:

**
E(Y) = rms * sqrt (2 / pi) = rms * 0.79788456 ......(1.1)
**

for the average value of rectified Gaussian noise.

The variance is:

**
V(Y) = (rms^2) * (1 - (2 / pi))
= (rms^2) * 0.363380227 .......................(1.2)
**

See, also: the "Population Variance and Sample Variance," section, "Biased Sample Variance," in Variance.

Unfortunately, many consider this method of calculating the
wagering of the gambler *fragile* in *real world*
distributions often found in financial time series.

Formal root-mean-square analytical methods often yield more precise results.

Let

be the
**Si**

'th element from a random distribution,
with a bias, **i**

, and a deviation,
**avg**

:**srms**

**
1 n
srms^2 = - SUM (Si - avg)^2 ........................(1.3)
n i=1
1 n
= - SUM (Si^2 - 2Siavg + avg^2) .............(1.4)
n i=1
1 n 1 n
= - SUM Si^2 - - SUM 2Siavg + avg^2 .........(1.5)
n i=1 n i=1
**

But:

**
1 n
- SUM 2Si = 2avg ...................................(1.6)
n i=1
**

Therefore:

**
1 n
srms^2 = - SUM Si^2 - 2avg^2 + avg^2 ...............(1.7)
n i=1
1 n
= - SUM Si^2 - avg^2 ........................(1.8)
n i=1
**

And:

**
1 n
- SUM Si^2 = rms^2 .................................(1.9)
n i=1
**

**
srms^2 = rms^2 - avg^2 .............................(1.10)
rms^2 = srms^2 + avg^2 .............................(1.11)
1 n
Where, avg = - SUM Si ..............................(1.12)
n i=1
**

Further, note that the derivation is the paradigm/methodology used
in

(1)/*tsfraction*

(1),
and, additionally, in *tsrms*

(1).*tsinvest*

Now, aggregating

many of the random
distributions, each with a bias, **N**

,
and a deviation, **avgK**

, **srmsK**

together:**(1
=< K <= N, rmsK^2 = srmsK^2 + avgK^2,)**

**
1 n
srmst^2 = - SUM (S1i - avg1)^2 +
n i=1
1 n
= - SUM (S2i - avg2)^2 +
n i=1
...
1 n
= - SUM (SNi - avgN)^2 .....................(1.13)
n i=1
1 n
srmst^2 = - SUM (S1i^2 - 2S1iavg1 + avg1^2) +
n i=1
1 n
= - SUM (S2i^2 - 2S2iavg2 + avg2^2) +
n i=1
...
1 n
= - SUM (SNi^2 - 2SNiavgN + avgN^2) ........(1.14)
n i=1
1 n 1 n 1 n
srmst^2 = - SUM S1i^2 - - SUM 2S1iavg1 + - SUM avg1^2 +
n i=1 n i=1 n i=1
1 n 1 n 1 n
= - SUM S2i^2 - - SUM 2S2iavg2 + - SUM avg2^2 +
n i=1 n i=1 n i=1
...
1 n 1 n
= - SUM SNi^2 - - SUM 2SNiavgN
n i=1 n i=1
1 n
+ - SUM avgN^2 ...........................(1.15)
n i=1
**

For the elements from the

'th random
distribution:**K**

**
1 n
- SUM SKi^2 = rmsK^2 ...............................(1.16)
n i=1
1 n
- - SUM 2SKiavgK = -2avgK^2 ........................(1.17)
n i=1
**

Since:

**
1 n
- SUM 2SKi = 2avgK .................................(1.18)
n i=1
1 n
- SUM avgK^2 = avgK^2 ..............................(1.19)
n i=1
srmst^2 = rms1^2 - avg1^2 +
rms2^2 - avg2^2 +
...
rmsN^2 - avgN^2 ..........................(1.20)
**

But:

**
rmsK^2 - avgK^2 = srmsK^2 ..........................(1.21)
**

Therefore:

**
srmst^2 = srms1^2 + srms2^2 + ... + srmsN^2 ........(1.22)
1 n
avgt = - SUM S1i +
n i=1
1 n
- SUM S2i +
n i=1
...
1 n
- SUM SNi ...................................(1.23)
n i=1
**

For the elements from the

'th random
distribution:**K**

**
1 n
- SUM SKi = avgK ...................................(1.24)
n i=1
avgt = avg1 + avg2 + ... + avgN ....................(1.25)
avgt^2 = (avg1 + avg2 + ... + avgN)^2 ..............(1.26)
rmst^2 = rms1^2 + rms2^2 + ... + rmsN^2 -
(avg1^2 + avg2^2 + ... + avgN^2) +
(avg1 + avg2 + ... + avgN)^2 ..............(1.27)
**

Note that the

terms add
root-mean-square, and the **srmsK**

terms add
linearly, where **avgK**

.**srmsK^2 = rmsK^2 -
avgK^2**

Further, as an approximation when

:**0 << avgK
<< rmsK << 1**

**
rmst^2 ~ rms1^2 + rms2^2 + ... + rmsN^2
**

which is the method used in the

(1)
program to optimize portfolio asset allocation, (and decreasing
*tsinvest*

, due to the uncertainty created by
limited data set size, i.e., decreasing
**PK**

, and/or increasing
**avgK**

, via Standard Error
methodology.) Note, however, determination of the value of
**rmsK**

is not necessary for precisely
calculating the gain, **srms**

, and/or, the Kelly
Criteria, of an asset's value-only the value of
**g**

, (and
**rms**

,) of an asset are required.**avg**

For optimal leverage, (or margin,) let

be a geometric Brownian motion
fractal representing an asset's prices, with the
**V(t)**

'th marginal return:**t**

**
V(t) - V(t-1)
------------- ......................................(I-1.21)
V(t-1)
**

The mean of the marginal returns is

.**avg**

The square root of the variance of the marginal returns is

.**rms**

Then the probability of an "*up movement*" in any marginal
return,

, is:**P**

**
avg
--- + 1
rms
P = ------- ........................................(I-1.24)
2
**

And, the median gain,

, of the
marginal returns is:**g**

**
P (1 - P)
g = (1 + rms) (1 - rms) ....................(I-1.20)
**

which is maximal when:

**
2
avg = rms .........................................(I-1.26)
**

which makes:

**
rms = 2 P - 1 ......................................(I-1.18)
**

by substitution into the equation for

.**P**

Let

be the value of an investment
at some time, **V**

, and
**t**

be the fraction of
**M**

purchased on margin, **V**

, and, **0
<= M <= 1**

be the
fraction of **I**

invested, **V**

, where **0
<= I <= 1**

and **M + I =
1**

is the
amount of the margin, and **M * V**

is the
amount invested. Letting rmsi be the root mean square of the variance
of the investment:**I * V**

**
V
rmsi = rms * -----------
V - (M * V)
1
= rms * ----- = (2 * P) - 1 ...................(1.28)
1 - M
**

Or:

**
rms
M = 1 - ----------- ................................(1.29)
(2 * P) - 1
**

which would maximize the growth,

,
of the amount invested, **g**

, provided
**I * V**

, and both
**P > 0.5, avg > 0**

and
**avg**

are too small, (which is frequently
the case.)**rms**

Reducing:

**
P = ((avg / rms) + 1) / 2 ..........................(1.30)
rms
M = 1 - ----------- ................................(1.31)
(2 * P) - 1
rms
M = 1 - --------------------------------- ..........(1.32)
(2 * (((avg / rms) + 1) / 2)) - 1
rms
M = 1 - --------------------- ......................(1.33)
((avg / rms) + 1) - 1
rms
M = 1 - ----------- ................................(1.34)
(avg / rms)
**

**
rms^2
M = 1 - ----- ......................................(1.35)
avg
**

And, by substitution, the formula for optimal leverage:

**
rms
M = 1 - ----------- ................................(1.36)
(2 * P) - 1
**

which is the method used in the

(1)
program to maximize Return on
Investment, (ROI,) and, if *tsinvest*

the
investment is at fair value, relative to its metric of risk,
**M = 0**

.**srms**

For optimal asset allocation, let

be a geometric Brownian motion
fractal representing an asset's prices, with the
**V(t)**

'th marginal return:**t**

**
V(t) - V(t-1)
------------- ......................................(I-1.21)
V(t-1)
**

And many such assets assembled in a portfolio, each asset
representing a fraction,

, of the
total value of the portfolio, where:**cn**

**
c1 + c2 + c3 + ... + cN = 1 ........................(1.37)
**

Then the portfolio

,
**avg**

, would be:**avgp**

**
avgp = (c1 * avg1) + (c2 * avg2) +
(c3 * avg3) + ... + (cN * avgN) .............(1.38)
**

since the

's add
**avgn***linearly*.

And, from Equation
(1.10), the deviation of the

'th
asset, **n**

:**srmsn**

**
srmsn = sqrt (rmsn^2 - avgn^2) .....................(1.39)
**

Which add *root-mean-square*:

**
srmsp = sqrt ((c1 * srms1)^2 + (c2 * srms2)^2 +
(c3 * srms3)^2 + ... + (cN * avgN)^2) ......(1.40)
**

Yielding, from Equation
(1.11), the

of the portfolio,
**rms**

:**rmsp**

**
rmsp = sqrt (srmsp^2 + avgp^2) .....................(1.41)
**

The values of the asset allocations in the portfolio,

, **c1**

,
**c2**

... **c3**

,
can be optimized:**cN**

**
avg
--- + 1
rms
P = ------- ........................................(I-1.24)
2
**

where, for each asset:

**
rms = 2 P - 1 ......................................(I-1.18)
**

and substituting:

**
c = 2 P - 1 = avg / rms ............................(1.42)
**

Or, for the

'th asset:**n**

**
cn * avgn = avgn^2 / rmsn ..........................(1.43)
**

Which is the asset's contribution to the portfolio's

.**avgp**

And the asset's contribution to the portfolio's

:**rmsp**

**
cn * rmsn = avgn ...................................(1.44)
**

Where the asset's contribution to the portfolio's

:**srmsp**

**
srmsn = sqrt (rmsn^2 - avgn^2) .....................(1.45)
**

Yielding the following useful equation:

**
cn * srmsn = cn * sqrt (rmsn^2 - avgn^2) ...........(1.46)
**

Where each asset's

add
**cn * avgn***linearly* to produce the portfolio's

, and each asset's **avgp**

add **cn
* srmsn***root-mean-square*, to produce the
portfolio's

, and using Equation
(1.11), to produce the portfolio's
**srmsp**

, with the asset allocations,
**rmsp**

, **c1**

,
**c2**

... **c3**

,
optimized, which is the method used in the **cN**

(1)
program to optimize portfolio asset allocation. Note, however,
determination of the value of *tsinvest*

is
not necessary for precisely calculating optimal asset allocations-only
the value of **srms**

, (and
**rms**

,) for each asset are required.**avg**

Let

be a geometric Brownian
motion fractal representing an asset's prices, with the
**V(t)**

'th marginal return:**t**

**
V(t) - V(t-1)
------------- ......................................(I-1.21)
V(t-1)
**

The mean of the marginal returns is

.**avg**

The square root of the variance of the marginal returns is

.**rms**

Then the probability of an "*up movement*" in any marginal
return,

, is:**P**

**
avg
--- + 1
rms
P = ------- ........................................(I-1.24)
2
**

And, the median gain,

, of the
marginal returns is:**g**

**
P (1 - P)
g = (1 + rms) (1 - rms) ....................(I-1.20)
**

which can be implemented as a Kalman Filter,
and as more data is acquired, the accuracy of the values of

and
**avg**

, (and thus
**rms**

and **P**

,)
increases. (A device that searches, sorts, and, collates data is,
technically, an **g***information automaton*, or information robot,
or just 'bot.)

A reasonable question to be answered is how much accuracy is necessary?

Methodologies such as Standard Error
are often used, but the question can be rephrased: What are the
chances, of measuring

many marginal
increments, where by serendipity, the measurements were all made in a
"**t***bubble*", (i.e., the values in the measurement interval were
all above, or below, their median value)?

The chances of (at least,)

many
marginal increments, between zero crossings of an asset's median
value, is **t**

,
(**erf (1 / sqrt (t))**

for
**erf (1 / sqrt (t)) ~ 1 / sqrt (t)**

).**t >> 1**

Giving a convenient reduction in the value of

in Equation (I-1.24)
by a factor of **P**

to
estimate the likelihood of "**1 - erf (1 / sqrt (t))***up movement*" in the next marginal
return-compensating for the uncertainty of insufficient data set
size.

In general, calculating the probabilities will require solving for
the area of a section of the Normal/Gaussian distribution, (or
cumulative distribution,) which is expedient if a unit Normal/Gaussian
distribution is constructed as a table in memory, and a binary search
implemented since such a table is monotonic, which is the method used
in the

(1)
program.*tsinvest*

-- John Conover, john@email.johncon.com, http://www.johncon.com/

Copyright © 2002-2016 John Conover, john@email.johncon.com. All Rights Reserved. Last modified: Mon Oct 8 39:47:53 PST 2013 $Id: 131008394753.16478.html,v 1.0 2016/07/25 02:09:08 conover Exp $