public class BasketOption extends AbstractAssetMonteCarloProduct
| Constructor and Description |
|---|
BasketOption(double maturity,
double strike,
double[] weights)
Construct a product representing an European option on an asset S (where S the asset with index 0 from the model - single asset case).
|
| Modifier and Type | Method and Description |
|---|---|
RandomVariable |
getValue(double evaluationTime,
AssetModelMonteCarloSimulationModel model)
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime.
|
getValuegetCurrency, getValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, toStringpublic BasketOption(double maturity,
double strike,
double[] weights)
maturity - The maturity T in the option payoff \( max\left( \sum_{i} \alpha_{i} S_{i}(T) - K , 0 \right) \).strike - The strike K in the option payoff \( max\left( \sum_{i} \alpha_{i} S_{i}(T) - K , 0 \right) \).weights - The weights \( \alpha_{i} \) in the option payof \( max\left( \sum_{i} \alpha_{i} S_{i}(T) - K , 0 \right) \).public RandomVariable getValue(double evaluationTime, AssetModelMonteCarloSimulationModel model) throws CalculationException
getValue in interface AssetMonteCarloProductgetValue in class AbstractAssetMonteCarloProductevaluationTime - 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.