From theory to practice - page 188

 
Alexander_K2:

There is ONE problem - the calculation of the observation window. A small error leads to an increase/decrease in the window by 1000-5000 tick quotes and as a consequence there are negative trades, I am not hiding it.

All, absolutely all pairs have different wave functions. I initially overestimated myself a bit - I rushed to 32 pairs at once, and I don't have enough strength to handle them all at once. Now I've reduced the amount of work to 6 pairs. Otherwise it's just physically hard to work alone.

Can I now find such a problem as calculation? Unreliability to small errors and as a consequence of negative deals says not about the difficulty of calculation, but about the lack of statistical stability (recall Gorban, Kolmogorov and Markov doubts). When the optimal window size jumps strongly depending on small variations of the input data for the calculation, then the first conclusion is inevitable: the optimal window size itself is not constant. It cannot serve as a basis for stable trading with the profitability noticeably higher than the bank deposit.

Alexander, why do you pay attention first of all to the fact that the wave functions you use change when moving from one instrument (pair) to another? Why don't you see how they change when the timeframe taken for the calculation is changed? For example, when shifting by 3 months. Is there any reason to hope that these changes are known to be weaker?

Leave one pair out - is there a stable (optimal) window for it. Or is it a phantom, there is no such window even with a 24 hour shift... Note that both Gorban and Osminin, as the first conclusions of their calculations, gave the estimation of time during which the obtained characteristics of quote flow can be considered statistically stable (Gorban for his indicator of statistical stability hour and a half, Osminin for Hirst ratio), i.e. how long in average these characteristics have sense. I think the problem is not with the calculations, but with the limited validity (meaningfulness) of the indicators.

P.S. How many times have you been advised here not to rush at once on 36 pairs. Life has now forced you to reduce the number "slightly" (by a factor of 6). Leave one, so you will come to an understanding faster. That's me quoting from memory Hemming's book "Numerical Methods", 1972, the quote itself: "The purpose of calculations is not numbers, but understanding". You were talking about calculations...
 
Vladimir:

The first conclusion to be drawn is that the optimal window size itself is not at all constant. It cannot serve as a basis for stable trading with the profitability noticeably higher than the bank deposit.

The wave functions used change when the timeframe taken for the calculations changes

Gorban and Osminin, as the first conclusions from their calculations, have estimated the time interval, during which the obtained characteristics of quotes flow can be considered statistically stable (an hour and a half for Gorban's indicator of statistical stability, a day for Osminin's Hirst ratio), i.e. how long these characteristics have sense in average. I think the problem is not in the calculations, but in the limited validity (meaningfulness) of the indicators.


Here, gentlemen students, one of the "aliens" has come forward - read carefully!

Yes, Vladimir, you, as always, raise the most crucial problems, around which the solution of this problem is built.

1) The optimal size of the observation window is unstable and extremely difficult to formalize and calculate for an unstable, non-Poisson flow of quotes.

Once again I draw your attention to this problem. It is solvable. It is necessary to transform the initial tick quotes flow so that it would be Poisson at a first approximation. The main problem!!! Without solving it all is meaningless.

It is solved as follows - tick quotes are read automatically at intervals of 1 second and more with a sliding observation window of 1 hour and more. Pseudo-quotes without time stamp and real quotes with time stamp are written. When the desired data set is obtained, we should look at the histogram of the flow intensity in the selected time interval. It should at least look like a Poisson distribution!!! I can say at once that, strangely enough, the required tick reading frequency = 3 sec. and the sliding window of observation = 12 hours. This is my calculated data, but it still needs to be confirmed experimentally. It is also important that in this case, although we read the quotes uniformly, the real time stamps are distributed exponentially!!!!

2. And how they change! That's why it's important to solve problem #1 and work exclusively and only in a once and for all chosen time range of observation. Then these distributions are stable and you can calculate weights for WMA, for example, from them.

If problem 1 is solved and the stability of distributions (so called wave functions) on this time interval is proved, it actually means that we have a quasi-stationary process, which is required.

