java.lang.Object
net.finmath.marketdata2.products.AbstractAnalyticProduct
net.finmath.marketdata2.products.Portfolio
 All Implemented Interfaces:
AnalyticProduct
,Product
Implements the valuation of a portfolio of products implementing
AnalyticProductInterface
. Version:
 1.0
 Author:
 Christian Fries

Constructor Summary
ConstructorDescriptionPortfolio
(List<AnalyticProduct> products) Create a portfolio of products implementingAnalyticProductInterface
.Portfolio
(List<AnalyticProduct> products, List<Double> weights) Create a portfolio of products implementingAnalyticProductInterface
.Portfolio
(AnalyticProduct product, double weight) Create a portfolio consisting of a single product with a given weight.Create a portfolio of products implementingAnalyticProductInterface
. 
Method Summary
Modifier and TypeMethodDescriptionReturns the list of products as an unmodifiable list.getValue
(double evaluationTime, AnalyticModel model) Return the valuation of the product using the given model.Returns the list of weights as an unmodifiable list.Methods inherited from class net.finmath.marketdata2.products.AbstractAnalyticProduct
getValue, getValue

Constructor Details

Portfolio
Create a portfolio of products implementingAnalyticProductInterface
. The portfolio consists of an array of products and a corresponding array of weights. The value of the portfolio is given by the sum overweights[i] * products.get(i).getValue(evaluationTime, model)
Note that a product in the array of products may itself be aPortfolio
(hence you may easily combine portfolios). Parameters:
products
 Array of products implementingAnalyticProductInterface
.weights
 Array of weights used in the valuation as a multiplicator.

Portfolio
Create a portfolio of products implementingAnalyticProductInterface
. The portfolio consists of an array of products and a corresponding array of weights. The value of the portfolio is given by the sum overweights[i] * products.get(i).getValue(evaluationTime, model)
The portfolio is created by taking all products and weights of a given portfolio and adding other given products and weights. Parameters:
portfolio
 A given portfolio, which will become part of this portfolio.products
 Array of products implementingAnalyticProductInterface
.weights
 Array of weights used in the valuation as a multiplicator.

Portfolio
Create a portfolio consisting of a single product with a given weight. Parameters:
product
 A product, implementing implementingAnalyticProductInterface
.weight
 A weight used in the valuation as a multiplicator.

Portfolio
Create a portfolio of products implementingAnalyticProductInterface
. The value of the portfolio is given by the sum overproducts.get(i).getValue(evaluationTime, model)
Note that a product in the array of products may itself be aPortfolio
(hence you may easily combine portfolios). Parameters:
products
 Array of products implementingAnalyticProductInterface
.


Method Details

getValue
Description copied from interface:AnalyticProduct
Return the valuation of the product using the given model. The model has to implement the modes ofAnalyticModel
. Specified by:
getValue
in interfaceAnalyticProduct
 Parameters:
evaluationTime
 The evaluation time as double. Cash flows prior and including this time are not considered.model
 The model under which the product is valued. Returns:
 The value of the product using the given model.

getProducts
Returns the list of products as an unmodifiable list. Callingadd
on this list will result in anUnsupportedOperationException
. Returns:
 The list of products as an unmodifiable list.

getWeights
Returns the list of weights as an unmodifiable list. Callingadd
on this list will result in anUnsupportedOperationException
. Returns:
 The list of weights as an unmodifiable list.
