WebCab Bonds Web Services for Delphi

DurationConvexity.DurationOfPortfolio Method 

Returns the duration of a portfolio of bonds when the duration and weight of each bond within the portfolio is known.

public double DurationOfPortfolio(
   double[] duration,
   double[] weightOfBond
);

Parameters

duration
An array where the first term is the duration of the first element of the portfolio and second term is the duration of the second term and so on.
weightOfBond
An array where the first element corresponds to the weight of the first element within the portfolio and the second term corresponds to the weight of the second element within the portfolio and so on.

See Also

DurationConvexity Class | BasicBonds Namespace | WeightOfBonds - Use this method to find the weights of the bonds within a portfolio | Duration - Use this method to find the duration of each member of the portfolio