Bond valuation

Bond Valuation and Analysis in R

Clifford Ang

Senior Vice President, Compass Lexecon

Bond valuation

  • Fixed annual coupon rate
  • Fixed maturity date
  • Option-free
Bond Valuation and Analysis in R

Value of an asset

  • The value of an asset = present value of expected future cash flows
  • Cash flows: discounted at the appropriate risk-adjusted discount rate

$$

$$V = \sum_{t=1}^{T} \frac{CF_t}{(1+y)^t}$$

  • $CF$: cash flows

  • $y$: discount rate

Bond Valuation and Analysis in R

Laying out a bond's cash flows

  • Prior to maturity, the investor receives coupon payments

$$\sum_{t=1}^{T-1} \frac{CF_t}{(1+y)^t}$$

  • NB: sum up to $T-1$
  • At maturity, the investor receives the last coupon payment and the par value

$$V = \sum_{t=1}^{T-1} \frac{CF_t}{(1+y)^t} + \frac{C_T + P}{(1+y)^T}$$

Bond Valuation and Analysis in R

Creating a cash flow vector

$$

$$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, ...)
Bond Valuation and Analysis in R

Converting to dataframe

  • So we can add additional columns, we need to convert the cash flow vector into a data frame
  • Use the data.frame() command
    cf <- data.frame(cf)
    
Bond Valuation and Analysis in R

Creating a time index

  • Each cash flow occurs at a certain period of time
    • The unit of the periods will be in years
  • We create a variable that creates a time index
cf$t <- c(1, 2, 3, 4, 5, ...)
Bond Valuation and Analysis in R

Calculating the PV factors

  • To discount the cash flows, we need a "discount rate"
    • For bonds, the discount rate is called a "yield"
  • We create a present value factor used for discounting
cf$pv_factor <- 1 / (1 + y)^cf$t

pv_factor <- 1 / (1 + .10)^2
pv_factor
0.8264463
Bond Valuation and Analysis in R

PV of cash flows

  • We calculate each cash flow's present value
cf$pv <- cf$cf * cf$pv_factor

 

  • The sum of the present values of the bond's cash flow is equal to the bond's value
sum(cf$pv)
Bond Valuation and Analysis in R

Let's practice!

Bond Valuation and Analysis in R

Preparing Video For Download...