# Yield to Maturity (YTM) of a Bond

The yield to maturity (YTM) of a bond is the rate of return earned by an investor if he holds the bond till maturity. It is the overall return earned by the investor who purchases the bond at the market price and holds it till maturity.

It is the internal rate of return of the bond. The calculation assumes that all the cash flows from the bond are discounted at the same rate, and also reinvested at the same rate.

The YTM can be calculated from the bond pricing formula, using the trial and error technique.

$V= \sum_{t=1}^{n}\frac{C}{\left ( 1+i \right )^{n}}+\frac{P}{\left( 1+i \right )^{n}}$

Where:

- P is the price of the bond
- i is the rate of return or YTM
- C is the coupon
- P is the principal amount

Assume that we have a $100 par bond, paying a coupon of 10%, currently trading at $85, and has 10 years remaining until maturity.

We can calculate the YTM using the above formula. We have all the factors, except i.

V = $85

P = $100

n = 10

C = $10

I =??

Using the trial and error method, we can calculate the YTM, which in this case will be 12.735%.

# R Programming Bundle: 25% OFF

**R Programming - Data Science for Finance Bundle**for just $29 $39.