time-value-of-money
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTime Value of Money
货币时间价值
Purpose
用途
This skill enables Claude to perform present value, future value, and discounted cash flow calculations across all standard compounding conventions. It covers annuities, perpetuities, amortization schedules, NPV, and IRR, providing the foundational building blocks for virtually all financial valuation and planning tasks.
该技能使Claude能够在所有标准复利计息方式下执行现值、终值和现金流折现计算。它涵盖年金、永续年金、摊销计划表、NPV和IRR,为几乎所有金融估值和规划任务提供基础模块。
Layer
层级
0 — Mathematical Foundations
0 — 数学基础
Direction
适用方向
both (retrospective for valuing past cash flows, prospective for projecting future values)
双向(回顾性用于评估过去现金流,前瞻性用于预测未来价值)
When to Use
适用场景
- Discounting future cash flows
- Building amortization tables
- Comparing investments with different timing
- Calculating loan payments
- NPV or IRR analysis
- 未来现金流折现
- 构建摊销表
- 不同时间点投资对比
- 计算贷款还款额
- NPV或IRR分析
Core Concepts
核心概念
Future Value (FV)
终值(FV)
The value of a present sum after earning interest for periods at rate per period.
nr$$FV = PV \times (1 + r)^n$$
Future value grows exponentially with time, which is the mathematical basis of compound interest.
一笔现值在利率下经过期计息后的价值。
rn$$FV = PV \times (1 + r)^n$$
终值随时间呈指数增长,这是复利的数学基础。
Present Value (PV)
现值(PV)
The current worth of a future sum, discounted back at rate for periods. This is the inverse of future value.
rn$$PV = \frac{FV}{(1 + r)^n}$$
Present value is the cornerstone of all valuation: a dollar today is worth more than a dollar tomorrow because of the opportunity cost of capital.
未来一笔资金在利率下折现期后的当前价值。它是终值的逆运算。
rn$$PV = \frac{FV}{(1 + r)^n}$$
现值是所有估值的基石:今天的一美元比明天的一美元更有价值,因为存在资本的机会成本。
Compounding Conventions
复利计息方式
Interest can compound at different frequencies. The nominal annual rate compounded times per year produces different effective yields.
r_nommDiscrete compounding (m times per year):
$$FV = PV \times \left(1 + \frac{r_{nom}}{m}\right)^{m \times t}$$
Continuous compounding:
$$FV = PV \times e^{r \times t}$$
Effective Annual Rate (EAR):
$$EAR = \left(1 + \frac{r_{nom}}{m}\right)^m - 1$$
For continuous compounding:
EAR = e^(r_nom) - 1Common frequencies:
| Frequency | m |
|---|---|
| Annual | 1 |
| Semi-annual | 2 |
| Quarterly | 4 |
| Monthly | 12 |
| Daily | 365 |
| Continuous | infinity |
利息可以按不同频率复利计息。名义年利率每年复利次会产生不同的有效收益率。
r_nomm离散复利(每年复利m次):
$$FV = PV \times \left(1 + \frac{r_{nom}}{m}\right)^{m \times t}$$
连续复利:
$$FV = PV \times e^{r \times t}$$
有效年利率(EAR):
$$EAR = \left(1 + \frac{r_{nom}}{m}\right)^m - 1$$
对于连续复利:
EAR = e^(r_nom) - 1常见复利频率:
| 频率 | m |
|---|---|
| 年度 | 1 |
| 半年度 | 2 |
| 季度 | 4 |
| 月度 | 12 |
| 每日 | 365 |
| 连续 | 无穷大 |
Ordinary Annuity
普通年金
A series of equal payments made at the end of each period for periods.
nPresent Value:
$$PV = PMT \times \frac{1 - (1 + r)^{-n}}{r}$$
Future Value:
$$FV = PMT \times \frac{(1 + r)^n - 1}{r}$$
在期内每期期末支付的一系列等额款项。
n现值:
$$PV = PMT \times \frac{1 - (1 + r)^{-n}}{r}$$
终值:
$$FV = PMT \times \frac{(1 + r)^n - 1}{r}$$
Annuity Due
期初年金
A series of equal payments made at the beginning of each period. Each cash flow is one period closer than in an ordinary annuity, so values are scaled by .
(1 + r)Present Value:
$$PV = PMT \times \frac{1 - (1 + r)^{-n}}{r} \times (1 + r)$$
Future Value:
$$FV = PMT \times \frac{(1 + r)^n - 1}{r} \times (1 + r)$$
在期内每期期初支付的一系列等额款项。每笔现金流比普通年金早一期,因此价值需乘以。
n(1 + r)现值:
$$PV = PMT \times \frac{1 - (1 + r)^{-n}}{r} \times (1 + r)$$
终值:
$$FV = PMT \times \frac{(1 + r)^n - 1}{r} \times (1 + r)$$
Growing Annuity
增长年金
A finite series of payments that grow at a constant rate per period, where .
gg != rPresent Value:
$$PV = \frac{PMT}{r - g} \times \left[1 - \left(\frac{1 + g}{1 + r}\right)^n\right]$$
This is widely used in equity valuation (e.g., multi-stage dividend discount models) and salary/pension projections.
每期以固定增长率增长的有限系列款项,其中。
gg != r现值:
$$PV = \frac{PMT}{r - g} \times \left[1 - \left(\frac{1 + g}{1 + r}\right)^n\right]$$
广泛应用于股权估值(如多阶段股利折现模型)和薪资/养老金预测。
Perpetuity
永续年金
An infinite stream of equal payments.
$$PV = \frac{PMT}{r}$$
无限期的等额款项系列。
$$PV = \frac{PMT}{r}$$
Growing Perpetuity
增长永续年金
An infinite stream of payments growing at constant rate , where for convergence.
gg < r$$PV = \frac{PMT}{r - g}$$
This is the Gordon Growth Model when applied to dividends.
每期以固定增长率增长的无限期款项系列,其中以确保收敛。
gg < r$$PV = \frac{PMT}{r - g}$$
应用于股利估值时即为Gordon Growth Model。
Net Present Value (NPV)
净现值(NPV)
The sum of all discounted cash flows, including the initial investment. A positive NPV indicates value creation.
$$NPV = \sum_{t=0}^{T} \frac{CF_t}{(1 + r)^t}$$
Typically, is a negative outflow (initial investment), and subsequent are inflows.
CF_0CF_t所有折现现金流的总和,包括初始投资。正NPV表明创造了价值。
$$NPV = \sum_{t=0}^{T} \frac{CF_t}{(1 + r)^t}$$
通常,为负的流出(初始投资),后续为流入。
CF_0CF_tInternal Rate of Return (IRR)
内部收益率(IRR)
The discount rate that makes the NPV of all cash flows exactly zero.
r$$0 = \sum_{t=0}^{T} \frac{CF_t}{(1 + r)^t}$$
IRR is solved numerically (Newton-Raphson or bisection) since there is no closed-form solution for general cash flow streams. For conventional cash flows (one sign change), a unique IRR exists.
使所有现金流的NPV恰好为零的折现率。
r$$0 = \sum_{t=0}^{T} \frac{CF_t}{(1 + r)^t}$$
由于一般现金流序列没有闭式解,IRR需通过数值方法求解(如牛顿-拉夫逊法或二分法)。对于常规现金流(仅一次符号变化),存在唯一的IRR。
Amortization
摊销
Each payment on an amortizing loan is split into an interest component and a principal component:
- Interest portion:
Interest_t = Balance_{t-1} * r - Principal portion:
Principal_t = PMT - Interest_t - Remaining balance:
Balance_t = Balance_{t-1} - Principal_t
Over time, the interest portion decreases and the principal portion increases.
分期偿还贷款的每笔还款分为利息部分和本金部分:
- 利息部分:
Interest_t = Balance_{t-1} * r - 本金部分:
Principal_t = PMT - Interest_t - 剩余余额:
Balance_t = Balance_{t-1} - Principal_t
随着时间推移,利息部分逐渐减少,本金部分逐渐增加。
Key Formulas
关键公式
| Formula | Expression | Use Case |
|---|---|---|
| Future Value | | Compound a lump sum forward |
| Present Value | | Discount a future lump sum |
| EAR | | Compare rates across compounding frequencies |
| Continuous FV | | Continuous compounding |
| Ordinary Annuity PV | | Loan payments, lease valuation |
| Annuity Due PV | | Rent, insurance (paid in advance) |
| Growing Annuity PV | | Salary streams, growing dividends |
| Perpetuity PV | | Preferred stock, consol bonds |
| Growing Perpetuity PV | | Gordon Growth Model |
| NPV | | Project/investment evaluation |
| IRR | | Return metric for uneven cash flows |
| 公式 | 表达式 | 适用场景 |
|---|---|---|
| 终值 | | 一次性款项复利增值 |
| 现值 | | 未来一次性款项折现 |
| 有效年利率 | | 对比不同复利频率的利率 |
| 连续复利终值 | | 连续复利计息 |
| 普通年金现值 | | 贷款还款额、租赁估值 |
| 期初年金现值 | | 租金、保险(提前支付) |
| 增长年金现值 | | 薪资流、增长型股利 |
| 永续年金现值 | | 优先股、统一公债 |
| 增长永续年金现值 | | Gordon Growth Model |
| 净现值 | | 项目/投资评估 |
| 内部收益率 | | 非均匀现金流的回报指标 |
Worked Examples
示例演算
Example 1: Monthly Mortgage Payment
示例1:抵押贷款月还款额
Given: A $300,000 mortgage at a 6.5% annual interest rate, fixed for 30 years, with monthly payments (ordinary annuity).
Calculate: The monthly payment amount.
Solution:
First, convert the annual rate to a monthly rate and years to months:
r_monthly = 0.065 / 12 = 0.00541667
n = 30 * 12 = 360 monthsUsing the ordinary annuity present value formula, solve for PMT:
PV = PMT * [1 - (1 + r)^(-n)] / r
300,000 = PMT * [1 - (1.00541667)^(-360)] / 0.00541667Compute the annuity factor:
(1.00541667)^360 = 6.99179
(1.00541667)^(-360) = 0.143010
1 - 0.143010 = 0.856990
0.856990 / 0.00541667 = 158.2108Solve for PMT:
PMT = 300,000 / 158.2108 = $1,896.20The monthly mortgage payment is $1,896.20.
Over 30 years, total payments = , meaning total interest paid is .
360 * $1,896.20 = $682,632$682,632 - $300,000 = $382,632已知: 30万美元抵押贷款,年利率6.5%,固定期限30年,按月还款(普通年金)。
计算: 月还款额。
解决方案:
首先将年利率转换为月利率,年数转换为月数:
r_monthly = 0.065 / 12 = 0.00541667
n = 30 * 12 = 360 months使用普通年金现值公式求解PMT:
PV = PMT * [1 - (1 + r)^(-n)] / r
300,000 = PMT * [1 - (1.00541667)^(-360)] / 0.00541667计算年金因子:
(1.00541667)^360 = 6.99179
(1.00541667)^(-360) = 0.143010
1 - 0.143010 = 0.856990
0.856990 / 0.00541667 = 158.2108求解PMT:
PMT = 300,000 / 158.2108 = $1,896.20抵押贷款月还款额为**$1,896.20**。
30年总还款额 = ,意味着支付的总利息为。
360 * $1,896.20 = $682,632$682,632 - $300,000 = $382,632Example 2: NPV of a Project with Uneven Cash Flows
示例2:非均匀现金流项目的NPV
Given: A project requires an initial investment of $50,000 and produces the following cash flows:
- Year 1: $12,000
- Year 2: $15,000
- Year 3: $18,000
- Year 4: $22,000
- Year 5: $25,000
The required rate of return (discount rate) is 10%.
Calculate: The NPV and whether the project should be accepted.
Solution:
Discount each cash flow to present value:
PV(CF_0) = -50,000 / (1.10)^0 = -50,000.00
PV(CF_1) = 12,000 / (1.10)^1 = 10,909.09
PV(CF_2) = 15,000 / (1.10)^2 = 12,396.69
PV(CF_3) = 18,000 / (1.10)^3 = 13,524.21
PV(CF_4) = 22,000 / (1.10)^4 = 15,026.30
PV(CF_5) = 25,000 / (1.10)^5 = 15,523.03Sum all present values:
NPV = -50,000.00 + 10,909.09 + 12,396.69 + 13,524.21 + 15,026.30 + 15,523.03
NPV = +$17,379.32Since NPV is positive ($17,379.32), the project creates value and should be accepted. It earns more than the 10% required rate of return.
To find the IRR, we would solve for the rate where NPV = 0. Numerically, the IRR for this cash flow stream is approximately 21.0%, well above the 10% hurdle rate.
已知: 一个项目需要初始投资5万美元,产生以下现金流:
- 第1年:1.2万美元
- 第2年:1.5万美元
- 第3年:1.8万美元
- 第4年:2.2万美元
- 第5年:2.5万美元
要求的回报率(折现率)为10%。
计算: NPV以及是否应接受该项目。
解决方案:
将每个现金流折现至现值:
PV(CF_0) = -50,000 / (1.10)^0 = -50,000.00
PV(CF_1) = 12,000 / (1.10)^1 = 10,909.09
PV(CF_2) = 15,000 / (1.10)^2 = 12,396.69
PV(CF_3) = 18,000 / (1.10)^3 = 13,524.21
PV(CF_4) = 22,000 / (1.10)^4 = 15,026.30
PV(CF_5) = 25,000 / (1.10)^5 = 15,523.03求和所有现值:
NPV = -50,000.00 + 10,909.09 + 12,396.69 + 13,524.21 + 15,026.30 + 15,523.03
NPV = +$17,379.32由于NPV为正($17,379.32),该项目创造价值,应被接受。它的回报率超过了要求的10%。
要计算IRR,我们需要求解使NPV=0的利率。通过数值计算,该现金流序列的IRR约为21.0%,远高于10%的门槛利率。
Common Pitfalls
常见误区
- Mismatching rate and period frequency: if payments are monthly, the discount rate must be a monthly rate. Divide the annual nominal rate by 12, do not take the 12th root of unless converting from EAR.
(1 + annual rate) - Forgetting the sign convention for cash flows in IRR: outflows (investments) must be negative and inflows (returns) positive, or vice versa, but the convention must be consistent. Incorrect signs produce meaningless IRR results.
- Confusing nominal vs effective rates: a 12% nominal rate compounded monthly produces an EAR of 12.68%, not 12%. Always clarify the compounding basis.
- Off-by-one errors in annuity due vs ordinary annuity: an annuity due shifts all payments one period earlier. Forgetting the adjustment factor will undervalue annuity-due streams.
(1 + r) - Multiple IRR solutions with non-conventional cash flows: when cash flows change sign more than once (e.g., initial outflow, inflows, then a large terminal outflow), Descartes' rule allows up to as many positive real IRR solutions as there are sign changes. In such cases, use NPV profiling or the Modified IRR (MIRR) instead.
- 利率与周期频率不匹配:如果还款是按月进行的,折现率必须是月利率。将名义年利率除以12,除非是从EAR转换,否则不要对开12次方根。
(1 + 年利率) - IRR计算中现金流符号约定错误:流出(投资)必须为负,流入(回报)必须为正,反之亦然,但约定必须一致。错误的符号会导致无意义的IRR结果。
- 混淆名义利率与有效利率:名义年利率12%按月复利产生的EAR为12.68%,而非12%。务必明确复利基础。
- 期初年金与普通年金的计数错误:期初年金将所有现金流提前一期。忘记乘以调整因子会低估期初年金的价值。
(1 + r) - 非常规现金流存在多个IRR解:当现金流符号变化超过一次时(如初始流出、流入,然后大额期末流出),根据笛卡尔法则,正实根IRR的数量最多等于符号变化的次数。在这种情况下,应使用NPV分析或修正内部收益率(MIRR)替代。
Cross-References
交叉参考
- return-calculations (core plugin, Layer 0): CAGR is a special case of compound growth; MWR/IRR uses the same NPV=0 framework
- statistics-fundamentals (core plugin, Layer 0): Discount rate estimation often relies on regression (CAPM beta) and distributional assumptions
- return-calculations(核心插件,层级0):CAGR是复利增长的特例;MWR/IRR使用相同的NPV=0框架
- statistics-fundamentals(核心插件,层级0):折现率估算通常依赖回归(CAPM贝塔)和分布假设
Reference Implementation
参考实现
See for computational helpers.
scripts/time_value_of_money.py详见获取计算工具。
scripts/time_value_of_money.py