Repository navigation
Open
Milestone
Description
Collection of follow-ups to #5827. These can/should be broken out into individual PRs. Many are relatively straightforward and would make a good first PR.
General
- Documentation (none was added in original PR).
- Release notes.
- Example notebook.
- Double-check how
sm.tsa.arima.ARIMAworks withfix_params(it should fail except when the fit method isstatespace). - Estimators that do not support seasonal models per se should support models where the only seasonal part is seasonal differencing.
GLS
- Add support for fixed parameters
- Improve "Returns" documentation for
other_results. - Add documentation for why we have e.g.
include_constantbut not other trend specifications (e.g. that it is to maintain consistency with estimation methods with assumptions that require demeaned series). - Fix the following test and put it back into the GLS test suite:
@pytest.mark.low_precision('Test against Example 6.6.3 in Brockwell and Davis'
' (2016)')
# @pytest.mark.xfail(reason="Source appears to find suboptimal parameters")
def test_brockwell_davis_example_663():
# TODO: the parameters described by BD appear to be suboptimal (based on
# llf computed from state space form), so that this test fails. Should try
# to confirm with ITSM2000 (i.e. see if we can get it to find better
# parameters closer to what we find, or compare llf, or something).
# TODO: quite a slow test, and xfail anyway due to finding better
# parameters...
# Get the data, perform seasonal differencing
endog = sbl.diff(12).iloc[12:]
exog = pd.Series((sbl.index > '1983-01-01').astype(int),
index=sbl.index).diff(12).iloc[12:]
res, _ = gls(endog, exog, order=(0, 0, 12), max_iter=3)
assert_allclose(res.exog_params, -328.45, atol=1e-2)
assert_allclose(res.ma_params,
[.219, .098, .031, .064, .069, .111, .081,
.057, .092, -0.28, .183, -.672], atol=1e-3)
assert_allclose(res.sigma2, 12581, atol=1)Hannan Rissanen
- Better warnings / errors when series are short relative to lag length
- Add support for fixed parameters
- Seems like we could add support for seasonal parameters in this model.
- Tests for the case with the bias-corrected estimator.
Innovations MLE
- Add support for fixed parameters
Innovations algorithm
- Add support for ARMA models; see Brockwell and Davis (2016) p.154 and Example 5.1.6. This estimator should be feasible given the Cython versions of the general innovations algorithm that introduced in PERF: Cythonize innovations algo and filter #5947.
Reacted by Emil Mirzayev
Activity
rajathpatel23 commentedon Sep 15, 2019
@ChadFulton I would like to work on this enhancement, would like to request some help in guiding to start working on this enhancement.
Thank you
ChadFulton commentedon Sep 16, 2019
@rajathpatel23 that would be great, thanks!
There are a number of things here that I think should be pretty self-contained, including:
If you have a particular interest, I can go into more details.
emilmirzayev commentedon Sep 18, 2019
Hi Chad,
How one can add examle Notebooks?
Which directory I should put them?
Thanks,
bashtage commentedon Sep 18, 2019
Three steps to add a notebook:
I like the format that @ChadFulton uses with the title. I used it here: https://github.com/statsmodels/statsmodels/blob/master/docs/source/_static/images/rolling_ls.png
bashtage commentedon Sep 18, 2019
NB: The json file determines where the example notebook appears in the docs, so please add in the correct section.
8 remaining items
Merge pull request #9811 from imann128/feature/arima-seasonal-diff-su…
harshhh817 commentedon Jul 1, 2026
Hi @ChadFulton — I'd like to work on the 'better warnings/errors for short series' item under Hannan-Rissanen. Is that still open? I have a background in data analysis / feature engineering and this seems like a good scoped starting point.
anish19p-spec commentedon Nov 7, 2026
Hi @ChadFulton, I'd like to contribute, can you point me in the right direction?
ChenyangLi4288 commentedon Nov 9, 2026
Hi @ChadFulton @bashtage, I'd like to take the Hannan-Rissanen item "Tests for the case with the bias-corrected estimator".
Current tests only check that
unbiased=Nonematchesunbiased=True. I plan to compute the step-3 correction from Brockwell & Davis (2016) §5.1.4 independently with numpy for a simulated ARMA(1,1) and asserthannan_rissanen(..., unbiased=True)matches.Side note: the GLS
other_resultsdocs (#9881) and innovations MLE fixed params (#9845) items are done and can be checked off.I'll open a PR in a few days unless you'd prefer a different approach.
bashtage commentedon Nov 9, 2026
Sure, please go for it.
ChenyangLi4288 commentedon Nov 9, 2026
Thanks! One thing came up while writing the test: it fails on main. In step 3, W is computed as
i.e.
(1 − θB)Z, but the Gauss-Newton derivation givesθ(B)W = Z. JDemetra+'s Hannan-Rissanen (biascorrection()) also uses the recursive form. The fix is one line,W = lfilter([1], ma_coef, Z).I'll include the fix in the same PR as the test, since the test can't pass without it.
DOC: Tighten the ARIMA GLS notes on constants and trends in integrate…
DOC: Move and complete the release note for the ARIMA GLS docs
anish19p-spec commentedon Nov 10, 2026
@ChenyangLi4288 @bashtage , are there any other issues I can wokr on?
BUG: Use recursive filter for W in Hannan-Rissanen bias correction
fcarvajalbrown commentedon Nov 24, 2026
I went through the GLS checklist looking for something to pick up, and two of the boxes turned out to be finished already, they just never got ticked.
If someone with rights can tick both, the list tells the truth again. What's left in GLS that needs code is the Brockwell-Davis 6.6.3 test.
jjohnnystwsss commentedon Nov 26, 2026
Hi @ChadFulton and @bashtage, I'd like to work on the last item in the list, which is preliminary estimation of ARMA parameters using the innovations algorithm. I've looked through recent PRs, and nobody seems to be working on it.
My plan is to extend the innovations estimator to support ARMA models so that
ARIMA.fit(method="innovations")also works with AR terms. For testing, I plan to check against Example 5.1.6 in Brockwell & Davis and verify that the algorithm recovers the true parameters from theoretical autocovariances.Would you prefer a new function or additional arguments to
innovations(), and what would be a reasonable default value form? Would these two approaches be sufficient for validation?bashtage commentedon Nov 26, 2026
The best approach would be to do what the others have done so that the API will be consistent in terms of the other approaches as well as the keyword version.
ENH: Add ARMA estimation to the innovations estimator
Duke2nuke commentedon Nov 28, 2026
Hi, I’m Aarambh, a 3rd year CSE student prepping for GSoC 2027. I was reading through this list and a few of the smaller items caught my eye, like the better warnings when a series is short for the Hannan-Rissanen estimator. Are any of these still open, and is there one you’d suggest as a first PR? Happy to start with one small piece rather than the whole list.