Respectfully,

Alexander_K

 
Vladimir:

Can we now find such a problem as calculation? Unsteadiness to small errors and consequent negative trades speak not of computational difficulty, but of a lack of statistical stability (recall Gorban, Kolmogorov and Markov doubts). When the optimal window size jumps strongly depending on small variations of the initial calculation data, then the first conclusion comes to be: the optimal window size is not constant at all. It cannot serve as a basis for stable trading with the profitability noticeably higher than the bank deposit.

Alexander, why do you pay attention first of all to the fact that the wave functions you use change when moving from one instrument (pair) to another? Why don't you see how they change when the timeframe taken for the calculation is changed? For example, when shifting by 3 months. Is there any reason to hope that these changes are known to be weaker?

Leave one pair - is there a stable (optimal) window for it. Or is it a phantom, there is no such window even with a 24-hour shift... Note that both Gorban and Osminin, as the first conclusions of their calculations, gave the estimation of time during which the obtained characteristics of quote flow can be considered statistically stable (Gorban for his indicator of statistical stability hour and a half, Osminin for Hirst ratio), i.e. how long in average these characteristics have sense. I think the problem is not with the calculations, but with the limited validity (meaningfulness) of the indicators.


Why do we need a stable window? For beauty? For what?


You should always set a goal and a criterion to achieve it.

The goal: to find such a window that the prediction from it has the minimum error.


If we know how to calculate the optimal window size in the sense that a prediction from it will have a minimum prediction error, then it is clear that the window size will be different and moreover, the size will not be of interest, because we will make decisions depending on the magnitude of the prediction error obtained on all possible windows on the current bar.



The requirement of a stable window is fundamentally wrong - it is not needed in principle.

 
As far as windows are concerned, in my TS the window is dynamic, i.e. it always differs and is formed by the market itself, so I don't have a problem choosing a window, the market forms it for me...
 
Mihail Marchukajtes:
Since we are talking about the window, in my TS, the window is dynamic, it is always different and the market forms it, so I do not have the problem with window selection, the market forms it for me...

The window is also dynamic and is also shaped by the market. The quotes are coming from the market in any case. How else could it be? The other thing is that the data can be processed and calculated based on different criteria and using different methods. But in any case, the volatility should influence the size of the window in the first place.

 
Alexander Sevastyanov:

The window is also dynamic and is also shaped by the market. The quotes are coming from the market in any case. How else could it be? The other thing is that the data can be processed and calculated based on different criteria and using different methods. But in any case, the volatility should influence the size of the window in the first place.

I have had a split personality at the moment:

1. the observation window is dynamic, formed on the basis of a certain sample size of ticks

2. the observation window is strictly defined, expressed in seconds. On the contrary, it has a dynamic set of tick quotes.

If in the second case the tick flow is reduced to a Poisson flow, the results are MUCH better than for case 1. This is the direction of my work I trust more - for here old Gunn, Einstein, Shelepin, and all-around here have gathered and are watching.

 
Alexander_K2:



2. the observation window is strictly defined, expressed in seconds.

Is it different for each pair in this case too? Or for all = 12 hours?

 
Wizard2018:

Is it different for each pair in this case too? Or for all = 12 hours?

FOR ALL!!!! It's coming to a denouement, guys! Get your pockets ready, there's enough for everyone!!!

 
Alexander_K2 It's not easy at all....3. Calculate weights for WMA

By the way, even 50 pages ago I showed that your "weights for WMA" are meaningless, because the result is not a gram different from SMA ))))

Instead of theorizing, it would be more useful to study the physical meaning of what you do :)

 
Yuriy Asaulenko Instead of EMA, we can invent something more interesting, but it needs to be calculated for a certain task. For example, we can take polynomial regression as an average.

Have you tried HP filter? I think there was an indy in kodobase.

p.s. polynomial lies on reversals (as far as I remember my experiments from 5 years ago), because its ends fly to the sky, which is not typical for the market. And it does not try to give an average, but adjusts to the whole quote.

Reason: