The authors consider a new method to detect trends of price charts using autoregressive moving, adaptive to the unknown a priori laws of their formation. The method allows to eliminate some low sensitivity of moving averages and the effect of shifting the identified trends, improve the quality of trade signals.

Pros and cons of moving averages

In today's technical analysis in high demand different types of moving averages, which are very simple tool smoothing price charts in order to identify trends. [1] It's a simple (MA), weighted (WMA) and Exponential (EMA) moving averages. Based on the combination of moving averages of different orders received stochastic oscillators, MACD.

The moving average is used for forming the index RSI and other technical indicators. With the moving average price changes are based channels - PCU and Bollinger Bands. They are used to generate trading signals for purchase / sale, as filters trading systems.

So, moving averages can be attributed to the most popular tools of technical analysis. However, the known and disadvantages:

- Lag moving average relative price charts;

- Low sensitivity to changes in price charts (decreases with increasing time averaging).

These disadvantages of moving averages described in detail in the technical literature, for example [1]. It should be noted that the first unavoidable lack of principle, and the second, as will be shown below, can be significantly reduced by using our method. [2] Besides, as it turned out, moving averages have a third disadvantage to traders who had previously ignored:

- Moving averages for averaging nonlinear trend emit no real trends, and their linearized model (this is subject to certain offsets).

To explain this effect, we consider some idealized example.

Here nonlinear autoregressive on the closing prices of the form

Conditional expectation of the corresponding t = 3, is

Calculating simple moving average, we get = (5 + 23 +15 +20 +25) / 5 = 17.6. The relative displacement between the well and the delta = (20.171-17.6) / 20.171 ** 100% = 12.75%.

Curious readers can using the above methods to make sure that in case of any linear trend shift delta will be identically zero.

The method

From the above example it logically follows our method autoregressive moving, adaptive to the type of equation allocated trend [2]. Its essence lies in the fact that on a sliding averaging interval for the famous closing prices of the least squares method calculates the unknown parameters of a countable set of autoregressive equations of various types. For each of the N equations VAR calculated residual variance:

where k - the number of unknown parameters of the j-th regression equation.

Next, we choose the j-th equation, the residual variance which has the lowest value. Knowing the parameters of this equation, we calculate the conditional expectation. The process is repeated, as in the case of traditional moving averages. For the implementation of the method most convenient to use the so-called two-parameter function (k = 2). We used the following features: 1 - linear, 2, 10 - hyperbolic 3 - logarithmic, 4, 16 - Exponential, 5, 6, 7, 8, 9 and 17 - degree, 12 - back to the exponential, 14, 15 - Demonstration; 11, 13 - the product of power and hyperbolic functions.

## A new method to smooth edges of price charts

Expert