Application of Adaptive and Multiplicative Models for Analysis and Forecasting of Time Series

The paper considers two forms of models: seasonal and non-seasonal analogues of oscillations. Additive models belong to the first form, which reflects a relatively constant seasonal wave, as well as a wave that dynamically changes depending on the trend. The second ones are multiplicative models. The paper analyzes the basic adaptive models: Brown, Holt and autoregression models. The parameters of adaptation and layout are considered by the method of numerical estimation of parameters. The mechanism of reflection of oscillatory (seasonal or cyclic) development of the studied process through reproduction of the scheme of moving average and the scheme of autoregression is analyzed. The paper determines the optimal value of the smoothing coefficient through adaptive polynomial models of the first and second order. Prediction using the Winters model (exponential smoothing with multiplicative seasonality and linear growth) is proposed. The application of the Winters model allows us to determine the calculated values and forecast using the model of exponential smoothing with multiplicative seasonality and linear growth. The results are calculated according to the model of exponential smoothing and with the multiplicative seasonality of Winters. The best model is determined, which allows improving the forecast results through the correct selection of the optimal value of α. The paper also forecasts the production volume according to the Tayle-Vage model, i.e., the analysis of exponential smoothing with additive seasonality and linear growth is given to determine the calculated values α. The paper proves that the additive model makes it possible to build a model with multiplicative seasonality and exponential tendency. The paper proves statements that allow one to choose the right method for better modeling and forecasting of data.


I. INTRODUCTION
NALYSIS, modeling and forecasting of financial and economic processes form the basis for the development of management decisions at all levels of the economic hierarchy.This task is characterized by increased complexity and ambiguity.Therefore, the question arises about the effective analysis and development of such models and methods that can correctly describe modern financial and economic processes [1].
Most often, in the practical construction of forecasts of economic indicators their seasonality and cyclicality are taken into account.Different mathematical apparatus is used to predict non-seasonal and seasonal processes.The dynamics of many financial and economic indicators has a stable fluctuating component.In the study of monthly and quarterly data are often observed within the annual seasonal fluctuations, respectively, in the period of 12 and 4 months.When using daily observations, fluctuations with a weekly (five-day) cycle are often observed.In this case, to obtain more accurate forecast estimates, it is necessary to correctly reflect not only the trend but also the oscillating component.The solution to this problem is possible only with the use of a special class of methods and models [1 -5].
Seasonal models are based on their non-seasonal counterparts, which are supplemented by means of displaying seasonal fluctuations.Seasonal models are able to reflect both a relatively constant seasonal wave and a wave that changes dynamically depending on the trend.The first form belongs to the additive class, and the second one refers to the class of multiplicative models [2].Most models have both of these shapes.The most widely used in practice are Holt-Winters models [6] and autoregressions [7].
In short-term forecasting, the dynamics of the development of the studied indicator at the end of the observation period is usually more important than the trend of its development, which has developed on average throughout the prehistory period.The property of dynamic development of financial and economic processes often prevails over the property of inertia, so adaptive methods that take into account information inequality of data are more effective [8].

A
Adaptive models and methods have a mechanism of automatic adjustment to a change in the studied indicator.The forecasting tool is a model, the initial assessment of the parameters of which is carried out on the first few observations.Based on it, a forecast is made, which is compared with actual observations.Next, the model is adjusted according to the magnitude of the forecast error and is used again to predict the next level, until all observations are exhausted.Thus, it constantly "absorbs" new information, adapts to it, and by the end of the observation period reflects the current trend [9,10].The forecast is obtained as an extrapolation of the latest trend.In different forecasting methods, the process of setting up (adapting) the model is carried out in different ways.Basic adaptive models are:  Brown model [11];  Holt Winters model [6];  autoregression model [7].The first two models belong to the average mean scheme, the latter refers to the autoregression scheme [12].Numerous adaptive methods based on these models differ in the way of numerical estimation of parameters, determination of adaptation parameters and layout.
According to the moving average scheme, the assessment of the current level is the weighted average of all previous levels, and the weights in the observations decrease as they move away from the last (current) level, i.e., the information value of observations is greater the closer they are to the end of the observation period [13].
According to the autoregression scheme, the estimate of the current level is the weighted sum of the orders of the model's "p" of the previous levels.The information value of observations is determined not by their proximity to the simulated level, but by the closeness of the relationship between them [14 -16].Both of these schemes have a mechanism for reflecting the oscillating (seasonal or cyclical) development of the studied process.
Autoregressive Integrated Moving Average ( ARIMA) is a popular method for forecasting time series data using a single variable [17].The problem with ARIMA is that it does not support seasonal data.This is a time series with a repeating cycle.ARIMA expects data that is not seasonal or has a seasonal component removed, for example seasonally adjusted using techniques such as seasonal variance.This method supports direct modeling of the seasonal component of the series called Seasonal Autoregressive Integrated Moving Average SARIMA [14].It is an extension of ARIMA that explicitly supports univariate time series data with a seasonal component [17].The seasonal portion of the model consists of terms that are very similar to the non-seasonal components of the model, but include reverse shifts of the seasonal period [17].
Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects.It works best with time series that have strong seasonal effects and several seasons of historical data.Prophet is robust to missing data and shifts in the trend, and typically handles outliers well [18].
The purpose of the paper is to develop the adaptive methods of modeling and forecasting the time series based on a combination of the adaptive methods of predictive modeling:  Holt Winters model [19];  moving average model [20].Time series generally focus on the prediction of real values, called regression problems.Therefore, the performance measures in the paper will focus on methods for evaluating real-valued predictions.
The main contribution consists of the following:  the adaptive polynomial models used sequentially allow increasing the prediction accuracy;  the data interpretation algorithm for adaptive methods of modeling and forecasting time series is developed;  the comparison with Winters model and Tayle-Wage model shows a good quality of the proposed predictive model.
This paper consists of several sections.In the Methods and means section, the data interpretation algorithm for adaptive methods of modeling and forecasting time series is given.The next section presents results of calculation and data interpretation.The last section concludes this paper with a possible solution to appraisal technique.

II. METHODS AND MEANS
The time series in adaptive models are presented in Formula 1:  =   ,  , … ,  ,  +  , where t -time indicator;  ,  , … ,  -coefficients of the adaptive model at the moment of time t.
Depending on the shape of the trend and the presence or absence of a periodic component, a certain type of adaptive forecasting should be chosen.To do this, you need to find the optimal value of the smoothing parameters ,  ,  .They should be used to calculate the coefficients ,  , … ,  .
If the smoothing parameters change, the prediction error increases.However, this approach will not bring the quality of forecasting.The research proposes an algorithm for determining the optimal values of smoothing parameters.
Also, it is important to analyze the effectiveness of the adaptive approach in other methods.Therefore, it is proposed to develop an algorithm that allows you to take into account the accuracy of the forecast, the complexity of the model, and its adequacy and compliance with the object under study.
There are two groups of adaptive models: linear and seasonal.
According to Formula 2, the forecast of linear growth models is shown [35]: where  -the number of steps of the forecast;  ,  -the coefficients of the adaptive model at a moment of time t.
Adaptive models of linear growth include the Holt model, the Braun model, and the Box-Jenkins model.The difference between linear growth models lies in finding the parameters  ,  [35].
The parameters of the Holt model are found in Formula 3: Formula 4 presents the calculation of parameters according to the Tayle-Vage model [35]: VOLUME 22(2), 2023 where  ,  ,  are the smoothing coefficients that take values from 0 to 1,  -the real value of the series level at t-th step,  − the predictive value at t-th step,  -the error at the t-th step.
Characterizing the calculation of the parameters of Formulas 3-4, it is possible to highlight a certain feature of adaptive models.It is necessary to calculate  ,  at each step.In order to receive better results from the model, it is necessary to find  ,  ,  , which will most closely correspond to the time series.
The adaptive mono-parameter Brown model is used for stationary time series based on simple exponential smoothing: where  is prognostic value of time series level in time (t+1),  is exponential mean,  is adaptation coefficient,  is current time series value.
Here, the model value is the weighted average between the current true value and previous model values.Weight  is also called the smoothing factor.It determines how quickly we will "forget" the last available real observation.The smaller , the more influence the previous model values have, and the smoother the series.
Taking the adaptation coefficient α and the warning period τ, it is necessary to approximate the series using an adaptive polynomial model.
The 3. Repeat step 2 for all values in dataset.

Procedure 2.
So far, we have been able to get from our methods at best a forecast only one point ahead (and still we nicely smooth the series), this is great, but not enough, so we move on to the expansion of exponential smoothing, which will make the forecast two points forward (and also it is nice to smooth out a number).
This will help us to divide the series into two componentsℓ (level, intercept) and b (trend, slope).We have predicted the level, or expected value of the series using previous methods, and now the same exponential smoothing can be applied to the trend, naively or not very much believing that the future direction of a change in the series depends on the weighted previous changes.The idea of this method is to add the third component, that is, seasonality.Accordingly, the method can be applied only if a number of this season is not deprived, which in our case is true.The seasonal component in the model will explain the repetitive fluctuations around the level and trend, and it will be characterized by the length of the season, i.e., the period after which the repetition of fluctuations begins.For each observation in the season, a component is formed, for example, if the length of the season is 7 (for example, weekly seasonality), then we get 7 seasonal components, one by one for each day of the week.
Therefore, a new system is defined: The algorithm is the following: , where y is initial dataset, L is the length of season in our case we set it to count weeks and s is a number of seasons., where m is the number that indicates how many steps forward, we want to predict.
The level now depends on the current value of the series except for the corresponding seasonal component, the trend remains unchanged, and the seasonal component depends on the current value of the series except for the level and the previous value of the component.Now, having a seasonal component, we can predict not one, not even two, but arbitrary m steps forward.

III. RESULTS
Dataset consists of the dynamics of shares of a company for 25 days [21,33].
The time series xt of some economic indicator consisting of n observations will be analyzed.
In Pandas [22] there is a ready implementation -DataFrame.rolling(window).The more we set the width of the interval, the smoother the trend will be.If the data is very noisy, which is especially common, for example, in financial terms, such a procedure can help us see common patterns.

A. ADAPTIVE ZERO ORDER POLYNOMIAL MODEL
The exponential mean has the form [23]: Taking the adaptation coefficient α = 0.5 and the warning period τ = 1, it is necessary to approximate the series using an adaptive polynomial model [7 -10].
The initial condition for the first five observations is given as follows: S = a , , where a , is an average value, for example, the first five observations: The forecast model value with the warning period τ will be determined from the relation: x * = S = 511.The error is determined by formula 9: Using Formula 8 and the accepted value of α = 0.5, calculation is performed.We have made a forecast for one step forward, but it cannot be considered optimal.To obtain an adequate forecast, it is necessary to choose such a value of α that the sum of the squares of the deviations and the error of the forecast was minimal.To determine the optimal value of α, tabulate it from 0.1 to 0.9 in steps of 0.1.Then each time we substitute it in the calculation model to obtain the forecast and the magnitude of the error.Thus, the value of α is selected at which the error will also be minimal.
The distribution of the prediction error with respect to the parameter α is shown in Figure 1.

Figure1. Dependence of forecasting error on α
Figure 1 shows that the optimal value for the zero-order model is α = 0.4, which is determined on the basis of the minimum total error E = 8.85.The results of the forecast are shown in Figure 2. Numerical forecasting values are shown in Table 2.

B. ADAPTIVE FIRST-ORDER POLYNOMIAL MODEL
First, according to the time series xt, we find the LSM (Least Squares Method) [24,34] estimate of the linear trend: x = a + a t.Suppose, a , = a and a , = a .To find the coefficients a , and a , on the graph of the time series x , the trend line is added (Figure 3).In our case, the trend equation has the form: where  , =   =  and  , =   = ..where β=1-α.
Hence the initial conditions are the following: The estimation of the model (predicted) value of the series with the warning period τ is equal to The results are shown in Figure 3.The results of calculation are given in Table 3. Error value is lower than for parameters presented in Table 2.  Based on this, the time series is given as: The results of the calculations are shown in Table 3.For analyzed dataset, the predicted values are first calculated at α = 0.5 and τ = 1.
Next, it is necessary to determine the optimal value of α, based on the consideration of the minimum total error.To do this, as in the first model, a value of α with the minimum total error is selected.
Figure 4 shows the results of determining the optimal smoothing parameter.The results of forecasting at the selected optimal value of α are shown in Figure 5. Thanks to this method, we obtained a smoother series, based on which we were able to calculate predictions for 1 step forward.

C. ADAPTIVE SECOND ORDER POLYNOMIAL MODEL
According to the time series xt, we find the LSM estimate of the parabolic trend [25,26,34]: x = a + a t + a t .For the second-order model, the equation of the parabolic trend has the following form (see Figure 6): x = 515.96− 2.79t + 0.15t , a , = a = 515.96;a , = a = −2,79; a , = a = 0.15  From the graph it is seen that the optimal α is 0.25, as at this value we get the smallest error.
The initial conditions are determined by the following formulas: The estimate of the model (prediction) with the warning period τ is found from the expression: x .
Next, we determine the optimal value of the smoothing coefficient (see Figure 7).Taking into account the optimally obtained value α = 0.25 (E = 9.06) the forecast is given (see Figure 8).Next, the proposed model will be compared with the existing adaptive models.The Winters model and Tayle-Vage are analyzed.

D. FORECASTING USING THE WINTERS MODEL (EXPONENTIAL SMOOTHING WITH MULTIPLICATIVE SEASONALITY AND LINEAR GROWTH)
This model is convenient to use with a small amount of initial data.The seasonal model of Winters with linear growth has the following form: x = a , f + ε , where x -original time series t = 1, 2, ..., n; a , -the parameter characterizes the linear trend of the process, i.e., the average values of the level of the studied time series x at time t; f seasonality factor for v phase of the k -th cycle; v = 1,2, . . ., l , where v = t − l(k − 1); l -the number of phases in the full cycle (in monthly time series l = 12, in quarterly l = 4, etc.); εt -random error.It is usually assumed that the vector ε = N (0, σ I ), where ε = (ε , … , ε , … , ε ) ; I -unit matrix with size of (n × n).
The adaptive parameters of the model are estimated using a recurrent exponential scheme according to the time series xt, consisting of n observations: where a , -the increase of the average level of the series from the moment t -1 to the moment t; x * = x (t) -the calculated value of the time series, which is determined for the time t with the warning period τ, i.e., according to the moment (t -τ); α , α ,α , -parameters of adaptation of exponential smoothing, and (0 <α , α , α <1).
The increase in α (j = 1,2,3) leads to an increase in the weight of later observations, and a decrease in αj leads to an improvement in the smoothing of random deviations.These two requirements are in conflict, and the search for a compromise combination of values is the task of optimizing the model.
Exponential alignment always requires a preliminary estimate of the smoothed value.When the adaptation process is just beginning, there should be initial values prior to the first observation.In our task it is necessary to define initial conditions: a , ;a , ;f , , where v = 1,2, l.Thus, the calculated values of x * are a function of all past values of the original time series xt, parameters α , α and α initial conditions.The influence of the initial conditions on the calculated value depends on the value of the weights αj and the length of the series preceding the moment t.Impacts of a , ;a , usually decrease faster than f , , a , and f , are reviewed at each step, but f , only once per cycle.From the presented graph we can conclude that the model of exponential smoothing with multiplicative seasonality of Winters is better than the regression model, but worse than the proposed adaptive model.The forecast results of Winters can be improved by selecting the optimal values of α.

E. PRODUCTION FORECAST BASED ON THE TAYLE-WAGE MODEL
The additive modeling [26,35,36], which has an independent value in economic research, is also interesting because allows you to build a model with multiplicative seasonality and exponential tendency.This requires the replacement of the values of the initial time series by their logarithms, which converts the exponential trend into a linear and same time multiplicative seasonal model into an additive.
Suppose the observation x refers to the v -th phase of the k -th cycle, where v = t -l (k -l), l is the number of phases in the cycle (for the quarterly time series l = 4, and for the monthly l = 12).
The model with additive seasonality and linear growth can be represented as x = a , + g + ε a , = a , + a , , where x -the average value of the level of the time series at time t after excluding seasonal fluctuations; a , -additive growth rate from time t-1 to time t;g -additive seasonality factor for the vt-th phase of the kt-th cycle; ε -white noise.
First, on the time series xt, which contains n = 8 observations, we find the LSM -an estimate of the linear regression equation: We will perform calculations for adaptation parameters α1 = 0.1; α2 = 0.4; α3 = 0.3 and the warning period τ = 1.
According to the formula for t = 1 we have: As estimates g , takes the average values of the deviations ∆ = x − x , corresponding to the vt-th phase of the original time series, where v = 1, 2, . . ., l.
Calculated according to the Tayle-Wage model, the values of the time series x * are presented in Figure 11, where they are presented with the original time series x .
Figure11.Forecasting results using the Tayle-Wage model The graph shows that our forecast is not that far from the original series and that it maintains the trends.
The comparison of the proposed forecasting model DIAAMMFTS with existing models is given in Table 4. Mean Squared Error (MSE) [29 -30] is used for all the models.

IV. CONCLUSIONS
In this work the different adaptive methods are analyzed.The Data Interpretation Algorithm for Adaptive Methods of Modeling and Forecasting Time Series (DIAAMMFTS) is developed in the paper.This method is based on 5-steps procedure and shows promising forecast skill.Also, we have implemented a program that builds models using these methods.Based on the obtained results and the characteristics of the models calculated by the program, the results are analyzed and a comparison of the methods used in the work was carried out, on the basis of which a conclusion is made about the most efficient models for each specific situation.
The results of this work are as follows: time series is investigated and characteristics that affect the adequacy and accuracy of models are identified; characteristics of time series dynamics that influence the choice of forecasting model are determined; new data interpretation algorithm for adaptive methods of modeling and forecasting time series is developed; the comparison with Winters model and Tayle-Wage model shows a good quality of the proposed predictive model; a program is implemented that builds models and calculates forecasts by adaptive methods; the adaptive polynomial models used sequentially allow increasing the prediction accuracy.
The implemented program showed good results, which allows us to conclude that these adaptive models are effective in predicting economic or conventional computational processes.
The model of exponential smoothing with multiplicative seasonality of Winters is better than the regression model, but worse than the proposed adaptive model.The forecast results of Winters can be improved by selecting the optimal values of α.

1 : 2 : 3 :
Data Interpretation Algorithm for Adaptive Methods of Modeling and Forecasting Time Series (DIAAMMFTS) is developed in the paper.DIAAMMFTS consists of the following steps: Procedure Zero order (р = 0); Procedure First order (р = 1); Procedure Second order (р = 2); Procedure 4: Assess the accuracy and quality of forecasts; Procedure 5: Make a forecast.All procedures of DIAAMMFTS are presented below.Procedure 1. Procedure 1 developed as sequence of the following steps: 1.Let y = y .2. Append arrayy using following formula: y = α * y + (1 − α) * y − 1, where y is an actual value and y is previous number from prediction array.

6 .
Using this formula, the time series is given as below: 495.6 = 499.2.

Figure 4 .
Figure 4. Determination of the optimal value of α

Figure 5 .
Figure 5. Forecasting results based on a first-order polynomial model (p = 1)

Figure 8 .
Figure 8. Forecasting results based on a second-order polynomial model (p = 2) First, by n = 8 observations of the time series xt we find the LSM estimate of the linear trend x = a + a t.As a result of the calculation, we have x = 492.46− 8.5476 * t.Next, the initial conditions are defined: a , = a = 492.46;a , = a = −8.5476.Multiplicative zero-cycle seasonality coefficients [35] f , are defined as the arithmetic mean of seasonality indices x x ⁄ for v -th phase in the original time series:

Table 1 .
Predicting the time series xt one step further (adaptive polynomial model of zero (p = 0) order)

Table 2 .
(2) results of the forecast at α = 0.4In the Table2the results of the forecast are given.They are not much different from our original series.VOLUME 22(2), 2023

Table 3 .
The results of calculations of the predicted model at α = 0.5

Table 4 .
The comparison of forecasting models The error values are in squared units of the predicted values.A mean squared error of zero indicates perfect skill, or no error.