Adaptive Trend Decomposition Method in Financial Time Series Analysis

Purpose: dynamic reproduction of multi-trend stock market processes. Discussion: the authors consider adaptation principles as the basis of the mechanism of the effective stock market. Considering the behavior of the stock market as the behavior of a single social and economic system, having the properties of self-adjustment, self-regulation, adaptation to new, continuously changing conditions, the stock market theories recognized by the scientific community, but disparate and opposing stock market theories, can be considered as a complementary. The fact that the stock market is volatile and follows variable rules at different time intervals formed the understanding of the multi-trend processes of the stock market. Results: the authors introduce the concept of a basis trend and make suggestions concerning its properties. A formal statistical model of the multi-trend process has been proposed, it is introduced as a set of trend components. This model formed the basis of dynamic technology of the adaptive trend decomposition of financial time series, demonstrated in the empirical part.


Introduction
The abundance of surveys devoted to the study of the price process in the stock market involuntarily suggests that modern finance theory is extremely multifaceted and, without forming a single completed paradigm, is essentially disputable. In this regard, we note that at present there is no theory that would allow one to accurately predict prices in the stock market. However, serious steps have been made in this direction. As the Nobel Committee notes, (Fama, 1965;Fama et al., 1969;Fama, 1970;1976), (Campbell and Shiller, 1988a;1988b) and (Hansen and Singleton, 1982;Hansen, 1982), independently of each other, established a number of important regularities that contribute to an understanding of how the price process is realized in the stock market.
E. Fama made a significant contribution to the development, empirical verification and popularization of "efficient market hypotheses". Assuming information efficiency of the market with respect to available information, E. Fama showed that price forecasting in the short term is extremely difficult.
R. Shiller is usually positioned as a critic of the hypotheses of the effective market of E. Fama. Investigating the problem of predictability of the market over long time intervals, he found that extending the forecast horizon to several years makes the market processes more predictable, and in their implementation, the effects of "return to the average" are observed. He drew attention to the possible psychological origins of such price fluctuations, are the irrational behavior of investors.
On the other hand, L.P. Hansen made a significant contribution to the theory of pricing in the stock market. He proposed the so-called generalized method of moments, used for reliable estimations of the parameters of asset pricing models in the stock market, even if the conditions of normality, homoscedasticity and lack of autocorrelation are violated. In several empirical studies, L.P. Hansen showed that asset prices are not consistent with the most theoretically grounded consumer asset valuation model (C-CAPM).
Unequivocally we can state only the fact that different laws operate at different time intervals (Davnis et al., 2013a;Fedoseev and Korotkikh, 2011a;2011b). If short market time intervals are dominated by classical market ideas based on mathematics and logic, then on longer ones -rather psychological features of thinking and people's actions. This statement of facts ignores the fundamental question of the nature of the market mechanism.
In our opinion, even in the proposed models, it is implicitly observed that the mechanism for achieving balance in the market, whether important in the moment or asymptotically, is based on the principles of adaptation. The stock market is a complex social and economic system with the properties of self-adjustment, self-regulation. Based on the new information received at each step-in time, the parameters of the market process are adjusted, their adaptation to new, continuously changing conditions for the development of the phenomenon. Thus, the parameters of the market process constantly "absorb" new information and adapts to it, leaving it still effective.
Use measurement and modeling tools based on the hypothesis of the inertia of the market against the backdrop of increasing mobility of economic phenomena, is not entirely correct. We believe that the nature of the process should be taken into account in the study of its dynamics in the tools used (Davnis et al., 2013b;Davnis and Korotkikh, 2014;2018). In this regard, the principles of adaptation, which empower the models with the ability to continuously take into account the evolution of the dynamic characteristics of the processes under study, are preferable.
Stock market returns over short periods of time are most dependent on the trends of the last moments of time. This leads to the preference to use the principles of adaptation in obtaining short-term forecasts. Also, the authors cite the opinion of experts (Lukashin, 1979), according to which the accuracy of adaptive forecasts is on average higher than the accuracy of forecasts obtained by traditional methods (Bakholdin and Korotkikh, 2012;Davnis et al., 2011;Davnis and Korotkikh, 2014).
In this study, we present the technique of non-harmonic expansion of the time series by trends, considering the adaptive nature of the stock market functioning mechanism.

Basic Assumptions
Usually, investigating the problem of the decomposition of the economic time series into components (components), appeal to the existence of various types of dynamics: trends, cycles, seasonal fluctuations, random fluctuations, structural shifts, etc. Moreover, from an economic point of view, each kind of dynamics must have its own substantial meaning.
Often for time series analysis is useful isolated consideration of its components. And although there are economic time series, which almost in pure form can be attributed to a particular type of dynamics, the majority of the series has a very complicated form, due to the fact that different kinds of dynamics can be combined.
For the purposes of this survey, we are interested in combining within the same type of dynamics, in particular, time series representing a combination of trends existing at different time intervals, with the imposition of random fluctuations.
The specific decomposition of a series into components requires the adoption of a number of assumptions about the properties that these components should possess. This greatly facilitates the construction of a formal statistical model that includes these components, and the subsequent evaluation of its parameters.
Adaptive trend decomposition of the time series -the transformation of the time series levels, transforming them into a set of basis trend components. The basis trend is a deterministic trend that is identified at a predetermined time interval of the analyzed time series.
The decomposition is called "adaptive", since the prediction error through feedback comes to the input of the system and is used when moving from one basis trend to another by corrective actions in proportion to this error. This raises the level of consistency of the model with the dynamics of the series, which provides compensation for changes in the behavior of a number of changes in the parameters of the functions of basis trends.

Assumption 1. The Basis Trends Form a Time Series, Entering it Additively
This transformation represents the levels of the original time series as the sum of basis trends existing at different time intervals where t yt-level of the spread time series; k the function of the k-basis trend; The number of allocated basis trends K depends on specificity of tasks. We proposed to consider the allocation of three basis trends that reflect long, medium and short-term patterns.
Identification of several basis trends in the implementation of the same process, allows to consider it as multitrend. Despite the abstract formalization of real processes, the model is useful in understanding the meaning that we are striving to make the concept of " multi-trend process." Each basis trend is determined from the derived time series obtained by smoothing the levels of the original time series.
The selection of the trend components is performed sequentially from the series with the largest sliding window smoothing to the lowest, ending close to the original.

Assumption 2. In The Dynamics of Financial Time Series Simultaneously Present Several Basis Trends, Showing Stability at Various Time Intervals
To identify these trends, it is necessary to investigate regularities exhibiting stability over time intervals that are defined in a special way, for example, hourly, four hour, daily, weekly, biweekly, etc. Assumed that the desired trend period of time, which it dominates, is identified.

Assumption 3. The Duration of the Existence of Certain Regularities Differs from the Length of Existence of Others
The reality of the stock market does not contradict our assumption. Over time observed attenuation of certain trends and the emergence of others, as well as the onset of trend reversals. Modeling the time series, it is important to provide different rate of change of these patterns. Time series data on the results of trading in the stock market have a long history and are periodically updated. In this connection, it is obvious that the parameters of the basis trend functions must be updated. To solve this problem, it is expedient to use econometric models with time-varying coefficients.
Continuing reflection on the changing trends come the need of replacing the model (1)  Taking into account the foregoing, it is expedient to use econometric models for modeling basis trends, the procedure of their construction provides for the refinement of the form of functions   k t  , the definition of them with accuracy to unknown parameters, and the choice of the method of estimating these parameters from time series data.
For example, estimating the parameters k = 1 of the basis trend, we consider the use of the recursive OLS procedure, whereas estimating the parameters k > 1 of the basis trend, the recursive procedure of exponentially weighted least squares. Moreover, the parameters under evaluation are corrected with the approximation errors of the k-derivative time series by a function, the parameters were obtained earlier with the k-1 derived time series.
Although recurrent OLS is not widely used in the construction of econometric models, in situations where the time series already have a long history and are constantly updated, creating the need for periodic adjustment of the model parameters, a recursive procedure is much more efficient than conventional OLS. Earlier we noted that their use saves both time and memory (Endovitsky et al., 2017).
The type and properties of the functions describing the basis trends are largely determined by the specifics of the simulated index. If the baseline of the stock market to investigate a price, preference is given to autoregressive models, implementing the assumption of the substantial dependence of the current values from the previous one. This assumption is convenient due to the fact that identifying systematic determinants of the price of the asset is a difficult task. Along with the price, which is in a sense the baseline processes of the stock market, interest is the modeling of indicators derived from it. In particular we are talking about the rate of return of the asset.

