I'm creating some .Net libraries for bond pricing and verifying its correctness with a bond pricing excel spreadsheet (Bond Pricing and Yield from Chrisholm Roth) but I believe it calculates the Yield to Horizon erroneously. This site describes how to calculate the Yield to Horizon, with the example given defined below: