code wiki / fin

topic: fin

69 modules sharing the fin name family (derived from the tree's prefix discipline).

The 'fin' topic family in the Nishi sovereign ecosystem focuses on financial modeling, auditing, and backtesting within a modular, binary-per-organ architecture. It integrates advanced statistical analysis through nx_fin_advstats to rigorously evaluate trading edges, supports multi-asset forward pricing via nx_fin_assets for precise valuation, and ensures transparency with nx_fin_audit to detect anomalies in financial data. These modules work in tandem to provide a robust framework for quantitative finance, balancing statistical rigor, pricing accuracy, and auditability.

auto-narrated by the local model from this topic's module headers; links verified against the wiki index.

narrated overview -- maintained by the narration lane, module links verified against this wiki.

moduledescriptionlinesfuncs
nx_fin_advstats.nxadvanced backtest statistics (the Lopez de Prado rigor that separates a real edge from504
nx_fin_advstats_gate.nxGATE for the deflated-Sharpe / multiple-testing suite, hand-computed. The headline:422
nx_fin_assets.nxmulti-asset FORWARD pricing, closing the loop on the operator's original ask ("trade264
nx_fin_assets_gate.nxGATE for multi-asset forward pricing (tolerance, since exp is approximate).443
nx_fin_audit.nxR5 of THE NISHI FINANCIAL ECOSYSTEM: medical-bill OVERBILLING / anomaly audit.1095
nx_fin_audit_gate.nxR5 GATE: proves the medical-overbilling audit is exact + data-driven, on a1105
nx_fin_backtest.nxR2 of the trading stack: the TRUTH ENGINE. Given OHLCV bars (from nx_fin_marketdata) +1032
nx_fin_backtest_gate.nxR2 GATE: proves the backtester on KNOWN bars + a KNOWN signal, with EVERY metric592
nx_fin_bs.nxOPTIONS pricing (Black-Scholes) in integer fixed-point (scale 1e6 = "micro"), the hard939
nx_fin_bs_gate.nxGATE for the fixed-point Black-Scholes suite. Approximations, so checked within a522
nx_fin_census.nxHONEST HAVE-vs-GAP census for the NISHI MARKETS-INVESTING / TRADING stack (the "finmkt"763
nx_fin_competitor_census.nxS-CLASS-EXCEED census: measure the Nishi trading+tax+grants stack against the813
nx_fin_dashboard.nxemit the static nishifamily.com/finance dashboard to the staging media dir, so283
nx_fin_dashboard_gate.nxGATE for the finance dashboard: proves the page is SOVEREIGN zero-JS (no1275
nx_fin_datasource.nxthe DATA-ACQUISITION doctrine as verified logic: how to get raw financial data LEGALLY445
nx_fin_datasource_gate.nxGATE for the data-acquisition doctrine: free classification, cheapest-legal502
nx_fin_dispute.nxR8 (fail-safe execute) of THE NISHI FINANCIAL ECOSYSTEM: turn audit findings into957
nx_fin_dispute_gate.nxR8 GATE: proves the audit findings (R5) flow into a correct, complete medical-1137
nx_fin_edgar_fetch.nxFREE_RAW in action: pull REAL company fundamentals straight from SEC EDGAR847
nx_fin_extract.nxRUNG 2 of THE NISHI FINANCIAL ECOSYSTEM researcher: EXTRACT stage.1446
nx_fin_finance.nxR7 (financing-cost optimizer) of THE NISHI FINANCIAL ECOSYSTEM: find AFFORDABLE866
nx_fin_finance_gate.nxR7 GATE: proves the financing-cost optimizer ranks REAL options by TRUE total985
nx_fin_fund_research_fetch.nxthe Nishi RESEARCHER's sovereign fetch for AFFORDABLE / ALTERNATIVE /865
nx_fin_grant.nxR8 (Nishi Grants): pull in NON-DILUTIVE cash. Eligibility screening for SBIR/STTR (US515
nx_fin_grant_gate.nxGATE for the grants arm: SBIR/STTR eligibility (pass + each failing condition),422
nx_fin_ledger.nxR2 of THE NISHI FINANCIAL ECOSYSTEM: the content-addressed, append-only,40117
nx_fin_ledger_gate.nxR2 GATE: proves the double-entry ledger is exact, append-only, idempotent,1344
nx_fin_liquidity.nxthe market-IMPACT model: finer than R1's flat ADV cap. Uses the square-root impact law303
nx_fin_liquidity_gate.nxGATE for the square-root market-impact model: impact scales with sqrt(size),352
nx_fin_marketdata.nxR1 of the trading stack: the PRICE + LIQUIDITY sensor's CORE. Pure, deterministic1108
nx_fin_marketdata_fetch.nxMAKE IT REAL: the live ingestion adapter + end-to-end demo. Fetches a symbol's1728
nx_fin_marketdata_gate.nxR1 GATE: proves the OHLCV parser + ADV/capacity math on KNOWN bytes (no network,482
nx_fin_md_probe.nxground-truth probe: is the finance dashboard actually LIVE on the public edge?394
nx_fin_member.nxNISHI FINANCE joins the team: registers the `finance` DOMAIN into THE NISHI BUILDER434
nx_fin_member_gate.nxproves Nishi Finance is registered in THE NISHI BUILDER: the finance domain has523
nx_fin_metrics.nxrisk-adjusted performance metrics, i64 fixed-point, NO floats. Provides the integer527
nx_fin_metrics_gate.nxGATE for the risk-adjusted metrics on a hand-computed returns series (bps):442
nx_fin_mgmt_grade.nxR-MKT5 of the MARKETS-INVESTING arc: GRADE THE PEOPLE running a company (operator:552
nx_fin_mgmt_grade_gate.nxproves the management-stewardship grader ("handicap the team"): each of the 8684
nx_fin_microcap.nxthe 1000-MICROCAP FUNNEL: screen a universe of small names down to the few worth432
nx_fin_microcap_gate.nxGATE for the microcap funnel: one PASS plus each reject gate fired in isolation,442
nx_fin_optimizer.nxportfolio OPTIMIZATION, analytic (no matrix inverse needed): the closed-form604
nx_fin_optimizer_gate.nxGATE for the analytic mean-variance optimizer, hand-computed. Exits 0 iff all pass.532
nx_fin_paper.nxR5: PAPER / forward simulation = the OVERFIT CHECK before any capital. Splits the bar383
nx_fin_paper_gate.nxR5 GATE: proves the in-sample/out-of-sample split, the OOS-only backtest run, and the522
nx_fin_pbo.nxProbability of Backtest Overfitting (Bailey/Lopez de Prado CSCV). Completes the overfit-483
nx_fin_pbo_gate.nxGATE for PBO/CSCV, hand-computed. 3 strategies x 4 groups: strategy 0 is the OVERFIT412
nx_fin_portfolio.nxportfolio construction / DIVERSIFICATION: allocate across many names so NO single516
nx_fin_portfolio_gate.nxGATE for portfolio construction: equal/score weighting with concentration caps,512
nx_fin_reality_check.nxBRUTALLY HONEST competitive standing. The 720/760-permille census measured a NARROW814
nx_fin_research_fetch.nxthe Nishi RESEARCHER's sovereign web-fetch for THE NISHI FINANCIAL ECOSYSTEM arc.2775
nx_fin_risk_engine.nxR4: POSITION SIZING + drawdown circuit breaker = the real answer to "don't blow up".526
nx_fin_risk_engine_gate.nxR4 GATE: proves the sizers + circuit breaker on hand-computed values (no432
nx_fin_route_gate.nxproves nishifamily.com/finance is correctly served BEHIND THE OPAQUE WALL.1668
nx_fin_rules.nxR6 of THE NISHI FINANCIAL ECOSYSTEM: the SOVEREIGN RULE-PACK STORE. This is what745
nx_fin_rules_gate.nxR6 GATE: proves the audit rule packs round-trip through the sovereign seg-store1335
nx_fin_serve.nxstandalone loopback HTTP server for the finance dashboard. Composes nx_http_server10810
nx_fin_spine_gate.nxTHE FINANCE SPINE WITNESS. One organ that re-proves the load-bearing1586
nx_fin_stack_page.nxSURFACE the sovereign financial stack in a gorgeous, S-class page (composes981
nx_fin_strategy.nxR3: the SIGNAL generator (produces the long/flat signals the R2 backtester consumes).886
nx_fin_strategy_gate.nxR3 GATE: proves the SMA signal generator on known bars, then runs the FULL LOOP722
nx_fin_taxlot.nxR7 (Nishi Accounting): tax-lot accounting = the machinery to PARK gains legally. Exact576
nx_fin_taxlot_gate.nxGATE for tax-lot accounting: exact holding-period days across a leap year, short/long432
nx_fin_taxopt.nxR7 tax-OPTIMIZATION / entity modeling = "park gains like the big companies", LEGALLY.487
nx_fin_taxopt_gate.nxGATE for tax optimization: ยง1202 QSBS exclusion (floor vs 10x-basis, holding-period382
nx_fin_universe.nxthe UNIVERSE-SELECTION brain: given a scored candidate set (one row per symbol, each443
nx_fin_universe_gate.nxGATE for the universe-selection brain. 4 candidates: c0 passes all gates, c1 has542
nx_fin_zscore.nxR-MKT1 of the MARKETS-INVESTING finance arc: the ALTMAN Z-SCORE, a distress/bankruptcy412
nx_fin_zscore_gate.nxproves the Altman Z-score engine: exact x1000 score from raw figures + correct624