Re: FIR Bandpass filtering (C code)



On 2 Apr., 21:43, "Rune Allnor" <all...@xxxxxxxxxxxx> wrote:
On 2 Apr, 21:09, "Andor" <andor.bari...@xxxxxxxxx> wrote:





Rune wrote:
On 2 Apr, 03:20, info2...@xxxxxxxxx (Robert Krten) wrote:

Rune Allnor <all...@xxxxxxxxxxxx> wrote:
On 1 Apr, 04:33, info2...@xxxxxxxxx (Robert Krten) wrote:
The problem I'm running into is that the output of the filter follows the
input shape (the low frequency component).
Stock data and FIR filters? Of course. Stock data are
non-starionary. FIR filters compute the weighted avreage
of a finite number of data points. If there is a trend in
the data which is far longer than the FIR filter -- and
such a trend exists in stock data -- this is exactly
what one would expect to see.

That would apply to the very long sequences, i.e., the "years" samples,
given insufficent length. But when I have 2 years worth of samples,
and I'm filtering for an 8-day trend, I would expect it to work...

You don't get my point: The stock market data don't comply with
the assumtions about data the FIR filter techniques is based on.

Rune, what the heck are you talking about??

The basis for DSP. I am sure you know aout energy signals and
power signals?

The types of signals which are analyzed in the realms of DSP
are assumed to be of type "finite energy" or "finite power".
Such signals are a bit restricted with respect to arbitrary
data sequences in that they have a finite mean value.

What does the mean of a sequence of numbers have to do with FIR
filtering (or, in fact, anything)? Anycase, every (finite) sequence of
numbers has a finite mean. I really don't get your point.

If you analyze the nature of a stock market time series,
you will find that it has certain properties which are
very different from thoe properties of the data encountered
in DSP.

No. It's just another sequence of numbers.

If you extrapolate a stock market data sequence
into the future, it will rise without bound.

That depends on how you care to extrapolate the data. Even if the
extrapolation explodes, it still doesn't matter.

Well, according
to ecomoy theory. Whether that will happen in practice is
anybody's guess, but there is nothing in the tehory to
suggest and upper limmit exists to the stock market index.

So the mean of the stock market index does not exist, in
the sense that no theoretical limit can be found on the
form

M = lim_{N -> infinite} sum_{n=0}^N x_n/N < infinite

where x_n is the n'th sample in a stock market data sequence.

This
mean value is often - but not always - zero.

Stock market data do not exhibit this limitation.

It's no limitation. Are you saying that only zero-mean data can be
filtered?

No. I'm saying that FIR and IIR filters only make sense for
energy signals and power signals. These filters are studied
in terms of the Fourier tranform, which requires the signals
to me integrable(?). The stock market data are not integrable
in the sense required by the FT, and hence FIR and IIR filters
don't make sense with those sorts of data.

So, consider this sequence x_n given by

x_n = alpha n + beta cos(w_0 n) + e_n,

where 0 < w_0 < pi is known and e_n is some noise. Are you saying I
can't use an FIR to filter out the periodic componenent? Or yet
another FIR to filter out the polynomial component? Or combine the two
to filter out both components to find the residual e_n?


Obviously you are not, but I haven't the slightest clue what
your objection is to filtering (or DFT) analysis of stock market data
as compared to, say, seismic, radar or audio data.

Those types of data comply with the requirements of the FT.
A tiny detail, but it makes all the difference.

When did you last try to compute the Fourier transform of a sinusoid?
Using the same mathematical trick, you can compute the FT of a
polynomial (which is, as I said, just a special case of a sinusoid).

Regards,
Andor

.



Relevant Pages

  • Re: FIR Bandpass filtering (C code)
    ... Stock data and FIR filters? ... If you analyze the nature of a stock market time series, ...
    (comp.dsp)
  • Re: FIR Bandpass filtering (C code)
    ... i am no stock analyst or guru. ... Hz filters). ... My main concern is filter delay (Since this isn't a realtime application, ... and you have a bank of comb filters. ...
    (comp.dsp)
  • Re: Very low power dynamo (alternator actually).
    ... It would be cool if I could set up performance targets and let Spice ... do the iterations for me. ... stock parts plus a minimum of new purchases. ... using Touchstone to design microstip filters. ...
    (sci.electronics.design)
  • Re: Dealer support ...
    ... filters and a few basic items would be a minimum requirement. ... I know for VW cars that air filters and oil filters are common across *loads* of engines, meaning they probably only have to stock a couple of hundred quids worth of parts to cover filter supply for the entire range for the past 15 years. ...
    (uk.rec.motorcycles)
  • Re: FIR filtering in the Fourier domain
    ... Winfilter allows to design FIR filters (BUTT, CHEB, BESS, RCOS and ... applied to a rectangular or raised cosine window. ... In other word, the same frequency response, but with a linear phase. ...
    (comp.dsp)