Seasonal Decompose

To calculate the prediction bounds, refer to the STL Decomposition.ipynb notebook, where we can investigate the option of adding the mean and the standard deviations of the residuals into the trend and seasonal components.

Calculating the lower band
lower = avg_over_time((mean_over_time(Residuals[5m:])-$Bound*stddev_over_time(Residuals[5m:]))[5m:]) + Trend + Seasonal Component
python
Calculating the upper band
upper = avg_over_time((mean_over_time(Residuals[5m:])+$Bound*stddev_over_time(Residuals[5m:]))[5m:]) + Trend + Seasonal Component
python

For an in-depth discussion of the SARIMA functions, see these external resources: