What's new / 新增内容
Two new tools (five total), still zero runtime dependencies and pure arithmetic:
cashflow_analysis— NPV at a discount rate, IRR found by bisection, and simple + discounted payback periods for an arbitrary cash-flow series. Flows with no sign change or multiple sign changes are reported explicitly (irr_note/multiple_irr_possible) instead of fabricating a rate. Anchored against the Excel IRR documentation example (8.663095%).retirement_plan— safe-withdrawal math: time to exhaustion for a fixed monthly withdrawal (with never-deplete detection at or below interest-only), or the sustainable monthly withdrawal that depletes the balance exactly at a horizon (PMT closed form — cross-checked against the loan_payment mortgage-table anchor). With both inputs, reports whether the withdrawal lasts the horizon (lasts_horizon).
新工具: cashflow_analysis(净现值/内部收益率/回收期,符号异常时如实报告不编造)与 retirement_plan(提款耗尽时间/可持续提款额/4% 法则一族,PMT 闭式与贷款月供交叉校验)。
Install / 安装
dsh plugin --profile web add github:TYEclipse/dsh-finance46 new tests (81 total), all external-anchor verified. 46 个新测试(共 81),全部外部锚点验证。