SPB Git

spb/wp46_uqo

Public
9.3 KB · 91 lines markdown
1# WP46 progress log23All times ET. "Done" means executed with the listed command and artefact; "planned" means not yet executed.45## Phase 0 — Inventory and literature (done 2026-11-09)6- Repository reconnaissance: `Recherche-UQO/` conventions (HARMONISATION.md), WP41 as the FinData template; folder7  `finance/wp46_garch_benchmark`, repo `gitsrv:srv/git/wp46_uqo.git` created 2026-11-09.8- FinData audit: `.venv/bin/python scripts/audit_findata.py` → `docs/findata_audit.md`, `results/manifests/findata_audit.json`9  (live API, 42 candidates, 0 errors). Dedicated API key `wp46_uqo_c` (scopes read:market, query, export; two earlier keys revoked).10- Literature: `scripts/build_references.py` → `paper/references.bib` (205 entries: 200 Crossref/arXiv/OpenAlex-verified + 5 manual URL),11  `docs/literature_matrix.md`, `results/metrics/references_verification.json` (1 unverified: Chung 1999, excluded).12- Gate 0: PASS (evidence-backed instrument list; no invented endpoints).1314## Phase 1 — Pre-registered protocol (done 2026-11-09, freeze tag `prereg-frozen`)15- `docs/preregistered_protocol.md`, `configs/{model_registry,forecast_protocol,study,instruments}.yaml`, `docs/methodology_decisions.md` (D-01…D-15).16- Disclosure: SPY 2024 forecast values (no losses) were inspected during driver smoke tests before the freeze (D-15);17  the pilot (Phase 2) used the validation period 2012–2015 only.1819## Phase 2 — Trusted data and pilot (done 2026-11-09)20- Ingestion on M3U96a: `scripts/ingest_bars.py --workers 3` (1-min + daily bars, 42 instruments + VIX/SPX; manifest21  `results/manifests/ingest_manifest.json` with dataset versions and SHA-256) — cache `M3U96a:~/wp46-cache/bars` (not in git).22- Panels: `scripts/build_panels.py` (3 runs: tz fix, per-instrument session length D-05, crypto cutoff D-06) →23  `~/wp46-cache/panels/*.parquet` on M3U96a, laptop and the 5 other compute nodes; `results/manifests/panels_manifest.json`.24- Tests: `pytest tests/unit tests/integration` (19 passed), `pytest tests/simulation -m slow` (5 passed after fixing the25  NAGARCH parameter index in the test), `pytest tests/replication -m r` (rugarch 1.5-6 cross-check PASS; `results/metrics/rugarch_crosscheck.json`).26- Pilot: `scripts/run_pilot.py --symbols SPY,AAPL` and `--symbols CL,EURUSD` (validation period) → `results/metrics/pilot/`;27  leakage check passed (future returns perturbed → forecasts unchanged).28- Gate 2: PASS (see `docs/feasibility_report.md`).2930## Phase 3–5 — Benchmark, realized/multivariate tiers, inference (in progress)31- Job list: `scripts/make_jobs.py --name main` → 3,276 jobs (42 instruments × 29 implemented models × distributions), OOS 2012-01-03 → 2026-10-30.32- Dispatch: `scripts/dispatch_nodes.py launch --jobs results/manifests/jobs_main.json --name main` (M3U96a/M3U96b/M2U64/M5M36/M4M64a/M4M64c).3334## Open issues35- FIGARCH: arch and rugarch differ by 1.47 log-likelihood units on the fixture (truncation/constraints) — caveat in the model card.36- Crypto realized measures unusable before 2022 (D-06): crypto Tier B / proxy-based evaluation covers 2022–2026 only.3738## Amendments after the freeze39- **A-01 (2026-11-09, during the main run):** the arch wrapper passed a seeded generator only for Gaussian innovations; simulation40  forecasts (h > 1) of EGARCH/APARCH/TGARCH/AVGARCH with t/GED/skew-t innovations were drawn from an unseeded generator.41  Fixed (`DISTS[dist](seed=seed)`); the 504 affected jobs are re-run so that every forecast is bit-reproducible. No change to42  the protocol (Monte Carlo noise only; 2,000 paths). Found by the model-card audit (`model_cards/_discrepancies.md`).43- **A-02 (2026-11-09):** registry bibkeys corrected to the verified keys (zumbach2009riskmetrics, gonzalezrivera1998smooth,44  hansen2016exponential). Documentation only.45- **A-03 (2026-11-09):** tests added for GARCH-M (nesting of GARCH(1,1) at delta = 0, recovery), QGARCH (recovery), and46  cross-checks extended to TGARCH (rugarch fGARCH/TGARCH), GAS-t (R package GAS, inverse-information scaling), GARCH-X return47  equation (rugarch external regressor) and MS-GARCH likelihood and 22-step forecasts (R package MSGARCH). Verification only.48- **A-04 (2026-11-09):** performance bug — custom models with skew-t innovations recomputed kappa = E[z^2 1{z<0}] (20,000 quantile49  evaluations) at every likelihood evaluation, making those jobs ~100x slower and stalling the nodes; kappa is now held at 0.550  inside the optimizer (it only enters the first-observation initialization of the GJR recursion) and computed exactly once51  after the fit. Runs restarted with the fix; completed jobs kept (results unaffected: the likelihood maximised is identical up52  to the first-observation term of the custom GJR, which is not a registry model).53- **Note (2026-11-09):** the first main run wrote one `_runs.jsonl` per node under the same name, so the rsync merge kept a54  single node's manifest, and `cpu_s` was the cumulative CPU of the worker process. Compute accounting in the paper therefore uses55  the complete per-refit (`time_s`) and per-origin (`time_fc_s`) timings stored in every fits/forecast table (exact, 3,276 jobs);56  `maxrss` is reported as the per-worker peak (≈ 0.4 GB). `run_benchmark.py` now records per-job CPU deltas in `_runs_<host>.jsonl`.57- **A-05 (2026-11-09, after inspecting the first test-period analysis):** the first pass showed pooled QLIKE ratios of order 10^658  for EGARCH and 3–7 for Realized GARCH-t, traced to converged-but-degenerate optima of arch's default fit (e.g. SI, origin59  2019-03-06: EGARCH-t alpha = −641, beta = 0, nu at its bound, log-likelihood −6294 versus −1613 from alternative starting60  values and −1621 for rugarch; 81/168 EGARCH and 54/168 APARCH jobs had in-sample variance ranges above 10^6). The failure61  policy of D-10 ("bounded retry sequence, alternative starting values, optimizer diagnostics") is made concrete: every arch fit62  now runs from arch's default plus three alternative starting vectors and keeps the best converged optimum; a fit whose63  log-likelihood is more than 50 units below GARCH(1,1) with the same innovation law (models at least as flexible; not applied64  to ARCH(5), IGARCH, GAS-t, the baselines or the realized-measure models with measurement equations) is retried from perturbed65  starts and otherwise recorded as failed (reason 'degenerate'), after which the driver keeps the last good parameters (flag66  stale_fit). The affected jobs (all arch-backed models except the fixed baselines, and the custom daily models) are re-run;67  losses, analyses and exhibits are regenerated. The first-pass analysis is kept in results/metrics/analysis_main_test_pass1/68  for the record. No change to the universe, periods, losses, proxies or inference.69- **Tier C done (2026-11-09 evening):** `scripts/run_tier_c.py` on M3U96a (equity_etf basket) and M2U64 (cross_asset_etf basket),70  `scripts/analyze_tier_c.py test` → `results/metrics/analysis_tier_c_test/` (all one-step covariance forecasts positive definite:71  minimum eigenvalue > 0 on every origin; DCC/aDCC beat CCC by 15 % (equity basket) and 3 % (cross-asset basket) in multivariate72  QLIKE, DM p < 0.001; rolling covariance 14–15 % worse; 90 % MCS keeps all six models on the equity basket and drops the rolling73  covariance and CCC on the cross-asset basket).74- **E-01 extensions (2026-11-09 evening, post-registration, exploratory):** seven architectures added to maximise the coverage of75  the GARCH family (ST-GARCH logistic, Beta-t-EGARCH, Realized EGARCH, GARCH-MIDAS with own monthly RV, HYGARCH, FIAPARCH, FIEGARCH)76  in `src/wp46/models/extensions.py`, registry status `extension`; tests `tests/unit/test_extensions.py` (6 passed: fractional77  weights, HYGARCH(amp=1) reproduces arch's FIGARCH likelihood, FIAPARCH/ST-GARCH/GARCH-MIDAS nest FIGARCH/GARCH, seeded simulation,78  no look-ahead). Scored with the frozen protocol but reported separately from the pre-registered set (job list `jobs_ext.json`).79- **Synthesis deliverables (2026-11-09 night):** `results/manifests/garch_genealogy.yaml` (64 architectures: 25 scored, 7 extension,80  2 unsupported, 30 out of scope with reasons), `scripts/make_genealogy_figure.py` → `paper/figures/fig_genealogy.pdf` (Figure 1 of the81  taxonomy section), `scripts/make_encyclopedia.py` → `paper/tables/tab_encyclopedia.tex` (Appendix), `docs/genealogy_notes.md`82  (nomenclature traps and package naming); 13 seminal references added and Crossref-verified (218 entries in references.bib).83- **A-06 (2026-11-09 night, after the corrected test-period analysis):** EGARCH fits that are regular in-sample (log-likelihood above84  GARCH(1,1)) but have alpha < 0 with beta ≈ 1 produce explosive out-of-sample variance paths on about a third of the instruments85  (EURUSD 2014-02: sigma2 163 → 927 percent² in four days with no shock; mean QLIKE ratio 10^6). This is a property of the86  unconstrained arch parameterization, not an optimizer artefact (A-05 did not remove it). Handling: (i) the pre-registered mean87  QLIKE is reported as is; (ii) every spec now also reports a 1 % trimmed-mean ratio, a median ratio and the share of "explosive"88  forecasts (cumulative forecast > 100 × the trailing 22-day proxy mean at the origin), and the paper's exhibits use the trimmed89  statistics for display with the full numbers in the tables; (iii) the admissibility flag of EGARCH now requires alpha ≥ 0;90  (iv) a constrained twin `egarch11c` (alpha ≥ 0, beta ≤ 0.995) is added as an extension and run on all instruments.91
Files · main
Menu

Theme