Not Mashka's business! - page 3

 
grasn:

to Neutron

Seryoga, I'm a bit confused (don't pay attention. It's residual from beer :) Please, how did you calculate the mutual correlation between MA? [MA(n) and MA(n+1)] then[MA(n+1) and MA(n+2)] or in some other way?

It is not quite clear where these values come from. After all, starting from a window of length 20 and above the correlation between MAs is very strong and how they got 20% difference and then how you got windows 6, 80 and 300. This is hardly possible! But if you calculated e.g.[MA(n) and MA(n+k)], then on what basis did you choose this k (thinning conditions)?

I calculated the correlation coefficient between the derivatives of the mashups using the formula:


Where X and Y are two one-dimensional vectors of equal length. Well, then I looped through all the wafers and plotted the mutual correlation curve. Then, I used different preiods, looking at the coefficients and chose the ones that satisfied me. I gave figures 10, 100 and 300 from memory, if you want more precise figures, you will have to wait.

To be absolutely exact, I took thinning condition on the basis of requirement of fak<30%. This is fulfilled if the periods of neighbouring waves correlate as a power of 5 or even 6.

 
Neutron:
...

I calculated the autocorrelation coefficient between the derivatives of the mashups using the formula:

...


Where X and Y are two one-dimensional vectors of equal length. Then I looped through all the wands and plotted the mutual correlation curve. Then, I used different preiods, looking at the coefficients and chose the ones that satisfied me. I've given the figures 10, 100 and 300 from memory, if you need more precise figures, you'll have to wait.

I see. Thanks.

 

Here are the fried results from testing this system.



This is an attempt to predict the first derivative of an ideal MA (the one that has no lag, and the first derivative of which gives absolutely accurate entry/exit signals, shown in the figure with a solid red line). I did it this way: I moved backward on the timescale from the current value of the derivative by N bars and found the weighted sum of n common MA derivatives (those with lag), equated it to the value of the red line and solved a system of linear equations for weights. Then knowing these weights I multiply the current values of the lagging MAs by them and obtain the predicted value of an ideal MA "for now".

In fig. I have made a forecast for six bars ahead. We can see that the forecast does not lag behind an ideal MA though somewhere it differs considerably from the last one in terms of amplitude, i.e. the idea turned out to be not absurd, though an attempt to extend the forecast horizon leads to "scattering" of the forecast series. I attached a video below which shows the dynamics of the forecast stability when trying to increase the horizon from 0 bars to 10 (one frame - one bar+).

Files:
n.zip  25 kb
 
A 2 bar forecast is already practical. Japanese candlesticks, for example, give 70% for just two bars ahead.
Forecast for 10 bars is too good.
Don't ruin your results, just make a 5-bar forecast)))
 

to Neutron


Great results (by eye :o)). The outliers, I think, can easily be cut off. Now, knowing the MA forecast for some number of bars ahead it is possible to reconstruct the time series on the forecast plot.


PS: I dug out my experience in forecasting based on MA. I made a forecast about 5 bars long (max for my method is 10-12, but it lies too much):




EURUSD, hours

  • black crosses symbolize (H+L)/2
  • black line is MA with a 5-bar window
  • the grey line is the rebuilt future series
Recovery was done for 5 counts, then the "current count" was moved forward by 5 counts and the forecast was repeated, and so on to the end of the range in question. Here is a bit for better visibility :o)
 

Sergei, damn it!

Construction of (H+L)/2 is a hidden integration and you can not use it in prediction problems in any way. The point is this: if you take a random BP, the first differences are uncorrelated, but if you build a series (H+L)/2 on these data you immediately get positive autocorrelation at the level of tens of percent! No one pays attention to it, but they adiabatically stop at the last one when choosing all possible combinations of price series for the construction of an indicator, because an illusion of predictability appears.

Once again, you build a prediction of positively autocorrelated BP (H+L)/2, which isn't very difficult, any computer will do, but it's not going to bring you closer to the prediction of the initial BP! Just think about it.


P.S. To check your code, let it run not on series (H+L)/2, but on the series of opening prices. Feel the difference.

 

I don't really believe it's that simple. A (simple) wop can be predicted with 0.5 pips accuracy (albeit a bar ahead). But if it's a 100-window wop, it's 100 times more wrong when the price recovers.

 

Nobody's tearing up their shirt. So, spoiling :-).

By the way, if not limit oneself in number of problems to be solved (thus adding a system of 30-80 ones) and as many quite correlated dummies (r>0.9) it's possible to go a little bit deeper into forecasting horizon. Although it is not crucial.

 

to Neutron


It's really not that simple, the picture shows one of the best plots, statistically it's not that good, and therefore it's risky to use this approach. Getting the MA forecast by any method (no matter what method) is not enough for trading, we should estimate how the price behaves around this MA. If you reconstruct the price values directly, you will get significant errors. I tried to calculate stable levels of "restored price" but I wasn't completely satisfied with the result, though I had some profit but I cannot make unambiguous statements about its stability.

Конструкция вида (Н+L)/2 это скрытое интегрирование и испоьзовать её в задачах прогноза нельзя ни вкоем случае. Фишка вот в чём, если взять случайный ВР, то первые разности в нём не коррелированы, одноко если построить на этих данных ряд (Н+L)/2 сразу получим положительную автокорреляцию на уровне десятка процентов! На это никто не обращает внимания, но преберая всевожможные комбинации ценового ряда для построения индикатора, адиабатически останавливаются на последней т.к. возникает иллюзия предсказуемости.

I have thought about it a lot and came to the following - it is a fallacy (of course, this is just my opinion).


Once again, you are making a prediction of positively autocorrelated BP (H+L)/2, which is not very difficult, any computer can do it, but it's not getting you any closer to the prediction of the initial BP! Just think about it.

But I predict it ... of course, it does not always work. Look closely at the picture - it's a BP forecast for 5 bars ahead. And you still need to go to the BP forecast.

P.S. To check your code, let it run not on series (H+L)/2, but on the series of opening prices. Feel the difference.

(H+L)/2 - more stable
 
Neutron:

Construction of (H+L)/2 is a hidden integration, and you can not use it in prediction problems in any way. The trick is this: if we take random BP, the first differences are not correlated, but if you build a series (H+L)/2 on these data we immediately get positive autocorrelation at the level of tens of percent!


This is what I don't quite understand. It would be clear if the integration plots overlapped but they didn't. Maybe a pseudo-random BP was taken instead of a random one? It is just by idea is built according to a certain law and is quite predictable (if this law is known or restored). However, this topic was recently discussed at https://forum.mql4.com/ru/11556.