To calculate a bond’s yield to maturity using the bond pricing calculator several inputs are needed. They include the spread, settlement date, maturity date, and coupon rate. The number of payments is derived from the payment terms.
Bond prices constantly change just as stocks and all publicly traded securities. For securities traded through an exchange, the last reported price at which a security was sold is the market value (price). The current pricing of the bond can be obtained from the exchange on which the bond trades.
Par value of a bond, also known as the face or principal value, is the amount the bondholder will receive at maturity. For example, a $1,000 par value bond will be worth $1,000 when it matures. The par value remains constant and it set when the bond is originally issued. Our bond calculator is based on this assumption and outputs for bond price, bond derivative and yield to maturity are added to the constant bond price, the outputs are added to any given bond price. . The spread is the difference, in basis points, between the yield curve created from the most recently issued bonds and 30-year treasuries. The settlement date is the date on which ownership of a security actually changes hands. For bonds, a purchaser begins to accrue interest on the settlement date. This information can be obtained from the bond terms.
All bonds have a maturity date which can range from a few months to many years. This date is important in the yield calculation because it determines the end of the interest payment cash flow stream and when the par value will be returned to the bond holder.
The coupon rate is the interest rate the bond will pay its holder. The coupon rate is a pre-determined rate at the time of issuance and will not change over the life of the bond; however, there are some bonds which have a variable interest rate tied to an external index.
Number of payments refers to the number of times the bond pays interest during the year. Typically in the US, bonds pay twice per year; however, there are bonds that pay more and less frequently. This input is also important to the yield calculation since bonds that pay more frequently (assuming everything else constant) will have a higher yield to maturity because of additional compounding.
Once the issue, settlement and maturity date, coupon rate, spread, and payment terms have been entered into the calculator, the calculate button will display the selected value. The value shown is added to any bond par value and can be used own its own for comparison.
In summary the calculator has been designed to respond to two bond evaluations: calculation of the yield to maturity and calculation of the market price in which the bond holder is provided ability to input a required rate of return.
Reuters Adfin Analytics 5.0 Bonds Guide was instrumental in the creation of our bond calculator. This guide provided programming code which was implemented in most of the bond calculator’s instructions. By utilizing this guide we were able to successfully communicate with Reuters data successfully.
Screen Shots:
User enters coupon rate, the spread all date fields, one payment term should be entered.
Select at least one, or all of check boxes: “Bond Price”, “Derivative”, “Yield to Maturity”.
Illustrates Bond Price only checked. The value calculated is the yield over time.
Derivative calculation.
Yield to maturity calculated.
Calculator displays which calculation for whichever box is checked. Defaulted term is Semi-Annual.
Source code:
private void button1_Click(object sender, EventArgs e)
{
string couponpayment;
// declare arrays
Array PrimiumArray, PrimiumArray1, PrimiumArray2;
// if else statment to to pick the payment terms
if (rbYear.Checked)
{
// annual_payment is 1
couponpayment = "1";
}
else if(rbSemi.Checked)
{
// semi_payments is 2
couponpayment = "2";
}
else
{
// quartly_payments is 4
couponpayment = "4";
}
if (cbYTM.Checked)
{
// the Bond Module ActiveX control has been added to the form
// Name is: axAdxBondModule1
// Declare a System::Array to hold the Yield results
// =AdConvBdYield(SettlementDate, Maturity, Coupon, RateArray, Spread,ConvStructure, RateStructure, CalcStructure, AdMode)
PrimiumArray1 = (Array)axAdxBondModule1.AdBondYield(Convert.ToDateTime(dpSettle.Text), Convert.ToDouble(tbCouponRate.Text), Convert.ToDateTime(dpMaturity.Text), 0.03, "ACC:A0 CFADJ:NO CLDR:USA_FI FRQ:" + couponpayment + " NOTIONAL:1 PX:C PXRND:1E-8:DOWN REFDATE:MATURITY RP:1 SETTLE:1WD XD:NO ISSUE:03/02/2007", "CLDRADJ:NO DCB:00 EY:2 LLP:00 RATEFRQ:FRQ RATETYPE:ACT RM:YTA", "");
// Copy out the first value of the array as the bond YTM price
lbYTM.Text = Convert.ToString(string.Format("{0:0.0000}", PrimiumArray1.GetValue(1, 1)));
}
else if(cbBPrice.Checked)
{
// the Bond Module ActiveX control has been added to the form
// Name is: axAdxBondModule1
// Declare a System::Array to hold the results
// =AdConvBdPrice(SettlementDate, Maturity, Coupon, RateArray, Spread,ConvStructure, RateStructure, CalcStructure, AdMode)
PrimiumArray = (Array)axAdxBondModule1.AdBondPrice(Convert.ToDateTime(dpSettle.Text), 0.02, Convert.ToDateTime(dpMaturity.Text), Convert.ToDouble(tbCouponRate.Text), Convert.ToDouble(tbSpread.Text), "ACC:A0 CFADJ:NO CLDR:USA_FI FRQ:" + couponpayment + " NOTIONAL:1 PX:C PXRND:1E-8:DOWN REFDATE:MATURITY RP:1 SETTLE:1WD XD:NO ISSUE:03/02/2007", "CLDRADJ:NO DCB:00 EY:2 LLP:00 RATEFRQ:FRQ RATETYPE:ACT RM:YTA", "", "");
// Copy out the first value of the array as the Bond Premium price
lbBondPrice.Text = Convert.ToString(string.Format("{0:0.0000}", PrimiumArray.GetValue(1, 1)));
}
else if (cbDerivitive.Checked)
{
// the Bond Module ActiveX control has been added to the form
// Name is: axAdxBondModule1
// Declare a System::Array to hold the Bond Derivatives data
// =AdConvBdDerivitive(SettlementDate, Maturity, Coupon, RateArray, Spread,ConvStructure, RateStructure, CalcStructure, AdMode)
PrimiumArray2 = (Array)axAdxBondModule1.AdBondDeriv(Convert.ToDateTime(dpSettle.Text), 0.02, Convert.ToDateTime(dpMaturity.Text), Convert.ToDouble(tbCouponRate.Text), Convert.ToDouble(tbSpread.Text),"ACC:A0 CFADJ:NO CLDR:USA_FI FRQ:"+couponpayment+" NOTIONAL:1 PX:C PXRND:1E-8:DOWN REFDATE:MATURITY RP:1 SETTLE:1WD XD:NO ISSUE:03/02/2007" ,"CLDRADJ:NO DCB:00 EY:2 LLP:00 RATEFRQ:FRQ RATETYPE:ACT RM:YTA","", "");
// Duration is the 5th element of the array
lbDerivitive.Text = Convert.ToString(string.Format("{0:0.0000}", PrimiumArray2.GetValue(1, 1)));
}
}