NdustriX_medium.jpg

 

Software For Business Intelligence Analytics:

Tests


Home | Installation | Usage | FAQs | Utilities | Architecture | QA | Tests | Links | Mailing List | License | Author | Download | Thanks



home.jpg
installation.jpg
usage.jpg
FAQs.jpg
utilities.jpg
architecture.jpg
QA.jpg
tests.jpg
links.jpg
mailinglist.jpg
license.jpg
author.jpg
download.jpg
thanks.jpg

The source distribution contains the LaTeX sources to the document, (fractal.ps.gz, or fractal.pdf, about 6MB.) The figures in Appendix B were made from the regression tests for the programs, and can be reconstructed with the Unix make(1) utility in the~../simulation/test, and~../utilities/test directories in the source tree.


Fractal Time Series Analytical Utilities

tsderivative

Source tsderivative.c, for taking the derivative of a time series. The value of a sample in the time series is subtracted from the previous sample in the time series. The derivative time series is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsderivative program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsintegrate

Source tsintegrate.c, for taking the integral of a time series. The value of a sample in the time series is added to the previous samples in the time series. The integral time series is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsintegrate program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tshcalc

Source tshcalc.c, for calculating the H parameter for a one variable fractional Brownian motion time series.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tshcalc program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tshurst

Source tshurst.c, for calculating the Hurst coefficient for a time series. The time series is broken into variable length intervals, which are assumed to be independent of each other, and the R/S value is computed for each interval based on the deviation from the average over the interval. These R/S values are then averaged for all of the intervals, then printed to stdout. The -r flag sets operation as described in "Chaos and Order in the Capital Markets," by Edgar E. Peters, pp 81, and should only be used for time series from market data since logarithmic returns sum to cumulative return-negative numbers in the time series file are not permitted with this option. The ln (R/S) vs ln (time) plot is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tshurst program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tslogreturns

Source tslogreturns.c, is for taking the logarithmic returns of of a time series. The value of a sample in the time series is divided by the value of the previous sample in the time series, and the logarithm of the quotient is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tslogreturns program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsshannon

Source tsshannon.c, for calculating the probability, given the Shannon information capacity.

An example output from the tsshannon program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsshannonmax

Source tsshannonmax.c, for calculating unfair returns of a time series, as a function of Shannon probability. The input time series is presumed to have a Brownian distribution. The main function of this program is regression scenario verification-given an empirical time series, speculative market pro forma performance can be analyzed, as a function of Shannon probability. The cumulative sum process is Brownian in nature.

To find the maximum returns, the "golden" method of minimization is used. As a reference on the "golden" method of minimization.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsshannonmax program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsfraction

Source tsfraction.c, for finding the fraction of change in a time series. The value of a sample in the time series is subtracted from the previous sample in the time series, and divided by the value of the previous sample. The fraction time series is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsfraction program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsrms

Source tsrms.c, for taking the root mean square of a time series. The value of a sample in the time series is squared and added to the cumulative sum of squares to make a new time series. The new time series is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsrms program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tslsq

Source tslsq.c, for making a least squares fit time series from a time series.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time. Uses Newton-Raphson method for an iterative solution for the probability, p.

An example output from the tslsq program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsnormal

Source tsnormal.c, for making a histogram or frequency plot of a time series.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsnormal program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tschangewager

Source tschangewager.c, for changing the unfair returns of a time series. The idea is to change the returns of a time series which is weighted unfairly, by changing the increments by a constant factor. The main function of this program is regression scenario verification-given an empirical time series, and a "wager" fraction, speculative market pro forma performance can be analyzed. The input time series is assumed to be cumulative sum with fractional or Brownian characteristics.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tschangewager program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsavg

Source tsavg.c, for taking the average of a time series. The value of a sample in the time series is added to the cumulative sum of the samples to make a new time series by dividing the cumulative sum by the number of samples, for each sample. The new time series is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsavg program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tssample

Source tssample.c, for sampling a time series. The value of a sample in the time series is printed to stdio only if it is a multiple of the specified interval.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tssample program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsXsquared

Source tsXsquared.c, for taking the Chi-Square of two time series, the first file contains the observed values, the second contains the expected values.

The input file structures are text files consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsXsquared program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsavgwindow

Source tsavgwindow.c, for taking the average of a time series. The value of a sample in the time series added to the cumulative sum of the samples to make a new time series by dividing the cumulative sum by the number of samples, for each sample. The new time series is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsavgwindow program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsrmswindow

Source tsrmswindow.c, is for taking the root mean square of a time series. The square of a value of a sample in the time series added to the cumulative sum of the square of the samples to make a new time series by dividing the cumulative sum of the square of the samples by the number of samples, for each sample. The new time series is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsrmswindow program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsshannonwindow

Source tsshannonwindow.c, for finding the windowed Shannon probability of a time series. The Shannon probability is calculated by the following method:

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsshannonwindow program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tspole

Source tspole.c, is for single pole low pass filtering of a time series. The single pole low pass filter is implemented from the following discrete time equation:

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tspole program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsdft

Source tsdft.c, is for taking the Discrete Fourier Transform (power spectrum) of a time series.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsdft program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsmath

Source tsmath.c, for for performing arithmetic operations on each element in a time series. The resultant time series is printed to stdio.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsmath program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsdeterministic

Source tsdeterministic.c, is for determining if a time series was created by a deterministic mechanism. The idea is place each element of a time series in an array structure that contains the element and the next element in the time series, and then sort the array. The array is output and may be plotted. For example, using the program tsdlogistic to make a discrete time series of the logistic, (quadratic function,) with the command "tsdlogistic -a 4 -b -4 1000 > XXX" and then using this program on the output file, XXX, will result in a plot of a parabola.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsdeterministic program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsstatest

Source tsstatest.c, for making a statistical estimation of a time series. The number of samples, given the maximum error estimate, and the confidence level required is computed for both the standard deviation, and the mean.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsstatest program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsshannonaggregate

Source tsshannonaggregate.c, aggregate Shannon probability of many concurrent Shannon probabilities.

An example output from the tsshannonaggregate program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsunfraction

Source tsunfraction.c, is for making a cumulative sum of the fraction of change in a time series. The value of a sample in the time series is multiplied by the running cumulative sum of the time series, and added to the running sum of the time series. The resultant time series is printed to stdout. (This program is the inverse of the tsfraction program.) Note that:

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsunfraction program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsinstant

Source tsinstant.c, for finding the instantaneous fraction of change in a time series. The value of a sample in the time series is subtracted from the previous sample in the time series, and divided by the value of the previous sample. For Brownian motion, random walk fractals, the absolute value of the instantaneous fraction of change is also the root mean square of the instantaneous fraction of change. Squaring this value is the average of the instantaneous fraction of change, and adding unity to the absolute value of the instantaneous fraction of change, and dividing by two, is the Shannon probability of the instantaneous fraction of change. The values are printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsinstant program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsrunlength

Source tsrunlength.c, is for finding the run lengths of zero free intervals in a time series, which is assumed to be a Brownian fractal. The value of each sample in the time series is stored, and the run length to a like value in the time series is stored. A histogram of the number of run lengths of each run length value is printed to stdout as tab delimited columns of run length value, positive run lengths, negative run lengths, and the sum of both positive and negative run lengths, followed by the cumulative sum of the positive run lengths, the cumulative sum of negative run lengths, and the cumulative sum of both positive and negative run lengths.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsrunlength program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsrootmean

Source tsrootmean.c for finding the root mean of a time series. The number of consecutive samples of like movements in the time series is tallied, and the resultant distribution is printed to stdout-a simple random walk fractal with a Gaussian/normal distributed increments would be the combinatorial probabilities, 0.5, 0.25, 0.125, 0.625, ...

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsrootmean program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsrunmagnitude

Source tsrunmagnitude.c is for finding the magnitude of the run lengths in a time series. The value of each sample in the time series is stored, and subtracted from all other values in the time series, each point being tallied root mean square. The magnitude deviation is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsrunmagnitude program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsshannonvolume

Note: Conceptually, this program is used to "adjust" the Shannon probability of a stock by considering the volumes of trade in a time interval. Unfortunately, the results were not encouraging, and the concept was abandoned. It is left in the program inventory for future reference.

Tsshannonvolume.c, is for finding the fundamental Shannon probability of a time series, given a stocks value, and the number of shares traded, in each time interval. The value of a sample in the time series is divided by the volume, and added to the cumulative sum of the samples, and the square of the value, after dividing by the volume, is added to the sum of the squares to make a new time series by dividing both the cumulative sum and the square root of the sum of the squares by the number of samples for each sample. The new time series is printed to stdout. The time series printed to stdout is a tab delimited table of:

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least two fields, which is the data value of the sample, followed by the volume of the sample, but may contain many more fields-if the record contains many more fields, then the first field is regarded as the sample's time, and the next to the last field the value, with the last field as the sample's volume at that time.

tsshannonfundamental

Source tsshannonfundamental.c, is for finding the fundamental Shannon probability of a time series, given a stocks value, and the number of shares traded. The value of a sample in the time series is added to the cumulative sum of the samples, and the square of the value is added to the sum of the squares to make a new time series by dividing the cumulative sum by the number of samples, and the square root of the sum of the squares divided by the number of samples for each sample. The new time series is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least two fields, which is the data value of the sample, followed by the volume of the sample, but may contain many more fields-if the record contains many more fields, then the first field is regarded as the sample's time, and the next to the last field the value, with the last field as the sample's volume at that time.

Note that since the average of the normalized increments of a time sampled time series goes up linearly on the number of samples in a sampled interval, and the root mean square of the normalized increments go up with the square root of the of the number of samples in a sampled interval, it would be reasonable to assume that that the average of the normalized increments would go up linearly with the trading volume of a stock, and the root mean square to go up with the square root of the trading volume of a stock.

tsnumber

Source tsnumber.c, is for numbering the records of a time series. The new time series is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

tsunshannon

Source tsunshannon.c, is for calculating the Shannon information capacity, (and optimal gain,) given the Shannon probability.

tskurtosis

Source tskurtosis.c is for finding the coefficient of excess kurtosis of a time series. The value of a sample in the time series is analyzed to find the running coefficient of excess kurtosis to make a new time series. The new time series is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tskurtosis program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tskurtosiswindow

Source tskurtosiswindow.c is for finding the coefficient of excess kurtosis of a time series. The value of a sample in the time series is analyzed to find the running coefficient of excess kurtosis to make a new time series. The new time series is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tskurtosiswindow program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsgain

Source tsgain.c is for finding the gain of a time series. The value of a sample in the time series added to the cumulative sum of the samples, and is squared and added to the cumulative sum of squares, the Shannon probability, P, calculated using:

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsgain program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsgainwindow

Source tsgainwindow.c is for finding the windowed gain of a time series. The value of a sample in the time series added to the cumulative sum of the samples, and is squared and added to the cumulative sum of squares.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsgainwindow program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsscalederivative

Source tsscalederivative.c, for taking the derivative of a time series. The value of a sample in the time series is subtracted from the previous sample in the time series. The derivative time series is printed to stdout.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a '#' character as the first non white space character in the record. Data records must contain at least two fields, which are the time followed by the data value of the sample at that time, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsscalederivative program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsrootmeanscale

Source tsrootmeanscale.c is for finding the root mean of a time series, at different scales. The number of consecutive samples of like movements in the time series is tallied, at different scales, and the resultant value of the distribution, as calculated by using the first value in the distribution, the running mean of the distribution, and the least squares fit of the distribution, is printed to stdout-a simple random walk fractal with a Gaussian/normal distributed increments would be the combinatorial probabilities, 0.5, 0.25, 0.125, 0.625, ...

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsrootmeanscale program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tskalman

Source tskalman.c, for taking the Kalman filtered average of a time series. The n'th running Kalman filtered linear average, A, of a time series is calculated by:


        A  = ((n - 1) / n) A      + (1 / n) a
         n                  n - 1            n

        

where a is the n'th value in the time series. The new time series of the running Kalman filtered average is printed to stdout.

Note the similarity to the running average:


        A  = (1 / n) (a  + a  + ... + a )
         n             1    2          n

        

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tskalman program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)


Fractal Time Series Simulation Utilities

tsbrownian

Source tsbrownian.c, brownian noise generator-generates a time series. The idea is to produce a 1/f squared power spectrum distribution by running a cumulative sum on white noise.

An example output from the tsbrownian program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsblack

Source tsblack.c, black noise generator-generates a time series. The idea is to produce a 1/f cubed power spectrum distribution by running a cumulative sum on pink noise which is made by running a cumulative sum on relaxation processes which are generated by a white noise generator.

An example output from the tsblack program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsfractional

Source tsfractional.c, fractional brownian noise generator-generates a time series. The idea is to produce a 1/f squared power spectrum distribution by running a cumulative sum on a Gaussian power spectrum distribution.

An example output from the tsfractional program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsgaussian

Source tsgaussian.c, Gaussian noise generator-generates a time series. The idea is to produce a Gaussian power spectrum distribution.

An example output from the tsgaussian program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tswhite

Source tswhite.c, white noise generator-generates a time series. The idea is to produce a flat power spectrum distribution.

An example output from the tswhite program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tspink

Source tspink.c, pink noise generator-generates a time series. The idea is to produce a 1/f power spectrum distribution by running a cumulative sum on relaxation processes which are generated by a white noise generator.

An example output from the tspink program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsunfairbrownian

Source tsunfairbrownian.c, unfair returns of a time series. The idea is to produce the returns of a time series which is weighted unfairly, by a Shannon probability, p, or alternately, a fraction of reserves to be wagered on each time increment. The input time series is presumed to have a Brownian distribution. The main function of this program is regression scenario verification-given an empirical time series, a Shannon probability, or a "wager" fraction, (which were probably derived from the program tsshannon,) speculative market pro forma performance can be analyzed. The cumulative sum process is Brownian in nature.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsunfairbrownian program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tscoin

Source tscoin.c, brownian noise generator, with unfair bias, and cumulative sum-generates a time series. The idea is to produce a 1/f squared power spectrum distribution by running a cumulative sum on white noise. The program accepts an unfair bias and a wager factor.

An example output from the tscoin program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tscoins

Source tscoins.c, fractional brownian noise generator, with unfair bias, and cumulative sum-generates a time series. The idea is to produce a 1/f squared power spectrum distribution by running a cumulative sum on a Gaussian power spectrum distribution. The program accepts an unfair bias and a wager factor.

An example output from the tscoins program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsfBm

Source tsfBm.c, fractional brownian noise generator-generates a time series. The idea is to produce a programmable power spectrum distribution.

Example outputs from the tsfBm program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tslogistic

Source tslogistic.c, logistic function generator-generates a time series.

An example output from the tslogistic program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsdlogistic

Source tsdlogistic.c, discreet logistic function generator-generates a time series. The idea is to iterate the function x(t) = x(t - 1) * (a + b * x(t - 1)).

An example output from the tsdlogistic program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsstockwager

Source tsstockwager.c, stock capital investment simulation. The idea is to simulate an optimal wagering strategy, dynamically determining the Shannon probability by counting the up movements in a stock's value in a window from the stock's value time series, and using this to compute the fraction of the total capital to be invested in the stock for the next iteration of the time series, which is 2P - 1, where P is the Shannon probability.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsstockwager program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsbinomial

Source tsbinomial.c, is for generating binomial distribution noise, with unfair bias, and cumulative sum-generates a time series. The idea is to produce a 1/f squared power spectrum distribution by running a cumulative sum on a binomial distribution. The program accepts a an unfair bias and a wager factor.

This program is a modification of the program tscoin. The wager fraction is computed by first calculating the optimal wager fraction, f = 2P - 1, where P is the Shannon probability, and f is the optimal wager fraction, (which is the root mean square = standard deviation of the normalized increments of the time series,) and then reducing this value by the standard deviation of the binomial distribution, which is the square root of the number of elements in the distribution, ie., the root mean square of the normalized increments of the cumulative sum is the same as the standard deviation of the binomial distribution.

An example output from the tsbinomial program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsunfairfractional

Note: Conceptually, this program is used to "weight" the returns of a time series with a Gaussian distribution, ie., produce a fractional Brownian motion time series, as opposed to a Brownian distribution which would produce a Brownian time series, as produced by the program tsunfairbrownian. Unfortunately, the precision of the results were not encouraging, and the concept was abandoned. It is left in the program inventory for future reference.

Source tsunfairfractional.c, unfair returns of a time series. The idea is to produce the returns of a time series which is weighted unfairly, by a Shannon probability, p. The input time series is presumed to have a Gaussian distribution. The main function of this program is regression scenario verification-given an empirical time series, a Shannon probability, and a "wager" fraction, (which were probably derived from the program tsshannon,) speculative market pro forma performance can be analyzed. Uses Newton-Raphson method for an iterative solution for the inverse function of the normal function. Also iterates, using Romberg integration, to calculate the cumulative interval value of the normal function.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsunfairfractional program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsintegers

Source tsintegers.c, integers function generator-generates a time series.

An example output from the tsintegers program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsshannonstock

Source tsshannonstock.c, is for simulating the gains of a stock investment using Shannon probability.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsshannonstock program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsmarket

Source tsmarket.c, is for market simulation by fractional brownian noise generation, with unfair bias, and cumulative sum-generates a time series. The idea is to produce a 1/f squared power spectrum distribution for each company in an industrial market by running a cumulative sum on a Gaussian power spectrum distribution. The aggregate of all companies participating in the market is obtained by summing the production of the individual companies. The program accepts an unfair bias and a wager factor, and the number of companies in the market.

An example output from the tsmarket program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsstock

Source tsstock.c, is for simulating the gains of a stock investment using Shannon probability.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

An example output from the tsstock program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tsstocks

Source tsstocks.c, is for simulating the optimal gains of multiple stock investments. The program decides which of all available stocks to invest in at any single time, by calculating the instantaneous Shannon probability of all stocks, and using an approximation to statistical estimation techniques to estimate the accuracy of the calculated Shannon probability.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a `#' character as the first non white space character in the record. Data records must contain at least one field, which is the data value of the sample, but may contain many fields-if the record contains many fields, then the first field is regarded as the sample's time, and the last field as the sample's value at that time.

tstrade

Source tstrade.c 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 of all equities, and using an approximation to statistical estimation techniques to estimate the accuracy of the calculated Shannon probability.

The input file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a '#' character as the first non white space character in the record. Each data record represents an equity transaction, consisting of a minium of six fields, separated by white space. The fields are ordered by time stamp, equity ticker identifier, maximum price in time unit, minimum price in time unit, closing price in time unit, and trade volume. The existence of a record with more than 6 fields is used to suspend transactions on the equity.

tstradesim

Source tstradesim.c is for generating a time series for the tstrade program. Generates a fractal time series, of many stocks, concurrently.

The input file is organized, one stock per record, with each record having up to five fields, of which only the Shannon probability need be specified. The fields are sequential, in any order, with field the type specified by a single letter-P for Shannon probability, F for wager fraction, N for trading volume, and I for initial value. Any field that is not one of these letters is assumed to be the stock's name.

The output file structure is a text file consisting of records, in temporal order, one record per time series sample. Blank records are ignored, and comment records are signified by a '#' character as the first non white space character in the record. Each data record represents an equity transaction, consisting of a minium of six fields, separated by white space. The fields are ordered by time stamp, equity ticker identifier, maximum price in time unit, minimum price in time unit, closing price in time unit, and trade volume. The existence of a record with more than 6 fields is used to suspend transactions on the equity.

tscauchy

Source tscauchy.c, Cauchy distributed noise generator-generates a time series. The idea is to produce a 1 / f power spectrum distribution.

An example output from the tscauchy program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)

tslognormal

Source tslognormal.c is for changing the distribution of a time series to a log-normal distribution. The value of a sample in the time series is subtracted from the previous sample in the time series, and divided by the value of the previous sample. This value is multiplied by its exponentiation, (i.e., e-to-the-power,) and the log-normal fractional time series is printed to stdout.

An example output from the tslognormal program appears in Appendix B of the document, (fractal.ps.gz, or fractal.pdf, about 6MB.)


A license is hereby granted to reproduce this software source code and to create executable versions from this source code for personal, non-commercial use. The copyright notice included with the software must be maintained in all copies produced.

THIS PROGRAM IS PROVIDED "AS IS". THE AUTHOR PROVIDES NO WARRANTIES WHATSOEVER, EXPRESSED OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, TITLE, OR FITNESS FOR ANY PARTICULAR PURPOSE. THE AUTHOR DOES NOT WARRANT THAT USE OF THIS PROGRAM DOES NOT INFRINGE THE INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY IN ANY COUNTRY.

So there.

Copyright © 1994-2011, John Conover, All Rights Reserved.


Comments and/or bug reports should be addressed to:

john@email.johncon.com

http://www.johncon.com/
http://www.johncon.com/ntropix/
http://www.johncon.com/ndustrix/
http://www.johncon.com/nformatix/
http://www.johncon.com/ndex/
John Conover
john@email.johncon.com
January 6, 2006



Home | Installation | Usage | FAQs | Utilities | Architecture | QA | Tests | Links | Mailing List | License | Author | Download | Thanks


Copyright © 1994-2011 John Conover, john@email.johncon.com. All Rights Reserved.
Last modified: Tue Mar 1 16:06:56 PST 2011 $Id: tests.html,v 1.0 2011/03/02 00:20:11 conover Exp $
Valid HTML 4.0!