单利 / 复利 / 定投 / IRR / 分期真实年化(妙用盒)
calculate_interest使用 50 位十进制精度试算五种理财与分期模型:simple(单利)、compound(复利与有效年利率 EAR)、sip(定期定投)、irr(现金流内部收益率,2–120 期)、installment_apr(分期/消费贷/砍头息真实年化,同时返回复利 EAR 与单利 APR)。默认仅返回汇总;compound/sip 如需分期明细可设 includeSchedule=true 并分页(最多 24 期)。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode": "<mode>"
},
"name": "calculate_interest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | 试算模式:simple / compound / sip / irr / installment_apr | |
| term | No | 【simple/compound】投资期限数值 | |
| years | No | 【compound】投资年数(与 term/termUnit 二选一) | |
| months | No | 【installment_apr】分期总期数(2–120 月) | |
| timing | No | 【sip】扣款时机:end(期末,默认)或 begin(期初) | end |
| periods | No | 【sip】定投总期数(1–600) | |
| termUnit | No | 【simple/compound】期限单位:year / month / day(默认 year) | |
| cashFlows | No | 【irr】现金流数组(2–120 期,负数为投入、正数为回流,至少 1 次符号变化) | |
| frequency | No | 【sip/irr】频率:sip 支持 monthly/weekly/yearly;irr 支持 yearly/quarterly/monthly | |
| inputMode | No | 【installment_apr】分期输入方式:fixed_payment / monthly_fee_rate / total_repayment | |
| principal | No | 【simple/compound/installment_apr】本金(元) | |
| upfrontFee | No | 【installment_apr】期初一次性扣除手续费/砍头息(元,默认 0) | |
| compounding | No | 【compound】复利计息频率 | monthly |
| scheduleLimit | No | 【compound/sip】明细每页条数(1–24) | |
| scheduleStart | No | 【compound/sip】明细起始期数(从 1 开始) | |
| monthlyPayment | No | 【installment_apr:fixed_payment】每期固定还款额(元) | |
| totalRepayment | No | 【installment_apr:total_repayment】分期总还款额(元) | |
| includeSchedule | No | 【compound/sip】是否附带分期明细(默认 false) | |
| initialPrincipal | No | 【sip】初始本金(元,默认 0) | |
| annualRatePercent | No | 【simple/compound/sip】年利率或预期年化收益率(%,0–1000) | |
| periodicContribution | No | 【sip】每期定投金额(元) | |
| monthlyFeeRatePercent | No | 【installment_apr:monthly_fee_rate】宣传月费率(%,如 0.5) |