WebCab Bonds for COM v2.01

DurationConvexity.DurationOfPortfolio Method 

Calculates 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.

Return Value

The duration of the portfolio.

See Also

DurationConvexity Class | WebCab.COM.Finance.Bonds 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