The code is attributed to time series analysis and forecasting from the books "Time Series Analysis and Its Application"