Time Value Module¶
??? example "present_value"
from startup_valuation.tv import present_value
result = present_value(future_value=1_000_000, rate=0.10, periods=5)
print(f"Present value: ${result.value:,.0f}") # $620,921
??? example "net_present_value"
from startup_valuation.tv import net_present_value
result = net_present_value(
cash_flows=[-1_000_000, 300_000, 400_000, 500_000, 600_000],
rate=0.10,
)
print(f"NPV: ${result.value:,.0f}") # $348,941
??? example "annuity_present_value"
from startup_valuation.tv import annuity_present_value
result = annuity_present_value(payment=100_000, rate=0.08, periods=10)
print(f"Annuity PV: ${result.value:,.0f}") # $671,008
startup_valuation.tv
¶
Time value of money calculations.
Chapter 2: Mathematical Foundations — Time Value of Money
Classes¶
Functions:¶
present_value(future_value, rate, periods)
¶
Calculate present value of a single future cash flow.
Formula: PV = C / (1 + r)^t
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
future_value
|
float
|
Future cash flow (C). |
required |
rate
|
float
|
Discount rate (r). |
required |
periods
|
float
|
Number of periods (t). |
required |
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with present value. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If rate < -1. |
Notes
Present value discounts a single future cash flow to today's dollars:
$$PV = \frac{C}{(1 + r)^t}$$
Foundation of all DCF and NPV calculations. Higher discount rates or longer time horizons reduce present value.
References
Startup Valuation textbook, Chapter 2, Section 2.2.
See Also
net_present_value : Sum of discounted cash flows. annuity_present_value : Perpetual or fixed-period payments.
Example
result = present_value(11000, 0.08, 1) round(result.value, 2) 10185.19
Source code in src/startup_valuation/tv.py
net_present_value(cash_flows, rate)
¶
Calculate net present value of a series of cash flows.
Formula: NPV = Σ Cₜ / (1 + r)^t
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cash_flows
|
list[float]
|
Cash flows at each period (C₀, C₁, ..., Cₜ). |
required |
rate
|
float
|
Discount rate (r). |
required |
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with NPV. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If rate < -1. |
Notes
Net present value sums all discounted cash flows:
$$NPV = \sum_{t=0}^{n} \frac{CF_t}{(1 + r)^t}$$
The first element is typically negative (initial investment). NPV > 0 indicates value creation. Used in DCF valuation and capital budgeting.
References
Startup Valuation textbook, Chapter 2, Section 2.3.
See Also
present_value : Single cash flow discounting. dcf_valuation : Full DCF with terminal value.
Example
result = net_present_value([-100000, 30000, 40000, 50000], 0.10) round(result.value, 0) -2103.0
Source code in src/startup_valuation/tv.py
annuity_present_value(payment, rate, periods)
¶
Calculate present value of an annuity.
Formula: PV = C × [(1 - (1 + r)^(-n)) / r]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payment
|
float
|
Periodic payment (C). |
required |
rate
|
float
|
Discount rate per period (r). |
required |
periods
|
int
|
Number of periods (n). |
required |
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with present value. |
Notes
Present value of equal payments at end of each period:
$$PV = C \times \left[\frac{1 - (1 + r)^{-n}}{r}\right]$$
When r = 0, PV = C × n. Used for valuing fixed-payment streams like lease payments or subscription revenue.
References
Startup Valuation textbook, Chapter 2, Section 2.4.
See Also
present_value : Single cash flow. net_present_value : Variable flows.
Example
result = annuity_present_value(50000, 0.10, 4) round(result.value, 0) 158495.0
Source code in src/startup_valuation/tv.py
dcf_valuation(cash_flows, rate, terminal_growth=0.0)
¶
Discounted cash flow with an explicit forecast plus a Gordon terminal value.
Formula: DCF = Σ Cₜ/(1+r)^t + [C_n (1+g)/(r−g)] / (1+r)^n
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cash_flows
|
list[float]
|
Forecast free cash flows for periods t=1..n, in currency units. |
required |
rate
|
float
|
Discount rate (r), must exceed terminal_growth. |
required |
terminal_growth
|
float
|
Perpetual growth rate (g) applied after the forecast window. |
0.0
|
Returns:
| Type | Description |
|---|---|
ValuationResult
|
ValuationResult with the DCF value (enterprise value). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If cash_flows is empty, or rate <= terminal_growth. |
Notes
The explicit forecast is discounted period by period and a Gordon growth terminal value captures all cash flows beyond the horizon:
$$DCF = \sum_{t=1}^{n} \frac{CF_t}{(1+r)^t} + \frac{CF_n (1+g)}{(r-g)(1+r)^n}$$
Set terminal_growth=0 for a flat perpetuity. Standard for discounting
projected startup cash flows when a terminal value is material.
References
Startup Valuation textbook, Chapter 2, Section 2.3.
See Also
net_present_value : NPV without a terminal value. wacc : Build the discount rate (r) from cost of equity and debt.
Example
result = dcf_valuation([100000, 120000, 140000], 0.12, 0.03) round(result.value, 0) 1425028.0