WebCab Bonds for COM v2.01

DurationConvexity.PriceOfBondWithExplicitTime Method 

Evaluates the price of a bond via the relationship between its yield and cash flows.

public double PriceOfBondWithExplicitTime(
   double yield,
   double[] coupons,
   double[] time2Coupons,
   double principleSum,
   double maturity
);

Parameters

yield
The continuously compounded yield which the bond pays expressed in decimal format (i.e. 1 percent = 0.01).
coupons
An array where the first term is the first coupon payment and the second term is the second coupon payment and so on.
time2Coupons
An array of doubles where the first element represents the time until the first coupon payment is made, the second the time until the second coupon payment is made and so on.
principleSum
The principle sum of the bond which will be repaid at maturity.
maturity
The time in years until the bond matures.

Return Value

The price of the bond.

See Also

DurationConvexity Class | WebCab.COM.Finance.Bonds Namespace