Commit 0a2783a
Address PR #393 R0 P1: recompute path_cumulated_event_study post-bootstrap
CI reviewer flagged that the cumulated layer was built before the
bootstrap propagation block, so when n_bootstrap > 0 it surfaced stale
analytical SEs / t-stats / p-values / CIs while path_effects[path][l]
had been overwritten with bootstrap stats — a public-surface
inconsistency with the library-wide bootstrap contract.
Fix: move the _compute_path_cumulated_event_study() call to AFTER the
bootstrap propagation block at chaisemartin_dhaultfoeuille.py:3034-3081
(mirrors the global linear_trends_effects placement at :3405-3454).
The helper reads path_effects[path]["horizons"][l]["se"] which by then
is bootstrap-overwritten under n_bootstrap > 0, so cumulated SE
becomes a running sum of bootstrap per-horizon SEs.
Also addresses the P2 test-coverage gap with two new regressions in
TestByPathTrendsLinear:
- test_bootstrap_cumulated_uses_post_bootstrap_per_horizon_se: positive
case asserting cumulated SE == running sum of post-bootstrap per-
horizon SEs (rtol 1e-12).
- test_bootstrap_cumulated_nan_consistent_when_n_bootstrap_one:
n_bootstrap=1 case asserting cumulated SE / t_stat / p_value /
conf_int are all NaN per the library-wide NaN-on-invalid contract.
REGISTRY note updated with the post-bootstrap recomputation contract.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 88afbe4 commit 0a2783a
3 files changed
Lines changed: 142 additions & 23 deletions
File tree
- diff_diff
- docs/methodology
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2102 | 2102 | | |
2103 | 2103 | | |
2104 | 2104 | | |
2105 | | - | |
2106 | | - | |
2107 | | - | |
2108 | | - | |
2109 | | - | |
2110 | | - | |
2111 | | - | |
2112 | | - | |
2113 | | - | |
2114 | | - | |
2115 | | - | |
2116 | | - | |
2117 | | - | |
2118 | | - | |
2119 | | - | |
2120 | | - | |
2121 | | - | |
2122 | | - | |
2123 | | - | |
2124 | | - | |
2125 | | - | |
2126 | | - | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
2127 | 2112 | | |
2128 | 2113 | | |
2129 | 2114 | | |
| |||
3095 | 3080 | | |
3096 | 3081 | | |
3097 | 3082 | | |
| 3083 | + | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
3098 | 3119 | | |
3099 | 3120 | | |
3100 | 3121 | | |
| |||
0 commit comments