Annuity
更多信息和选项
- Annuity 对象指定一类涉及一组支付的金融工具. 它们可以用于表示贷款或抵押贷款、 贷款摊还和债券.
- TimeValue[Annuity[…],interest,t] 计算年金的时间价值,得到在时刻 t 的一次性等价支付.
- Annuity 适用于数值型或任意符号型表达式.
- 在 Annuity[p,t] 中,支付发生在时刻 1,2,…,t.
- 在 Annuity[p,t,q] 中,支付发生在时刻 q,2q,…,t.
- 如果 s≤0,TimeValue[Annuity[p,t,q],r,s] 给出现值,如果 s≥t,则给出终值.
- 普通抵押贷款的现值为 TimeValue[Annuity[p,t,q],r,0].
- 一般债券的值由 TimeValue[Annuity[{p,{0,pfinal}},t,q],r,0] 得到.
- 支付区间 q 与复利区间 d 不同的养老金由 TimeValue[Annuity[p,t,q],EffectiveInterest[r,d],s] 给出.
- Annuity[function,…] 表示的年金中,支付由时间的函数给出.
- 在 Annuity[function,t,0] 中,单位时间的支付取为从 0 到 t 积分得到的一个时间的连续函数.
- 有时,离散支付函数由递归关系定义. RSolve 可用于将递归关系转换成单独的时间函数,以用于 Annuity[function,t,q].
- Annuity[{function,{pinitial,pfinal}},…] 指定支付为时间函数,以及初始支付与终止支付.
- Annuity[p,Infinity,…] 表示永久年金.
范例
打开所有单元 关闭所有单元基本范例 (2)
已知实际利率为6%,某年金的期数为10,每期支付为1000美元. 求该年金的现值:
TimeValue[Annuity[1000, 10], .06, 0]TimeValue[Annuity[{1000, {p1, p2}}, 10], .06, 0]TimeValue[Annuity[1000, 10, 1 / 2], .06, 10]Future value of that annuity with specified initial and final payments:
TimeValue[Annuity[{1000, {p1, p2}}, 10, 1 / 2], .06, 10]范围 (11)
TimeValue[Annuity[100, Infinity], .06, 0]已知名义利率为 8%,按季计算复利,某年金的期数为5,每期支付为1000美元. 求该年金的终值:
TimeValue[Annuity[1000, 5], EffectiveInterest[.08, 1 / 4], 5]TimeValue[Annuity[1000, 5, 1 / 2], EffectiveInterest[.08, 1 / 4], 5]已知一个30年息票债券的面值为1000美元,半年计息,息票利率为 6%,债券收益率为 5%,求该息票债券的价值:
TimeValue[Annuity[{(.06/2)1000, 0, 1000}, 30, 1 / 2], EffectiveInterest[.05, 1 / 2], 0]已知利率为5%,求一个期数为10、支付逐期递增10%的年金的终值:
TimeValue[Annuity[100 1.1^# - 1&, 10], .05, 10]一个期数为10、连续支付的年金,其连续支付的速率使得每期支付总额为100美元. 求该年金的终值:
TimeValue[Annuity[100&, 10, 0], .05, 10]注意它的价值与一个支付频率为每期100次,每次支付额为1美元的高频率年金相似:
TimeValue[Annuity[1, 10, 1 / 100], .05, 10]Annuity 适用于符号式参数. TimeValue[Annuity[…],…] 能够找到解析解:
TimeValue[Annuity[pmt(1 + g)^f# - 1&, n, 1 / f], r, t]TimeValue[Annuity[p Log[#]&, n], r, 0]Apart 可用于将贴现因子系数应用于单独支付上:
Apart[TimeValue[Annuity[pmt, 5], r, 0]]Apart 可能需要多次应用以将表达式完全分解:
TimeValue[Annuity[pmt(1 + g)^# - 1&, 5], r, 0]//Apart%//Apart涉及 Annuity 的方程的解可以用符号参数的形式得到:
Solve[TimeValue[Annuity[pmt, n, 1 / f], r, n] == val, pmt]可以用整数作为支付区间,以指定每隔几个周期才进行一次支付的情况:
TimeValue[Annuity[1, 10, 2], r, 0]//ApartTimeValue[Annuity[Sqrt[#]&, n, 0], (1/1 + #)&, n]利用衍生函数 D 计算一支普通股票的持续时间,其股息增长速率为定值:
val = TimeValue[Annuity[div (1 + g)^# - 1&, Infinity], r, 0]duration = (-(1 + r)/val)D[val, r]duration /. {r -> .05, g -> .03}应用 (19)
Solve[TimeValue[Annuity[pmt, 3, 1 / 12], .08, 0] == 5000, pmt]已知名义利率为5.2%,贷款额为 200000美元,按揭贷款期限30年,求月供:
Solve[TimeValue[Annuity[pmt, 30, 1 / 12], EffectiveInterest[.052, 1 / 12], 0] == 200000, pmt]已知每月支付200美元,实际利率为8%,求需要多上时间才能还清10000美元的贷款:
Solve[TimeValue[Annuity[200, n, 1 / 12], .08, 0] == 10000, n]TimeValue[AnnuityDue[1000, 7], EffectiveInterest[.08, 1 / 4], -5]FindRoot[TimeValue[Annuity[{(.07/2) * 1000, {0, 1000}}, 10, 1 / 2], EffectiveInterest[yld, 1 / 2], 0] == 900, {yld, .1}]已知年利率为8%,按季复利,如果某人投资1000美元,求此人在每个季度末能够提款多少能够正好在10年末用光这笔资金:
Solve[TimeValue[Annuity[{wd, {-1000}}, 10, 1 / 4], EffectiveInterest[.08, 1 / 4], 10] == 0, wd]如果按季复利,每个季度末支付1000美元,连续支付5年,求在利率为何值时,其现值为16000美元:
FindRoot[TimeValue[Annuity[1000, 5, 1 / 4], EffectiveInterest[r, 1 / 4], 0] == 16000 , {r, .05}]已知实际利率为在前6年为 5%,在后4年为4%,求一个每期支付100美元的10年期年金的累加值:
TimeValue[Annuity[100, 10], {{0, .05}, {6, .04}}, 10]如果利息力为 .02t,t 为时间,求每年支付为1的年金的终值:
TimeValue[Annuity[1 , 5], .02#&, 5]贷款3000美元将按季在5年内的每个季度结束时分期偿还. 如果利率为 10%,半年计算复利一次. 求每个季度的付款金额:
Solve[TimeValue[Annuity[p, 5, 1 / 4], EffectiveInterest[.1, 1 / 2], 0] == 3000, p]已知一个20期连续支付年金,每期内支付款额等于1,该年金等于一个 10期年金的三倍. 求利息力(常数):
FindRoot[TimeValue[Annuity[1&, 20, 0], d&, 20] == 3TimeValue[Annuity[1&, 10, 0], d&, 10] , {d, .05}]已知实际利率为 5%,一个永久年金的连续支付为 1、2、3……,求该永久年金的现值:
TimeValue[Annuity[#&, Infinity, 1], .05, 0]RSolve[{payment[i + 1] == g + payment[i], payment[1] == p}, payment[i], i]TimeValue[Annuity[-g + g # + p&, Infinity], r]用利率表示一个年金现值的表达式. 已知支付从1美元开始,每期递增1美元,直至达到10美元,然后每期支付为10美元直到第15期:
TimeValue[Annuity[If[# < 10, #, 10]&, 15], r, 0]//Apart用利率表示一个年金现值的表达式. 已知支付从1美元开始,每期递增1美元,直至达到10美元,然后每期支付递减1美元,直到为0美元:
TimeValue[Annuity[If[# <= 10, #, 10 - (# - 10)]&, 20], r, 0]//Apart已知利率为7%,一个年金的期数为20,支付以1000美元开始,随后每期递增4%,求该年金在第一次支付之前两年的现值:
TimeValue[Annuity[1000 1.04^# - 1&, 20], .07, -2]用利率表示一个永久年金的现值. 已知该年金在第三年的年底支付1,在第六年的年底支付2,在第九年年底支付3,依此类推:
TimeValue[Annuity[# / 3&, Infinity, 3], r, 0]求一个连续增长的 n 年期年金的现值,已知(常数)利息力为 δ,在时刻 t 的支付速率为 t2/年:
TimeValue[Annuity[#^2&, n, 0], δ&, 0]在时刻 t 支付死亡福利$1的现值期望,其中 t 为 Gompertz-Makeham 分布:
nsp = Expectation[TimeValue[1, EffectiveInterest[r, 0], {0, t}], tGompertzMakehamDistribution[a, b]]Solve[Expectation[TimeValue[AnnuityDue[premium, t], EffectiveInterest[r, 0], 0], tGompertzMakehamDistribution[a, b]] == nsp, premium]因为贷款余额在任何时间等于其剩余的未来付款的现值,Annuity 可用于创建摊销表:
years = 30;monthlyPayment = 1199.10;monthlyRate = .06 / 12;loanValue[month_] = TimeValue[Annuity[monthlyPayment, years * 12 - month], monthlyRate, 0]amortizationList = Table[{i + 1, loanValue[i], monthlyPayment, loanValue[i] * monthlyRate, monthlyPayment - loanValue[i] * monthlyRate, loanValue[i + 1]}, {i, 0, years * 12 - 1}]//Round;amortizationTable[month1_, month2_] := TableForm[amortizationList[[month1 ;; month2]], TableHeadings -> {None, {"month", "beg value", "payment", "interest", "principal", "end value"}}]amortizationTable[1, 12]ListLinePlot[Table[{i + 1, loanValue[i]}, {i, 0, years * 12 - 1}], AxesLabel -> {"month", "loan balance"}, ImageSize -> 300]属性和关系 (7)
TimeValue 对现金流取一个参照点参数. 该参数可与 Annuity 联用来模拟一个期初年金:
TimeValue[Annuity[1000, 10], .06, {0, -1}]TimeValue[AnnuityDue[1000, 10], .06, 0]Annuity 是平移后的 AnnuityDue:
TimeValue[Annuity[p, t, q], r, n]TimeValue[AnnuityDue[p, t, q], r, n - q]%% / %一个年金的支付增长模式可以为任意 Wolfram 语言函数,也可以是用户定义的任意函数:
TimeValue[Annuity[Sin[#]&, 10], r, 0]//ApartTimeValue[Annuity[If[# < 5, #, 5]&, 10, 1], r, 0]//ApartRSolve 可以将递归关系转换为时间的单一函数:
RSolve[{payment[i + 1 / 2] == (1 + growth)payment[i], payment[1 / 2] == 10}, payment[i], i]上述递归关系表示支付以固定的速率增长. 其解仅是时间的函数,并且适用于 Annuity:
TimeValue[Annuity[10 (1 + growth)^-1 + 2 #&, 5, 1 / 2], r, 0]g1 = TimeValue[Annuity[100&, n, 0], .5, n];{g2, g3, g4, g5} = Table[TimeValue[Annuity[100 / i, n, 1 / i], .5, n], {i, 1, 4}];Plot[{g1, g2, g3, g4, g5}, {n, 1, 5}, Epilog -> Arrow[{{4.9, 1250}, {4.9, 1550}}]]绘制一个正弦支付流的年金支付与作为时间函数的年金的累加值的图形:
pmts = Cashflow[Annuity[Ceiling[100Sin[.3#]]&, 60]][[1]];g1 = ListPlot[pmts, Filling -> Axis, AspectRatio -> 1 / 2, ImageSize -> 400]totalval = TimeValue[Annuity[100Sin[.3#]&, t], .02, t]g2 = Plot[totalval, {t, 0, 60}, PlotStyle -> Orange];Show[{g1, g2}, PlotRange -> All]使用 Plot 和 Plot3D 研究年金与一组变量的依存关系:
g1 = TimeValue[Annuity[pmt (1 + g)^f# - 1&, n, 1 / f], EffectiveInterest[r, 1 / c], n]Plot[g1 /. {pmt -> 100, f -> 2, n -> 10, c -> 2, g -> .1}, {r, .01, .15}, AxesLabel -> {"interest", "value"}, ImageSize -> 250]Plot[g1 /. {pmt -> 150, f -> 2, n -> 10, c -> 2, r -> .07}, {g, -.2, .2}, AxesLabel -> {"payment growth rate", "value"}, ImageSize -> 300]使用 Plot3D 查看利率/增长率的平面关系图:
Plot3D[g1 /. {pmt -> 100, f -> 2, n -> 10, c -> 2}, {r, .01, .15}, {g, -.2, .2}, AxesLabel -> {"interest", "growth", "value"}, ImageSize -> 250]可能存在的问题 (3)
在求长期或高频年金或债券的利率时,FindRoot 比 Solve 的速度要快得多:
Solve[yld > 0 && TimeValue[Annuity[{(.07/2) * 1000, {0, 1000}}, 10, 1 / 2], yld, 0] == 900, yld]//QuietFindRoot[TimeValue[Annuity[{(.07/2) * 1000, {0, 1000}}, 10, 1 / 2], yld, 0] == 900, {yld, .05}]TimeValue[Annuity[function,…],…] 有时返回的表达式不能被 Sum 或 Integrate 显式实现. 在这种情况下,将使用 K 个变量作为指数或积分器:
TimeValue[Annuity[LegendreP[p, #]&, n], r, 0]TimeValue[Annuity[LegendreP[p, #]&, n, 0], r, 0]如果指定的估值期间位于 Annuity 对象的两次支付之间,TimeValue 计算在该估值期间之前全部现金流的终值,以及在该估值期间之后全部现金流的现值:
TimeValue[Annuity[100, 5], .08, 2.5]将 Annuity 对象转换为 Cashflow 对象说明了支付结构:
Cashflow[Annuity[100, 5]]TimeValue[Cashflow[{{1, 100}, {2, 100}}], .08, 2.5] + TimeValue[Cashflow[{{3, 100}, {4, 100}, {5, 100}}], .08, 2.5]互动范例 (1)
使用 Manipulate 研究年金与一组变量的关系:
Manipulate[
Plot[
Evaluate[
TimeValue[Annuity[pmt, n], EffectiveInterest[r, 1 / c], n]
],
{n, 5, 30}, AxesLabel -> {"time", "value"}
],
{{pmt, 150, "payment"}, 100, 300}, {{r, .05, "interest"}, .01, .15}, {{c, 2, "compounding"}, 1, 10}, FrameLabel -> "future value of an annuity"
]巧妙范例 (1)
建立一个退休计算器. 假设将通胀调整后的给付投资于股市,然后将退休时的累积结余投资一个终生支付通胀调整后给付的年金:
assumptions = {marketRate -> .08, annuityRate -> .05, inflation -> .03, yearsToFinalAge -> 45, yearsToRetirement -> 20};futureValueAnnuity1 = TimeValue[Annuity[presentValuePaymentMade (1 + inflation / 12)^12 # - 1&, yearsToRetirement , 1 / 12], marketRate, yearsToRetirement];presentValueAnnuity2 = TimeValue[Annuity[presentValuePaymentReceived(1 + inflation / 12)^yearsToRetirement * 12 (1 + inflation / 12)^12 # - 1&, yearsToFinalAge - yearsToRetirement, 1 / 12], annuityRate, 0] ;sol = Solve[presentValueAnnuity2 == futureValueAnnuity1, presentValuePaymentReceived]//Flatten//Simplify假定不同的股市情况,绘制现在必须放入帐户的通胀调整款额与退休时得到的通胀调整款额的图形:
plotFunctions = Table[presentValuePaymentReceived /. (sol /. Prepend[assumptions, marketRate -> j]),
{j, .05, .12, .01}];Plot[
plotFunctions,
{presentValuePaymentMade, 50, 500}, GridLines -> Automatic, Frame -> True, Axes -> None, FrameLabel -> {"(inflation adjusted) payment made into retirement account", "Present value of (inflation adjusted)
payment received at retirement"}, PlotLabel -> "Annuity Rate = " <> ToString[100 * (annuityRate /. assumptions)] <> "%, Stock Mkt Rate 5-10%", ImageSize -> 400, BaseStyle -> (FontFamily -> "Helvetica")]如果要获得一定数目的退休金(通货膨胀调整),必须要在退休账户放入指定数目的的当前支付(通货膨胀调整). 在这种情况下,绘制股市利率和最终年金率的组合:
myPresentValuePaymentMade = 500;myPresentValuePaymentReceived = 1000;paymentAsFunctionOfRates = (presentValuePaymentReceived /. sol /. Flatten[Prepend[assumptions, {presentValuePaymentMade -> myPresentValuePaymentMade, marketRate -> r1, annuityRate -> r2}]])//Simplify;ratePlotData = Table[{i, r2 /. FindRoot[paymentAsFunctionOfRates - myPresentValuePaymentReceived /. r1 -> i, {r2, 0}]}, {i, .05, .12, .005}];ListLinePlot[ratePlotData, GridLines -> Automatic, AxesLabel -> {"stock market rate", "annuity rate"}, PlotLabel -> "Combination of stock mkt rate vs. annuity rate
necessary in order to receive a future (inflation adjusted)
payment of " <> ToString[myPresentValuePaymentReceived] <> " by making a current (inflation adjusted) payment of " <> ToString[myPresentValuePaymentMade] , ImageSize -> 500, BaseStyle -> (FontFamily -> "Helvetica")]如果要获得一定数目的退休金(通货膨胀调整),必须要在退休账户放入指定数目的的当前支付(通货膨胀调整). 绘制退休年龄与最终年龄的组合关系图形:
myPresentValuePaymentMade2 = 400;myPresentValuePaymentReceived2 = 1000;currentAge = 40;paymentAsFunctionOfAge = (presentValuePaymentReceived /. sol /. Flatten[Prepend[assumptions, {presentValuePaymentMade -> myPresentValuePaymentMade2, yearsToFinalAge -> yfa, yearsToRetirement -> yr}]])//Simplifysol0 = 7.;sol1 = 7.;
ratePlotData2 = Table[
{sol0, sol1} = {sol1, yfa /. FindRoot[paymentAsFunctionOfAge - myPresentValuePaymentReceived2 /. yr -> i, {yfa, 2sol1 - sol0}]};
{currentAge + i, currentAge + sol1}, {i, 5, 30}];ListLinePlot[ratePlotData2, GridLines -> Automatic, AxesLabel -> {"retirement age", "final age"}, PlotLabel -> "Combination of retirement age vs. final age
necessary in order to receive a future (inflation adjusted)
payment of " <> ToString[myPresentValuePaymentReceived] <> " by making a current (inflation adjusted) payment of " <> ToString[myPresentValuePaymentMade] , ImageSize -> 500, BaseStyle -> (FontFamily -> "Helvetica")]文本
Wolfram Research (2010),Annuity,Wolfram 语言函数,https://reference.wolfram.com/language/ref/Annuity.html.
CMS
Wolfram 语言. 2010. "Annuity." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/Annuity.html.
APA
Wolfram 语言. (2010). Annuity. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/Annuity.html 年
BibTeX
@misc{reference.wolfram_2026_annuity, author="Wolfram Research", title="{Annuity}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/Annuity.html}", note=[Accessed: 18-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_annuity, organization={Wolfram Research}, title={Annuity}, year={2010}, url={https://reference.wolfram.com/language/ref/Annuity.html}, note=[Accessed: 18-August-2026]}