In this post, we will compute the price of a bond and it's duration using a an excel/spreadsheet, as always I use openoffice for my spreadsheet computations and you can always import the openoffice spreadsheet as a Windows compatible excel file.
For calculating the price of the bond and it's duration, we will take a sample problem from Investment Science by Luenberger (Problem 3.10)
Problem 3.10 Find the price and duration of a 10-year, 8% bond that is trading at a yield of 10%.
Based on the formula for the price of a bond and it's duration as discussed in the previous article, we know that for the above case
The price of the bond P = $83.537
Duration of the bond D = 6.84
The same can be calculated quite easily using the below excel/spreadsheet which can be re-used to calculate the price/duration of any bond.