WebCab Bonds for COM v2.01

FixedInterestBonds.HoldingPeriodReturnWithAccuracy Method 

Calculates the half-yearly holding period return on an interest payment date when the asset is held for a whole number of years in accordance with user defined algorithm specific parameters.

public double HoldingPeriodReturnWithAccuracy(
   double purchasePrice,
   double coupon,
   double sellingPrice,
   DateTime purchaseDate,
   DateTime saleDate,
   double upperBound,
   double precision,
   string businessCalendarName
);

Parameters

purchasePrice
The purchase price of the bond.
coupon
The annual coupon of the bond convertible half-yearly (that is, payable in half yearly-installments).
sellingPrice
The market price at which the investor can sell the bond (when the holding period return is evaluated).
purchaseDate
The date when the asset is purchased.
saleDate
The date when the holding period return is evaluated.
upperBound
The upper bound of the interval over which the (holding period) return will be sort. If you are unsure as to a suitable value then by setting this parameter to 2 you will cover all cases where the (annual) return is less than 200 percent.
precision
The accuracy of the result. This is an internal parameter used by the equation solver algorithm, the smaller the precision required the more accurate the result but also the longer the computation will take. A suitable value for this parameter is 0.0001.
businessCalendarName
The name of one of the implemented business calendars, "London" by default.

Return Value

The holding period return in decimal format (i.e. 1 percent = 0.01)

Remarks

Recall that, the holding period return is the yield over the period that the bond was held by the investor.

This procedure offers the same functionality as the method HoldingPeriodReturn except that here the internal equation solving algorithm parameters can be set. This is, the upper bound of the return over which the solution is searched and the precision of the returned result can be specified.

Remarks:

Exceptions

Exception TypeCondition
NoSolutionExceptionThrown if no solution to the equation corresponding to the holding period return can be found for the given search interval selected.

See Also

FixedInterestBonds Class | WebCab.COM.Finance.Bonds Namespace | HoldingPeriodReturn