WebCab Bonds Web Services for .NET v2.01

TreasuryPrice.TbondPriceWithExplicitTime Method 

Evaluates the price of a Treasury bond where the coupons are assumed to be paid continuously.

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 (i.e. 1 percent = 0.01).
time2Maturity
The number of years until the bond matures expressed in decimal format (i.e. 3 years 6 months = 3.5).
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).

Remarks

The technique used here to evaluate the price is to discount the future cash flows in accordance with the risk free interest rate.

See Also

TreasuryPrice Class | BasicBonds Namespace