Assumption 4. Trends of Different Duration Exist in a Particular Relationship
The meaning of this assumption is that each subsequent basis trend is the result of a refinement of the previous basis trend by adapting it to the data of the analyzed time series.
An important point in the construction of the model (4) is the realization of the interrelated estimation of the parameters that affect its member functions. The necessity for this evaluation stems from the following reasoning.
The observed values of the time series rarely match exactly with the basis trend. Then if l+1-time series represent as a temporary deviation from the l-basis trend, it became possible to build a combined model in which both identified l and l+1 basis trends. This is true for sequential decomposition for any number of basis trends. With the help of this approach, we can develop a model that identified a specified number of basis trends.
As noted above, the interrelated assessment procedure should be used to build a k=1 basis trend of the recurrent OLS, and identify the subsequent trends using the adaptive adjustments procedure to the approximation error of the current time series of the previous function of the basis trend via adaptive feedback mechanism.

Adaptive Decomposition Model of Multi-trend Processes
Let us consider a generalized model of multi-trend process that implements adaptive trend decomposition technique of the time series.
Formally, the model that identifies patterns in multi-trend processes and having for these purposes a layered structure of adaptive mechanism can be represented as follows: where   1,2,..., , , 1,2,..., 1 To k = 1 get   , , , where , kt  x -advanced row-vector of current values of independent variables, smoothed with a window k p ; , kt b -the current estimates vector of the parameters of the k-basis trend; -assessment of the current value of the k-basis trend, which uses the parameters of the k-basis trend in the previous period; , kt y -smoothed with k p window current value of the dependent variable; 1 , kt  C -the inverse matrix, adjusted to recent observations. Then 2,3,...,  -the current vector changes smoothing parameter (configurable);  -reaction rate adaptive mechanism parameter (configurable);  -number of observations processed in a single step multi-step adaptive procedure parameter (configurable).
, 1 , 1 , 2 , 1 , (18) The model has k=1,2,... blocks, each of which reflects calculations associated with the identification of the kbasis trend. For calculations on the proposed scheme requires the initial values . Their computation is carried out by OLS (8) -(10). As source data are used corresponding to each basis trend derived time series The first block includes formulas (11) -(13) implementing the recurrent OLS procedure. The recursive OLS for the current estimates of the first basis trend parameters is equivalent to applying OLS to the entire data set. The presence of a feedback loop, though without weighing the data, allows to consider adaptive current regression analysis based on recursive OLS. Blocks k=2,3,...K-1 (14)-(16) constitute an assessment procedure of the basis trend current settings. The specificity lies in the fact that the adaptive mechanism has a simple structure and realizes the idea of interrelated basis trend parameter estimation. Basis trend assessments are adjusted for the updates in the derived time series, and considering the error of approximation of the previous basis trend of the analyzed derived time series. Unlike the first block feedback circuit provides the data weighting in favor of the group of newly received data. Multi-steping, provided in the adaptive mechanism of this block, allows to update the basis trend so that it dominated the trend in the last few observations used for the adjustment. In this case, of an identifiable basis trend will be resistant to accidental releases.
During implementation of the last K-block uses a one-step recursive procedure OLS (17) -(19). Its peculiarity lies in the fact that the adaptive adjustment is carried out by one last observation. These specifics of modeling the Kbasis trend allows you to refocus evaluate the regularity by using the adaptive custom structures mechanism, so that it was dominated by a trend in the last observation used for the adjustment. Since in the general case of the Kderivative time series must match with the original, the objective of the K-block in the model is the identification of new trends in a rising stage, while an adaptive custom structure mechanism will allow to filter the imposition of random fluctuations.

Conclusion
During the research, many of theoretical and practical problems were solved. These reflections are an important step towards unifying the theories of functioning of the stock market that are recognized by the scientific community, but so far poorly consistent among themselves. The stock market at all time intervals demonstrates the behavior of a single system that has the properties of self-adjustment, self-regulation, adaptation to new, continuously changing conditions. We are inclined to believe that considering the adaptive nature of an efficient market will allow us to consider theories of the functioning of the stock market recognized by the scientific community not as opposing views but as the faces of one process, on the other hand, to develop tools for modeling the dynamics of the stock market, considering its behavior, complex adaptive system.
The central place of research is the study of the regularities of the functioning of an efficient stock market, manifested at different time intervals and the development of an appropriate mathematical apparatus. The analysis of time series of yields in the stock market showed that the profitability processes behave as multi-trend. In this connection, it became necessary to introduce the concept of a basis trend, as one of the elementary trends of a multitrend process. To identify the basis trends, we have put forward many assumptions: • basis trends additivity; • several basis trends existence; • different duration of regularities existence at different time intervals; • trends correlation at different time intervals. The assumptions made allowed the development of a dynamic technique for adaptive trend decomposition of the time series.