Advisors and indicators based on the SSA models and non-linear generalizations
AAdvisors and indicators based on the SSA models and non-linear generalizations А . М . А vdeenko The National Research Technological University, Moscow, Russia 119049, Moscow, Leninsky prospekt, 4 e-mail: [email protected] Abstract
This paper considers method of creation of an advisor and indicator based on the spectral stochastic analysis model, both with linear and non-linear approximation. The problem of entrance to one or another trade position is solved on the basis of combined analysis of dynamics of quotations of all currency pairs, what allows to actively hedge open positions.
Keywords : Forex market, advisor, indicator, singular stochastic analysis 1. Introduction Great number of models is known, which are used for automation of exchange trade (advisors) and visualization of the recommendations (indicators). These are models of sliding average MA(q), autoregression AR(p), mixed models, such as ARMA(p,q) [1,2], ITRIX, Bolinger bands, Elliott waves, moment and stochastic models, etc. Models of ARCH(q) type represent conditional dispersion as linear function of squares of past disturbances. In models GARCH(p,q) conditional dispersion at given time is linear function of conditional dispersion and squares of disturbances at past times [3,4]. Further rectification of the GARCH(p,q) model – model EGARCH(p,q) – is able to allow for asymmetry effects – negative correlation between profitability and volatility. Actual application of these models for creation of automated trading systems or visualization of the tendencies is not too efficient. It frequently happens that the results are trivial – the model’s coefficients are either statistically non-significant, or are determined with accuracy, which does not suffice for making of efficient decisions. In this work, for increase of reliability of forecasts of dynamics of given currency pair, we propose to use information on dynamics of other currency pairs. It will allow to partially avoid effects of non-stability (slow drift of the description parameters in standard models of types MA(q), ARCH(q) , etc) , and thereby to improve forecasting power and practical efficiency of the model. . SSA model Let us assume that input information – is discrete financial sequence )( nn txx of quotations of a currency pair at time n t . In order to exclude unessential oscillations (lesser than the spread), let us understand n x as weighted average of prices of opening and closing, and of maximum and minimum for given time frame, which will be assumed equal to minimum possible min. Let us introduce value nnn xxy - change of n x in the course of evolution of the systems. Value n y will be considered as random process. Dozens of currency pairs are simultaneously traded on the market, so let in y - be relevant change for pair Mi . Elementary estimations show that currency pairs are correlated, so, for instance, for pairs EURUSD and GBPUSD the correlation factor in averaging interval equal to 20-50 time frames is positive and is within the interval 0.65….0.75 , etc. Therefore, when making decision on entrance to / exit from short or long position for given pair, it is expedient to allow for dynamics of changes for the rest currency pairs. To this end, we offer the following algorithm. Let us introduce information matrix, which reflects dynamics of change of all currency pairs at given time n t .................. Mn KMnKnnKn n yyyyyyU
In this case M - is number of analyzed currency pairs. Now let us determine the two-point correlation function – square matrix with dimensions )()( KMKM , where value K ‐ is averaging interval in the space of currency pairs at given time: KUUR T , while ( MK ) . The matrix is symmetric, therefore eigen values – that is solutions of equation )det( IR , are real. To find them, it is convenient to use Jacobi algorithm, which is based on sequence of rotations of the initial matrix, which sequence is implemented in such a way that at each rotation step the value of non-diagonal element, which is maximum by absolute value, is made equal to zero. omponents of the rotation matrix i A at each step i are )cos(),sin( mnmn , where
11 1 innimm imnmn RR Rarctg , imn R - is maximum non-diagonal element at the preceding step, if i . Maximum number of iterations is ))((5.0 MKM , but actually the procedure may be stopped when modulus of the maximal non-diagonal element becomes less than pre-established value . Usually it is assumed that . Columns of the rotation matrix ...... nc AAAA – are the initial matrix’s eigen vectors, while corresponding eigen values – are diagonal elements of matrix cTc RAAR . Let us regularize eigen values by absolute value, and let us assign them to eigen vectors. The idea of linear filtration of the forecast in the SSA algorithm consists in retaining of several eigen vectors corresponding to maximum eigen values. Linear filtration (forecast) in this model is carried out by means of restoration of the process by l eigen values corresponding to maximal, by absolute value, eigen values; in other words, future is forecasted as qnlq ciqin yAy while KMl . In the non-linear filtration model the aforesaid algorithm is implemented for time n t , and then, by means of the least-squares method, or by means of the reverse-spread neural networks, we build approximation )( inin yy . Now, the future may be represented as )( inin yy and used as a criterion for entrance to short or long position. Further improvement of the SSA method is possibility to allow for time lag. In this case, instead of the information matrix U we use cellular matrix ........................ Nn INnIn n
UUUUF
Its elements are the U matrix’s elements shifted for unit time , where N – is total number of shifts, NI – is depth of averaging. urther analysis and filtration are similar to described above. This not only allows us to take into consideration joint influence of various currency pairs on formation of the exchange rate, but also to allow for lagging with various characteristic time scale. Practically, for the Forex market the algorithm is implemented in the MetaTrader 5 medium, both as indicators SSA1 – linear filtration and SSA2 – linear filtration with time lag, and one of the advisor’s unit as well [8]. Peculiarity of implementation of the algorithm for the advisor is possibility of linear filtration on the basis of the reverse-spread neural network with T hidden layers (1 31. – Pp. 307-327. 2. Nelson D.B. Conditional Heteroscedasticity in Asset Returns / D.B. Nelson // Econometrica. – 1991. – V. 59. – Pp. 347-370. 3. Engle R. Estimating Time Varying Risk Premia in the Term Structure: The “ARCH-M Model”/ R. Engle, D. Lilien, R. Robins // Econometrica. – 1987. – №