Skip to content

nns_arma: lower prediction bound is LPM.VaR without abs() (book ch17, ch26) - #173

Closed
gitRasheed wants to merge 1 commit into
rasheed/book-meboot-driftfrom
rasheed/book-arma-pi-lower
Closed

gitRasheed wants to merge 1 commit into
rasheed/book-meboot-driftfrom
rasheed/book-arma-pi-lower

Conversation

@gitRasheed

@gitRasheed gitRasheed commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

The book gives the interval as [LPM.VaR(alpha/2, d, X), UPM.VaR(alpha/2, d, X)] of the bootstrapped forecast path (ch17:273-276, ch26:552). nns_arma took abs() of the LPM.VaR value, so for a series whose bootstrapped forecasts go below 0 the lower quantile turned positive, landed above the forecast, and the pmin with the estimates set the lower band equal to the forecast. We mirror OVVO-Financial/NNS#87, which makes R follow the book. That PR changes the method, so the R author may close it; if so, this slice should be dropped too.

Stacked on #172; merge with a merge commit.

Changes

  • Drop the abs(). For sin(t/2) * 5 - 10 + 0.5 cos(3t), t = 1..200, h = 6, the lower band went from equal to the estimates (first -10.74) to -11.34 -10.21 -9.28 -9.73 -6.59 -7.25.

Positive series are unchanged. The NNS.MC bootstrap and the lin.resid term stay as they were. The book has neither lin.resid nor the pmin/pmax clamp, and we leave both to the R author.

Tests

A new parity test with its NNS.ARMA.pred_int entry. The parity cache encodes R 13.3 plus the fixes in OVVO-Financial/NNS#73-#92. The nine NNS.VAR strict xfails stay until #174.

Mirrors OVVO-Financial/NNS#87
Part of OVVO-Financial/NNS#71

Review

GPT-6.1 Sol reviewed this slice and found nothing.

…r-bound)

Mirrors R's arma-pi-lower-bound branch (NNS.ARMA). The book gives the
interval as [LPM.VaR(alpha/2, d, X), UPM.VaR(alpha/2, d, X)] of the
bootstrapped forecast path (ch. 17 and 26). nns_arma took abs() of the
LPM.VaR value, so for a series whose bootstrapped forecasts go below 0
the lower quantile turned positive, landed above the forecast, and the
pmin with the estimates set the lower band equal to the forecast.
Positive series are unchanged. The NNS.MC bootstrap and the lin.resid
term stay as they were.

Before -> after, sin(t/2) * 5 - 10 + 0.5 cos(3t), t = 1..200, h = 6,
seasonal_factor=13, pred_int=0.95, seed 123:
  estimates  -10.74 -8.02 -5.79 -4.31 -4.79 -5.64
  lower      equal to the estimates
          -> -11.34 -10.21 -9.28 -9.73 -6.59 -7.25
New NNS.ARMA.pred_int entry for the new test.
@gitRasheed
gitRasheed force-pushed the rasheed/book-arma-pi-lower branch from e44704c to f8bca9c Compare November 2, 2026 23:09
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Incorporated through NNS R 14.0 integration #192, merged as bd19c3303222af46da79d8c97f258248eb5674d2. Verified exact head f8bca9cf91adb78dc7ae4d03df112c10035cff38 is an ancestor of main; original commits and authorship are preserved. The integration includes the subsequent R14 compatibility corrections and passed the complete GitHub Python 3.11-3.14 matrix. This supersedes the separate landing, not the work or review history.

@github-actions github-actions Bot closed this Nov 7, 2026
@github-actions
github-actions Bot deleted the rasheed/book-arma-pi-lower branch November 7, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant