Cyclical analysis for finance next step

written by Sergey Tarassov


Sometimes Timing Solution users ask me about different math techniques that can be applied to conducting the cyclical analysis of financial markets. These are quite popular things like fast Fourier transform (FFT), singular spectrum analysis (SSA) and other. Some traces of these ideas may be found in Timing Solution. In this article I would like to summarize the discussion of these techniques inside TS Yahoo Group as well as the history of developing existing Timing Solution modules for cyclical analysis.

It started in early 90s. I was making my first steps then in market analysis. Many of my University friends worked at the banks at that time. Some of them were involved in trading, and they were interested in employing advanced math for that. I worked then at the Institute of Nuclear Research, Linear Accelerator department; cyclical analysis was my job and a special point of interest as the linear accelerator is in reality a big oscillator system. At that time the mutual interest between what my friends-traders did and future Timing Solution software was born.

Surely I tried then a variety of different math techniques and tools that were available at that time: Matlab program, CERN library with a lot of procedures written on FORTRAN since 1970s as well as other sources. 

When the existing modules in Timing Solution were developed, they covered practically everything that is valuable and meaningful in cyclical analysis. Our next step should be totally different than searching for some new math procedures. It should be more about information processing or data mining or something like this. Let us discuss this issue in details. 

Firstly I want to emphasize the fact that different math procedures were developed to solve some practical tasks, and not all of them can be applied for the stock market analysis. 

Let us look at them:

FFT (Fast Fourier Transform) - allows to reveal cycles very fast (though with some restriction). It was a big issue 30-40 years ago. However, now, with modern fast computers, this is not an issue at all.  

SSA (Singular Spectrum Analysis) - as I understand, this procedure allows to solve cyclical analysis problems using matrix calculations (matrix eigenvalues). Matrix calculation and matrix libraries were developed a lot during the computer era. Again, this is not an issue in our case, with modern powerful computers we can conduct cyclical analysis from a scratch.

Goertzel algorithm - allows to recognize some fixed amount of cycles. It allows to recognize some already known cycles. This is not our case at all. 

Bartels significance test - it was developed to confirm hidden permanent cycles like an effect of the Moon tidal force on the ionization of F2 layer of the ionosphere. I wrote about this already in this article  This is not our case as well, cycles in finance work for a very restricted period of time.

As you see these techniques had been developed to solve some practical task or to overcome restrictions of slow computers. All these techniques have one common thing: they were developed to find a trace of some harmonic wave in data.

Now the abilities of modern computers change the situation significantly. We can conduct a complete cyclical analysis within some seconds now while  30 years ago we would need almost an hour to conduct similar calculations. Personal computers gave to the cyclical analysis a new dimension: visual analysis. Now we are able not only to calculate cycles, we can see them, see how cycles appear, live and disappear. Wavelet analysis shows the whole life of a cycle. This is a sample of a wavelet diagram:



These yellow stripes show the strongest cycles. Look at this one:


It means that on March 27 the cycle with the period of 2 hours 30 minutes was very active all trading day. If some cycle just appears, it will be immediately visualized on this diagram as a yellow spot, and you can immediately display the projection line based on this cycle. We do not need any other calculations as we can see a complete portrait of all cycles working within any selected period. The diagram above shows the cyclical life for S&P within 30 trading days. We have analyzed intraday 2 min chart and observed the life of cycles with periods 1-8 hours, the most tradable cycles for day trading.  As you see, since March 24 till May 1, 2014, ten intraday cycles have appeared (10 bright yellow spots).

What else do you need to improve our cyclical models? The word "immediately" has been used twice in the last paragraph. This is the core of the main problem which is to be able to reveal these cycles as early as possible. I see two methods to solve this problem, and these methods should be working together:

1) Employ visual analysis; this is what Timing Solution does. Yes, this is true! Our eye can see patterns that are practically impossible to reveal using formal math methods. A single human brain contains the information gathered during the process of human evolution, from the simplest live forms to the modern humankind. It covers several hundreds million years of data!!! As an example, when we define our orientation in the physical space, we rely on the experience received by ancient live forms. Our movements, emotions, thinking are not a product of simple Aristotle logic, their source is much more deeper. We simply employ this ancient knowledge.

2) Employ fundamental analysis.  From my understanding these cycles usually appear as a reaction on some fundamental factors. So the further developing of this system  is possible as a combination with some structuralized news system. This system should analyze incoming news and reveal the cycle/cycles related to this type of news. In this case we can over perform the stock market. This system should work like this: 

- we got some news; 

- our expert system indicates that market reaction on this fundamental event is: a)  1-0.5% drop in price and b) a birth of the cycle with the period of 2 hour 30  of min: 

- it means that in 1 hour 15 min after this news we are expecting up movement and 2 hours 30 min a drop once again. This information is very tradable - kind of delaid news trading.

This is a very complicated task, and so far I even don't know how to begin it. It needs a good data and news providers,  and more...  

I believe the breakthrough in cyclical analysis may appear not in some new math procedure. It should appear in some other place, some border between different fields of knowledge. It should be data mining applied to fundamental analysis or something like that...

May 4, 2014

Sergey Tarassov

Toronto, Canada