Please clarify, I'm not quite sure what exactly the coefficient is. The specifics of the Q-test are described in the article, as revised.
Rather, it is based on the fact that it is a universally popular value of 0.05. If you want to use a different one, it's up to you to replace the variable value in the script.
And you wanted to get everything on a platter? It doesn't work that way. Something has to be sacrificed.
Yields are also forecasted. And then after forecasting they are converted into absolute price values. I am going to write about it in the next article.
denkir:
This is not an example, but a clipping from the context.
Without the source data and formulas, based on which you obtained the residuals and your distribution, I have no right to evaluate it.
-Alexey-, I recommend you to read the article again. There you will see that it is not the series itself that is estimated, but the series of returns. This is about stationarity.
The article about distributions was written for introductory purposes as an example of the characteristics of a financial series, or rather a series of returns. You can also write an article on this topic.
I mean the correlation coefficient for each lag. What do you mean - you wish, the algorithm should reasonably set the level of significance, otherwise - uncertainty in determining the level, and accordingly - it is not clear why it is needed. The fact that the derivative of a series is estimated is clear, and this is what I have been writing about all along. And I gave you an example not for the original series, but for the residuals. I remember something, I don't know how accurate it is, that the method you describe is used for forecasting volatility, and it is precisely because its series is already much more stationary (the effect you write about at the beginning) and does not need transformation. Accordingly, you can use the method, since the source data are suitable for it. But not the price series derivative you mentioned. Understand that if you have removed, for example, asymmetry (or other moments) from the initial distribution by means of your transformation, then you will forecast a series in which it is not present, and you will not get it back.
Denis, I would still like to hear an answer to my question regarding the interpretation of the criterion - I can't understand from the article whether the conclusions drawn from the tests are correct.
// I would question the validity of the application of the Ljung-Box itself. Of course, most of the books I have seen say that it remains valid even for non-normal distributions, but I have never seen any proof of it. I suppose the primary source has it, but I never came across the works of Ljung and Box, so I always kept this question on my mind. The essence of my doubts is that LB uses chi-square distribution, which, as we know, is tied to normality and independence. In the case of the quotation series, neither of these is observed, which means that the application of this criterion looks like a very complicated one.
Therefore, I would like to ask you if you have any calculations that prove that the Ljung-Box criterion is applicable to series where the conditions of independence of neighbouring returns and normality of their distribution are not essentially fulfilled. Personally, until I see the calculations, I would be cautious about using this criterion. By the way, I am extremely surprised that Mr Engle is not a billionaire yet.
I have no such calculations. It's an interesting question. I'll try to work on it. The only thing I can say is that I've seen this test in several sources on rows that don't fulfil the stated conditions either. For example here: Analysis of Financial Time Series, Ruey S. Tsay. Aren't you surprised that G. Perelman is not even a millionaire? :-))
-Alexey-: Я имею в виду, коэффициент корреляции по каждому лагу. Что значит - желаете, алгоритм должен обоснованно задаваться уровнем значимости, иначе - неопределенность в определении уровня, а соответственно - непонятно, зачем он нужен...
I meant the statistical significance level alpha, relative to which the null hypothesis of the calculated p-value for each Q-statistic is evaluated. Maybe we are talking about different terms?
...The fact that the derivative of a series is estimated is clear, and this is what I have been writing about all along. And I gave you an example not for the original series, but for the residuals.
Until I see the formulas and the residuals themselves, I will refrain from any evaluation. If you don't want to show me, then let's not talk about it....
I remember something like this, I don't know how accurate it is, that the method you describe is used for volatility forecasting, and precisely because its series is already much more stationary (the effect you write about at the beginning) and doesn't need transformation. Accordingly, you can use the method, since the source data are suitable for it. But not the price series derivative you mentioned. Understand that if you have removed, for example, asymmetry (or other moments) from the initial distribution with the help of your transformation, then you will forecast a series in which it is not present, and you will not get it back.
That's exactly how it is - volatility forecasting. There will be a continuation of my article, then we will discuss it :-))))
I meant the statistical significance level alpha, relative to which the null hypothesis of the calculated p-value for each Q-statistic is evaluated. Maybe we are talking about different terms?
Until I see the formulas, the residuals themselves, I will refrain from any evaluation. If you don't want to show it, then let's not talk about it....
Exactly so - volatility forecast. There will be a continuation of my article, then we will discuss it :-))).
Now everything is clear. But you should specify in the article that you are going to forecast volatility, not the price series, and that after forecasting you are going to transform the values of the "returns" series not into the price series, but into some derivative of it. My considerations are not critical for this task, but I hope that they will help you if you ever decide to try to forecast a price series.
-Alexey-: Now everything is clear. But it should be specified in the article that you are going to forecast volatility, not price series, and that after forecasting the values of the series of "returns" you are not going to transform them into price series, but into some derivative of it. My considerations are not critical for this task, but I hope that they will help you if you ever decide to try to forecast the price series.
That's great.
Thanks for your thoughts. I always welcome constructive criticism!
Once again, the ultimate goal is to get a price series forecast, taking into account the parameters that were present in the non-linear model.
The only thing that changes in my plans is the need to create some library of statistical distributions. It is worth writing an article about it. Such an idea occurred to me after the discussion.
-Alexey-: So you have plans to do some price range forecasting? Quite a worthy and interesting task. I would like to see articles on this topic :)
Yes, in the plans. Because it is interesting. And I plan to make short-term forecasts as well. But for now we need to prepare for it. First we need to solve the problem with distributions.... We also need MetaQuotes' consent :-))))
And the main thing is that MQL5 users should be interested in it.
alsu, I see that you have worked in Statistica. But you need the raw data. What returns and what formula did you use to get them?
I assume that we are talking about different derivatives of price series. So I would not hurry to throw a stone into the Nobel laureates' garden :-))).
No, we are talking about the same ones. The 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).
Nevertheless.
You can analyse the relative increment of price - the result is the same. If you take the logarithm of the relative increment - well, try it, it will be an interesting curve) For convincing, I bring pictures from Statistica (I am really used to using it, but, as a rule, only as food for thought and hypothesis testing. In fact, to do statistics, and any other area of mathematics, you need, as the professionals joke, chalk, a blackboard and a bald head. I have enough of the first and the second, the third I am gradually gaining)))).
Here is the relative increment with a lag of 8.
and here is the distribution of the logarithm of the relative increment.
don't start convincing me that it's normal. Here the left tail is much thicker and longer than the right tail anyway. It looks more like gamma, but expanded along the x-axis, well, or something quite exotic. The peaks in the left wing are a consequence of quotations quantisation (the left part corresponds to very small changes in Close, and they, as we know, can differ by no more than Point, hence the observed noise), so they can be smeared over the whole slope, which will make the left tail even thicker.
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))).
PS you don't consider me a snob, I treat laureates with respect. It's just that I was taught from childhood not to be afraid of authorities and to doubt more often, and it always helped me in life. If a person has received the Nobel Prize, it does not mean that he is right all the time and in everything. For example, Einstein was given a Nobel for the photoeffect (although, if you think about it, the formula was on the surface, and he was just the first to get there, but that's worth a lot), but he didn't believe in quantum mechanics until the end of his life - and he turned out to be wrong. Even though Engle got a Nobel Prize for GARCH (I should note that the method is not too complicated either, everything is the same here - for speed:), but it doesn't mean that since the 80s, when this model was created, the market hasn't changed. On the contrary - I am ready to believe that THEN it really worked, and quote distributions were close to normal (though I doubt the latter:)). The fact is that NOW, after 30 years, it does not work. Plus, if Engle had been an engineer rather than an econometrician, he would have known that stationary processes can be heteroscedastic as well - this fact he did not take into account in his research, and it is on such data that GARCH goes astray momentarily. So, I advise you and everyone to try less to tail the authorities and more to dig on your own.
alsu: Theoretically he is a millionaire, and with a direct possibility of practical realisation)
I wonder what he's doing now. If a creative person has forgotten about work, socialising and a bonus, it means that he is most likely solving some interesting task.
Please clarify, I'm not quite sure what exactly the coefficient is. The specifics of the Q-test are described in the article, as revised.
Rather, it is based on the fact that it is a universally popular value of 0.05. If you want to use a different one, it's up to you to replace the variable value in the script.
And you wanted to get everything on a platter? It doesn't work that way. Something has to be sacrificed.
Yields are also forecasted. And then after forecasting they are converted into absolute price values. I am going to write about it in the next article.
This is not an example, but a clipping from the context.
Without the source data and formulas, based on which you obtained the residuals and your distribution, I have no right to evaluate it.
-Alexey-, I recommend you to read the article again. There you will see that it is not the series itself that is estimated, but the series of returns. This is about stationarity.
The article about distributions was written for introductory purposes as an example of the characteristics of a financial series, or rather a series of returns. You can also write an article on this topic.
Denis, I would still like to hear an answer to my question regarding the interpretation of the criterion - I can't understand from the article whether the conclusions drawn from the tests are correct.
// I would question the validity of the application of the Ljung-Box itself. Of course, most of the books I have seen say that it remains valid even for non-normal distributions, but I have never seen any proof of it. I suppose the primary source has it, but I never came across the works of Ljung and Box, so I always kept this question on my mind. The essence of my doubts is that LB uses chi-square distribution, which, as we know, is tied to normality and independence. In the case of the quotation series, neither of these is observed, which means that the application of this criterion looks like a very complicated one.
Therefore, I would like to ask you if you have any calculations that prove that the Ljung-Box criterion is applicable to series where the conditions of independence of neighbouring returns and normality of their distribution are not essentially fulfilled. Personally, until I see the calculations, I would be cautious about using this criterion. By the way, I am extremely surprised that Mr Engle is not a billionaire yet.
I have no such calculations. It's an interesting question. I'll try to work on it. The only thing I can say is that I've seen this test in several sources on rows that don't fulfil the stated conditions either. For example here: Analysis of Financial Time Series, Ruey S. Tsay. Aren't you surprised that G. Perelman is not even a millionaire? :-))
Я имею в виду, коэффициент корреляции по каждому лагу. Что значит - желаете, алгоритм должен обоснованно задаваться уровнем значимости, иначе - неопределенность в определении уровня, а соответственно - непонятно, зачем он нужен...
I meant the statistical significance level alpha, relative to which the null hypothesis of the calculated p-value for each Q-statistic is evaluated. Maybe we are talking about different terms?
Until I see the formulas and the residuals themselves, I will refrain from any evaluation. If you don't want to show me, then let's not talk about it....
I remember something like this, I don't know how accurate it is, that the method you describe is used for volatility forecasting, and precisely because its series is already much more stationary (the effect you write about at the beginning) and doesn't need transformation. Accordingly, you can use the method, since the source data are suitable for it. But not the price series derivative you mentioned. Understand that if you have removed, for example, asymmetry (or other moments) from the initial distribution with the help of your transformation, then you will forecast a series in which it is not present, and you will not get it back.
I meant the statistical significance level alpha, relative to which the null hypothesis of the calculated p-value for each Q-statistic is evaluated. Maybe we are talking about different terms?
Until I see the formulas, the residuals themselves, I will refrain from any evaluation. If you don't want to show it, then let's not talk about it....
Exactly so - volatility forecast. There will be a continuation of my article, then we will discuss it :-))).Now everything is clear. But it should be specified in the article that you are going to forecast volatility, not price series, and that after forecasting the values of the series of "returns" you are not going to transform them into price series, but into some derivative of it. My considerations are not critical for this task, but I hope that they will help you if you ever decide to try to forecast the price series.
That's great.
Thanks for your thoughts. I always welcome constructive criticism!
Once again, the ultimate goal is to get a price series forecast, taking into account the parameters that were present in the non-linear model.
The only thing that changes in my plans is the need to create some library of statistical distributions. It is worth writing an article about it. Such an idea occurred to me after the discussion.
That's great.
Thanks for the thoughts. I always welcome constructive criticism!
Once again, the ultimate goal is to get a price series forecast.
So you have plans to do some price range forecasting? Quite a worthy and interesting task. I would like to see articles on this topic :)
Yes, in the plans. Because it is interesting. And I plan to make short-term forecasts as well. But for now we need to prepare for it. First we need to solve the problem with distributions.... We also need MetaQuotes' consent :-))))
And the main thing is that MQL5 users should be interested in it.
alsu, I see that you have worked in Statistica. But you need the raw data. What returns and what formula did you use to get them?
I assume that we are talking about different derivatives of price series. So I would not hurry to throw a stone into the Nobel laureates' garden :-))).
No, we are talking about the same ones. The 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).
Nevertheless.
You can analyse the relative increment of price - the result is the same. If you take the logarithm of the relative increment - well, try it, it will be an interesting curve) For convincing, I bring pictures from Statistica (I am really used to using it, but, as a rule, only as food for thought and hypothesis testing. In fact, to do statistics, and any other area of mathematics, you need, as the professionals joke, chalk, a blackboard and a bald head. I have enough of the first and the second, the third I am gradually gaining)))).
Here is the relative increment with a lag of 8.
and here is the distribution of the logarithm of the relative increment.
don't start convincing me that it's normal. Here the left tail is much thicker and longer than the right tail anyway. It looks more like gamma, but expanded along the x-axis, well, or something quite exotic. The peaks in the left wing are a consequence of quotations quantisation (the left part corresponds to very small changes in Close, and they, as we know, can differ by no more than Point, hence the observed noise), so they can be smeared over the whole slope, which will make the left tail even thicker.
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))).
PS you don't consider me a snob, I treat laureates with respect. It's just that I was taught from childhood not to be afraid of authorities and to doubt more often, and it always helped me in life. If a person has received the Nobel Prize, it does not mean that he is right all the time and in everything. For example, Einstein was given a Nobel for the photoeffect (although, if you think about it, the formula was on the surface, and he was just the first to get there, but that's worth a lot), but he didn't believe in quantum mechanics until the end of his life - and he turned out to be wrong. Even though Engle got a Nobel Prize for GARCH (I should note that the method is not too complicated either, everything is the same here - for speed:), but it doesn't mean that since the 80s, when this model was created, the market hasn't changed. On the contrary - I am ready to believe that THEN it really worked, and quote distributions were close to normal (though I doubt the latter:)). The fact is that NOW, after 30 years, it does not work. Plus, if Engle had been an engineer rather than an econometrician, he would have known that stationary processes can be heteroscedastic as well - this fact he did not take into account in his research, and it is on such data that GARCH goes astray momentarily.
So, I advise you and everyone to try less to tail the authorities and more to dig on your own.
Does it surprise you that G. Perelman is not even a millionaire? :-))
Theoretically he is a millionaire, and with a direct possibility of practical realisation)