Building a trading system using digital low-pass filters - page 26

 
jartmailru писал(а) >>

....

It turns out that if I selected a frequency with the filter, subtracted it from the original series,

then I can select it as many times as I like.

And there will be no zero? And even no similarity?)

In what way does filtering work then?

....

To see, if filter works correctly, you should feed a test signal, e.g. harmonic or just a step to its input and see, what you get at the output.

 
diakin >> :

To see if the filter is working correctly, you need to feed a test signal such as a harmonic or just a step into the filter and see what happens at the output.

don't feed anything.

In that programme it is enough to look at the AFC and the FFC

 
diakin >> :

To see if the filter works correctly, you need to feed a test signal such as a harmonic or just a step to its input and see what the output is.

Thanks for the tip.

.

I scored the signal -- 8 * MathSin(pi * 2 * i/50.0)

Assuming full sine cycle = 2 pi, period = 50 bars, i = current bar number.

.

Based on a set of filters:

-> 44..48 -> 35..38 -> 30..35 -> 25..30 -> 20..22 -> 16..18 -> 9..12 -> 4..6
I think I have the right to want a single sinusoid.

And something swarming around zero.

.

Just in case, asked the indicator to show the response from each of the filters.

The picture is funny :-)

Big and purple is lowpass = -> 44...48, max amplitude about 11.2

What others do there - I don't know :-), min amplitude = 7.8

.

.

** Removed unnecessary picture **

.

Regarding the AFC and FFC: Everybody makes mistakes. People, programs. Only Pushkin writes unit tests...

For example, you can "architecturally" do the following: filter coefficients will calculate two functions -

one is for displaying the FFC / AFC and the other is for the user.

 
jartmailru >> :

Just in case, asked the indicator to show the response from each of the filters.

The picture is funny :-)

Big and purple is lowpass = -> 44...48, max amplitude about 11.2

I dont know what others do there :-), min amplitude = 7.8


The picture is correct...

what is the purpose of a lowpass filter ?

Is lowpass or bandpass all the same to you?


 
christmas >> :

the picture is correct...

What is the purpose of a lowpass filter?

It's all the same to you whether it's lowpass or bandpass?

Exactly :-(. All - should pass this sine wave. My bad. Not an expert in DSP.

I'm afraid this is the first time I've looked at this outrage in such detail. Cited the wrong picture.

.

Here's a picture of my sadness:

Purple = what the first filter missed, purple has been subtracted from the original series.

Dark red = what the second filter missed, subtracted dark red from the remainder.

.

So after subtracting a signal with a period of 50 and an amplitude of 11.2, we're left with a signal,

from which the second filter managed to extract something shifted with an amplitude of 8.7.

.

It even comes to zero in the end...

.

.

Judging by the fact that your opinion is that there's nothing wrong with these pictures -

then even with the "right" frequencies in the signal, digital filters won't give them to anyone?

 
Maybe it is easier to predict stationarity if there is a difference between two strongly correlated instruments, e.g. two shares of oil companies, or is it just about forex?
 
jartmailru >> :

even if there are "correct" frequencies in the signal, digital filters won't give them to anyone?

I'm not quite sure who won't get them?

Just in case, the universal answer is that nothing is perfect

 
surfer >> :
Maybe it's easier to predict stationarity if there is a difference between two strongly correlated symbols, like for example two shares of oil companies, or is it just about forex?

>> not just about forex

I can and should have a lot of thoughts, all thoughts require long research in Matlab or using research indicators.

 
christmas >> :

I'm not quite sure who's not getting it?

just in case there's a universal answer - nothing's perfect.

.

The situation where there is a sine wave with a known period is ideal.

IMHO, a digital filter should be able to cope with this at a glance.

That is, if it's set to pass a signal with a given period - frequency,

I'd expect it to pick up about 98% of the signal, maybe 90%.

So after subtracting what the digital filter picked up,

there should be 10% of the original amplitude left.

Just in case, to get the "right residual",

I even tried to normalize the filter output from -11.2 ... +11.2 to -8 ... +8,

but the diagram shows that apart from the wrong amplitude, it doesn't have zero at zero.

.

Instead, I see a funny situation where the filter picks up a sine wave,

but for some reason it picks it up so that it leaves 77% of the amplitude in the signal.

The whole series looks like this: 77%, 48%, 17%, etc.

.

On the other hand, if you switch from LowPass filter "44...48" to LowPass "10...20",

the signal is squeezed down to an "acceptable" 13%, the signal has the correct

amplitude -8 ... +8 and becomes correct phase (at zero bar it should be 0).

.

.

.

Schematic diagram showing the parameters of the digital filter in the figure:

.

.

.

Accordingly, it looks strange to me if a period of 50

... it looks strange to me if a filter should be set to 10 ... 20 ...

.

Maybe if someone could try to filter a sine wave with period 50

and show what goes through the filter and what is left in the residual at filter 44...48,

then you could compare the DigitalFilter from fx.qrz.ru with other means.

 

don't keep repeating the phrase "digital filter""DSP" - it's just a software simulation of an analogue filter with FIR

Reason: