# Time series forecasting

A time series is a time-ordered value of a predicted quantity. In practice, time series forecasting is most often used because of the availability of the initial data and the obviousness of the way to obtain a solution. To predict using regression or other models, it is necessary first, on the basis of theoretical ideas, to outline a circle of independent variables – candidates for inclusion in the model, to assess the complexity of obtaining their initial values, then, based on an assessment of the degree of influence on the predicted value, select the most informative ones and only then build a model for subsequent forecasting. In the case of forecasting by time series, everything is quite obvious – there is data on the value of the projected value in the past and only needs to be extended into the future.

In most cases, uniform time series are used for forecasting purposes, i.e. time series in which the studied value is measured at regular intervals – daily, weekly, decadal, monthly, etc. time series. For the convenience of subsequent analysis, time series are usually renumbered, i.e. the earliest date is assigned the number 1 and further in ascending order. Such time series will denote , where is the number of the time series point.

In its most general form, a time series can be represented as a combination of a trend, seasonal (periodic) fluctuations, non-periodic fluctuations, and a random component. Non-periodic oscillations, if any, are usually of a complex nature, a combination of several oscillations of different or even variable periodicity and variable scope. To establish the very fact of the presence of non-periodic oscillations, and even more so to reliably determine their parameters, time series of long duration, which are rarely found in practice, are required, and therefore the methods for determining them are not considered in this manual. Elements of non-periodic oscillations, if any, we will consider as one of the possible components of the random component. In this formulation, the task of time series forecasting is to determine the parameters of seasonal fluctuations and trends and their subsequent use for the purpose of predicting future values of the time series.

A trend or trend is a long-term pattern of change in the quantity under study over time. The seasonal component is periodic fluctuations that have a relatively stable period of fluctuations over a sufficiently long period of time. More accurate results of determining the trend are achieved if seasonal fluctuations have already been removed from the initial time series, so we will first consider methods for identifying and subsequently isolating seasonal fluctuations.