code wiki / (root) / nx_bond_gate.nx

nx_bond_gate.nx

buildroot/runtime/nx_bond_gate.nx

5410 B111 linesdepth 7pulls 13 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_bond_gate.nx -- FIXED-INCOME VALUATION GATE. Proves exact integer bond pricing (par/discount/premium), yield-to-maturity by bisection round-tripping on both sides of par, the fail-closed refusals (unreachable price, non-positive price), Macaulay and modified duration, current yield, and price monotonicity in yield. All values hand-verified with the same downward-truncation the library uses. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_bond_lib.nx nx_matter_lib.nx nx_bond_gate.nx

imports: nx_bond_lib.nxnx_matter_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main bg_puts bg_ck bg_puts ↻ bg_putn bond_price bond_ytm bond_price ↻ bond_macaulay_duration bond_modified_duration bond_current_yield_bp bg_ckstr mt_streq bg_puts ↻ bond_price_class bg_putn ↻

structs

none

consts

none

functions

10func bg_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 3: bg_ckbg_ckstrmain
11func bg_putn(v: i64) -> i64
called by 2: bg_ckmain
25func bg_ck(cnt: *i64, name: *u8, got: i64, want: i64) -> i64
called by 1: main calls 2: bg_putsbg_putn
36func bg_ckstr(cnt: *i64, name: *u8, got: *u8, want: *u8) -> i64
called by 1: main calls 2: mt_streqbg_puts
47func main(argc: i64, argv: *i64) -> i64