Discussion of article "Econometric Approach to Analysis of Charts" - page 6

 

Now I see .

  1. You removed the zero lag value. Where the ACF value is always =1, so that it would be better to see. It turns out that already at lag =1 the difference is 1e4 times. You have got ACF which has the form of delta function. There is only one model for this type of ACF - it is noise. ( And you have already been asked, because it is a consequence of the fact that you take the days and logarithmise them). Think ...
  2. After all, you take the modulus and square it )) I was right. I mean, you're doing it right,
      Data21[i].opMultEq(cData[i]);  //production of a complex number by its conjugate 
                     //gives a complex number having non-zero real part only

z with a dash is a complex conjugate number.

3. but unfortunately you did not fully understand why you subtract the MOG and not the trend. Although you are right this is a theoretical question and it is very interesting.

  double m=mean(res);               // arithmetic mean of the res array
   ArrayResize(rets1,nFFT);          // fitting the array size
   for(int t=0;t<ArraySize(res);t++) //copy the original array of observations 
       // to the service one adjusted for the average
     rets1[t]=res[t]-m;

and it's a pity you can't tell others. But don't link again to foreigners, it's better to say it in your own words. It will be clearer to you yourself. It is always so, when you explain it to others, you will understand it yourself very well.

4. I was mistaken I thought it was your article https://www.mql5.com/en/articles/185 that's why I asked such questions on spectral processing, I apologise for attributing someone else's work to you. Your article is very beautiful, I haven't read such articles for a long time.

 
Trolls:

Now I see .

  1. You removed the zero lag value. Where the ACF value is always =1, so that it would be better to see. It turns out that already at lag =1 the difference is 1e4 times. You have got ACF which has the form of delta function. There is only one model for this type of ACF - it is noise. ( And you have already been asked, because it is a consequence of the fact that you take the days and logarithmise them). Think ...

Trolls, either I did not write in Russian or you did not read carefully ...

I quote myself ..:

...A few words about the description of the axes of the diagram. Everything is clear with the x-axis - it shows lag indices. The y-axis shows the exponential value by which the original ACF value was multiplied. Thus, 1e4 means that the original value was multiplied by 1e4 (1e4=10000), and 1e2 - by 100, etc. This multiplication was done for the readability of the diagram.

Any other questions on this thesis?

Then about zero lag. Here are two charts of ACF of usdjpy:


The first one has zero lag (its value rests in the upper left corner), while the second one does not. Now tell me, which chart is more illustrative? Just don't forget about zero lag. Then everything will be ok. In my script I left the 2nd variant, as you understand....

 
Trolls:

2. Still you take the module and square it )) I was right. I.e. you are doing it right,

z with a dash is a complex conjugate number.

I am glad you were right.....

3. but unfortunately you didn't fully understand why you are subtracting the MOG and not the trend. Although you are right this is a theoretical question and it is very interesting.

and it's a pity you can't tell others. But don't link again to foreigners, it's better to say it in your own words. It will be clearer to you yourself. It's always so, when you explain it to others, you understand it very well yourself.

This question is not for me. Although I suppose for that reason:

the arithmetic mean is often used as mean values or central tendencies, this concept does not apply to robust statistics, which means that the arithmetic mean is strongly influenced by "large deviations". Notably, for distributions with a large skewness coefficient, the arithmetic mean may not be consistent with the concept of "mean", and mean values from robust statistics (such as the median) may better describe the central tendency.

And trend subtraction is a different matter, imho.

 
denkir:

Trolls, either I didn't write in Russian or you didn't read carefully...

I'm quoting myself:

Any other questions on this thesis?

...

that's a bit off. I probably expressed the idea I wanted to convey to you incorrectly. That on the 0th lag the ACF should be equal to 1 is clear, and that you removed it for better reflection of the graph is also clear.

I wanted to draw your attention to the result you got. The kind of ACF you got is the ACF that corresponds to the noise.

Take the noise and plot its ACF, compare it with your last graphs. As they say, find ten differences...

and I'll give you the link again, compare it with this figure https://www.mql5.com/en/code/8295, there ACF falls smoothly and mat. model is matched to it.

H.Y. understand I am not scolding, I want to help. I'm telling you about the next stage of research, the one you didn't tell about due to the limitations of the article (you can't cover everything in one article, people write dissertations, they devote their whole life to it, it can't be presented on 2 pages).

The order of the study

We got ACF, conducted Q test, now we need to select a model by ACF type, then find parameters of this model, try to forecast by the obtained model and estimate accuracy and forecast horizon.

And so on round and round until you get satisfactory results.

The ACF you got is noise, it is difficult to predict noise, even if it is "coloured".

 
Trolls:

...I wanted to draw your attention to the result you got. The kind of ACF you got is the ACF that corresponds to the noise.

Take the noise and plot its ACF, compare it with your last graphs. As they say, find 10 differences....

H.Y. understand I am not scolding, I want to help you. I'm telling you about the next stage of the research, the one you didn't tell about because of the limitations of the article (you can't cover everything in one article, people write dissertations, they devote their whole life to it, it can't be presented in 2 pages).


Thank you, it was pointed out... let's talk about ACF types some time later....

Cobblers argue - we discuss :-)))

 

I added the files Autocorrelation.zip and GarchTest_html.mq5 to display charts using the tools described in the article.

From the archive, the file Autocorrelation.htm should be placed here: %MetaTrader%\MQL5\Files, and the file GarchTest_html.mq5 in the scripts folder.

I ask the administration to update the article.

 

You'll get something like this... but in *.htm format. The GarchTest_html.mq5 script is thrown on the chart and look at the results obtained.

 
denkir:

I request the administration to update the article.

Updates have been published
 
...I forgot to add that you should also put highcharts.js and jquery.min.j s library files in the %MetaTrader%\MQL5\Files folder.
 

alsu:
Спасибо, что дали ссылку.

Very interesting article and unique in the MQL forum.

It seems to me that the topkstarter tried to solve the issue with a dashing sabre-rattling - econometric packages offer many more models than GARCH. Selecting a model and then selecting model parameters is the middle of the road, not the beginning.

There has been criticism in previous posts about difference-based analyses. It is thought that this criticism arose because the author skipped the initial data preparation step.

According to the author of the article, non-stationarity is the only evil of the market. It is not. The following problems should be solved beforehand:

1. We should decide on the number of candles in the sample. Does the number of candles in the sample depend on the timeframe? Judging by the literature, 50 candlesticks should be enough.

2. Let's try to fit the distribution to our sample. Preferably a normal distribution. The question of the number of racks on which the chart is plotted will immediately arise. Where did you get the number of racks on which the graph is plotted? We are constantly making visual adjustments. If we think it is still not a normal distribution, we check the sample itself:

- presence of outliers: we should replace outliers, i.e. quotes above some threshold (e.g. 3 sigma) by the value of the threshold. Bulashov has a different opinion about the threshold value.

- check by Fourier or ACF for the presence of cycles, just in case. Due to the limited sample and the properties of the market itself, there are most likely no cycles.

- solve the problem of trends. I cannot agree with the author - detrending by subtracting the MOG is a serious simplification of the problem. The logarithm is taken for an exponential trend, while for an additive trend the first differences are sufficient. The trend will have to be dealt with separately and regressions will not be needed, and all variety of regressions. You have to subtract the regression, not the MOG. This is for deterministic trends, but there are also statistical trends.

Without solving these issues, reasoning about the statistical characteristics of the sample has no basis.

Only after these steps, which must be justified, you can proceed to the selection of a model from some list offered by a specialised package, which will solve a lot of other technical problems.