Bond Valuation and Analysis in R
Clifford Ang
Senior Vice President, Compass Lexecon
$$
$$V = \sum_{t=1}^{T} \frac{CF_t}{(1+y)^t}$$
$CF$: cash flows
$y$: discount rate
$$\sum_{t=1}^{T-1} \frac{CF_t}{(1+y)^t}$$
$$V = \sum_{t=1}^{T-1} \frac{CF_t}{(1+y)^t} + \frac{C_T + P}{(1+y)^T}$$
$$
$$V = \sum_{t=1}^{T} \frac{CF_t}{(1+y)^t} + \frac{C_T + P}{(1+y)^T}$$
$$
cf <- c(c1, c2, c3, c4, c5, ...)
data.frame()
commandcf <- data.frame(cf)
cf$t <- c(1, 2, 3, 4, 5, ...)
cf$pv_factor <- 1 / (1 + y)^cf$t
pv_factor <- 1 / (1 + .10)^2
pv_factor
0.8264463
cf$pv <- cf$cf * cf$pv_factor
sum(cf$pv)
Bond Valuation and Analysis in R