WebCab Bonds for COM v2.01

DurationConvexity.Duration Method (Double, Double[], DateTime, DateTime[], Double, DateTime, String)

Evaluates the duration of a bond with a continuous interest yield where the cash flows (or payments) made in terms of amount and time of payment are known.

public double Duration(
   double yield,
   double[] payments,
   DateTime evaluationDate,
   DateTime[] paymentDates,
   double principleSum,
   DateTime maturityDate,
   string businessCalendarName
);

Parameters

yield
The continuous compounded yield paid by the bond expressed in decimal format (i.e. 1 percent = 0.01).
payments
An array of doubles where the first element represents the first payment from the bond, the second the second payment and so on.
evaluationDate
The date on which the duration of the bond is evaluated.
paymentDates
An array of dates where the first term corresponds to the first payment date and the second payment date corresponds to the second payment and so on.
principleSum
The principle sum paid by the bond at maturity.
maturityDate
The date when the bond matures.
businessCalendarName
The name of one of the implemented business calendars, "London" by default.

Return Value

The duration of the bond.

Remarks

Example

Here we illustrate the application of this method to evaluate the duration of a two year coupon bond which has a (continuously compounded) yield of 4.93 percent per annum, has a principle sum of 100 USD, and pays coupons of 2.5 USD at maturities 0.5, 1, 1.5, and 2 years, and has exactly 2 years until maturity.

Parameter values required to solve this problem:

  1. yield = 0.0493
  2. payments = {2.5, 2.5, 2.5, 2.5}
  3. time2Payments = {0.5, 1.0, 1.5, 2.0}
  4. principleSum = 100
  5. maturity = 2.0

Answer evaluated using these parameters:

The Duration of the bond is:

1.92801853919072

See Also

DurationConvexity Class | WebCab.COM.Finance.Bonds Namespace | DurationConvexity.Duration Overload List