## 2 Materials and Methods
### Deterministic Decomposition Time Series Model  
Time Series Analysis (TSA) is commonly performed by analyzing the time series both in time and frequency. In the time domain, the more interesting features are the time slope, the ratio of past/present, the memory of the series, the autocorrelation of the data, etc. On the other hand, in the frequency domain, the aim is to decompose the time series into its fundamental periodic components, each of them characterizing the signal and representing a seasonal behavior. Time series have different components: the trend represents the long-term behavior of the data and can be detected with regressive methods. Seasonality is the short-term periodicity, the repetition of a given phenomenon that cyclically affects the data and can be pointed out with autocorrelation studies and lag detection. Finally, the random component represents the non-deterministic part of the series, the unpredictable feature of the physical phenomenon.  
\[A_{t}=D_{t}+e_{t} \tag{1}\]  
\(A_{t}\) is the actual data measured in a period \(t\), and \(D_{t}\) is the multiplication of trend and seasonality. The random component \(e_{t}\) represents any casual variation from the trend and the seasonality of the time series that cannot be predicted a priori with any deterministic formula. For these reasons, the latter component can be only \"estimated\" but not \"predicted\". The Deterministic Decomposition Time Series Analysis model (DD-TSA) here presented in this paper is aimed at the prediction of the deterministic part of the series, i.e., trend and seasonality, with the following formula:  
\[\hat{D}_{t}=(b_{0}+b_{1}t)\overline{S}_{i} \tag{2}\]  
where \(b_{0}\) is the intercept, \(b_{1}\) is the slope of the trend line and \(\overline{S}_{i}\) is the seasonal coefficient. To visualize the trend, a linear regression on the calibration dataset and the seasonal coefficient is performed, according to what the authors reported in [40]. The parameters of the calibration are reported in Tables 6 and 7.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Test** & **Test Statistic** & **\(\mathbf{d}\)** & \(\mathbf{p}\)**-Value** \\ \hline Augmented & \(-3.8\) & \(10\) & \(0.02\) \\ Dickey–Fuller & \(-15.9\) & \(7\) & \(0.01\) \\ Phillips–Perron & \(-15.9\) & \(7\) & \(0.01\) \\ \hline \hline \end{tabular}
\end{table}
Table 4: Ljung–Box test performed on calibration dataset.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Test** & **Test Statistic** & \(\mathbf{d}\)** & \(\mathbf{p}\)**-Value** \\ \hline LWG & 46.1 & 2 & \(9.77\times 10^{-11}\) \\ TLG & 47.0 & 2 & \(6.15\times 10^{-11}\) \\ \hline \hline \end{tabular}
\end{table}
Table 5: Lee–White–Granger (LWG) and Terasvirta–Lin–Granger (TLG) tests for linearity performed on the calibration dataset.  
Given the output of this model, the residuals \(e_{t}^{*}\) can be calculated as the difference between the actual data and the DD-TSA output:  
\[e_{t}^{*}=A_{t}-\tilde{D}_{t} \tag{3}\]  
The \(e_{t}\) of the DD-TSA process are used to train an artificial neural network (ANN). In particular, the neural network here implemented is a feedforward backpropagation network: it is a multilayer perceptron model largely adopted and documented in the literature. The network was developed in the Matlab R-2018 framework, using the Neural Network 2019\(b\) Tool.