Adaptive digital filters

 
Many people now use the JMA and its modifications, but there is almost no mention of the specific theoretical assumptions on which it works. If anyone knows, please share.
 

There is quite a lot of information on this subject, e.g. here: http://prodav.narod.ru/dsp/index.html (section "adaptive digital filtering")


Ask Prival as well, he seems to be the only DSP expert among us, I think he can help with the theory.

PS: what is JMA?

 

I would love to help. But unfortunately I can't read MQL code as freely as MathCad where formulas are written the way we are used to seeing them in books. The only thing that seems to me (though I'm not sure) is using one of regression types, to make it clearer

There is a linear regression like y(x)=ax+b. You can calculate coefficients a and b in different ways, you can use ANC (seems not to be used there), and you can use recursion, but to understand it you should clearly understand cycles (I get confused there, where, what and why is calculated). Most probably there is a non-linear regression, because there are some if() while calculating + type of regression equation itself is not clear, how many coefficients there are.

In general, almost all indicators can be considered as digital filters, the MA is a digital filter. The word adaptation usually means that some parameters (coefficients in the filter gut) have to change depending on the characteristics of the input signal. Therefore first of all I would refer AMA, FRAMA and similar adaptive digital filters (averaging parameter (n) changes depending on input process variance estimation), almost all FFT, wavelet filters that use threshold processing (trying to match TF parameters with a spectrum of input desired signal).

But SATL, FATL are not adaptive, because once at design stage TF coefficients were calculated, which allowed to match transient response of the filter with a spectrum of the input signal (AFR and IFR) and during operation these coefficients do not change. These are so-called matched filters. But there is an ideal, what is called in DSP optimum filter, to build it is difficult, but possible. For this you need to know spectra of useful signal and noise.

I don't know, if I helped you or confused you :-), but in any case good luck.

 
2 grasn - thank you very much for the link, the material is very good)

2 Prival - I have some experience with this kind of digital filters, but on the principle of "theory to practice" (Kaufman filter), visually the results were very good, but the statistics did not show any particular advantages. The statistics are better in JMA because I've added some original solutions to the algorithm, and that's what I want to understand. Now I will have to take apart the code on the basis of the theory and look for the differences))
 
NightPaul:

2 grasn - thank you very much for the link, the material is very good)

2 Prival - I have some experience with this kind of digital filters, but on the principle of "theory to practice" (Kaufman filter), visually the results were very good, but the statistics did not show any particular advantages. The statistics are better in JMA because I've added some original solutions to the algorithm, and that's what I want to understand. Now I'll have to take apart the code on the basis of theory and look for the differences ))

Try to do the following: take AMA (Kaufman) as the basis, but use regression model instead of a simple average. Maybe it will be easier this way and everything will be clearer + you will make your own code. IHMO this combination of methods may be good.
 
Not a bad option, by the way. I'll let you know when the results are in.
 
Prival, let me rewrite the code into formulas and you explain.
 
Integer:
Prival, let me rewrite the code into formulas and you explain.

The code of what, JMA. Or should I write formulas how to rewrite JMA? As my programming experience tells me, it is better (and faster) to write your own code than to deal with someone else's and write the same (or something very similar).
 

Colleagues, don't consider me too annoying, but what is JMA? I tried to make my own adaptive filter on the basis of Widrow-Hopf's least squares algorithm, which seems to be the simplest one. After some experiments I was 300% sure that it is impossible to make an adaptive filter for time series of Forex, because miracles do not happen, there are only wizards. The main reason is a huge influence of non-stationarity effect: surface of filter's performance changes all the time, therefore minima of this surface change, and also problem with convergence of weighting coefficients. But in general - I'm not an expert, just self-taught in DSP.

PS: If you make really adaptive filter, please let me have a look :o)

 
2 Integer
If it's not too much trouble, it would be a good idea to take apart the JJMASeries code from this article 'Efficient averaging algorithms with minimum lag and their use in indicators'.

2 grash
Here is what the author himself writes about JMA ) - http://www.jurikres.com/catalog/ms_ama.htm#top
Since all this is for sale we only get the disassembled codes, as I understand them myself, but I really want to understand what's the tricky part.

 

There's a light hit on the Kalman filter, by the way(Prival, that's just for you):

JMA performs BETTER THAN OTHER SOPHISTICATED METHODS, including ...

Kalman's g, g-h, g-h-k filters, with or without fading memory
Savitzky-Golay filters, with or without fading memory
Kaufman's Adaptive Moving Average (KAMA)
Chande's Variable Index Dynamic Average (VIDYA)
Double Exponential Moving Average (DEMA)
Triple Exponential Moving Average (T3)
Brown's Modified Moving Average (MMA)
Ehler's Modified Optical Elliptical Filter (MEF)
Ehler's Symmetrically weighted FIR filter
Hull Moving Average (HMA)

P.S. By the way, there is a link to Kalman's filter at the bottom of this page.

Reason: