Edge effect on the way to the GRAAL

 

Gentlemen, good afternoon.

I am working on a reverse MTS. Expert Advisor gives BUY and SELL signals and the system reverses trades

depending on these signals.

SELL appears at the maximum of the indicator, BUY at the minimum. This indicator is a proprietary one, based on

on several sliders, which represents the momentum of price changes (similar to RSI, but not it).

The indicator itself is noisy, so tried to use low-pass filters and wavelets for smoothing.

Smoothing by wavelets turned out the most successful, but the edge effect (distortion at the extreme points) spoils everything.

I made an experiment: approximation of an indicator by wavelets from 2000 to 2008 on EURUSD on a one-minute timeframe.

The system gives on average 2000-4000 points per month without any MM or other additives. Purely advisor.

The graph of balance growth is smooth and almost straight.

Of course there is nothing to rejoice about, because in real online trading the edge effect gives only minuses.

Question: has anyone tried other methods of approximating functions or finding extrema?

Or is it a futile case?

Or is it still possible to come up with something?

 
The case is unsuccessful and is a consequence of the principal impossibility to look into the future. Therefore, the marginal effect is in principle irrespective of the smoothing method, but can be reduced to a theoretical minimum, which, however, does not give a significant trading advantage.
 
Desperado писал(а) >>

Question: has anyone tried other methods of approximating functions or finding extrema?

Or is it a lost cause?

Or is it possible to come up with something?

I was recently collecting statistics for an indicator - at what values the probability of price increase (decrease) is higher. The curve turned out to be uneven. I have invented to smooth it out. It seems to be worked out. The method is simple: I take 3 considered values a, b, c. Calculate the average of extreme values (a+c)/2. If it is greater than the mean value b, we add their half-difference to the mean value (i.e. we increase b = b + ((a+c)/2 - b)/2), and decrease the extreme values (a = a - ((a+c)/2 - b)/4, c = c - ((a+c)/2 - b)/4). It smoothes out the graph, but spikes are lost (but that is exactly what I wanted).

   double raznicha; // Наша разница значений через исследуемое

   for (j = 2; j <= step-1; j++)    // Пробегаемся по числу отрезков индикатора от 1 до последнего, т.е. [a - step; a = max]
   {
      raznicha = LOG_norm_Bay[j] - (LOG_norm_Bay[j-1] + LOG_norm_Bay[j+1])/2;
      LOG_norm_Bay[j]  =(LOG_norm_Bay[j-1] + LOG_norm_Bay[j+1])/2;  // Среднее значение есть среднее из крайних
      LOG_norm_Bay[j-1]= LOG_norm_Bay[j-1] + raznicha/2;
      LOG_norm_Bay[j+1]= LOG_norm_Bay[j+1] + raznicha/2;
   }
 
Neutron писал(а) >>
The case is unsuccessful and is a consequence of the fundamental impossibility to look into the future. That is why the edge effect can not be eliminated in principle regardless of a smoothing method but it can be reduced to the theoretical minimum which, however, does not give any significant trading advantage.

This is understandable, but there is an option of either reducing the error, or predicting the next outcome of the indicator and smoothing out the original signal with the predicted part. Really, I haven't tried that.

1) I tried to decrease it. I found a certain regularity that the error is always of the same sign as the initial indicator and evenly

decreases from maximal value at the last output to minimal one at i-10 output. But how to find this value, I have not found.

2) I also tried variation of transform length. The wavelet transform itself depends on the input vector length.

In this case, we can find the closest transform to the current vector using the vector distance method.

But a wavelet often changes its direction at the extreme points and trading based on it is not very successful.

 

By the way, has anyone used just a centred Close signal as an indicator?

The distribution is Gaussian and there is little correlation.

 
infinum13 писал(а) >>

Recently, I was collecting statistics for an indicator - at which values the probability of price increase (decrease) is higher. The curve turned out to be a jumpy one. I thought of smoothing it out. It seems to be worked out. The method is simple: I take 3 considered values a, b, c. Calculate the average of extreme values (a+c)/2. If it is greater than the mean value b, we add their half-difference to the mean value (i.e. we increase b = b + ((a+c)/2 - b)/2), and decrease the extreme values (a = a - ((a+c)/2 - b)/4, c = c - ((a+c)/2 - b)/4). It makes the plot smoother, but removes obvious jumps (but that is exactly what I wanted).

Smoothing will still turn out to be a broken line, not a smooth curve.

But it's not a bad idea, I'll give it a try.

 
Desperado писал(а) >>

Smoothing will still be a broken line, not a smooth curve.

But it's not a bad idea, I'll have to give it a try.

Just do it more times :))

 
infinum13 писал(а) >>

Just do it more times :))

Then lag :)

 
Desperado писал(а) >>

Then lag :)

It won't work otherwise :((. Sorry. Any smoothing will lead to a lag. You do the math. Right now you've got, though not explicitly, a fit to the story. With any normalization, the highs and lows will settle in. And then it will be more accurate, but no longer in the +. Maybe, instead of increasing and decreasing the signal we should use the level over which the indicator will go over. (I am also worried about spreads, it's only 2 points, otherwise I would be in Sochi. But decrease of "my" smoothing leads to the signals of 1barrel, while increase - to the lag).

 
infinum13 писал(а) >>

It won't work otherwise:((. Sorry. Any smoothing will lead to a lag. You do the math. Right now, you've got an implicit, but not explicit, fit to the story. With any normalization, the highs and lows will settle in. And then it will be more accurate, but no longer in the +. Maybe, instead of increasing and decreasing the signal we should use the level over which the indicator will go over. (I am also worried about spreads, it's only 2 points, otherwise I would be in Sochi. But decreasing "my" smoothing leads to 1bp signals, while increasing it leads to a lag).

Crossing levels doesn't give a very attractive result. This has crossed my mind as well.

In the indicator the distribution of highs and lows obeys a Gaussian law, only with different MO.

Highs have approximately 0.3, lows -0.3.

The higher the bar is, the more reliable the signals are and the fewer they are.

And it is not interesting to earn 200 points per month :)

Yes, unfortunately there are either distortions or lags.

 
Desperado писал(а) >>

And earning 200 pips a month is not interesting :)

If it's 200 +/-500, then it's not interesting. If it's 200 +/-10, then you'll be like Soros soon.

Reason: