nx_finhealth_lib.nx
buildroot/runtime/nx_finhealth_lib.nx
about
nx_finhealth_lib.nx -- COMPOSITE FINANCIAL HEALTH: one verdict from the whole grounded pipeline.
This is the recombination capstone of the finance suite -- the organ that answers "is this company
healthy?" by COMPOSING the pieces built separately, exactly as the atlas thesis intends: real data
(nx_edgar) -> structural check (nx_xbrl identity) -> distress model (Altman Z, nx_fin_zscore) ->
fundamental strength (Piotroski F, nx_piotroski). No re-implementation; it judges the sub-results.
★TWO FAIL-CLOSED GATES on the verdict, in priority order:
1. INCOMPLETE -- if the F-score could not be computed (a fact was missing, the pipeline sentinel),
the whole verdict is INCOMPLETE. A health call on partial facts is a lie with a number on it.
2. FLAGGED -- if the balance sheet does NOT balance (Assets != Liabilities + Equity), the verdict is
FLAGGED regardless of how good the scores look. You cannot trust a distress score or an F-score
computed from books that do not add up -- the structural check GATES the analytical one.
Only past both gates does it grade STRONG / MODERATE / WEAK from the distress zone and the F-score.
license_tier: ORIGINAL No hw writes (Rule 26). LIB.
dependencies 2 imports · 1 importers
imports: nx_fin_zscore.nxnx_piotroski_lib.nx
imported by: nx_finhealth_gate.nx
structs
| none |
consts
| 21 | const FH_INCOMPLETE: i64 = 0 - 1 // a required fact was missing -- not gradable |
| 22 | const FH_WEAK: i64 = 0 |
| 23 | const FH_MODERATE: i64 = 1 |
| 24 | const FH_STRONG: i64 = 2 |
| 25 | const FH_FLAGGED: i64 = 3 // books do not balance -- do not trust any score |
functions
| 29 | func fh_grade(z_zone: i64, f_score: i64, identity_balanced: i64) -> i64 called by 1: fh_analyze |
| 41 | func fh_analyze(working_capital: i64, retained_earnings: i64, ebit: i64, mv_equity: i64, total_liabilities: i64, sales: i64, total_assets: i64, f_score: i64, assets: i64, liabilities: i64, equity: i64) -> i64 |
| 50 | func fh_verdict_str(v: i64) -> *u8 called by 1: main |