Random Flow Theory and FOREX - page 23

 
Prival:

Earlier in this branch of the forum I gave a picture of ACF obtained from the model and ACF of real quotes, look at the appearance they do not differ.


This picture is a reference to the stationarity issue. These are time plots of the first ACF sign change from + to - . This characteristic is chosen as one of the special points. The ACF is calculated for Y - mu, for the lower curve the linear regression is calculated on the weekly interval, for the one above it is approximately on the monthly interval.

 
lna01:
Picture to the question of stationarity. These are time plots of the first ACF sign change from + to - . This characteristic is chosen as one of the special points. The ACF is calculated for Y - mu, for the lower curve the linear regression is calculated on a weekly interval, for the one above it is calculated on a monthly interval.
Please show this point on the ACF chart, it seems that the first inflection point is the change from - to + (i.e. first the curve goes down (-) then up (+) this point just defines the oscillation frequency). Are the numbers time in hours ? or was the ACF pre-normalised along the X axis by the sampling depth. And if it's not difficult your conclusions. I think one obvious conclusion is that oscillations are always present, because there is an inflection point, the frequency of these oscillations change the smaller the sample size the faster the rate of change of frequency of oscillations. However, if I understand these graphs correctly
 
Prival:
Please show this point on the ACF plot, it seems that the first inflection point is the change from - to + (ie first the curve goes down (-) then up (+) this point is how the frequency of oscillation). Are the numbers time in hours ? or was the ACF pre-normalised along the X axis by the sampling depth. And if it's not difficult your conclusions. I think one obvious conclusion is that oscillations are always present, because there is an inflection point, the frequency of these oscillations change the smaller the sample size the faster the rate of change of frequency of oscillations. However, if I understand these graphs correctly


I give you a picture:

That is, this is the "wrong" singular point, but it is closer :), and, supposedly, its coordinate is monotonically related to the coordinate of the "right" one. Also, it is located at a steeper section of ACF, i.e. probably less dependent on noise - i.e. more suitable as the first rough (i.e. fast) criterion of stationarity, imho.

The numbers are time in hours. It is not difficult to normalise, but what is interesting is exactly how much time we can "pull" a stationary model onto the market.

So far the only conclusion is that before coding a Kalman filter we should learn how to get initial data with sufficiently frequent and sufficiently long periods of stationarity. And here are more thoughts. The fact that the stationarity situation depends on the sample length may just mean that its choice is a matter of principle and success depends on it. Or in a more general formulation - on the way the data are prepared.

If for certainty to choose as a model a system of linear differential equations (LDEs), then by structure of ACF we seem to be able to judge about quantity of LDEs needed for more or less adequate description. Selecting coefficients (and trying to describe their drift) is a matter of technique. However, after contemplating the behaviour of ACF over time (in the visualiser) for a while, we begin to understand that the number of DTs in the model must be variable. Or, equally, the models will have to be changed on the fly.

By the way, this particular fragment for the picture was chosen because it contains both a well-defined stationarity plot (which is quite rare) and (apparently) a catastrophe (column).

P.S. Two catastrophes are more exact - there are two jumps.

 

Thanks, I understood everything, and all thoughts (ideas) seem to converge.

Proceeding from my analysis and your picture of ACF, it can be approximated by the following expression (p. 184-185. Tikhonov V.I. file attached)

I have managed to solve a problem having ACF to draw parameters (omega, alpha and N) from it.

I attach the file, only in matcad, I don't remember if you have it. If not, I'll post the formulas here with the necessary explanations.

My thoughts on the research.

It seems wrong to look for stationarity on hourly bars, because it is a non-linear transformation from the input stream (I consider the tick stream as the input). If we take bars (to reduce the volume of analyzed information), then the input flow should be divided into bars not by time but by the number of ticks in a bar (Volume=const) IMHO. So far I have settled on minutes as the lesser of two evils. I don't consider higher timeframes because the larger the timeframe, the greater the introduced non-linearity. If I need a week, I simply regulate the length of the analyzed sampling, choosing 7200.

Be sure to follow the same scheme, when Y is (Close[i]-Close[i+1])/(time[i]-time[i+1]) speed, at minutes you can omit division. Mathemat'ik calls it, but I prefer to call it speed.

Naturally too, but for acceleration (second derivative).

That's when, as you rightly said, we'll be able to decide on the amount of DU. Concerning "models will have to change on the fly", exactly will have to. Only still these models have also parameters and if to remain within linear (Kalman filtering), then for each value of parameter (say omega) a different filter is needed. I wrote earlier, that for solving this problem in head on (to search the optimum solution "for all cases") we need 10-20 - in the limit an infinite number of filters. To get away from that, I think in the future to make the unknown parameters (omega, alpha) in the control system, ie switch to a non-linear filtering (at first glance, see your bottom chart there is an area where these parameters obey a linear law is nice). Stratonovich recommends to do so, and this method often helps to solve such problems with acceptable accuracy for practice.

As I understand the term "acceptable accuracy for practice", if I manage to synthesize 2-3 non-linear filters that work 2 days a week, that is enough for me. The model works - I trade; if not, the model does not work (I cannot predict) then I don't trade. Then I continue studying it and introduce one more model that works with the first one for 2.5 days and not 2 days, etc.

Candid, please elaborate on the "catastrophic" points a bit more. Interested in the time, which is earlier the catastrophe or the triggering of the "wrong" point "catastrophe point :-)".

Files:
fjvokxt_yd.zip  1186 kb
teor_model.zip  31 kb
 
Prival:

I was able to solve the problem of having the ACF pull the parameters (omega, alpha and N) out of it.

Thanks for the files, I'll have a look. I still don't have matcad though. And how are you supposed to fight trickier ACFs, e.g. those?

Actually I'm embarrassed to admit it, but it looks like I'm just a phylon on the forum :). I have my work plan, alas, from about the end of the summer it is practically untouched :). Basically this plan has something in common with a task of definition of optimum sampling length, accordingly in case of success it can be turn of Kalman filter too. That is unfortunately fruits of this very interesting theme go yet in closets, on storage :)

It is wrong to look for stationarity on the hour bars.

I also prefer minutiae, it's just that MT's horizontal chart compression capabilities are not enough.

Be sure to use the same scheme, when Y is (Close[i]-Close[i+1])/(time[i]-time[i+1]), at minutes division may be omitted. Mathemat'ik calls it, but I prefer to call it speed.

Naturally too, but for acceleration (second derivative).

That's when, as you rightly said, we'll be able to decide on the amount of DU. Concerning "models will have to change on the fly", exactly will have to. Only still these models have also parameters and if to remain within linear (Kalman filtering), then for each value of parameter (say omega) a different filter is needed. I wrote earlier, that for solving this problem in head on (to search the optimum solution "for all cases") we need 10-20 - in the limit an infinite number of filters. To get away from that, I think in the future to make the unknown parameters (omega, alpha) in the control system, ie switch to a non-linear filtering (at first glance, see your bottom chart there is an area where these parameters obey a linear law is nice). Stratonovich recommends to do so, and this method often helps to solve such problems with acceptable accuracy for practice.

As I understand the term "acceptable accuracy for practice", if I manage to synthesize 2-3 non-linear filters that work 2 days a week, that is enough for me. The model works - I trade; if not, the model does not work (I cannot predict) then I don't trade. Then I continue studying it and introduce one more model that works with the first one for 2.5 days and not 2 days, etc.

I think the idea is more or less understood.

Candid, please elaborate on the "catastrophic" points a bit more. Interested in the time, which is earlier the catastrophe or the triggering of the "wrong" point "catastrophe point :-)".


I'm afraid it's not a market catastrophe, but a model catastrophe, and directly related to the fixed sample length for the regression. The effect of jumping the sliding regression parameters has been noticed since the Great Parallel Forum Theme (GTPF) development :). Although it is of course related to market processes in the end. But I give a picture all the same. I can send you the indicator as well.

 

Candid

A little more detail, with arrows where all these catastrophes are. I just think this is very important, if the parameter is triggered earlier this is an opportunity to predict the onset of a price catastrophe. If it does earlier, then the long sample can be dealt with. This is the second time you've referred to a parallel forum, if you can give me a link. (I may have missed something). You can't reread everything.

 
Prival:

Candid

A little more detail, with arrows where all these catastrophes are. I just think this is very important, if the parameter is triggered earlier it is possible to predict the price catastrophe. If yes earlier, then the long sampling can be dealt with. This is the second time you've referred to a parallel forum, if you can give me the link. (I may have missed something). You can't reread everything.


Replaced the picture in a previous post. As for the WTPF (the Great Parallel Forum thread :), it is quite difficult to reread it, both because of its length and because it is extremely littered.
 

I might add about the prediction. I have also noticed that a double "catastrophe" precedes a price spike, and I've looked at a few more. These are quite rare events and, alas, the price spike after them does not always occur.

 
lna01:

I might add about the prediction. I have also noticed that a double "catastrophe" precedes a price spike, and I've looked at a few more. These are quite rare events and, alas, the price spike after them does not always occur.


It should be looked at smaller timeframes (in general, in more details), the points are very interesting. And not necessarily a double jump of the "tricky ACF point". For some reason I think that a single (sharp) change also indicates a change in the process.
 
lna01:

I still can't understand how you can work with an indicator that always shows one at the right end of the graph? What is its predictive potential - even if it is calculated according to a perfectly correct formula? I apologise if this is an idiotic question...