Yield Measures
There are two different yield measures to consider: Yield to Maturity and Realized Compound Yield. Yield to Maturity we have already seen in the Basic Finance course, it is the yield which discounts a bond’s cash flows back to the current price. The realized compound yield is the return an investor will receive if they reinvest all coupons.
A reminder, our YTM function was:
from scipy.optimize import fsolve
def value(r,price,fv,year,cr):
final_pay = fv/(1+r)**year
coupon_payment = (fv*cr)
annuity_value = coupon_payment*(1-(1+r)**(-year))/r
return annuity_value+final_pay-price
def findYield(price,fv,year,cr):
return fsolve(value, cr,(price,fv,year,cr))[0]
findYield(1141.40378526,1000,5,.05)
The realized return is really a lot easier, it is an equation that can be easily solved for.
Challenge
t
= FV
PV = Present Value
FV = Future Value
t = Periods
y = Realized Compound Yield
Solving for both yields with a 5 year 5% coupon bond with face value of 1000, and present value of 800….
print(findYield(800,1000,5,.05))
print((1000/800)**(1/5)-1)