Exact Numbers Do Not Equal Correct Investment Decisions
A report presents a Numeric kernel design for financial research agents that separates deterministic decimal arithmetic from domain decisions such as formula selection, input suitability and business eligibility. It uses decimal strings, explicit units and rounding policies, and returns exact, rounded and residual values to reject incompatible operations locally. All examples use synthetic inputs, and the report cautions that local numerical tests do not certify financial research quality.
The design explicitly separates reproducible computation from investment-domain judgment and warns that numerically correct calculations alone do not establish the correctness of real-world research, investment advice or transactions.
一个基金研究 Agent 算出 2.06 元,可能完全符合算术规则,却不适合当作投资建议:份额来自昨天,净值来自今天;不同币种被相加;费用已经体现在净值里,却又扣了一次。
因此,金融 Agent 不需要一位“万能数学裁判”,而需要严格区分两类责任:精确数值运算(Numeric) 保证给定十进制数值、单位和舍入政策下的确定性结果;确定性投资计算等领域模块 选择公式、判断输入和分母是否适用,并决定业务结果的资格。本文围绕一条金额计算讲解 Numeric 的接口和实现边界。所有例子为合成输入;局部数值测试不代表金融研究质量已经获得认证。
一、输入必须保留计算以前的意义
图 1:从原值到解释,数值核不应补造领域前提。
图中关系(文字对照):
- 来源数据与原始精度 → 领域 Owner 选择对象/时点/方法。
- 领域 Owner 选择对象/时点/方法 → 单位/尺度/运算绑定明确?。
- 单位/尺度/运算绑定明确? → 若否,局部拒绝并标明原因。
- 单位/尺度/运算绑定明确? → 若是,A33 精确数值运算。
- A33 精确数值运算 → 返回 exact/rounded/residual。
- 返回 exact/rounded/residual → 领域 Owner 检查业务约束。
- 领域 Owner 检查业务约束 → Result 保存身份和适用限制。
- Result 保存身份和适用限制 → 模型解释与原 Publication 交付。