ARMA algorithm