Fast Fourier Transform - Cycle Extraction - page 73

 
secretcode:
Alex

Thanks for your kind offer...please go ahead

There are so many traders including me who have very ordinary knowledge about FFT and market cycles !!

Your help will be appreciate

Best Regards,

Alex,

in my opinion I found this thread very inspiringly and the spectormetr useful. Any help is appreciated.

 

Ok. I will get something up by tomorrow afternoon.

 
mladen:
That is a band pass (FIR) filter using Lanczos kernel (some more info of it can be found here : Lanczos resampling - Wikipedia, the free encyclopedia ) for calculation The coeff representer is a separate indicator I made in order to enable people to see what does the actual kernel used by a filter look like (since that filter can use 12 types of kernel for calculation)

Mladen,

Is your Lanczos kernel FIR re-calculating?

 
nevar:
Mladen, Is your Lanczos kernel FIR re-calculating?

nevar,

Yes. It is a centered filter with a special kind of asymmetric extrapolation for the missing data

 

Here is a quick example of ONE way to create a projection line using spectormetr and the Goerzel Browser. The two tools are complementary and in my opinion need to be used together. With cycle analysis on financial time series, the first thing you need to do is adjust your expectations. Using the the past to predict the future is full of problems and is inherently unreliable but it does allow the trader to anticipate potential changes in trend well ahead of the turn. We have to ask ourselves what is moving price. Is it only news or can past cycles fully explain the current price action? This answer will never be clear. Sometimes this works with alarming accuracy and other times leaves you wondering why your turn did not materialize. For this reason you need to use other indicators or trend lines for confirmation and always make sure that the fundamentals also support a potential change in trend.

What we need to look for are cycles that have some persistence ie. the cycle has existed within the time series for enough time to be used to create a projection line. On shorter time frames, in my opinion, anything under the Daily will have cycles that vanish and reappear too quickly to be useful most of the time. The follow example will use daily data.

The first thing we need to so is determine the window where will be begin the analysis. Where to start is the fundamental problem here and here is one technique you can use all all time frames. The window we will be using will start at 24-07-2012 and finish at 01-92-2013.

Files:
 

Take the cross-hair tool and hold down the right mouse button and drag the cross-hair between those pivot points. You will see that that swing had a lifespan of 136 days. In order to create a valid projection line we need to look at the last largest swing so that we can have a better chance of evaluating what is happening on the current swing.

Rule 1: Multiply 136 by 4 = 544 for trough to peak in this case or if your are measuring peak to peak, multiply the result by 2.

544 days will ensure that we have enough bars to start the analysis. Using 500+ bars has advantages as it allows us examine several well known natural cycles that exist in financial markets. Here it is important to make the distinction between calendar days and days within metatrader without weekends. The most important ones are the 584 day Venus cycle (417 bars), the 365 day annual cycle (261 bars) and the 40 week cycle will be familiar to those who have studied Hurst (200 bars). In order validate the existence of these cycles we will add a Goerzel Browser to our chart with a 544 day window.

Files:
 

With the Goerzel Browser, we can start to examine the cycles with more depth. What is immediately apparent is the 414 day cycle with an amplitude 2.5x the second cycle. In this case, the venus cycle is clearly defined. When we see such a strong cycle within the time series, we need to make a decision. The Goerzel Browser will make a composite of the cycles and their amplitudes to generate a projection line. In cases like this where one cycle is so clearly dominant, it may be better to focus on the sub harmonics of the dominant cycle instead. With this in mind we can add spectrometr to the chart with an iperiod of 414. I prefer to use no more than 5 cycles within spectrometr and even few cycles when the value of iperiod is smaller. With regard to the other cycles, the second cycle shifts between 290 period and 310 periods and I have touched on this cycle in previous posts. The 3rd and 4th cycles are close relatives of the 40 week Hurst cycle. When the periods are similar and there is little difference in the amplitudes you can go ahead and average the periods.

Files:
 

Of course there are limitations here. We are looking at one cycle and using the tools available within metatrader. There are other tools which allow you to go much deeper but just because you can, does not mean that you will get a better result. Once you have the longer cycles in place, you will then have to drop to lower time frames and use statistical tools to determine if price has moved enough in the context of time to change direction.

Best luck to all,

Alex

P.S Dear mladen, any chance we can have more time to edit past posts? A couple of hours would be great!

 

A quick correction: Dragging the cross-hair is with the left button.

 

Take the cross-hair tool and hold down the right mouse button and drag the cross-hair between those pivot points. You will see that that swing had a lifespan of 136 days. In order to create a valid projection line we need to look at the last largest swing so that we can have a better chance of evaluating what is happening on the current swing.

Alex, you are right, but I stumble a little bit:

The cross-hair tool shows 163 days between 27-07-2012 and 29-01-2013 (incl. sundays), divided 163 days by 6 is 27 (Sundays).

Take 163 days minus 27 that is your 136 day lifespan.

Your example could have been transposed digits.

Reason: