Questions:
An investor is considering investing $100,000 in bonds. One potential option is a 3 years fixed-rate bond paying semiannual coupon of 5%. The bond is available for purchase at $930 per $1000.

What is the yield to maturity of this bond (on an annual basis)?

There is another option on the market, a 3 years 5% fixed-rate bond which pays interest quarterly. The bond is available for purchase at a price $940 per $1000.

Which of these two options has a higher yield to maturity?

Reference answers:
Yield to Maturity is the expected return on a bond if the bond is held till the time it matures. 
The yield to maturity can be found using the following formula: 
Price = Coupon (1+YTM) ^ -1 + Coupon (1+YTM) ^ -2 + .... + (coupon + face value) (1+YTM) ^-n


The yield to maturity of the fixed rate bond can be determined using the following formula:
930 = 25 (1+YTM) ^ -1 + 25 (1+YTM) ^ -2 + 25 (1+YTM) ^-3 + 25 (1+YTM) ^-4 + 25 (1+YTM) ^-5 + 1025 (1+YTM) ^-6
YTM = 3.828%
To convert this to annual yield, this YTM will be multiplied by 2.
YTM annual = 3.828% * 2 = 7.656% 

Therefore, the yield to maturity of this bond is 7.656%

The yield to maturity of the fixed rate bond can be determined using the following formula:
960 = 12.5 (1+YTM) ^ -1 + 12.5 (1+YTM) ^ -2 + 12.5 (1+YTM) ^-3 + 12.5 (1+YTM) ^-4 + 12.5 (1+YTM) ^-5 + 12.5 (1+YTM) ^-6 + 12.5 (1+YTM) ^-7 + 12.5 (1+YTM) ^-8 + 12.5 (1+YTM) ^-9 + 12.5 (1+YTM) ^-10 + 12.5 (1+YTM) ^-11 + 1125 (1+YTM) ^-12
Quarterly YTM = 1.625%
To convert this to annual yield, this YTM will be multiplied by 4
YTM annual = 1.625% * 4 = 6.500%

The first bond has a YTM of 7.656% and the second bond has a YTM of 6.5% (on an annual basis). The first bond has a higher YTM.