Prediction of EUR/AZN exchange rate dynamics on the basis of spectral characterıstıcs

Herein, we establish the most appropriate model of exchange rate dynamics using computer modeling, mean-error indicators of approximation, and the average quadratic divergence with the Fourier series approach and timedependent behavior in a time series. This study was based on 360 daily observations of EUR/AZN currency exchanges covering the time period 03.02.2017–03.08.2018. Our main assumptions were: (1) the ability to describe the global dynamics of exchange rates by approximating the combinations of the linear trend and harmonic oscillations of various frequencies relative to this line; and (2) the possibility of developing a high-precision algorithm for short-term forecasting of changes in exchange rates. Harmonious oscillations were separated by using methods for the harmonic analysis of the table error in MS EXCEL. Eviews was used to calculate statistical estimates of the coefficients of factor variables with the types of sines and cosines that are suitable for all possible frequencies. Dynamic forecasting of exchange rates was enabled by setting up harmonious oscillatory models with straight-line trends. The necessary statistical procedures were implemented for authentication of the established models, evaluation of parameters, and verification of the algorithm’s adequacy.


INTRODUCTION
It is impossible to imagine the globalized world economy without currency relations, which play a special role in international economic relations. Nowadays, monetary relations are determined mainly by currency exchanges; thus, it is very important to study exchange rates. In some instances, a change in the exchange rate of a currency will have a serious impact not only on that particular country but also on a great number of other countries. The U.S. dollar (USD), Great British pound sterling (GBP), and Euro (EUR) are examples of currencies with the potential to have a serious impact on many countries worldwide. Analysis of harmonics in the exchange rate dynamics of these currencies with other national currencies remains an important topic. Here, the vibration problems that appear are studied by approximations of spectral analysis using modern computer programs. The obtained results can be used to predict short-and long-term exchange rate dynamics and play a great role in the financial decisions of households, the regulation of monetary and budget policies, the solution of problems arising out of the currency market, and the making of mathematical econometric decisions that aim to restore macroeconomic stability (Calvet,1997). The spectral analysis problem that we consider in this paper needs to be solved urgently given current geopolitical conditions and considering the sanctions applied by the USA to both Russia and Iran (Urbanovsky,2015). Under these sanction conditions, Azerbaijan's economy is currently adapting to new economic relations. These new economic relations have made the Azerbaijan manat rate dependent on the prices of oil in the world market, national currencies of partner countries whose non-oil sector is subject to sanctions in relation to the USD, and the volume of imports. Such dependence on international relations has made it necessary to perform USD/AZN, EUR/AZN, and other currency calculations with Azerbaijan manat rates (Orudzhev & İsazadeh ,2018;Orudzhev & Mamedova & Suleymanov , 2018).
The aim of this study is to establish the most appropriate model for exchange rate dynamics with the help of computer modeling and taking into account the mean-error indicator of approximation and average quadratic divergence using the Fourier series approach with time-dependent behavior in the time series. The model was developed on the basis of daily observations of EUR/AZN currency exchanges (www.cbar.az/currency/customs) covering the time period 03.02.2017-03.08.2018.

LITERATURE REVIEW
There are many studies on the spectral analysis of financial-economic time series and their continuous analogues. The theoretical bases of the classical mathematical-statistical methodology for the spectral analysis of time series are given in (Anderson,1971;Box, G.E.P. & Jarkins & Reinsel , 1994;Granger & Hatanaka ,1964;Cryer & Chan, 2008;Koopmans ,1974). A classic example of spectral analysis of a time series is the expansion of a time series with periodic components into several harmonic functions with different frequencies by solving a linear multiple regression problem in which the dependent variable is the observed time series and the independent variables or regressors are the functions of the sines and cosines of all possible (discrete) frequencies. Moreover, the regression coefficients describe the degree to which the corresponding functions correlate with the levels of the time series. The sines and cosines themselves are not correlated (are orthogonal) at different frequencies. Spectral analysis determines the correlation between the functions of sines and cosines of various frequencies and the observed data. If there is a high degree of correlation (the coefficient for a certain sine or cosine), then we can conclude that there is strict periodicity at the corresponding data frequencies. For spectral analysis of multicomponent time series containing singularities, such as jumps, changes in periods, and amplitudes and phases of harmonic components, it is necessary to use new methods for processing time series that differ significantly from the classical correlation-based spectral analysis method. Currently, singular decomposition (Hassani & Thomakos, 2010), the Wavelet transform (Kedadouche, Thomas & Tahan, 2016), and the normalized range method (the Hurst Method) (Calvet, 1997;Lopatin & Chernenko, 2010) are the methods most commonly used to study the basic structural components of time series.
Depending on the domain of definition of the parameters of the approximating function, two main groups of methods can be distinguished. The first group contains global methods, which identify the parameters of the approximating function by using all known values of the time series. These methods are mainly applied to obtain global characteristics of the dynamics of the process under study. This group of methods includes autoregressive models (Verbeek, 2012) and singular spectral analysis (Hassani & Thomakos, 2010). The second group contains local methods, which are based on the principle of local approximation (Kedadouche, Thomas & Tahan, 2016). The advantage of local forecast methods for irregular quasi-periodic time series is the use of a smaller amount of source data.
In order to obtain a more adequate model, it is possible to divide the time series into parts and to model trends. Such models are called piecewise linear or piecewise nonlinear models. In this case, a comparative analysis should be performed with distortions of a single dataset. However, such division into parts of the original population of the time series dataset will lead to a loss in the number of observations, and, therefore, to a decrease in the number of degrees of freedom in each equation of the piecewise approximation model. A comparison can be made depending on the ratio between the decrease in the residual dispersion and the decrease in the number of degrees of freedom and in the transition from a single equation to a piecewise model.
For spectral analysis of continuous analogues, we note that ordinary differential equations of the n-th order (Orudzhev, 2000;Obara & Takashi, 2004) can be represented as a system of n first-order differential equations. The phase space of such a system is an n-dimensional Euclidean space. Each instantaneous state of the system corresponds to a phase point of this space, and each point in the space corresponds to a certain unique state of the system. The dynamics can be represented as a sequential change in the position of phase points, i.e., trajectories of motion of these points in the phase space. The behavior of the initial process will correspond to the n solutions of the ordinary differential equations and the corresponding phase trajectory. Given ( )= ( )+ ( ), where ( ) is the observed value of the time series at time moment t, ( ) is white noise with zero mean and final dispersion, and ( ) is the mathematical expression of the investigated value at time moment t, then we can evaluate the corresponding parameters in the general solution of the differential equation to predict the corresponding series. Since the random additive term ( ) is white noise, the parameters can be estimated using the least squares method (Verbeek, 2012).
In (Orudzhev, 2009), differential characteristics of the exchange rate in a financial market are given, and the solution of the Cauchy problem for a correlation function was provided. In the paper (Orudzhev, Mammadova & Gulmammadova, 2013), the authors considered jumping problems for the people's collection of money equation and obtained explicit expressions for distribution densities. In (Orudzhev & Isazadeh, 2018), the authors performed a comparative analysis of macroeconomic indicators that exert an influence on the Azerbaijan manat rate and constructed multifactor regression models. In (Orudzhev, Mamedova & Suleymanov, 2018), the authors analyzed the formation of the USD/AZN exchange rate and predicted it using appropriate regression equations. However, in the abovementioned works, the authors mainly studied expansion models with respect to small harmonics, which has caused some uncertainties to arise regarding the distribution of dispersion at higher harmonic frequencies.
In order for analysts from money and credit regulatory bodies to analyze the rate formation process and trace and control market tendencies, it is very important to perform research on regular and irregular increase and decrease periods, the determination of spectral peaks, the expansion of strong harmonics (Dariusz & Wiechek, 2016) and the estimation of frequencies corresponding to their periods with respect to the spectrum, and the general dispersion portion of the harmonics in changes in exchange rates. It should be noted that when are spectral parameters) are the solutions of second-order differential or difference equations, it is reasonable to approximate the dynamic motion of periodic-and quasiperiodic-type vibrations using linear combinations of these functions. In this case, the frequencies of the wave movement of the vibrations are determined by the parameters () In this paper, we directly apply the Fourier expansion approximation and compare it with autoregression models, as this approach will provide us with rather good information about the rate behavior. When the Fourier harmonics functions are the solutions of second-order difference equations and second-order differential equations, approximating the dynamical motion of appropriate vibrations by means of linear combinations of these functions will enable us to study their oscillation properties.

METHODOLOGY
If the changes in the indicators of the series under consideration are of a harmonic character, then these changes will correspond to a Fourier series. If the harmonics of these indicators are expressed by sinusoidal functions, then the expansion of these functions into a Fourier series is called harmonic analysis (spectral analysis). We can use the following trigonometric polynomial as the analytic form of these vibrations.
where ˆt y is the value of the trend function of the model constructed according to the spectral analysis of the series under consideration at time t , k  is the ordinal number of harmonics of the Fourier series, m is the number of harmonics, n is the total number of indicators for the series, and t is time and takes the values The parameters of the model given in (1) can be calculated using the Least Squares method (LSM). By applying this method, we obtain 2m+1 normal systems of equations. From this system, we obtain expressions of estimations by means of the following simple algebraic calculations After estimating the parameters, we define the harmonics where the change in the harmonics of the series is best described. Increasing the number of harmonics will improve the accuracy of the approximation; however, in this case, it may also increase the number of quadratic deviations. Increasing the square deviation will lower the validity of the model.
The main square deviation is used to indicate to what degree the observed indicators deviate from the mean level of the time series. The smaller the mean error of approximation and the square deviation are for the given series, the more adequate the constructed model will be. The main square deviation was calculated using the following formula: The main calculation formula for spectral analysis may be written as: where k c  is the amplitude of the constructed model and k   is the model's phase.
The amplitude was calculated using the formula The phase was calculated using the formula

Graph 1. Time-dependent graph of the amplitude of a periodic wave
The amplitude expresses the distance from the t (abscissa) axis of the graph of the model constructed by spectral analysis (Graph 1). The distribution of the amplitude of the harmonic composition is called the 'amplitude spectrum'. The distribution with respect to phases is called the 'phase spectrum'.
The selection of harmonics that better approximate the factual data is performed through other statistical and adequacy characteristics of the model in addition to the condition of optimizing its mean quadratic error. If there are non-periodic trends and periodic or quasi-periodic tendencies in the dynamics, then comparative analyses are performed by establishing multi-harmonic models and stipulating the increase in the accuracy of the approximation and non-deviation of the amplitudes from the diapason with certain finite values using the linear regression equation and Fourier harmonics together to model the dynamics. Irrespective of the order of phase variables, panel data, or time series in the studied series, it is important for the evaluation of the spectral characteristics of the studied process that, for the establishment of the most suitable model for the given series, the models be based on the trigonometric Fourier series in the case of a non-linear model with a linear or non-linear trend and trigonometric content. The limitation of using high-composition polynomials with a non-periodic trend is the homogeneity of the studied collection. If a high-degree polynomial is used, the curve of the trajectory will be subjected to more declination and the homogeneity of the collection with regard to the resulting factor will decrease. The forecasting of the exchange rate can have higher accuracy by separating the harmonic vibrations, carrying out statistical assessment of the ratios of factor variables of sine and cosine types relevant to all possible frequencies, calculating the theoretical amplitude and phase values that fit the vibrations, and establishing models with a statistically grounded polynomial trend and that reflect the harmonic vibrations.

EMPIRICAL RESULTS AND DISCUSSION
The proposed theoretical method was realized by adopting new approaches to the analysis of the real EUR/AZN exchange rate. All calculations and practical realizations were performed in the Microsoft Excel package, as it performs statistical calculations and analysis of time series more conveniently than other packages. First, we describe the results of the realization of the descriptive statistics of the data in the following Eviews  Table 1 shows that the asymmetry is equal to 0.44, which indicates that there is a slight left-side asymmetry of the empirical distribution curve compared with the theoretical one. The excess is 2.38, so there is a slight peak in the empirical curve. Since the result of the Jarque-Bera test is a value that is significantly different from zero, the dynamics do not obey the normal partition law. Taking into account the fact that the global spectral characteristics show that the maximum and minimum values of the given series are located on a strip with a smaller width and connection, the dynamics of the process under study will be used in the global methodology to determine the parameters of the approximating function. In this forecasting of the dynamics of the process in question, we will approximate the trend as a linear trend in a combination of harmonious oscillations of various frequencies relative to this trend.
To construct the spectral analysis model of the EUR/AZN exchange rate, we first analyzed the harmonics, i.e., the case where m=1. We then applied the least squares method to parametrize the model.
Using instrumentation procedures in MS EXCEL, we obtained the motion dynamics and smooth curve described in Graph 2.

