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

 
AlexEro:

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

(If it's yours, today 09-JAN-2012 you have secured YOUR WORLD SCIENCE PRIORITY by publishing it on the forum).

Let me explain to others what I am talking about: In many cases of noisy signal the usual methods of approximation and interpolation do not work. Usually in such cases the least squares method is used (by solving a redefined system of linear equations). Although their results are much more reliable, all these methods are a 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 it's NOT suitable for trading, except as a supplementary quick method in some places - maybe.

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


You flatter me :) The pages cited were from my unpublished book. Honestly, when I derived those formulas, I didn't see anything special. This is a usual trigonometric regression: take trigonometric model of series, fix frequency w and get a linear model in relation to its remaining parameters A, B, and mean. And then like everyone else: we assume Gaussian noise, then the maximum likelihood method reduces to the least squares method. But thanks anyway for the kind words.

By the way, the bigger problem is finding that very frequency w. In the indicator I used Quinn and Fernandez's method, which is described later in my book. It is easy to show that the time series model x_n based on trigonometric function x_n = A*cos(w*n+phase)+epsilon_n reduces to

Later I used a more accurate, but more time consuming method of finding the frequency, based on finding the maximum in the spectrum. But both methods gave me approximately the same results, which gave me more confidence in the power of Quinn and Fernandez's algorithm.

 
gpwr:


You flatter me :)

Later I used more accurate, but more time consuming method to find the frequency, based on finding the maximum in the spectrum. But both methods gave me roughly the same results, which gave me more confidence in the power of Queen's and Fernandez's algorithm.

I'm not flattering anything. You, colleague, probably don't have a very broad idea of the applicability of your method. For some DSP applications, increasing the Fit speed by a factor of 100 without loss of accuracy (which itself is equivalent to increasing the accuracy by a factor of 2) is a matter of life and death - literally. For example, in aircraft radars, in air defence, in anti-missile cases, as well as in other applications. It is quite time to call "the right people", it is strange that you have not been called "from there" yet, the method has been practically unknown until now. (Such "little things" as applicability in mobile phones and modems we're not discussing here.)

And then, as I've already said, the success of such a "reductive" approach in MNC is a rarity in numerical methods. So don't be modest.

 
AlexEro:

I'm not flattering at all. You, colleague, probably don't have a very broad idea of the applicability of your method. For some DSP applications, increasing the Fit speed by a factor of 100 without loss of accuracy (which in itself is equivalent to increasing the accuracy by a factor of 2) is a matter of life and death - literally. For example, in aircraft radars, in air defence, in anti-missile cases, as well as in other applications. It is quite time to call "the right people", it is strange that you have not been called "from there" yet, the method has been practically unknown until now. (Such "little things" as applicability in mobiles and modems we're not discussing here.)

And then, as I've already said, the success of such a "reductive" approach in MNC is a rarity in numerical methods. So don't be modest.


Hmmm... I'll write an article and see what the reviewers have to say.
 
gpwr:

Same as ordinary trigonometric regression: take a trigonometric model of a series, fix the frequency w and obtain a linear model with respect to its remaining parameters A, B, and mean

I would like to try trigonometric regression in EViews.

Could you write down or tell me how to write this regression, so that you can estimate the parameters in EViews. There are plenty of estimation methods there, this can be changed as well.

I will definitely post the result

 
faa1947:

Same as ordinary trigonometric regression: take a trigonometric model of a series, fix the frequency w and obtain a linear model with respect to its remaining parameters A, B, and mean

I would like to try trigonometric regression in EViews.

Could you write down or tell me how to write this regression, so that you can estimate the parameters in EViews. There are plenty of estimation methods out there, this can be changed too.


Sorry, but I'm not familiar with EViews. If you need the code for this method, see here:

https://www.mql5.com/ru/code/8732

By the way, ARMA econometrics methods reduce to a trigonometric series regression with decaying exponents like exp(zeta*n)*cos(w*n+phase). Read the output of Prony's method and you'll understand everything. If you can't find it, I'll post a piece from my book explaining it all.

 
gpwr:


Sorry, but I'm not familiar with EViews. If you need the code of this method, look here:

https://www.mql5.com/ru/code/8732

By the way, ARMA methods of econometrics are reduced to regression of trigonometric series with decaying exponents like exp(zeta*n)*cos(w*n+phase). Read the output of Prony's method and you'll understand everything. If you can't find it, I'll post a piece from my book explaining it all.

The page in question is missing.

Your knowledge of EViews is not required - I'll try to do that, but I can't do without your help.

The equation in EViews looks like this for lag values:

EURUSD = c(1) + c(2)*EURUSD(-1) + c(3) * EURUSD(-2) etc.

with sines:

EURUSD = c(1) + c(2)*sin(c(3)* ........ ) ......

Something along these lines. The kind of formula is quite arbitrary. C(i) is the coefficients to be evaluated by different methods.

 
faa1947:

The page in question does not exist.


The code is here:

https://www.mql5.com/ru/code/8732

How the odds are displayed there is clear. I don't charge money for my codes, while EViews creators want >$1000 per copy. So I'm not going to help them and translate my code into EViews format.

 
gpwr:


The code is here:

https://www.mql5.com/ru/code/8732

The way the odds are displayed there is clear. I don't charge money for my codes, while EViews creators want >$1000 per copy. So I'm not going to help them and translate my code into EViews format.

EViews is a tool. All programs on your computer are free, including vin?

You don't want to do it, don't do it.

 
gpwr:

...

It's a regular trigonometric regression:

...

That's right, it's a regular trig regression. Not very sure if those two sines and cosines will revolutionise the DSP, but try ticking off an article.

It's not very clear how you're going to adequately identify the model. I don't mean to firmly "fit" the model into a series, with MNC you can fit any model into any series (with some assumptions on accuracy). I'm asking about the understanding that the "optimal" parameters found will hold for a long time in the future, long enough to have time to work. There is a strong suspicion that the parameters will behave randomly.

Among other things, the model has a distinct disadvantage - you need to predict far ahead in order to profit from it. It is not very accurate, moreover, it does not describe the market at all, it will be seen by error analysis of the model - the first lags will be strongly correlated.

PS: although there are a couple of thoughts about the development of this thing, if they are of interest to you - I can write in private.

 
Farnsworth:

That's right, it's a regular tr-regression. I'm not so sure that these two sines and cosines will revolutionise the DSP, but try ticking off an article.

It's not very clear how you're going to adequately identify the model. I don't mean to firmly "inscribe" the model into a series, you can inscribe any model into any series with MNC (with some assumptions on accuracy). I'm asking about the understanding that the "optimal" parameters found will hold for a long time in the future, long enough to have time to work. There is a strong suspicion that the parameters will behave randomly.

Among other things, the model has a distinct disadvantage - you need to predict far ahead in order to profit from it. It is not very accurate, moreover, it does not describe the market at all, it will be seen by error analysis of the model - the first lags will be strongly correlated.

PS: although, there are a couple of thoughts about the development of this thing, if they are interesting to you - I can write in private.

In my poorly enlightened opinion the approach outlined is of little use for the marketplace. All good for improving signal to noise ratio. As written above for missile guidance. There is no signal in the marketplace, and most importantly the BP characteristics, including frequency, phase, float all the time. If we don't acknowledge non-stationarity from the outset, you get nothing good in principle. By recognising non-stationarity we can at least indicate the limits of applicability of the method.

For some reason, maximum entropy methods (like Burg) are glossed over. You can clearly see how the AFR swims when the window size changes or when the window is shifted. Immediately you can see several humps of resonant frequencies acting on the analyzed sample. And it's immediately clear that you can't just use all this beauty to predict the next bar and predict on the holy faith that the AFR won't change when the next bar arrives. And this is a very good example where the implemented idea initially did not take non-stationarity into account.

Reason: