Skip to content

thomaspinder/research future dev#33

Open
thomaspinder wants to merge 28 commits intomainfrom
thomaspinder/research-future-dev
Open

thomaspinder/research future dev#33
thomaspinder wants to merge 28 commits intomainfrom
thomaspinder/research-future-dev

Conversation

@thomaspinder
Copy link
Copy Markdown
Owner

  • docs: add Tier 1 extensions design for Impulso
  • docs: add Tier 1 extensions implementation plan
  • test: add tests for VARData.with_dummy_observations()
  • feat: implement VARData.with_dummy_observations()
  • fix: add exog test coverage and n_lags docstring for dummy obs
  • test: add tests for ConjugateVAR
  • feat: add ConjugateVAR with direct NIW posterior sampling
  • refactor: extract shared NIW param computation, use conftest fixture
  • test: add tests for GLP hierarchical prior selection
  • test: add tests for long-run Blanchard-Quah identification
  • feat: add Blanchard-Quah long-run identification
  • test: add ForecastCondition and conditional forecast tests
  • feat: add conditional forecasting on FittedVAR
  • feat: add conditional forecasting on IdentifiedVAR
  • fix: add input validation to LongRunRestriction.identify()
  • fix: add type annotations and exog_future guard for conditional forecast
  • fix: address final review findings
  • docs: add Tier 1 documentation design
  • docs: add Tier 1 documentation implementation plan

thomaspinder and others added 21 commits March 8, 2026 23:27
Design for integrating 5 foundation features: Conjugate Gibbs Sampler
(ConjugateVAR), Dummy Observation Priors, Hierarchical Prior Selection
(GLP), Long-Run Restrictions, and Conditional Forecasting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TDD implementation plan for 11 tasks across 5 layers: dummy observation
priors, ConjugateVAR with NIW sampling, GLP hierarchical prior selection,
Blanchard-Quah long-run restrictions, and conditional forecasting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 tests covering sum-of-coefficients and single-unit-root dummy
observation priors, including shape checks, value correctness,
immutability, and input validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add sum-of-coefficients (mu) and single-unit-root (delta) dummy
observation priors following Doan, Litterman & Sims (1984) and
Sims (1993). Returns a new VARData with dummy rows appended.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Addresses code review: missing test for exog zero-padding and
clarifies that n_lags is validated for API consistency but not
used in the dummy value computation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract _build_niw_params() to eliminate duplication between fit() and
  _log_marginal_likelihood() (addresses code review I1/I4)
- Replace stable_var_data fixture with var_data_2v from conftest (I2)
- Add reference to Kadiyala & Karlsson (1997) in docstring (I3)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements Waggoner & Zha (1999) hard constraint algorithm for
conditional forecasts on the reduced-form posterior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extends conditional forecasting to structural VARs with optional
shock path constraints alongside observable variable constraints.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Guard for missing 'B' in posterior (raises ValueError)
- Validate ordering contains only known variable names

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add list[ForecastCondition] type annotations to method signatures
  in fitted.py and identified.py (TYPE_CHECKING imports)
- Raise NotImplementedError when exog_future provided with
  shock_conditions in IdentifiedVAR (I2 - silent data loss)
- Keep bare list for Pydantic field in ConditionalForecastResult
  to avoid model_rebuild issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove dead optimize_dummy parameter from ConjugateVAR.optimize_prior()
- Add ordering length validation to LongRunRestriction.identify()
- Add error-path tests for LongRunRestriction (missing B, unknown vars, wrong length)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 93.91534% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.3%. Comparing base (5462cf5) to head (2bf00ae).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/impulso/conjugate.py 91.7% 8 Missing and 4 partials ⚠️
src/impulso/identified.py 89.8% 4 Missing and 4 partials ⚠️
src/impulso/fitted.py 95.7% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main     #33     +/-   ##
=======================================
+ Coverage   88.2%   90.3%   +2.0%     
=======================================
  Files         17      19      +2     
  Lines        657    1035    +378     
  Branches      68     127     +59     
=======================================
+ Hits         580     935    +355     
- Misses        58      72     +14     
- Partials      19      28      +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

thomaspinder and others added 7 commits March 9, 2026 09:01
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…my obs theory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants