Building a trading system using digital low-pass filters

 
I would like to discuss a spectroanalysis technique for non-stationary time series. A few years ago in the magazine Currency Speculator there were articles by Kravchuk about the application of the method of maximum entropy to the analysis of quotes.
From the point of view of mathematics any forex quotation is a time series (i.e. time price series). But the most important thing is that this time series is not stationary and Gaussian because the edge of the Gaussian distribution curve goes to "0" and the edge of the curve of time series bend upwards. There is a good example of Gaussian distribution in (un)obedient markets: if we take all population of the Earth, the height of people will vary from 1 to 2 meters and the appearance of a 4 m tall person is unrealistic In the market, we all know that this rule does not work. I.e. the series (quotation) is not quasi-stationary and is not close to it. Therefore the method of spectroanalysis by method of maximum entropy described in articles (in my opinion) is applied incorrectly. If we take a quote of, say, GBPUSD D1, and perform spectrum analysis for the whole sample and then for a part of the sample, we'll see that the "significant" frequencies "float". I tried to repeat the system described in the articles. I think the author averaged frequencies, i.e. analyzed sample pieces and then found the arithmetic mean. I was able to implement such a system but this situation is good, when frequencies (as in the articles EURUSD D1) are not fluctuating too much, if the frequencies are fluctuating too much the system will fail. Again, this is my subjective opinion. To find significant frequencies and thus build a stable mechanical (manual) trading system, you should choose the first variant: use a part of the sample in which the time series can be considered stationary or the second variant: move from non-stationary series to stationary.

Let's first consider variant 1

When can we consider that the time series (quote) is stationary or close to a stationary process? To my mind, such stationarity is possible in a linear regression channel, when the price moves out of the confidence intervals (borders of the channel) and the mean square deviation from the middle of the channel (regression line) decreases.... I.e., the criteria for assessing the stationarity of the process is a sequence of averages.

Variant 2
In my opinion, it will be correct to change from non-stationary series to stationary series by replacing them with first differences.

If what I have written is interesting to anyone, I will further describe from A to Z the construction of the trading system according to the first and second variants.
 

Of course it is!

 

This is really interesting. I would like to say a few words.

Stationarity - in short, it is the constancy of statistical characteristics over time. If we reduce BP (time series) to stationary using first differences (it's often called returns distribution on this forum), we get a Wiener process. The ACF (autocorrelation function) looks like a delta function. From my point of view this is a dead end.

IHMO we should use another method to get to a stationary series. At the first stage we deduct the straight line equation (obtain MOG=0 the first stationarity), then we deduct the oscillatory process from the residuals and check for a fit with BHP; if not, we again find the oscillatory process, deduct it and check for a fit with BHP, etc. Until there is a fit, thus we obtain and RMS=constant (the second stationarity). As a result, we have all the components of the analyzed BP.


For MME (method of maximum entropy) try to feed to the analyzer input BGS, just wondering whether you will get the same result as here http://forum.alpari-idc.ru/showthread.php?t=38804 or not.


In any case the topic is interesting and with pleasure, I will read it very carefully

 
Yes, mql4-coding, curious. The problem of non-stationarity of a time series has been discussed here, but so far we haven't been able to reduce it to a series for which the stationarity hypothesis is not rejected.
In my opinion, it would be correct to go from a non-stationary series to a stationary series by replacing it with first differences. <br/ translate="no">
So returns[i] = Close[i]-Close[i+1]? According to which stationarity criterion would this series be considered stationary? I have strong doubts concerning it: if we can still speak with some reserve about expectation constancy, then the same cannot be said about the variance.
 
I would be happy to discuss the methods of obtaining a stationary row. Most likely what I got is not ideal. But the results of this system are not bad in my opinion. I did a study for 2 currencies GBPUSD and GBPUSD for D1 timeframe. In both cases the systems have been working in the year 99 in the + . Let's try different ways to get a stats series and compare the results. It's worth a look in my opinion.
 
The topic is certainly interesting, but the analysis of the results is a little scary: "In both cases the systems have been operating since '99 on the plus side". A system's performance on the plus side is no indication of its suitability for trading. What are the results according to the following parameters: number of deals for the whole period, max drawdown in pips, mathematical expectation of a deal in pips, final profit in pips, Z-score? Without these parameters it is meaningless to talk about any positive results.
 
mql4-coding писал (а):
If what I have written is of interest to anyone, I will go on to describe from A to Z the construction of the trading system for the first and second variants.
I would like to hear more.
 
Vinin:
mql4-coding wrote (a):

If what I have written is of interest to anyone, I will further describe from A to Z the construction of the trading system by the first and second option.

I would like to hear more.

I will try to describe everything in one order tonight. I will be glad to hear any thoughts on the first variant. Thank you. (chuckles)
 
A market cannot in principle be stationary, if it becomes stationary, speculators throw in and inflate various "ducks" (as an example) to introduce non-stationarity on which you can make money. A market can be "conditionally" stationary in a certain period of time, usually called market phases - trend, flat, etc.
 
Yes, I absolutely agree with you. The movement in the trading corridor may be considered stationary. By the way, I have noticed an interesting point: if the price moves in the channel and approaches the "resistance" (resistance or support line) while being in the centre of the channel, the line will be broken with high probability; if it is closer to the channel boundary (confidence interval), the channel will be broken with high probability. I had some thoughts about creating a system based on that, but have not managed to find it yet. As for the flat and the trend, the flat is a component of a higher order trend (not my idea, but I absolutely agree with it).
 

mql4-coding

I think that the channel cannot be used as an example of stationarity, although it seems to be stationary, but this knowledge (the channel depth, start time, end time and width parameters) can only be determined retroactively. We need mathematical transformations that reduce the price series to stationary at the current moment in time and its current spectral analysis.


Z.I. Discussion of channels, this is not spectral estimation, on the basis of which we can build good LF (bandpass, adaptive) filters. Wouldn't want to get sidetracked.

Reason: