
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
No, just the same ones. Returns are simply the first differences of the Close[i]-Close[i+n] price series (on my chart they are taken with a lag of 8, but the curve is exactly the same for any lags). Just returns is a term common mainly in Western literature. In the MQL4 forum, people often use it in matstat discussions (they are traditionally heated there))) so I just used it out of habit. If it is more convenient, I will write "first difference of a series" or "increment of a series". But "derivative" is a very incorrect term for time series, there are no derivatives here and cannot be. If you remember, even the analytical apparatus for derivatives and differences is seriously different (for example, compare the p. Fourier and z-transform...).
There are several definitions for returns in the literature, and there are different kinds of them. I understand that your term "logarithm of relative increment" fits the formula in my article.
The term "price series derivatives" are in no way derivatives in the mathematical sense. They are derived in the sense of:
1. derived from another; derived from something else.
But the distribution of the logarithm of the relative increment.....
Rather like a mirror image of the lognormal distribution....
Generally speaking, we can announce a contest - the first one who finds a normally distributed value at Forex should be put on the board of honour as the one who proved the inexpediency of Nobel laureates' efforts)))))
Agreed. It was given as an example, not as an empirical distribution. If I didn't convey that to the reader, that's my sin.
So I advise you and everyone else to try less to keep up with the authorities and more to dig on your own.
To ARCH. And GARCH was invented by Bollerslev. Everything changes, including models. I chose the simplest and most universal for the example.
Thanks for the advice.
Comments:
- Leo is right the title of the article does not reflect what it is about. For Roche, he asked a question. I will change one word in the title. " Econometric Approach to MQ Firm Analysis". You can see how everything changes immediately, especially the approach .....
- The article uses an approach known as time series analysis (TSA) and this approach does not care what to analyse, whether it is the price series or the efficiency of selling snow to Eskimos :-), and you, as the author, talk about it, but call it (the article) differently for some reason.... .
- When carrying out AVR, the basis is exactly the analysis of ACF (autocorrelation function), its TYPE and parameters. First of all, the VID of the autocorrelation function (you do not say a word about it, but it is the VID that determines the further model.
- You have simply dragged the GARCH model here by willful decision. Although even by your research (indirect signs) one can understand that this model is not suitable... and it is not universal, there are better ones... for those who are going to trade volatility, it may be suitable, but for forecasting price series (our goal), it is in no way suitable. I can explain in more detail why, if you are interested, now just briefly. The main thing that caught my eye
Now, in terms of methodology.
- you went the way of obtaining ACF through Fourier transform. It is possible and so, but as far as I remember there should be obligatory modulus taking and possibly (I write from memory) taking the square of the modulus before the inverse Fourier transform. I did not see in your algorithm (maybe I was not attentive).
- From the figure where you show the ACF, it is clear that there is an error in the calculations. ACF by definition is a function lying within -1...+1, and you have there +-200 and a multiplier 1e4 (something with normalisation on the 0-th term).
- you are subtracting the MOG (mean value m=mean(res);). Why ? Why do you remove non-trending - straight line equations ? Please justify
- You as a specialist in spectral processing should know that the removal of the MOJ is similar to zeroing the zero component of the spectrum, but to be completely correct this component in the spectrum is the most powerful, and by the side lobes of the function sin(x)/x it extends to the entire spectrum. It is necessary to apply at least a hemming window (hening, butterworth,...) to suppress the side lobes (this effect).
- in the comments you write "inverse weighted Fourier transform" how does it differ from a simple inverse transform ? what and why do you weight it ?
There are more questions...or rather some things I do not agree with. ..you can not take H4 nature can not be cheated, the further the points on the time axis from each other, the less correlation between them, respectively the accuracy of the forecast will always be worse than for a short time interval.
You can't take logarithm ( or rather you can, but you should not forget about it), otherwise you get abracadabra, in a nutshell this transformation over the initial data changes the type of ACF (you can check it with the help of statistics package), many people step on this rake, and I once stepped on it in my time... the type of another one is extremely important.
H.Y. ready to join the research, because I am always interested and interested in this issue, the ability to predict, but not all there is simple, a lot of white spots, those studies that I came across, very often have white spots, they are talked about in passing does not reveal the essence, although it is clear, because further is already lying money and algorithms begin to bring income . https://www.mql5.com/en/code/8295
Yes, and about the Q-test, yes we did it, but then what?
were you able to answer what model now corresponds to what you observe?
What are the parameters of this model? What did this test give you ? What question did you get an answer to ? I mean that your hypotheses are a little bit wrong....
you can do it differently, the main thing is to understand what this test is looking for, what it determines in the sample...
Remarks:
- when carrying out AVR, the basis is exactly the analysis of ACF (autocorrelation function), its VIDA and parameters. First of all, it is the type of the autocorrelation function (you do not say a word about it, but it is the type that determines the further model.
- You have simply dragged the GARCH model here by willful decision. Although even by your research (indirect signs) one can understand that this model is not suitable... and it is not universal, there are better ones... for those who are going to trade volatility, it may be suitable, but for forecasting price series (our goal), it is in no way suitable. I can explain in more detail why, if you are interested, now just briefly. The main thing that caught my eye
I decided to answer the most important and interesting thing.
I agree that the type of ACF determines the further model. But I have not dealt with it in the article so far. That's a task for a later stage. So far I have covered the pre-estimation stage, the so-called pre-estimation stage.
I brought GARCH here because of its relative simplicity, and how did you decide that it is not suitable if we haven't even evaluated it yet? :-)
I specified it as a mathematical basis, which takes into account previous changes of indicators(ϵ2t -i) and previous estimates of variance (so-called "old news") (σ2t-i).
Themain goal - to make a forecast of the exchange rate (price) using some model - is not solved within a single paper...
- you went the way of obtaining ACF through Fourier transform. You can do it that way, but as far as I remember there should be obligatory modulus taking and possibly (I'm writing from memory) modulus squaring before the inverse Fourier transform. I didn't see it in your algorithm (maybe I wasn't paying attention).
Analysis: Forecasting and Control. 3rd edition. Upper Saddle River, NJ: Prentice-Hall, 1994.
And it is also implemented in Matlab.
Decided to answer the most important and interesting one.
...
what about the fact that the ACF should lie within the range from -1 to +1 ? it is not interesting ? because before making any conclusions, first you need to be sure that everything is correctly calculated.
H.Y. And the fact that in one article all can not be laid out, it is clear, one mat model wagon and a small cart ))
and about the reference to foreign literature here is this look at http://www.statsoft.ru/home/textbook/modules/sttimser.html#1general.
package statistics there is a calculation of ACF is matlab it coincides, at one time I checked it. Compare your calculation results in MQL and with these packages, on the same data. You have a mistake somewhere
- from the figure where you show the ACF, it is clear that there is an error in the calculations. ACF by definition is a function lying within -1...+1, and you have +-200 and a multiplier 1e4 (something with normalisation to the 0th term).
Please read more carefully the description of the y-axis in the article. I did it because of impossibility to reflect small values less than unity with the help of Google Chart API.
Besides, as you can see from the algorithm, I removed the zero lag from the ACF array, which is always equal to 1. This makes the chart more readable.
- you are subtracting the MOG (mean m=mean(res);). Why ? Why remove non-trending - straight line equations ? Please justify it.
This is a question for theoreticians. If you are interested, I have already indicated the source of the algorithm.
- You, as a specialist in spectral processing, should know that the removal of the MOG is similar to zeroing the zero component of the spectrum, but to be completely correct, this component in the spectrum is the most powerful, and according to the side lobes of the function sin(x)/x it extends to the entire spectrum. It is necessary to apply at least a hemming window (hening, butterworth,...) to suppress the side lobes (this effect).
Oh, I'm not an expert at all. Can you elaborate? :-)
- in the comments you write "inverse weighted Fourier transform" how does it differ from a simple inverse transform ? how and why do you weight it ?
It's describedhere, I believe ....
... you can't take H4 nature can't be fooled, the further the points on the time axis are from each other, the less correlation between them, so the accuracy of the forecast will always be worse than for a short time interval.
You cannot take logarithm ( or rather you can, but you should not forget about it), otherwise you get abracadabra, in a nutshell, this transformation over the initial data changes the form of ACF, it isextremely important (you can check it with the help of statistics package), many people step on this rake, and I once stepped on it in my time... the form is different.
They take both days and weeks :-)
Logarithm of what? Excusez-moi!
Trolls:
...statistic package there is a calculation of ACF and matlab it coincides, at one time I checked it. Compare your calculation results in MQL and with these packages, on the same data. You have a mistake somewhere
I've already compared it. Everything is correct, there is no error. It's just that data visualisation is still suffering because of Google.
In the comments to this article , 21 Jan 2011 at 14:19, I have shown the ACF graph as it usually looks, but without zero lag, which is always equal to 1.