The program used in this work:
equil-time-series.c You will also need
nrutil.h for a few definitions.

Examples of use:

equil-time-series 1326 2 ftse1326.dat

(Input time series ftse1326.dat; number of values to be read, 1326, must
be equal to, or less than, the number of values in the file; and the value
of 2, number of categories used in the coding, should be fixed always at 2.)

equil-time-series 1326 2 r

(Use 1326 uniformly distributed random values.)