public class Portfolio extends AbstractProductComponent
| 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 product.
|
TermStructureMonteCarloProduct[] |
getProducts() |
RandomVariable |
getValue(double evaluationTime,
LIBORModelMonteCarloSimulationModel 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.
|
getExecutor, getValuesgetFactorDrift, getValue, getValueForModifiedDatagetValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedDatapublic 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()
MonteCarloProductgetCurrency in interface MonteCarloProductgetCurrency in class AbstractMonteCarloProductpublic Set<String> queryUnderlyings()
AbstractProductComponentqueryUnderlyings in class AbstractProductComponentpublic RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException
getValue in interface TermStructureMonteCarloProductgetValue 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 TermStructureMonteCarloProduct[] getProducts()
public double[] getWeights()
Copyright © 2019. All rights reserved.