Graph 2. EUR/AZN exchange rate motion dynamics and smooth curve in the case of one harmonic
From Graph 2, we obtained the following analytic form of the trigonometric trend function of the model:

249
The trigonometric form of the trend of the model is as follows: ˆ1,98 0, 0541cos 0, 082sin 0, 03cos 2 0, 037 sin 2 Its mean square deviation is 0,03   , and its mean error of approximation is 1,1165%   . Now, let us consider a model with three harmonics. In the same way, we obtain the motion dynamics that are shown in Graph 4.

Graph 4. EUR/AZN exchange rate motion dynamics and smooth curve in the case of three harmonics
The analytic description of the model is given by the following trigonometric expression ˆ1,98 0, 0541cos 0, 082sin 0, 03cos 2 0, 037sin 2 0, Its mean square deviation 0.025

 
, and its mean error of approximation 0,96%   . Analysis of all three models shows that, as the number of harmonics increases, the mean square deviation and the mean error of approximation decrease. The constructed model for which the values of the indicators is closest to zero will be the most accurate model.
It should be noted that any successive Fourier harmonic will contain the preceding harmonics. If the order of harmonics is increased, the vibration frequencies will increase and the wavelength of sinusiodal osciallations will decrease.
Our research shows that the most accurate model for the series is a model with 180 harmonics. To verify this, we considered models with m=179, 180,181, and 182 harmonics.
First, we considered the case where m=179 (a model with 179 harmonics). In this case, the graphical description has the following form: . Now, let us consider the case where m=180 (a model with 180 harmonics). The motion dynamics are given in Graph 6.

Graph 6. EUR/AZN exchange rate motion dynamics and smooth curve in the case of 180 harmonics
The mean square deviation of the model

. EUR/AZN exchange rate motion dynamics and smooth curve in the case of 181 harmonics
The mean square deviation of the model 0,000615   , and the mean error of approximation 0,02543%   . Then, we considered a model with 182 harmonics. The motion dynamics are shown in Graph 8.

Graph 8. EUR/AZN exchange rate motion dynamics and smooth curve in the case of 182 harmonics
The mean square deviation of the model   . Comparative analysis shows that, in the models with 180 and 181 harmonics, both the mean square deviation and the approximation factor have very similar values. The mean square deviation and mean error of approximation of the model with 180 harmonics are less than the mean square deviation and mean error of approximation of the model with 181 harmonics. When we examine the indicators of the model with 182 harmonics, we see that the mean square deviation and the mean error of approximation of this model are greater than those of the other models. As an increase in the number of harmonics causes an increase in the mean square deviation and mean error of approximation, we considered the model with 180 harmonics to be the best model.
The final result of our analysis is that the EUR/AZN exchange rate is discrete (i.e., it was shown to be described by linear combinations of harmonic compositions of a Fourier series).

Graph 9. Remaining terms of the accepted model
As can be seen from the graph, the remaining terms of the constructed model are stationary at 0. Therefore, we have obtained some initial information about the constructed model. Now, let us examine some indicators of the model. The amplitude and phase of the model constructed by using the spectral analysis approach were separately calculated for each of the harmonics. As the constructed model has 180 harmonics, we obtained 180 amplitude and phase values.
The results show that the greatest amplitude value max 0,098 cos( ) kt kt is not a normal distribution. Therefore, the selection of appropriate harmonics for analysis should be verified using F-Fisher statistics. Now, let us consider the verification of the validity of the constructed model. In the general case, an estimation of the validity of a regression equation is an estimation of how well a mathematical model describes the dependence between variables, and offers an indication as to whether the number of the explanatory variables contained in the equation is sufficient to describe the explained variable. Verification of the validity of a regression equation is performed on the basis of a dispersion analysis.
To verify the degree of importance (validity) of the constructed model of the EUR/AZN exchange rate, we first applied the F-Fisher test. The proposition that the model is valid will be accepted as true for the case when the result calculated by the F-Fisher test is greater than the appropriate critical value of the F-Fisher statistics; i.e., F calculated >F table. To determine the critical table value of the F-Fisher test, the degree of importance (expressed as percentage probability) and the degree of independence should be determined. We determined the degree of independence of the test under a certain condition, i.e., according to the number of harmonics and observations in the form 12 ,1 k m k n m     . As the model with 180 harmonics has 360 parameters (m=360), according to the number of observations n=360, 1 = 360, 2 = 360 − 360 − 1 = −1. In the table of F-statistics, we can see that degrees of independence are given only by natural numbers, which means that it is impossible to calculate the validity of the model with 180 harmonics using F-Fisher statistics. Therefore, we verified the validity of the model with 179 harmonics using Fstatistics. According to the degree of independence given above, the F-Fisher critical  Vol.13, No.2, 2020 254 in the EXCEL computer package to verify the autocorrelation of the constructed model. The obtained dstatistics value was d=3,97. For this value, the double inequality 44 l dd    is satisfied. Therefore, we rejected the 0 H hypothesis and adopted the alternative 1 H hypothesis that concerned the existence of negative autocorrelation.
The constructed model's determination coeffiecient 2 0, 999957 R  . As can be seen, the obtained result is close to unity. This means that the constructed model explains 99,9957% of the dispersion of the exchange rate.
Finally, we note that even if each separate harmonic in a model is not considered to be optimal, in general, it can still be considered to be an optimal model. The main reason why each separate harmonic was not considered to be optimal is that the considered dynamic series is not stationary and the analytic form has 179 harmonics that are dependent only on one time factor. Non-importance of each separate factor of a model does not influence the validity of the model; thus, the model was considered to be optimal.
To predict the EUR/AZN exchange rate on the basis of spectral analysis, the following procedures should be performed.
-To construct the model's trend: (17) of the trend function. Graph 10 shows a description of the model constructed on the basis of the trend equation.

Graph 10. Description of the model constructed on the basis of the trend equation
Graph 11 shows a description of the remaining terms, which were obtained using the formula  It should be noted that the application of the spectral analysis method for modeling an exchange rate should be performed in the same way as the construction of the model of remainder terms. That is, to perform a spectral analysis of the model, the most correct number of harmonics should be obtained and the most true model should be constructed. We can accept m=179 as the most optimal number of harmonics for the model because the standard error for this number of harmonics was 0, 00739   and this error was less than the standard errors for the other numbers of harmonics (for m=178, The corresponding graph is given in Graph 12.  Vol.13, No.2, 2020 256

Graph 12. Graph of the regression function of the optimal model
For the optimal model, the mean error of approximation is 4.25%.
The description of the remainder terms of the constructed model is given in Graph 13.

Graph 13. The description of remainder terms of the optimal model
From Graph 13, we can see that the remainder terms of the model are distributed stationarily at 0. As was mentioned above, the total prediction value is considered to be the sum of two prediction components. These prediction components are the prediction components of the trend function and the spectral analysis model of the remainder terms.
To perform a next-day forecast, we can adopt for the trend equation t=361,362, for the spectral analysis of remainder terms  . To diminish the difference between the prediction value and the real value, we can replace the linear trend (17) with a higher-order polynomial.

CONCLUSIONS
In this paper, we performed mathematical-empirical analyses and realizations using the Excel software package for 360 indicators based on daily indicators of changes in the EUR/AZN exchange rate. We built a model with the content of a linear-trend Fourier series of these indicators with time-dependent behavior, and determined structural functions of finite numbers of the linear trend and the trigonometric series with respect to the time to forecast EUR/AZN exchange rate dynamics. As a result of a comparative spectral analysis performed by correctly exploiting the statistical spectral analysis approach and the statistical test needed to control the adequacy of the model, it was determined that, within the timeframe 03.02.2017-03.08.2018, the most optimal model to describe the behavior of the time series of changes in the EUR/AZN exchange rate, in comparison to the mean quadratic deviation and the mean error of approximation, was the model with components up to the 179 th harmonic month. Here, a model with a straight-line trend and a sine and cosine additive structure was constructed, and a prediction model of an appropriate Fourier series was also constructed. In the time interval under consideration, a stable Azerbaijan manat rate between restricted amplitude quasi-periodic vibrations of the EUR/AZN exchange rate and a national currency with a dynamic tendency was found to be the result of correct monetary policies for the Azerbaijan manat based on predictive analytics calculations under conditions of geopolitical risk (the USA's sanctions on Russia and Iran, risks connected with the conditions in the area, a decline in the oil price, etc.).