bandpass parameters

Posted By: hola123

bandpass parameters - 03/09/20 18:09

Hi,

I am looking at the bandpass function after reading the black book. I get the general idea of the function however am still confused by the parameters.

The paragraph below is copied from the book.


vars Cycles = series(BandPass(Prices,30,2));

The behavior of a bandpass filter can be seen in the second curve of Fig. 15 in the previous chapter. Its function is similar to a lowpass filter except that it dampens not only low but also high frequencies, i.e. short cycles. This bandpass filter has a center period of 30 bars and a width of 2 (the width determines the frequency range that can pass the filter). This way the trend (a cycle with a very long period) and the noise (short period cycles) are removed from the price curve. The result is a clean curve that consists mostly of the peaks and valleys of the 30-bars cycle,

If someone could give more information on the 30 parameter & the width of 2 parameter. As I don't understand what the two really means even though it mentions it determines the frequency range.

Thanks for any help!
Posted By: jcl

Re: bandpass parameters - 03/11/20 12:27

Look here: https://en.wikipedia.org/wiki/Band-pass_filter. In the image, the "B" is the width and "f0" is the center period.
Posted By: hola123

Re: bandpass parameters - 03/12/20 20:59

Thanks very much for the link & apologise for being a bit slow. I am still struggling a bit with translating the articles I'm reading on band pass filters into trading terms.

In the examples I am reading a band pass filter normally takes two frequencies and basically any frequencies that are outside that range are removed. So with the band pass filter above are we saying that the centre frequency is 30 bars (so not looking at the shorter time bars as we want to filter out the noise & also not looking at the longer time bars so that the long term trend is removed) and the width of 2 means that the band pass will reject any bars outside the range of 28 to 32. Is that correct or completely wrong?

Thanks once more!
Posted By: jcl

Re: bandpass parameters - 03/13/20 08:36

Basically correct, only the outer frequencies are not completely removed, but merely suppressed.
Posted By: hola123

Re: bandpass parameters - 03/14/20 13:06

thanks very much your time!
© 2024 lite-C Forums