You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The only approach to creating a non-delayed (true) filter that is not contradictory to the world order I have found only in separate smoothing.
Three pictures will explain what we are talking about. Quotes - in M5 bars, 3 times 288 (three days).
You see? Each separate chart (blue and red) lags relative to the price, but only "half" when the price move does not coincide with its move.
The other algorithm builds that more beautifully:
if we take the SMAs from the red and blue curves, we get an interesting channel (SMAs lagging by 100 bars, i.e. 201 bars each, are shown):
for clarity, the smoothed charts are shifted to the left by z=100 bars.
So. If you learn to jump between the red and blue curves in time on the second chart, making the result piecewise - from non-lagging pieces of the red and non-lagging pieces of the blue curves, the result will not lag at all. And some smoothing is in place. Although if we formally introduce a criterion equal to, for example, the ratio of the sums of the moduli of the first differences, the filter may turn out not to be a filter at all, but to have a greater volatility :-)
Numerically, we can try to "cheat" the world device in the following way: we can set an additional (very strong) condition: the "length" (sum of moduli of first differences) of the smoothed curve is either fixed per time unit, or it is set as a fraction of the original curve length. And then we minimise the non-convexity and other fantasies. The point is that the additional very strong condition of limiting the curve length at the output of the filtering algorithm leads to the fact that there are redraws, but not on the "last bars", but evenly over the entire interval, and very small, no more than the spread.
Is this design a filter? Or is it not? (on the first bars the red curve is drawn coinciding with the original curve, don't look there).
Smoothing - strong. The lag is very strong. On the step it will be visible. But on REAL quotes, the trick is that REAL VERY LARGE DELAY does not look like that.
Split smoothing similar to the above can be obtained from a beautiful idea: rolling a wheel on a graph. Balloon.
Everything is clear from the pictures:
again ... if you learn to jump between separately (piecewise along the arrow of time) delayed curves ... :-)
You can try to calculate weighted averages by tying weights to the price derivative. Strongly, non-linearly, by stepping or exponential functions. The result will have a large averaging window and on the step it will be visible that the lag is equal to half of the window, but visually the lag will be only in the areas with low volatility, and the filter will "take" all movements at once. With a lag of negligible fractions of a bar.
In fact, "lag" cannot be defined here at all. It is different in each point of the filter. It's not even clear what to compare it to.
The grey dotted line is not Heaviside. The step should be vertical. If it's because the discretisation is so on the abscissa, and it's drawn with a line, too bad. And I meant to see at higher smoothing values. So that the lag is greater than the 3 bars shown. And in general, if the lag is small, I usually practice repeating it as many times as necessary: I apply a filter to the result of filtering, after a thousand repetitions everything is visible, it becomes clear what fraction of the lag bar is contained in the algorithm at the apparent tiny smoothing.
First, all three lines are coincident and equal to zero. Then on 10 Jun 1:00 there is a gap of +1 (all three lines coincide, the filter picks this up as it should without delay). Then the momentum falls through the set 14 periods as it should to zero, the dotted line continues at +1. The filter perceives this momentum movement as noise (as it should, since we should have +1) and tries to smooth it out.
I don't understand what three bars you are writing about.
By the way, to the question about "learning to jump" between the curves of separate smoothing (and separate piecewise time lag):
you don't really need to jump: after additional construction of the superstructure over the algorithm, the "separate smoothing" curves become different, with a different physical meaning, but look at their mean - the pink line between the red and blue one:
More close-up (fewer bars on the time axis) with 2 times less lag and on a different piece of the course:
question: is the pink curve a filter? Yes. Is it lagging? Yes. Wildly. On a stepping stone, it will show. On the quotes - at a glance - you can present it as non-lagging.
I don't know what three bars you're talking about.
I can recommend that you do some meaningful data processing before filtering. You can come up with a lot of things there. A trivial example.
Input data - two curves - eurodollar ED and pounddollar PD.
Let's choose a new quote currency instead of the dollar. N. Bound to the dollar by a ratio:
What do we get? Oh, a lot of things.
Here's D versus N.
And here's E on N and P on N:
so all three currency relationships in the triangle are reduced to almost the same form. The study of FORMS is a separate song, here I just show what can be achieved by simple substitution.
So, EN and PN correlate almost singularly. And the DN shape is different, the correlation on this interval between EN and DN will be about 0.9979. Not 0.99999999999.... like EN and PN.
By analysing and adjusting everything so that the shape of all three graphs coincide IDEALLY, with correlation exactly equal to 1, based on the condition of minimum volatility of all three curves, one can do curious things.
To put it simply, to correct the shapes of graphs "brazenly", not arithmetically, but LOGICALLY, by comparing them. Knowing in advance that all of them are very close.
And in general, I can set any arbitrary form and set a new quote currency so that the forms of relations of all currencies to the new quote currency will coincide as much as possible with this arbitrarily set form.... while preserving all the relationships between the currencies and their relationships... but there will be subtle differences between the forms. And that is the subject of the analysis.