feat: forensic evaluator and permanent-loss filter (#89) - #118
Open
JLaborda wants to merge 4 commits into
Open
Conversation
Add phase-2 forensic hard-exclusion module with distress rules (Altman Z, interest coverage, net debt/EBITDA, negative equity, delisted), Beneish M-Score from multi-period PIT fundamentals, and QVAL-style bottom-5% cross-sectional gate. Versioned thresholds and coefficients live under config/permanent_loss/ for future book alignment. Writes curated/permanent_loss/run_date=*/exclusions.parquet and routes missing inputs to the review queue. EDGAR fraud rules log unavailable without blocking. CI regression covers Enron, Lehman, and WorldCom.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #118 +/- ##
===========================================
- Coverage 98.31% 98.05% -0.26%
===========================================
Files 25 31 +6
Lines 1836 2260 +424
Branches 239 294 +55
===========================================
+ Hits 1805 2216 +411
- Misses 25 30 +5
- Partials 6 14 +8
🚀 New features to boost your workflow:
|
Record closed phase 2a/2b forensic decisions in the permanent-loss spec, add QV forensic terms to CONTEXT.md, and extend the backlog with STA/SNOA/COMBOACCRUAL and PFD follow-ups.
JLaborda
marked this pull request as ready for review
July 7, 2026 10:52
Add hermetic edge-case and integration tests for the forensic evaluator, Beneish scorer, and distress rules to raise patch coverage above Codecov thresholds on PR #118.
This was referenced Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds hermetic tests to close Codecov patch coverage gaps for the forensic evaluator (#89).
Coverage improvements:
forensic_evaluator.py: integration paths (review queue, beneish percentile gate, delisted, empty universe, CLI)beneish_score.py: missing fields, derived-ratio edge cases, non-comparable inputsdistress_rules.py: Altman Z, interest coverage, net debt/EBITDA, delisted variants, getattr pathrun_forensic_evaluator.py:__main__entrypoint and review-queue echo