public class PortfolioMonteCarloProduct extends AbstractMonteCarloProduct
| Constructor and Description |
|---|
PortfolioMonteCarloProduct(MonteCarloProduct[] products)
Create a portfolio of products, each product being of AbstractMonteCarloProduct type.
|
PortfolioMonteCarloProduct(MonteCarloProduct[] products,
double[] weights)
Create a portfolio of products, each product being of AbstractMonteCarloProduct type
and weighted with a given weight.
|
PortfolioMonteCarloProduct(MonteCarloProduct[] products,
double[] weights,
Optional<Integer> numberOfThreads)
Create a portfolio of products, each product being of AbstractMonteCarloProduct type
and weighted with a given weight.
|
| Modifier and Type | Method and Description |
|---|---|
RandomVariable |
getValue(double evaluationTime,
MonteCarloSimulationModel model)
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime.
|
getCurrency, getValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, toStringpublic PortfolioMonteCarloProduct(MonteCarloProduct[] products, double[] weights, Optional<Integer> numberOfThreads)
products - An array of products.weights - An array of weights.numberOfThreads - Number of parallel threads to used. Required to be > 0.public PortfolioMonteCarloProduct(MonteCarloProduct[] products, double[] weights)
products - An array of products.weights - An array of weights.public PortfolioMonteCarloProduct(MonteCarloProduct[] products)
products - An array of products.public RandomVariable getValue(double evaluationTime, MonteCarloSimulationModel model) throws CalculationException
MonteCarloProductgetValue in interface MonteCarloProductgetValue in class AbstractMonteCarloProductevaluationTime - 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.Copyright © 2019. All rights reserved.