Re: script that does the same thing as tsinvest?

From: John Conover <john@email.johncon.com>
Subject: Re: script that does the same thing as tsinvest?
Date: 14 Dec 2000 18:35:00 -0000




Note that the model used is very close to compound interest in a
savings account, with variable rates-you just don't know what the
interest rate, (which can be negative,) will be tomorrow, or the next
day.

If there are no fluctuations, (i.e., avg = rms,) then:

    P = ((avg / rms) + 1) / 2 = 1

(i.e., the likelihood of an up movement is 100%, or a certainty,) and:

    G = ((1 + rms)^P) * ((1 - rms)^(1 - P)) = 1 + avg

which is the formula for compound interest, i.e., after n many days,
the value of the investment would be (1 + avg)^n.

        John

BTW, note that the interpretation of the root mean square of the
fluctuations, rms, is slightly different than that of Black-Scholes.

The Black-Scholes model uses the rms to be the square root of the sum
of the square of the fluctuations minus the average, avg, (i.e., the
variance.) This is the risk of investing, and if it is zero, (i.e.,
avg = rms,) there is zero risk. This method of computing rms is the
"standard" from probability theory, and larger rms means more risk.

The method of computing rms in tsinvest is not to subtract the avg
from the square of each fluctuation since tsinvest is based on finding
the probability of an up movement, i.e., the Shannon Entropy. The
value avg is the offset of the median of the fluctuations, which are
assumed to have a normal distribution, with a standard deviation of
rms.

Although different methods, in reality, they are very close to being
the same since rms >> avg by several orders of magnitude for equity
prices.

John Conover writes:
>
> The numerical methods used in tsinvest are quite straight forward, and
> most can be done in a spread sheet.
>
> There is, also, a set of 60 some programs that can be used for general
> fractal analysis at http://www.johncon.com/ndustrix/utilities.html, or
> they can be downloaded as a tape archive from
> http://www.johncon.com/ndustrix/archive/fractal.tar.gz.
>
> The tsinvest sources were, largely, cut-and-stick from the sources to
> these programs.
>
> A possible scenario to automatically pick stocks might be:
>
>     To find the marginal increments, (i.e., the fluctuations,) of a
>     stock's price, use the tsfraction program.
>
>     To find the average increase in value, use the tsavg program.
>
>     To find the risk of the investing in a stock, (i.e., the root mean
>     square of the fluctuations,) use the tsrms program.
>
> which is the two values used by tsinvest.
>
> So, if sprice is the name of a file containing the price of a stock
> over time:
>
>     tsfraction sprice | tsavg -p
>
> would print the average increase in value of the stock, avg, and:
>
>     tsfraction sprice | tsrms -p
>
> would print the risk of investing in the stock, rms.
>
> Then, the Shannon Entropy, (or Shannon Probability, i.e., the
> likelihood of an up movement,) P, would be:
>
>     P = ((avg / rms) + 1) / 2
>
    .
    .
    .
> To calculate the gain, G, in value of a stock, use the tsgain program:
>
>     tsgain -a avg -r rms
>
> which, as a stock picker, bigger values are better. All it does is
> solve the equation:
>
>     G = ((1 + rms)^P) * ((1 - rms)^(1 - P))

--

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


Copyright © 2000 John Conover, john@email.johncon.com. All Rights Reserved.
Last modified: Thu Dec 14 13:07:14 PST 2000 $Id: 001214103514.31798.html,v 1.0 2001/11/17 23:05:50 conover Exp $
Valid HTML 4.0!