1st and 2nd derivatives of the MACD - page 24

 
gpwr:

How do you calculate a delay-free, zero phase shift filter for all spectral components? The idea is simple. We take FFT quotes. We zalue the Fourier coefficients above a certain frequency. Then we reverse Fourier transform and get our filtered quote. But it does not look good, especially at the beginning and at the end. Which is understandable due to periodicity of Fourier components. If you want to play with this filter, the code is attached.

It's not a "filter" but an approximator. Otherwise you are right: there is no filter without delay. You don't even have to be a PhD to understand it. The problem is that the knowledge of most of the members of this forum, although profound, is FRAGMENTARY. To de-fragment these islands requires a flight of thought, you need freedom of speech. And on this forum there is none and won't be any time soon. So one should not hope to derive any working models here, surrounded by these here moderators, under this business model of Metakwots.

It would be better if you, colleague, would still post the rigorous output of Fit method from your extrapolator. Although you were not the first, the first was a graduate student from Asia, but his conclusion (which, by the way, he did not publish in full, the full conclusion was made by another scientist from the Baltics, both publications are virtually unknown), his approach is narrow. Perhaps your conclusion will be wider (the wider, the better), though it is not so exact - because of degrees. Put it out there, or it will be lost to world history.

 

Maybe someone already has a Hilbert-Huang conversion algorithm?

I found some codes in C++, but I don't have enough C++ experience and Hilbert-Huang knowledge to translate it to MQL4/5. Maybe someone would be willing to help?

 
AlexEro:

It's not a "filter", it's an approximator. Otherwise, you're right: there' s no such thing as a filter without a delay. You don't even need to be a PhD to understand that. The problem is that the knowledge of most of the members of this forum, although profound, is FRAGMENTARY. To de-fragment these islands requires a flight of thought, you need freedom of speech. And on this forum there is none and won't be any time soon. So one should not hope to derive any working models here, surrounded by these here moderators, under this business model of Metakwots.

It would be better if you, colleague, would still post the rigorous output of Fit method from your extrapolator. Although you were not the first, the first was a graduate student from Asia, but his conclusion (which, by the way, he did not publish in full, the full conclusion was made by another scientist from the Baltics, both publications are virtually unknown), his approach is narrow. Perhaps your conclusion will be wider (the wider, the better), though it is not so exact - because of degrees. Put it out there, or it will be lost to world history.


The output of formulas in Fit was done in Maple. I'll try to find this file and post it here. At one time I was so interested in time series prediction methods, that I even started to write a book about it. I wrote 100-odd pages and then got disappointed and abandoned it. Here is a piece of book, which superficially describes the output of formulas in Fit (sorry, but it's in English):

 
gpwr:


The formula output in Fit was done in Maple. I'll try to find that file and post it here. At one time I was so interested in time series prediction methods that I started to write a book about it. I wrote 100-odd pages and then got disappointed and abandoned it. Here is a piece of book, which superficially describes the output of formulas in Fit (sorry, but it's in English):

Thanks. Just clarify, please, is this above a page from your (unpublished) book, or some other?

(If it is yours, then today 09-JAN-2012 you have secured YOUR WORLD SCIENCE PRIORITY by posting on the forum).

Let me explain to others what I am talking about: In many cases of noisy signal, conventional approximation and interpolation methods do not work. Usually in such cases the method of least squares is used (by solving a redefined system of linear equations). Although their results are much more reliable, all these methods are HUNDREDS slower than the usual simple ones, due to the solution of the linear system.

In some, very few cases of a particular approximation or a particular signal, individual scientists by purely analytical mathematical tricks have succeeded in reducing the linear system of equations (two-dimensional) to simpler methods (one-dimensional, summation or vector convolution). This speeds up the approximation of the noisy signal by HUNDREDS of times.

One of such methods is the one posted here (for the first time ever) on MQL4.com by author GPWR (Vladimir).

Holoborodko from Japan as cited above has used the same approach to calculate the derivative of a noisy signal. He managed to reduce (simplify and speed up) derivative formulas to ridiculously simple types, without solving a system of linear equations.

In digital signal processing the same approach is used in fairly rare savitzky-golay filters.

https://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_smoothing_filter

P.S. Addendum for GPWR. By "Russian" style of proper English I see, that it is your book. It is excellent, just excellent. By the way, it was written very lucidly. It's too bad you haven't published it. It's a good contribution for DSP. I'm afraid for trading it's REALLY not suitable, except in some places as an auxiliary quick way - maybe.

P.P.S. Everyone learn a scientific approach to solving applied mathematical problems.
 
AlexEro:

.... In many cases of noisy signal, conventional approximation, interpolation methods do not work.

The words approximation and interpolation are appropriate where there is a signal. DSP specialists keep forgetting that there is no signal as such in the marketplace and in this sense it is not very important how one managed to fit within a sample. The sequence of criteria is different: to fit in the sample so that it can be extrapolated out of the sample. We are all only interested in the out-of-sample prediction, and the quality of the in-sample algorithms is interesting only in the sense of the predictive power of the resulting approximation.

Therefore, we must first answer what is the predictive ability of the model, and then only answer the next question, what is the approximation algorithm that satisfies the predictive criterion.

 
faa1947:

.... In many cases of a noisy signal, conventional approximation, interpolation methods do not work.

The words approximation and interpolation are appropriate where there is a signal. DSP specialists keep forgetting that there is no signal as such in the marketplace and in this sense it is not very important how one managed to fit within a sample. The sequence of criteria is different: to fit in the sample so that it can be extrapolated out of the sample. We are all only interested in the out-of-sample prediction, and the quality of the in-sample algorithms is only interesting in the sense of the predictive ability of the resulting approximation.

So, one must first answer what the predictive capability of the model is, and then only answer the next question, what is the approximation algorithm that satisfies the predictive criterion.

Right, absolutely right. And a partial, I repeat, partial answer to this very correct question may be given only by giving a correct answer to a perfectly simple, stupid in its simplicity question "What is an indicator":

https://www.mql5.com/ru/forum/137416

The correct approach to building a trading system lies at the CENTER of different concepts from mathematics, economics and even jurisprudence. It cannot lie anywhere else, because experienced managers of the world's greedy banks have already tried everything, all known methods, hired all known mathematicians and tried all the tricks of modern methods of approximation, modeling, optimization. Well, except that they did not know the GPWR method, but this method by itself will not give them anything except speed. The answer will be "so what"? They have had supercomputers for a long time; speed is not an issue for them.

I don't understand why the author of the thread is being attacked here? What is so red about his question? Why are you shouting "fuck him"?

Perhaps, quite possibly, there is something to it:

For example, it is true that the MACD derivative only provides the rate of change of the BAND of the trading signal (and the band itself is not very distinct and clear). But here, as correctly stated, the GRADIENT, that is, the multi-dimensional derivative of the MACD can give something useful. For example the derivative of the MACD signal + the gradient along the FOLLOWING of this very MACD. That is unusual and fresh.

The problem with advanced forum users here is that they are glossed over. Reshetov, for example, brought up an important topic of minimax. This is important. It has long been known to all among economists-model-optimizers - that ordinary "technical" methods of optimization do not give the right conclusions. It is not a question for economists at all - that it is necessary to dig in minimaxes. Von, even SProgrammer on Reshetov theme responded and get excited, he heard some insider information about methods of pro-trading in large companies. And what did the forum participants do? They slammed Reshetov! This despite the fact that, roughly speaking, without knowledge of minimax optimization economists-modellers are not given a diploma now at all.

 
AlexEro:
I don't understand why the author of this thread is being attacked? What is so redoubtable about his question? Why shout "get him!"?

The author's statement of the question is very unspecific.

If the derivative, then what variable. On the right is the difference between the two regressions. On the face of it - the variable is the value of the quotient. It doesn't look that way to me. There is a more interesting variable - it is the coefficient of these regressions. What do they represent? Constants? This needs to be proved. To my mind these coefficients are not constants at all, but random variables and we still have to work to make them at least similar to constants. So, what is a derivative? I asked this question, but got no answer.

 
faa1947:

The author's formulation of the question is very unspecific.

If derivative, which variable. On the right is the difference of the two regressions. At first glance, the variable is the value of the quotient. It doesn't look that way to me. There is a more interesting variable - it is the coefficient of these regressions. What do they represent? Constants? This needs to be proved. To my mind these coefficients are not constants at all, but random variables and we still have to work to make them at least similar to constants. So, the derivative - what is it? I asked this question, but got no answer.

The derivative is the rate of change of a function in one variable. A gradient is the multivariate rate of change of a function on several variables.

But you have to be careful with the words "regression" and "regression coefficient". Don't be so quick to jump the gun and label it immediately.

It is possible to slip the definition into an inconsistency with our subject of study.

And there will be further misunderstandings and the whole thing WILL turn into Mark Twain's "agricultural newspaper editing".

 
AlexEro:

The derivative is the rate of change of a function in one variable. The gradient is the multivariate rate of change of a function in several variables.


What exactly does this derivative look like for MACD. Not in words.
 
faa1947:
What exactly does this derivative look like for the MACD. Not in words.
That's not for me, but for the author of this thread. I have other interests at the moment.