Tsinvest's -c and -C Option

From: John Conover <john@email.johncon.com>
Subject: Tsinvest's -c and -C Option
Date: 22 Mar 2003 23:39:38 -0000



There were a couple of questions regarding tsinvest's -c and -C
options.

What these options do is control how aggressively the program buys
into IPO stocks, (or stocks with a limited history,) or other "bubble"
conditions.

The dot-com stocks were a good example; although these stocks were
attractive based on growth in value for a year, or so, the growth was
misleading in retrospect. That's the nature of fractal dynamics, (a
factor of two-even an order of magnitude-difference between
fundamental value of a stock and its market value is common.)

There are three methodologies used in tsinvest to address "bubble"
scenarios:

    1) compensation of a stock's empirical variables using standard,
    (i.e., conventional,) statistical estimate techniques, (which is
    the default.)

    2) compensation using fractal-theoretic run length and magnitude
    analysis of "bubbles" in a stock's price, (-C -c options.)

    3) both 1) and 2), (-c option.)

    4) using neither of 1) or 2), (-C option.)

For implementation particulars, see:

    http://www.johncon.com/ntropix/tsshannoneffective.html

which is the documentation to the tsshannoneffective program, (the
sources to the tsshannoneffective program were cut-and-stuck from the
tsinvest program's data set size compensation source code to make a
separate program for evaluation and software QA.)

As an example, if the tsinvestsim program, (see,
http://www.johncon.com/ntropix/tsinvestsim.html,) is used to produce
an equity market exchange of a hundred stocks, all identical, with P =
0.50706713781, f = 0.0283, (which is stocks that have a positive
average daily growth, avg, and a unity gain long term growth[1], and
is very similar to what the dot-coms were running in 1999,) and
simulate for 100,000 days using the options:

    +--------------+----------+----------+----------+
    | Default      | -C       | -C -c    | -c       |
    +--------------+----------+----------+----------+
    | Invested for | Always   | Invested | Never    |
    | 16,000 Days  | Invested | Mostly   | Invested |
    +--------------+----------+----------+----------+

With the default -D 1.0 option[2], the program is instructed to never
invest in a stock, unless the specific stock's value is increasing,
(which is an unreasonable request; the portfolio management section of
the program absolutely can assemble a portfolio that is increasing in
value, even if the value of the stocks in the portfolio are not-which
is the case for every stock in the simulation.)

So, in the long term investment scenario, (the -d 1 and -d 3 options,)
one should use the -c option, (the program should never have invested
in any of the stocks in the simulation.) However, for various noise
and high frequency trading scenarios, (-d2, -d4, and -d5,) one should
use the default or -C -c options.

Otherwise, the program will make the same mistake that most investors
made in 2000-and lose all the fortune they made in the dot-com
"bubble."

        John

[1] The average, (i.e., the mean,) and standard deviation of the
marginal increments of all stock's prices in the simulation is 0.0004
and 0.0283, per day, respectively; P = ((0.0004 / 0.0283) + 1) / 2 =
0.50706713781 and the gain in value per day, G:

    G = ((1 + 0.0283)^P) * ((1 - 0.0283)^(1 - P)) = 0.999999501

or about unity. The n'th marginal increment, M(n), is (V(n) - V(n -
1)) / V(n - 1), where V(n) is the price of a stock on the n'th day.

Note that the average gain per day of all stocks is a positive number,
(0.0004,) but that all stocks in the simulation have no growth in
value!

Sound like a paradox? It isn't. If the standard deviation is changed
to 0.02, all stock's will grow optimally, (0.02% per day.) With
0.0283, the daily value at risk, (VaR,) offsets the daily gain in the
long run, so the growth is unity.

Its an interesting exercise, (and also demonstrates the value of
simulation.)

[2] A listing of the tsinvest program options:

Usage: tsinvest [-a 0|1|2] [-C] [-c] [-D D] [-d 1|2|3|4|5|6] [-I I] [-i]
                [-j] [-M M] [-m m] [-o o] [-P] [-p] [-r] [-s] [-t] [-u]
                [-v] [filename]
    -a, optimize asset allocation for each stock held, (0):
        -a 0: equal asset allocation.
        -a 1: maximize gain.
        -a 2: minimize risk.
    -C, don't compensate the Shannon probability, P, for data set size
    -c, compensate the Shannon probability, P, for run length duration
    -D D, D = minimum growth in value of an equity, as calculated by the
              method specified by the -d argument, (1.0)
    -d d, d = method of calculating growth in value of an equity, G, (1):
        -d 1: G = (1 + rms)^P * (1 - rms)^(1 - P), P = ((avg / rms) + 1) / 2.
        -d 2: G = (1 + rms)^P * (1 - rms)^(1 - P), P = (rms + 1) / 2.
        -d 3: G = (1 + sqrt (avg))^P * (1 - sqrt (avg))^(1 - P),
              P = (sqrt (avg) + 1) / 2.
        -d 4: G = (1 + rms)^P * (1 - rms)^(1 - P),
              P = erf (1 / sqrt (run length)).
        -d 5: G = (1 + rms)^P * (1 - rms)^(1 - P),
              P = Hurst exponent =
              short term persistence.
        -d 6: G = random.
    -I I, I = initial capital (1000)
    -i, print the average index of all stocks in the output time series
    -j, index = average value of stocks, instead of average balanced growth
    -M M, M = maximum number of stocks to invest in concurrently (10)
    -m m, m = minimum number of stocks to invest in concurrently (10)
    -o o, o = maximum acceptable marginal increment in stock's value (1)
    -P, preclude calculating statistics for stocks not updated in interval
    -p, preclude investing in stocks not updated in interval
    -r, dump internal data on exit, as comments in tsinvestsim(1) format
    -s, print the names of stocks held in the output time series
    -t, print the time stamps in the output time series
    -u, reverse the sense of the decision criteria
    -v, print the version and copyright banner of this program
    filename, input filename

--

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


Copyright © 2003 John Conover, john@email.johncon.com. All Rights Reserved.
Last modified: Sat Mar 22 19:48:36 PST 2003 $Id: 030322153958.14131.html,v 1.0 2003/03/23 03:55:53 conover Exp $
Valid HTML 4.0!