Вы находитесь на странице: 1из 11

Getting Started with CATS

Firstly, some basic information to give you a quick and very brief overview
on how it looks for your orientation. Then followed with some step by step
lessons to help you get a feel for how it works.

Download Cats

When you get the link to the download site, just click on the link in the site
and it gets downloaded.
In “C:\Program Files” create a folder named “cats”. Then copy all the files
and folders from the downloads zipped folder to the cats folder that you
created. AsIf you see it as a compressed file just extract the files and
folders. If you see it as a folder, just copy the contents.

If you have Windows Vista or Windows 7 then you should create a cats
directory on the desktop or somewhere that Windows won't interfere and
unzip the files into that. Testing on Vista showed that cats files cannot be
seen if it is installed to Program Files.

Then set up a shortcut to the cats.exe file so that the software may be run
from the shortcut.

Whats in the Cats library

The different folders within cats are where you in the future you will save the
data for data time series you want to analyze. Cats.exe is the program you
run. The other .exe files are programs that you don’t normally start, but
Cats.exe use these.
In every folder you will find some data time series named xxx.cats that you
can play around with. If you want to see the data within the time series in
them you can open them with notepad.

The cats.ini file contain some basic information for cats.exe. Like the
timespan being used, the type of data and some macros.

Specout.csv is created in the folder together with some other documents


when you do a spectral analysis on some of the data time series in this
folder.

Speclog.csv is also created when a spectral analysis is done and contains a


list of the cycles periods at which peaks are found in the spectrum. This file
is best viewed with a spreadsheet.
Cats.exe

If you run cats.exe (by double clicking or using the link created earlier) then
a window opens:

Right here it is asking which data time series folder you will work with, for
example month or year or any other.

In the picture above we have now chosen directory month, entered


command f266 witch call on the file 266-ausoutfr.cats in the month folder,
and entered a command G witch graphs the time series in a new window.
Don’t try to maximize this graph window up in the right corner. Some
computers don’t like it at all. There is a command &S for setting the size of
graphs. When you want to close this graph you hit enter to deactivate it.

When you want to close the Cats.exe program type ctrl-c (hold down control
and press “c”).

The stack in Cats

In this picture we again have chosen month and then f266.


The next command here is ? which shows the stack.

One way to explain stack is to call it a register. It shows what data time
series Cats is working with. In this case the file 266-ausoutfr.cats from the
folder month. Cats can work with many (dataseries) on the stack at the
same time. Some of the more fancy commands use multiple time series at
one time.

If you want to empty the stack you use command z.

Lesson 1: Finding a cycle period to study and fitting the cycle to our
data

1. We start up CATS and type in month to select the folder we want to work
in.

2. We will analyze the US dollar versus Swiss franc exchange rate. We will
use logs of the data so that equal percentage changes become equal
changes in the displayed value. So we type F47 # G and should see this
result:
(When finished looking at the graph or saving it with a screen capture, press
enter to close the graph and return to the cats main window. This applies
after each graph displayed).

3. Let us do a spectral analysis to see what cycles might exist. To save the
values we already calculated we duplicate the data first, do the spectrum
and display its graph L S G and get this:
Most of the action is in the bottom left corner, as is commonly the case. To
understand this graph we need to know what the axes mean.

The y axis is the amplitude of the cycle, in this case expressed as a


correlation coefficient with a sine wave of the period in question.

The x axis is the frequency of the cycle (not the period). We can see a peak
at about 0.02 for example. That means 0.02 cycles / month, or 1 cycle per
50 months. That means it is about a 4 year cycle. We can expand the graph
to see the low frequency cycles more spread out by taking a copy of the
spectrum that is on the top of the stack, and selecting a range to display
from say 0 to 0.03 by typing in L D0,0.03 G for example to get this:
Ignore the big peak at the left for now. Usually this exists when any price
variable or series is used (including after taking logs). When first differences
are taken (rate of change) then usually the peaks are more horizontal. We
are looking for peaks that stand out relative to a sort of exponential decay
across the screen. The three that immediately catch my eye are the ones at
frequencies of around 0.0065, 0.0085 and 0.019 or a little over. These will
have periods of around 154 months or 13 years, 118 months or 10 years
and 52 months or 4 years or so. There is also a sharp spike at frequency
about 0.002 which is 500 months or about 40 years. We only have 40 years
data, so cannot say whether such a cycle might be real or not.

If we want accurate periods for the cycles, then we need to look at the file
speclog.csv which is written in the month folder when we run our S
command. Right click on it and open it in a spreadsheet. In this CATS
calculates the exact peaks in the spectrum.
Each row shows one cycle period peak from the spectrum. The first column
is the number of cycles present in the entire period. The second column is
the period in the units of the folder being used, in this case in months. The
next two columns are the correlations with sine and cosine waves and the
combined amplitudes of these is shown in the fifth column. A larger
amplitude means that the cycle is stronger, however long cycles usually
have large amplitudes and short cycles have smaller amplitudes. The last
column is the Bartel statistic which is the probability of the cycle arising by
pure chance. The values marked in pink are likely to be real cycles,
especially the last two.

So let us have a look at the first of these cycles, the 51.7 month cycle now.
First, look at what is on the stack using ? command to see:
The 1st (bottom) line still has our log exchange rate from 1971 to 2010. The
other two lines have the full spectrum and the part spectrum that we
displayed. We can leave them there in case we want to look at them again
later. For now, we want to make two waves of period 51.5 months each, but
1/4 of a cycle out of phase, the same relation as sine and cosine. There is a
macro supplied with CATS that does this. Its usage is period Usc and it
makes 2 new timeseries on the stack running for the entire period specified
in the cats.ini file. Remember that the period must be in the units that we
chose when we selected our folder, in this case months. So we type in say
51.5 Usc ? and see:

Now we are going to make a regression equation to best fit a 51.5 month
cycle to our log data which is still in line 1 of the stack. So we type L1 R2
and this info appears:

The meaning of these various outputs is as follows:

The means and correlations apply to the 2 waves, sine and cosine that we
put in. We don't need to worry about them.
The constant 0.2345... is the value that must be added to the two waves to
get the estimates of our log exchange rate data. More on this soon.

The standard error of the Y estimate is how accurate our regression equation
thinks it is, in this case 0.143... and the R squared of 0.047... means that R
is 0.217... which is not very high. However there are longer cycles that are
also disturbing the excahnge rate, so it may still be quite meaningful.

The other important information is the X coefficients, which are the values
that our sine and cosine wave values must be multiplied by and added to our
constant to get our estimates, in this case 0.0144.. and 0.0428... We also
see that these have standard errors of estimates of about 0.0093 each. That
means that the 2nd value is more than 4 standard errors in magnitude and
is therefore quite significant.

These values contain the equation for estimating the cycle, but we don't
need to enter them in as they are already on the stack. If we type T to type
the top line we get:

and the three values listed are our constant and 2 coefficients. We can now
calculate the estimates for the cycle using M2. But we want to see the values
also, which are in line 1 so we enter M2 L1 G2 and get:
Our first cycle estimate.

Вам также может понравиться