WebCab Bonds Web Services for Delphi

DurationConvexity.DurationWithExplicitTime Method 

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 DurationWithExplicitTime(
   double yield,
   double[] payments,
   double[] time2Payments,
   double principleSum,
   double maturity
);

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.
time2Payments
An array of doubles where the first element represents the time in years until the first payment is made, the second the time in years until the second payment is made and so on.
principleSum
The principle sum paid by the bond at maturity.
maturity
The time in years until the bond matures.

See Also

DurationConvexity Class | BasicBonds Namespace