Skip to content

BUG-0003, BUG-0034, BUG-0035: the .inp path's -deseason, -estwin and -diag are the C's - #40

Merged
davidesg merged 3 commits into
masterfrom
bug-0003-c
Nov 28, 2026
Merged

davidesg merged 3 commits into
masterfrom
bug-0003-c

Conversation

@davidesg

@davidesg davidesg commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Port side of atsw-gui #229 (the C's BUG-0010). Merge after #229.

  • BUG-0003: the port has deseasonalized on the Box-Cox scale since 0.2.0, and now the C of record does too. BUG-0003 is marked fixed; deseason.py, tests/_bug0003.py (the frozen 0.4.1 still adjusts in levels, so it stays strict xfail), ARCHITECTURE.md §8 and HOMOLOGATION.md are updated.
  • BUG-0034 (fixed): -estwin estimates on the window, as the C.
    • estimate_w(estwin=) starts from all the data and maximizes the likelihood on the window only. It goes through the binding's g_estwin, which was already there but always 0, and through the pure-Python estimator.
    • The seasonal dummies are estimated on the window too.
    • .out, .forecast and .recursive all come from that one fit, as in the C.
  • BUG-0035 (fixed): the Wald blocks now index the diagonal elements with -diagar/-diagma. Before, the CLI died with an IndexError.
  • tests/test_deseason_as_the_c.py covers all 11 -deseason cases of the C's battery. With the compiled engine, logL, iterations, estimates and forecast table match line for line, and the recursive forecasts match to the sixth decimal. The fdhess standard errors are not compared; the reason is in the test (a 1e-13 data perturbation already moves them by up to 2.5 %).
  • homologation.json: new sha256 of the binding (drvarma_api.c/.h, the package's own files).
  • Local battery: 405 passed, 72 skipped, 6 xfailed.

cases.json records the C at f513c9c (the #229 head). I update it to the merge commit when #229 merges.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LHFMF3teQWFeXfDJVGj2p5

davidesg and others added 2 commits November 28, 2026 17:48
The C of record now deseasonalizes on the Box-Cox scale too (atsw-gui
engines/drvarma BUG-0010). tests/test_deseason_as_the_c.py: the C battery's
seven full-sample -deseason cases; with the compiled engine the port gives
the C's logL, iterations, estimates and forecast table line for line.

Found on the way, with or without -deseason, in the .inp CLI: -estwin fits
the whole sample for the .out (BUG-0034) and -diagar -diagcov dies in the
Wald blocks (BUG-0035). Both with repros.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHFMF3teQWFeXfDJVGj2p5
…es its .out, as the C

BUG-0034: estimate_w(estwin=) (the binding's g_estwin, there but always 0;
and the pure-Python estimator) takes the start from all of w and the
likelihood on the window, and returns the window's residuals. Model(estwin=)
estimates the seasonal dummies on the window; the .out, the .forecast and the
.recursive come from that one fit, as the C's writer.

BUG-0035: the Wald blocks index a lag's m diagonal elements with
-diagar/-diagma, as the C's test_last_*_significance.

tests/test_deseason_as_the_c.py now holds all 11 -deseason cases of the C's
battery: logL, iterations, estimates and forecast line for line, recursive
forecasts to the sixth decimal. homologation.json: the binding's sha256.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHFMF3teQWFeXfDJVGj2p5
@davidesg davidesg changed the title BUG-0003: -deseason is the C's again; BUG-0034 and BUG-0035 registered BUG-0003, BUG-0034, BUG-0035: the .inp path's -deseason, -estwin and -diag are the C's Nov 28, 2026
@davidesg
davidesg merged commit 750ec23 into master Nov 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant