WebCab Bonds for Delphi (COM)

TreasuryPrice.YieldToMaturityWithExplicitTime Method 

The yield to maturity (YTM) (also known as the internal rate of return) with continuous compounding is calculated for a traded bond.

public double YieldToMaturityWithExplicitTime(
   double principalSum,
   double marketPrice,
   double time2Maturity,
   double[] time2Payments,
   double[] couponPayments
);

Parameters

principalSum
The principal sum which will be repaid at expiry.
marketPrice
The market price of the bond.
time2Maturity
The number of years until the bond matures expressed in decimal format.
time2Payments
An array where the first term corresponds to the number of years until the first coupon payment and the second term corresponds to the number of years until the second payment is made and so on... Note that the number of years must be expressed in decimal format.
couponPayments
An array where the first term corresponds to the amount paid by the next coupon payment and the second term corresponds to the amount paid by the coupon payment after that and so on.

Remarks

Note that the bond may be of any corporate or treasury type.

Remark: This method uses the Newton-Raphson procedure and produces a result which is accurate to 10 decimal places.

See Also

TreasuryPrice Class | WebCab.COM.Finance.Bonds Namespace