Cashflow
更多信息
- TimeValue[Cashflow[…],interest,t] 将一个现金流的时值算作指定时刻 t 的等价单笔付款. 可能的现金流计算包净现值、 贴现现金流和内部收益率.
- 时间和金额可以用数字或任意符号表达式给出.
- 在 Cashflow[{{time1,c1},…}] 中,timei 可以用数值或日期表达式给出.
- Cashflow[{c0,c1,c2,…}] 等价于 Cashflow[{{0,c0},{1,c1},{2,c2},…}].
- TimeValue[Cashflow[{{date0,c0},…}],r,date] 计算 date 时一个现金流的时值.
- Cashflow[Annuity[…]] 将 Annuity 对象转换为 Cashflow 对象.
范例
打开所有单元 关闭所有单元基本范例 (4)
TimeValue[Cashflow[{0, 100, 250, 300, 200, 500}], .07, 0]TimeValue[Cashflow[{50, 100, 250, 300}, 1 / 2], r, 0]TimeValue[Cashflow[{{2, 100}, {5, 200}, {7.5, 200}, {10, 500}}], .09, 10]TimeValue[Cashflow[{-1000, 100, 200, 300, 400, 500}], .07, 0]范围 (6)
Cashflow[Annuity[100 #&, 6]]Cashflow 作用于日期表达式:
TimeValue[Cashflow[{{{2010, 1, 1}, -600}, {{2011, 1, 1}, 300}, {{2012, 1, 1}, 400}}], .08, {2009, 1, 1}]通过 TimeSeries 指定Cashflow:
cf = Cashflow[TemporalData[TimeSeries, {{{0.04, 0.05, 0.06, 0.07, 0.08}}, {{0, 4, 1}}, 1, {"Continuous", 1},
{"Discrete", 1}, 1, {ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False,
10.1]];TimeValue[cf, 3]Cashflow 作用于符号式参数:
TimeValue[Cashflow[{c1, c2, c3, c4}], r, t]TimeValue[Cashflow[{c1, c2, c3, c4}, 1 / f], r, t]TimeValue[Cashflow[{{p1, c1}, {p2, c2}, {p3, c3}}], r, t]Cashflow[Annuity[pmt + g (# - 1)&, 10]]涉及 Cashflow 的方程的解可以用符号式参数的形式表示:
Solve[TimeValue[Cashflow[{c0, c1, c2, c3}], r, n] == val, c3]利用导数 D 计算一系列现金流的久期:
val = TimeValue[Cashflow[{100, 100, 300, 300, 400, 400, 500}], r, 0]duration = (-(1 + r)/val)D[val, r]duration /. r -> .05应用 (6)
FindRoot[ TimeValue[Cashflow[{-1000, 100, 200, 300, 400, 500}], r, 0] == 0, {r, .05}]Solve[TimeValue[Cashflow[{-1000, 300, pmt, 250, 500}], .08, 0] == 0, pmt]Solve[TimeValue[Cashflow[{{0, -1000}, {2, 300}, {t, 400}, {5, 600}}], .08, 0] == 0, t]//Quiet为了在第8年年末得到$600的回报,某人现在支付$100,在5年末支付$200,然后在10年末支付最后一笔款额. 求最后这笔款额为多少能够使得投资回报率等于8%,每半年计算复利:
Solve[TimeValue[Cashflow[{{0, -100}, {5, -200}, {8, 600}, {10, pmt}}], EffectiveInterest[.08, 1 / 2], 0] == 0, pmt]$100、$200和$500的款额将分别在2、3和8年末付清. 求$800在哪个时间点支付使得这两种投资在利率为5%时等价:
Solve[TimeValue[Cashflow[{{2, 100}, {3, 200}, {8, 500}}], .05, t] == 800, t]//Quiet在实际利率为多少时,2年末的$2000和4年末的$3000的现值将等于$4000:
FindRoot[TimeValue[Cashflow[{{2, 2000}, {4, 3000}}], r, 0] == 4000 , {r, .05}]属性和关系 (3)
只有一个现金流的 Cashflow 对象等价于一笔简单的款额:
TimeValue[Cashflow[{{5, 100}}], r, 0]TimeValue[100, r, -5]遵守一种模式的大型现金流量序列可以通过 Annuity 使用支付增长函数生成:
Cashflow[Annuity[100 (1 + g)^2# - 1&, 5, 1 / 2]]也可以使用 Table 来创建大型现金流:
Cashflow[Table[{i / 2, 100Mod[i, 5]}, {i, 1, 30}]]利用 Plot 和 Plot3D 研究一系列现金流与一组变量的不同相互关系:
g1 = TimeValue[Cashflow[{pmt, (1 + g) pmt, (1 + g)^2 pmt, (1 + g)^3 pmt, (1 + g)^4 pmt}], r, n]Plot[g1 /. {pmt -> 100, n -> 10, g -> .1}, {r, .01, .15}, AxesLabel -> {"interest", "value"}, ImageSize -> 250]Plot[g1 /. {pmt -> 150, n -> 10, r -> .07}, {g, -.2, .2}, AxesLabel -> {"payment growth rate", "value"}, ImageSize -> 300]使用 Plot3D 观察利率/增长率的立体景观:
Plot3D[g1 /. {pmt -> 100, n -> 10}, {r, .01, .15}, {g, -.2, .2}, AxesLabel -> {"interest", "growth", "value"}, ImageSize -> 250]可能存在的问题 (2)
当指定的估值时间段位于 Cashflow 对象的两笔付款之间时,TimeValue 计算在估值时间段之前的所有现金流的终值,在估值时间段之后所有现金流的现值:
TimeValue[Cashflow[{{1, 100}, {2, 200}, {3, 300}, {4, 400}}], .08, 2.5]TimeValue[Cashflow[{{1, 100}, {2, 200}}], .08, 2.5] + TimeValue[Cashflow[{{3, 300}, {4, 400}}], .08, 2.5]Cashflow[Annuity[pmt,n,q]] 仅对数值式 n 和 f 有效:
Cashflow[Annuity[pmt, n]]使用数值式 n 允许 Cashflow 转换为希望的 Annuity 对象:
Cashflow[Annuity[pmt, 5]]互动范例 (1)
使用 Manipulate 研究一系列现金流与一组变量的不同相互关系:
Manipulate[
Plot[
Evaluate[
TimeValue[Cashflow[{pmt, 100 + pmt, 200 + pmt, 300 + pmt, 400 + pmt, 500 + pmt, 600 + pmt, 700 + pmt, 800 + pmt, 900 + pmt}], 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)
cfspecs = Table[{i, 100 * (-1)^Floor[i, 5]Mod[i, 5]}, {i, 1, 30}];g1 = ListPlot[cfspecs, Filling -> Axis, AspectRatio -> 1 / 2, ImageSize -> 400]totalval = Table[{cfspecs[[i, 1]], TimeValue[Cashflow[cfspecs[[1 ;; i]]], .05, cfspecs[[i, 1]]]}, {i, 1, Length[cfspecs]}];g2 = ListLinePlot[totalval, PlotStyle -> {Thickness[.004], Orange}, InterpolationOrder -> 3];Show[{g1, g2}, PlotRange -> All]文本
Wolfram Research (2010),Cashflow,Wolfram 语言函数,https://reference.wolfram.com/language/ref/Cashflow.html.
CMS
Wolfram 语言. 2010. "Cashflow." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/Cashflow.html.
APA
Wolfram 语言. (2010). Cashflow. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/Cashflow.html 年
BibTeX
@misc{reference.wolfram_2026_cashflow, author="Wolfram Research", title="{Cashflow}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/Cashflow.html}", note=[Accessed: 16-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_cashflow, organization={Wolfram Research}, title={Cashflow}, year={2010}, url={https://reference.wolfram.com/language/ref/Cashflow.html}, note=[Accessed: 16-September-2026]}