Financial Analytics
A Practitioner's Resourcekit
Author: Thiru Praturi
Option-Greek Sensitivities
skip to the main content area of this page

Skip Navigation LinksThiruspace.com : SampleTopics : YTM Calcs 4.2.5

Simple YTM calculation - using iterative procs


In this section, we will examine computation of a straight bond's YTM using a popular technique called bisection. Inherent limitation of this model is that, it assumes reinvestment of bond coupons at that very bond's yield-to-maturity level. (not realistic, but let's examine the calc procedure).

The algorithm here starts with a bottom yield assumption and we then find the upper bound by increasing the interest rate until the bond price turns negative (annual compounding assumed). With that starting point, we operate a For..while loop, taking an average of the bottom and top guestimates, until we can refine to a point where the clean price is equal to the calculated bond price (subject to a pre-defined accuracy level).
 
Bond YTM calculation using Bisection Method

Bond Maturity (num Years) Years
Bond Price ($)
Bond Coupon (Pct) %    
Bond Par Value    
Yield to Maturity
 
<= Click here, after updating above fields.