Examples of a modern ARIMA algorithm from scratch? Where can I find a modern/robust algorithm for the fitting of an ARIMA model? Or in other words, if one were to implement an ARIMA model from scratch in 2021 what would be the most correct/efficient algorithm?
I have been looking into a number of different ARIMA implementations.

*

*C: ctsa

*Julia: ARIMA.jl

*Python: statsmodels.tsa.arima.model

*R: arima.c
All of these sources differ a good deal in lines of code from 36 in Julia to 1660 in ctsa. Also, of these scripts listed above none of their implementations are the same.
It seems that there are statespace implementations, but I remember reading that not all statespace models are arima and not all arima are statespace. If this is true I would want to avoid a statespace implementation. AS154[1] seems like one of the first algos, but it looks like it is fitting an ARMA and it is using Kalman filtering. If my understanding is current, I think we are estimating ARIMA with maximum likelihood. Are their any recent papers or old papers that are considered the gold standard which lay out the ARIMA fitting algorithm?
[1]: Gardner, G, Harvey, A. C. and Phillips, G. D. A. (1980). Algorithm AS 154: An algorithm for exact maximum likelihood estimation of autoregressive-moving average models by means of Kalman filtering. Applied Statistics, 29, 311--322. 10.2307/2346910.
 A: I would go for auto.arima() in the forecast package for R, or the more recent ARIMA() in the follow-up package fable. This is not the most recent implementation (the relevant paper is Hyndman & Khandakar, 2008), but:

*

*It has been the workhorse for academic and practical forecasting for the last decade. Any bugs or systematic weaknesses must have been purged by now. Searching for auto.arima on CV currently yields 1245 hits.

*There is still some development going on, most recently a change to the algorithm for setting the seasonal differencing order.

*The lead author is Rob Hyndman, who is pretty much the guru of forecasting. Seriously, I know of very few people whose implementation of an ARIMA algorithm I would trust more than Rob's. Look at his contributions here, and note that he spent many years as the chief editor of the International Journal of Forecasting. When Rob speaks, forecasters listen. If he found a better way to fit an ARIMA model, it would be in his packages before the rest of us would even know about it.

