WebCab Bonds for COM v2.01

TreasuryPrice.YieldToMaturity 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 YieldToMaturity(
   double principalSum,
   double marketPrice,
   DateTime previousCouponDate,
   DateTime evaluationDate,
   DateTime settlementDate,
   DateTime[] paymentDates,
   DateTime maturityDate,
   double[] couponPayments,
   string businessCalendarName,
   string dayCountConvention
);

Parameters

principalSum
The principal sum which will be repaid at expiry.
marketPrice
The market price of the bond.
previousCouponDate
The date of the last payment before the evaluation date, or the date of the issue of the bond. Set to the evaluation or settlement date if does not apply.
evaluationDate
The date on which the yield to maturity (YTM) is evaluated.
settlementDate
The date when the contract is being fulfilled.
paymentDates
An array of dates where the first term corresponds to the date of the first payment and the second term corresponds to the date of the second payment and so on.
maturityDate
The date on which the bond matures.
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.
businessCalendarName
The name of one of the implemented business calendars, "London" by default.
dayCountConvention
A string constant identifying one of the implemented day count conventions. The default day count convention is `Actual/Actual', identified by the "A/A" string constant.

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