The prevailing interest rates at the time of investment are a key driver of bond prices and yields. Keep in mind that bond issuers are always competing with the yields offered in the broader economy. If the prevailing bank interest rate is at 2%, then a bond issuer isn’t likely to find much interest in their bond if it’s also offering a 2% yield. Why? Because if holding onto your cash gets you the same result, why would you take the risk of lending it out for the same yield?
This dynamic becomes more complicated when interest rates change. Say you invested in a bond that yields 2%, but halfway to its maturity the interest rate offered by the banking system rose from 1.5% to 2%.
The issuer of the bond you purchased must now compete with the interest rate offered by the banking sector and so will issue new bonds with a higher yield. This puts the holders of the first 2% yielding bond at a disadvantage as they effectively paid the same for less yield. The only way to redress this imbalance, since the coupon is fixed, is for that first bond to drop in price until its price to yield is the same as the newer, higher-yielding bond.
The same occurs in the case of interest rates falling over time. If wider interest rates fall, then newer bonds will be issued with a lower interest rate. Since coupons are fixed, the older bonds issued at the higher interest rate will have their price go up in order for the coupon payment on the older, higher-yielding bond to match the lower yield of the newer bonds.