Start with, say, a 5-year, annual-pay, 6% coupon bond. Suppose that Treasury spot rates are:
1-year: 1%
2-year: 2%
3-year: 3%
4-year: 4%
5-year: 5%
Calculate the price:
Discount 60 at the 1-year spot rate for one period
Discount 60 at the 2-year spot rate for two periods
Discount 60 at the 3-year spot rate for three periods
Discount 60 at the 4-year spot rate for four periods
Discount 1,060 at the 5-year spot rate for five periods
Tot them up
Calculate the YTM for this bond using Excel’s IRR function; this assumes a flat yield curve.
Increase each spot rate by a spread of, say, 10 bps (0.1%) and do it all over again. Calculate the difference between this YTM and the original YTM. This is the spread for the flat yield curve. Is it greater than, equal to, or less than 10 bps (0.1%)?