public class Portfolio extends AbstractProductComponent
executor| Constructor and Description |
|---|
Portfolio(AbstractLIBORMonteCarloProduct[] products,
double[] weights)
Creates a portfolio consisting of a set of products and a weights.
|
Portfolio(AbstractLIBORMonteCarloProduct product,
double weight)
Creates a portfolio consisting of a single product and a weight.
|
Portfolio(String currency,
AbstractLIBORMonteCarloProduct[] products,
double[] weights)
Creates a portfolio consisting of a set of products and a weights.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCurrency()
Returns the currency string of this notional.
|
AbstractLIBORMonteCarloProduct[] |
getProducts() |
RandomVariableInterface |
getValue(double evaluationTime,
LIBORModelMonteCarloSimulationInterface model)
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime.
|
double[] |
getWeights() |
Set<String> |
queryUnderlyings()
Returns a set of underlying names referenced by this product component (i.e., required for valuation) or null if none.
|
getValuesgetFactorDrift, getValue, getValueForModifiedDatagetValue, getValue, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, toStringpublic Portfolio(AbstractLIBORMonteCarloProduct product, double weight)
product - A product.weight - A weight.public Portfolio(AbstractLIBORMonteCarloProduct[] products, double[] weights)
products - An array of products.weights - An array of weights (having the same lengths as the array of products).public Portfolio(String currency, AbstractLIBORMonteCarloProduct[] products, double[] weights)
currency - The currency of the value of this portfolio when calling getValue.products - An array of products.weights - An array of weights (having the same lengths as the array of products).public String getCurrency()
AbstractMonteCarloProductgetCurrency in class AbstractMonteCarloProductpublic Set<String> queryUnderlyings()
AbstractProductComponentqueryUnderlyings in class AbstractProductComponentpublic RandomVariableInterface getValue(double evaluationTime, LIBORModelMonteCarloSimulationInterface model) throws CalculationException
getValue in class AbstractLIBORMonteCarloProductevaluationTime - The time on which this products value should be observed.model - The model used to price the product.CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.public AbstractLIBORMonteCarloProduct[] getProducts()
public double[] getWeights()
Copyright © 2017. All rights reserved.