Commit Graph
56 Commits
Author SHA1 Message Date
dennisthiessenandClaude Opus 4.8 0e556d8a43 fix(sec): keep the market-cap fallback through an amendment merge
Found in review. _merge_amendments rebuilds a period from _MERGED_FIELDS +
_CARRIED_FIELDS alone, so a column in neither list is absent from the merged
row, not just stale — and callers read it with getattr(..., None), which
silently yields None. weighted_avg_diluted_shares was never added when the
market-cap fallback landed (_SNAPSHOT_COLS in the importer was updated, its
counterpart in the derivation was not).

The failure needed both of this branch's fixes at once: a multi-class issuer
with a partial amendment on its latest period (META with a Part-III-only
10-K/A) would silently lose market cap and FCF yield again.

Adds the field, a regression test for that case, and a guard test asserting
the merge/carry lists cover every SnapshotRow field, so the next column added
fails loudly rather than losing data quietly. Confirmed the guard catches the
original bug.

Also from review:
- Expose pe_caveat in the valuation payload, so a P/E suppressed by split
  contamination says why instead of looking like missing data (the caveat was
  set but never read).
- no_xbrl_filings now names both causes; the old text advised pinning a CIK
  override, which is wrong for a genuine new registrant that simply has not
  filed yet and clears itself.
- Document that fiscalYearEnd is the issuer's current calendar, so a fiscal-
  year-end change degrades old periods (fallback/newest-wins), not current ones.
- Parser-level tests for _select_weighted_avg_shares (shortest-span-wins and
  concept priority), which only had derivation-level coverage.

823 unit tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:50:17 +02:00
dennisthiessenandClaude Opus 4.8 fae621475b docs(sec): fundamentals parity root-cause findings
Nine-pass investigation of the 2026-07-23 A5 parity report: for each coverage
gap and wrong value, the root cause traced against live SEC company facts, the
fix, and its live-data validation. Also records the decisions taken (weighted-
average share fallback, keep ASC-606 revenue basis, basic-EPS fallback, keep the
25% split-guard threshold) and what remains genuinely unfixable from this data
(KLAC post-filing split, BRK-B dimensional share count). Includes the source
parity report the findings analyse.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:24:18 +02:00
dennisthiessenandClaude Fable 5 c7c60a64f2 research: Task 2 closed — SUE dead, earnings gap informational
Earnings backfill sourced from the public DoltHub earnings repo at a
pinned commit rather than the FMP API: reproducible for anyone re-running
the study, and it burns no request quota. 12,414 events, 98.6% of symbols
with >=8 announcements, 99.2% paired actual/estimate, no keyed duplicates.

2a earnings-gap diagnostic: INFORMATIONAL, no filter shipped. The
pre-earnings cohort's right tail was better, so the registered
avoid-earnings condition failed. Note the raw 23/266 vs 115/574 incidence
gap is largely a duration confound -- severe losses stop out fast and have
less time to span an announcement -- so it is not evidence that holding
through earnings is safe.

2b SUE: FAIL against the pre-registered +0.03 bar (unconditional IC
+0.0151 over 56 reliable windows, momentum-conditional +0.0213). Signs
stable across eras, so this is a clean null rather than an ambiguous one,
consistent with post-earnings drift having decayed in large caps.

Closes the Tier-1 arc: Task 1 dead on deep evidence, Task 2 dead here,
Task 3 complete as diagnostic. No in-sample research thread remains open.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 21:10:46 +02:00
dennisthiessen bb8aa655a1 research: clean up closed Tier-1 scaffolding from branch
Drop intermediate history-depth reports, sector-residual runners/map/code hooks
(evidence stays in final reports + docs), and slim MacBook helper to ssl/earnings/
prod-book-matrix only. SSL bootstrap and archived research conclusions retained.
2026-07-19 14:41:52 +02:00
Dennis Thiessen a4d5ed7a93 tests done 2026-07-19 14:21:05 +02:00
Dennis Thiessen 01007fb6dd tests done 2026-07-19 11:39:43 +02:00
Dennis Thiessen f3d1312a69 tests done 2026-07-19 11:21:05 +02:00
dennisthiessen 64761f38ba research: interpret history-depth MacBook harness (PARK sector residual wire-in)
Authoritative report history-depth-20260719-103315: race guard pass on deep
research.sqlite. Sector residual still short-window only (no pre-2021); fip sign
flips on broad deep sample; no production retune.
2026-07-19 10:42:01 +02:00
Dennis Thiessen f6e0ca734f tests done 2026-07-19 10:40:19 +02:00
dennisthiessen fa25b6ee68 research: sector residual, earnings gap/SUE, history-depth scaffolding
Tier-1 alpha research (local only, no production deploy):

Sector residual momentum: two-factor SPY+sector residual and sector demean signals, IC harness + A/B. Sector resid clears pre-registered bars narrowly (PROMOTE for human wire design only). Sector demean fails t vs market resid.

Earnings: earnings_events backfill (FMP bulk paid; FMP/AV per-symbol), 2a gap diagnostic report-only, 2b SUE IC (PARK; incomplete 48/506 coverage).

History-depth: pre-registered doc + runner for MacBook deep rebuild/harness.

Do not ship production residual or filters from this branch.
2026-07-19 09:33:34 +02:00
dennisthiessen 2311999e57 research: park Phase B fip breadth; race guard and compact evidence
Log the 21:14 orphan as a snapshot-build race, rewrite the context table to
authoritative ICs only, and soften the vol-tilt warning. Add extender completion
manifest + breadth refuse guard; strip intermediate/orphaned reports; park the
thread (no book sim, no deploy).
2026-07-19 00:32:20 +02:00
dennisthiessen 7d60e54f5a research: single-source liquid mask; orphan +0.06 fip IC
Harness and diagnostics share _filter_liquid_breadth_week_rich. Recompute
shows unconditional liquid fip IC -0.017 (mask binds 97%); mom-conditional
-0.088/t-4.58 stands. Document +0.0575 as orphaned.
2026-07-19 00:06:04 +02:00
dennisthiessen ceaaadc49f research: fip breadth diagnostics + compositional read
Add lagged/tier/prod-subset/mom-conditional checks on research.sqlite.
Log: unconditional sign is a winner/bleeder tug-of-war; mom-conditional
fip stays negative and reliable; warn on high-vol tilt if universe broadens.
2026-07-18 21:40:05 +02:00
Dennis Thiessen d34c7a21b7 done 2026-07-18 21:26:13 +02:00
dennisthiessen 9704e0d85a feat: Phase B fip_id liquid-breadth research tooling
Deploy / lint (push) Successful in 9s
Deploy / deploy (push) Canceled after 0s
Deploy / test (push) Canceled after 1m5s
Add research-only snapshot extender, PIT dollar-volume mask for signal IC,
rank-only harness path, fingerprint+breadth runner, and docs. Fingerprint
reproduced IC -0.045 / t -2.91 on prod.sqlite. No production gate/schedule changes.
2026-07-18 20:22:11 +02:00
Dennis Thiessen 99860dbd13 Tests done 2026-07-18 16:57:19 +02:00
Dennis Thiessen 723d47338e Tests done 2026-07-18 15:29:10 +02:00
dennisthiessen c9c6967c9c chore: consolidate post-stop research artifacts
Deploy / lint (push) Successful in 11s
Deploy / test (push) Successful in 1m18s
Deploy / deploy (push) Successful in 39s
2026-07-17 20:46:21 +02:00
Dennis Thiessen 1a6f82bf6d done 2026-07-17 17:42:13 +02:00
Dennis Thiessen cf294a7d2b done 2026-07-17 17:23:27 +02:00
Dennis Thiessen 27bc8a6631 done 2026-07-17 16:30:13 +02:00
Dennis Thiessen 13f57b2525 done 2026-07-17 15:22:58 +02:00
dennisthiessen 1e9f2dc4fb feat: add five-session post-stop reentry lockdown 2026-07-17 13:21:06 +02:00
dennisthiessen bee5a5ce89 Finalize GTL and retire S/R research harness 2026-07-13 17:58:04 +02:00
dennisthiessen 8e09f239c8 Retire completed GTL tuning harnesses 2026-07-13 16:40:29 +02:00
dennisthiessen 1d84a40c04 Document final GTL research decision 2026-07-13 16:24:43 +02:00
Dennis Thiessen 39acf22808 done 2026-07-13 16:22:30 +02:00
dennisthiessen 7162272cc0 Add GTL strength confirmation sensitivity 2026-07-13 15:42:47 +02:00
Dennis Thiessen 30fd5a029b done 2026-07-13 15:34:48 +02:00
dennisthiessen 623dc08875 Add GTL cohort composition backtest 2026-07-13 14:22:56 +02:00
Dennis Thiessen 3f86aec0be done 2026-07-13 14:07:42 +02:00
dennisthiessen 3999c5efc1 Add single-command GTL tuning matrix 2026-07-13 13:13:18 +02:00
dennisthiessen dc1570877c Document Gate Target Ladder architecture 2026-07-13 11:47:23 +02:00
dennisthiessen 3ffd13ce6e Record final gate-ladder parity pass 2026-07-13 11:34:47 +02:00
Dennis Thiessen b6df3b7ce7 done 2026-07-13 11:32:56 +02:00
dennisthiessen 8161c352a0 Separate chart S/R from gate target ladder 2026-07-13 11:17:03 +02:00
Dennis Thiessen 995a0380c3 done 2026-07-13 10:58:40 +02:00
dennisthiessen f0e6a8fc19 Isolate explicit S/R gate target ladder 2026-07-13 10:49:44 +02:00
Dennis Thiessen b8ddf14e7d done 2026-07-13 10:43:20 +02:00
dennisthiessen 01e6f7e2c3 Test clean S/R as production rank overlay 2026-07-13 10:33:42 +02:00
Dennis Thiessen 2e9afeec0f done 2026-07-13 10:11:23 +02:00
dennisthiessen e6dc74df6f Add full-period S/R production comparison 2026-07-13 09:37:39 +02:00
Dennis Thiessen 3280ed71f7 done 2026-07-13 09:11:11 +02:00
Dennis Thiessen 04ef7f44a2 done 2026-07-13 08:54:04 +02:00
Dennis Thiessen f8e1107851 done 2026-07-13 08:18:40 +02:00
Dennis Thiessen 87e01e260b done 2026-07-13 08:08:15 +02:00
Dennis Thiessen 37836f8824 done 2026-07-13 07:31:45 +02:00
Dennis Thiessen 8df76d3288 traffic done 2026-07-12 23:45:20 +02:00
Dennis Thiessen ce0df6a126 test done 2026-07-12 23:28:44 +02:00
Dennis Thiessen 178abd4b2d validation completed 2026-07-12 23:09:55 +02:00