## 2 Literature Review
### Bibliometric Review
A forecasting model that provides accurate predictions but takes excessive time to train or generate forecasts may be impractical in such contexts. The decision-making process may require forecasting models that can deliver timely responses, enabling organizations to react adequately to emerging trends, seize opportunities, and mitigate risks effectively. To extend the comparison between the models regarding their time performance, each was timed during training (with data of 215 months) and predicted (up to November 2033) 25 times, not considering exogenous variables. The resulting average execution time is shown in Table 9, along with the measurement margin of error, using Equation (5), and the consequent confidence level. Figure 15: Energy consumption endogenous forecasting for up to November 2033, using models in their optimal training window sizes, as according to Figure 10. The gray shades represent the upper and lower limits of the FB Prophet model. \[Margin\ of\ Error=z_{a/2}\frac{\sigma}{\sqrt{n}} \tag{5}\]

The time performance tests were conducted using a computer with 12.7 GB of RAM and an Intel(R) Xeon(R) CPU running at 2.20 GHz. No GPU was used. ## 6 Conclusions

Precise forecasting in the energy sector is crucial for the achievement of sustainable development objectives in three key areas: making available cost-effective, dependable, and up-to-date energy utilities, exploring alternative energy sources, and improving energy efficiency. This study seeks to meet this objective by comparing the performance of different forecasting models in the Brazilian energy sector. The analysis assesses Seasonal Autoregressive Integrated Moving Average (SARIMA), Facebook Prophet (FB Prophet), Holt-Winters, and TBATS, in handling the intricate dynamics of energy demand in Brazil. The results reveal that each model displays distinct strengths and weaknesses. As noted earlier, SARIMA excels in tracing seasonal patterns but may struggle to deal with irregular fluctuations. Facebook Prophet shows promising outcomes in different sectors. However, it requires careful examination of specific datasets and contextual factors when conducting an analysis. Holt-Winters is adept at handling seasonal variations but may encounter difficulties when faced with abrupt changes in demand. In contrast, TBATS shows flexibility when managing diverse seasonal patterns but requires a considerable amount of historical data and may face challenges in making long-term projections. Furthermore, account was taken of the influence of external variables on energy consumption, such as economic indicators, industrial factors, and climatic conditions. This investigation seeks to elucidate the connecting links between these factors and energy consumption through Granger causality tests and correlation assessments. Additionally, the research investigates the persistence of energy consumption patterns, by highlighting enduring trends in trend components and non-persistent behavior in residual components. The precision and effectiveness of the forecasting models are evaluated, in both univariate and multivariate scenarios. The performances of SARIMAX and FB Prophet are assessed in terms of their accuracy in integrating external variables and enabling practical applications. Thus, this study seeks to contribute to advances in energy demand prediction, by allowing well-informed decision-making in sustainable energy planning, resource allocation, and policymaking and, thus, assists in achieving SDG7 and its related objectives. Our findings indicate that, although FB Prophet achieved the best general accuracy metrics, its residuals still present autocorrelation, which implies a lack of fit of the model. Upon restricting the accuracy evaluation to the models that do not present autocorrelation in the residuals, it is noted that SARIMA is found to return the best MAPE values for the univariate forecasting, with 1.38%, as opposed to the 1.91% from FB Prophet.