Not Mashka's business! - page 7

 
 

Staging the experiment


I decided to describe the setup of the experiment in more detail (as I understood it, given the capabilities of my model), to the best of my knowledge, so as to eliminate misunderstanding. It's simple enough, we take a segment for testing and the system sequentially passes all samples in this segment. On each section, a sample of historical data of a fixed length W is taken. This data is analyzed and an optimal choice is made:

  • the MA window length (lagged) to be predicted
  • forecast horizon

Supporting the literary word with the artistic one, depicted the picture to the best of my ability:


A forecast is performed, the forecast data and the "environment parameters" of the particular forecast are recorded and the system shifts to the next reference. In this way, the number of forecast points and the size of the particular sliding window for which the forecast points are calculated change from one reference to the next.

Seryoga, apparently this is the reason for our misunderstanding. Probably, you fix the MA and only forecast it over the whole section and for that you can safely go to the increments. I can't just do that, MA is always changing and therefore the increments are "concentrated" around zero of the forecast readings.


First results of the forecast


The forecast was performed in the studied period of 100 samples, EURUSD quote, hours,(H+L)/2. The picture shows this plot with H, L and(H+L)/2 prices:


Change of sliding window length for each price forecast (I hope it is clear why the counts are longer than the forecast plot length)



Change of forecast horizon value for each Forecast value


The scatter plot of forecast prices and actual prices. Thex-axis shows forecast prices and they-axis shows actual prices. The coefficientb in the linear regression equation y=a+b*x is 0.9983.



Once again, let me remind you, there's no mistake here. The fact is reliable and verified. The trick is just optimizing the parameters for the prediction. By the way, to test the prediction on a good machine for 1000 samples I'll need to wait for about twenty hours, while the operator itself takes less than a second. And I'm still optimising the code.


PS:

Neutron:

Seryoga, why this suspiciously empty post? Probably called me something fancy, didn't you? :о)

 

to Prival

There are certain difficulties with ticks - you need a large history, preferably without holes, etc. These requirements are easier to fulfil for an archive with hours or minutes.

As for the perfect curve, let's compare two-run MEMA (that's what I use) and what Fourier-smoothing gives. I suggest that the criterion for "goodness" is the value of the standard deviation from the cotier and the smoothness of the curve itself - the smaller the sko and the smoother the curve, the steeper!

It is clear how to calculate the sko (the value of deviation from the quotes), but how to calculate the smoothness?

 
Prival:
...

How to calculate the sko (deviation value from the quotes) is clear, suggestions how to calculate the smoothness ?


and what will this smoothness give us ? I described above - I have a bunch of MA's predicted and for each reference that MA is selected in the best way in terms of predictability

 

Wrote the whole post above and it disappeared after a while :-(

Grans, we have a misunderstanding. There is no point in going any further!

If we plot the forecast cloud by absolute price and forecast values, we get a straight line with tangent=1 even for integrated white noise. This should be clear, both series contain a constant component whose value is zero, and it is this component that the valuation will react to. That's what I'm telling you. Think about it.


to Prival.

Как посчитать ско (величину отклонения от котировок) понятно, предложения как считать гладкость ?

At time t, let's choose the function (y[i]-x[i])^2 as the measure of closeness of series X and Y, and the function (y[i]-y[i-1])^2 as the measure of smoothness of series. We will estimate the value of the sum of these functions, that is, S=(y[i]-x[i])^2+(y[i]-y[i-1])^2

(taken from S. Bulashov)

 
Neutron:

Wrote the whole post above and it disappeared after a while :-(

Grans, we have a misunderstanding. There is no point in going any further!

If we plot the forecast cloud by absolute price and forecast values, we get a straight line with tangent=1 even for integrated white noise. This should be clear, both series contain a constant component whose value is zero, and it is this component that the valuation will react to. That's what I'm telling you. Think about it.


ok. what if i forecast MA and go from it to increments? would that work? :о) And maybe instead of "It's pointless to move further" we can come up with a criterion? Maybe there are objective criteria?

 

to Neutron

I think it makes sense to look at error analysis (the difference between the actual and predicted value), very objective information (recall, this is EURUSD):



Do you think this time series analysis would be objective?



PS (corrected):

Если строить прогнозное облако по абсолютным значениям цен и прогнозу, то мы получим прямую с тангенсом=1 даже для интегрированного белого шума. Это длжно быть понятно, оба ряда содержат постоянную составляющую ценность которой нулевая, а именно на эту составляющую и отреагирует оценка. Об этом я тебе и толдычу. Подумай об этом.

ANALOGIC and for increments, in that sense they are no different. This criterion (kt LR) is not the best in both cases

 

Sergei, all of your comments can be answered in agreement - they are not a matter of principle. You don't want to estimate by regression, let's use sko. You want to predict AI and then go to the baseline - do it!

The fundamental point is one question: can you give a prediction ONLY 1 (one) bar ahead?

 
Neutron:

Sergei, all of your comments can be answered in agreement - they are not a matter of principle. You don't want to estimate by regression, let's use sko. You want to predict AI and then go to the baseline - do it!

The fundamental point is one question: can you issue a prediction ONLY one (1) bar ahead?


Issuing a prediction one bar ahead of course I can, it's not hard to cut off. Does it mean that you do not think it is reasonable to forecast more than one bar ahead?

 

Naturally!

After all, if you can forecast one bar ahead, you can forecast two bars using recursion, and there by induction. But the forecast error will become exponentially worse as the horizon increases, that's why we are not interested in searching for relationship between the accuracy of the elementary forecast (for one bar) and the width of the confidence interval as f-fi of the forecast horizon. Let amateurs do that. You and I will study the quality of the forecast basis itself - 1 BAR going forward and that's it! True, to begin with we will gather statistics, predicting each time by 1 bar and going one step forward, and so on 10,000 times. Just to be sure. So we'll get a forecast vector of length of 10000 elements, each of which is a forecast for 1 bar and calculates all data we have including new ones.