Trading Strategies Based On Digital Filters - page 46

 

Now I can upload attachments

Here it is my digital filter

Files:
 
fajst_k:
Hi clahn04,

Did you ever made a statistic and proper out of sample test for digital filters method ?? I just wonder what the results would be.

So how you define the noise ?? In Fourier/Goertzel it is simple but with MESA ??

Do you know this.

The Adaptive N Cycle Goertzel Discrete Fourier Transform System

Any comments ??

Krzysztof

Krzysztof,

I haven't coded any mechanical strategy like richcap talks about. I spent a lot of time with the ATCF method months ago.

I don't use Mesa to define the noise. To be honest, I really dont' "define" noise per se. Filtering price is what i mean by noise (like your typical Low Pass Filters, Jurik, etc).

cl

 

Hi Clahn04,

Here is how I create the cycle indicator for M30 chart on EURUSD.

After running the Spectrum analysis, I can see the greatest peak is at 42. So I'll use 41 and 43 for P1 and P2 and 25 and 66 for D1 and D2.

The indicator is in attachment.

Then on the M30 chart it often happens that the price behaviour is reversed compared to the cycle indicator. What does that mean? Did I do something wrong?

Files:
analysism30.jpg  59 kb
cyclechart.jpg  243 kb
test.mq4  6 kb
 

One of the problems with Mesa is that, depending on the # of bars that you choose, you will get different spectrums. If i run a test over 2000 bars it will be drastically different than one with 5000 bars. So, you either need to denoise the data before you run the spectrum, or run the spectrum over multiple sample sizes/time frames to get common harmonic cycles.

If your cycle his harmonic, it will come through. I would encourage you to widen the bandpass though. 41-43 is no room for error, so what that tells me is you are capping off something important, and that is why it's inverted. Try 40 and 44, leaving your other numbers the same. ;-)

cl

dvarrin:
Hi Clahn04,

Here is how I create the cycle indicator for M30 chart on EURUSD.

After running the Spectrum analysis, I can see the greatest peak is at 42. So I'll use 41 and 43 for P1 and P2 and 25 and 66 for D1 and D2.

The indicator is in attachment.

Then on the M30 chart it often happens that the price behaviour is reversed compared to the cycle indicator. What does that mean? Did I do something wrong?
 

great that is gets alive

Hi,

It's great that this thread gets alive. I think I finished with CSSA on TRADE2WIN

so i can contribute as well. I have a double envirnoment now Neuroshell + MT4

and all indicators for digital filters for NS as well. So it will be easy to evaluate strategy or indicators itself using Genetic Optimizer.In next post will show w few NOXA CSSA cycles for EURUSD30 min so we can compare with MESA. I have also advanced Fourier indicators so we can compare with them as well. But maybe somebody will compare with Goertzel cycles ?? I don't have this ind for NS, the latest Goertzel for MT4 is at Codebreaker thread at ForexFactory

Krzysztof

 

denoise and detrend

In order to have a good spectrum you have to denoise and detrend. There is a lot of different methods of detrending, parametric and non parametric. The simplest log difference. Other Hodrick - Prescot filter

Krzysztof

 

HP filters

HP filters MT4 indicators are also at Codebreaker thread. Question is what DFG

MESA does with an input data. Takes it as a raw data or makes some detrending

internally. I don't know but it is easy to check. If you have SPECTRA installed

(advanced MESA, SSA etc) under Linux than simple compare the spectrum,

or with another MESA where you are sure what's is doing.

Krzysztof

 
clahn04:
One of the problems with Mesa is that, depending on the # of bars that you choose, you will get different spectrums. If i run a test over 2000 bars it will be drastically different than one with 5000 bars.

Yep. It is true.

But I'm not sure that a longer window is better. It depends on what is your objective.

If you want to find the dominant cycles over a long period, it is OK to have a long window and use MESA with a given order (My MESA analyser lets you choose the order of autoregression, in fin-ware software I believe it is fixed to 150 ).

But these cycles are not present all the time. So you must have a tool to catch the cycle as soon as it is present. With a long window of observation this is impossible. So you have to shorten the window and use the proper spectrum analyzer (maybe a simple oscillator could fit) to trigger a trading system on.

So, you either need to denoise the data before you run the spectrum, or run the spectrum over multiple sample sizes/time frames to get common harmonic cycles.

How do you denoise?

If your cycle his harmonic, it will come through. I would encourage you to widen the bandpass though. 41-43 is no room for error, so what that tells me is you are capping off something important, and that is why it's inverted. Try 40 and 44, leaving your other numbers the same. ;-)

cl

Yes, I agree. Keep also in mind that if P1 and D1 are too near, the filter may result very long and more errors can be introduced at frequencies near the one that you want to preserve.

 
clahn04:
One of the problems with Mesa is that, depending on the # of bars that you choose, you will get different spectrums. If i run a test over 2000 bars it will be drastically different than one with 5000 bars. So, you either need to denoise the data before you run the spectrum, or run the spectrum over multiple sample sizes/time frames to get common harmonic cycles.

If your cycle his harmonic, it will come through. I would encourage you to widen the bandpass though. 41-43 is no room for error, so what that tells me is you are capping off something important, and that is why it's inverted. Try 40 and 44, leaving your other numbers the same. ;-)

cl

That's really great!! :-)) It works fine with the 40 and 44 :-)

How do we choose the valleys for D1 and D2? Should they be as low as possible? if there is a peak next to the peak we will use to define P1 and P2, do we have to take the valey between them?

Do you have some example on which values we could use for method 2?

How do we choose the two peaks inside and the 2 peaks on the order. Are there some ideal configurations?

 
fajst_k:
HP filters MT4 indicators are also at Codebreaker thread. Question is what DFG

MESA does with an input data. Takes it as a raw data or makes some detrending

internally. I don't know but it is easy to check. If you have SPECTRA installed

(advanced MESA, SSA etc) under Linux than simple compare the spectrum,

or with another MESA where you are sure what's is doing.

Krzysztof

As a matter of fact, the first operation in MESA analysis is to calculate the autocorrelation of the time series, after subtracting the mean from the series itself. That does not mean that it is detrended, only that it is zero-centered. Maybe that a detrend pre-processing helps in getting better analisys, who knows?

But what do you mean with denoise? I understand that there are a lot of denoising algorythms. But what for?

Is it a removal of undesired high fequencies? Is it a removal of a known band with an undesirable signal?

MESA should get rid of gaussian white noise. The fact is that it is well known that market time series are not affected from that kind of noise.

Again, one of the problems is what do we mean with noise.

I will take a look at codebreaker 3d asap

Reason: