WebCab Bonds for Delphi (COM)

TreasuryPrice.TbondPriceWithExplicitTime Method 

Evaluates the price of a Treasury bond by discounting the future cash flows in accordance with the risk free interest rate.

public double TbondPriceWithExplicitTime(
   double principleSum,
   double riskFreeRate,
   double time2Maturity,
   double[] coupons,
   double[] time2Coupons
);

Parameters

principleSum
The principle sum which will be repaid at expiry.
riskFreeRate
The continuously compounded annual risk free interest rate expressed in decimal format.
time2Maturity
The number of years until the bond matures expressed in decimal format.
coupons
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.
time2Coupons
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 (i.e. 3 years 6 months = 3.5).

See Also

TreasuryPrice Class | WebCab.COM.Finance.Bonds Namespace