public class UnsupportedIndex extends AbstractIndex
getValue method is called.
This class can be used to created indices which triggers an exception only upon usage (i.e., late).
A typical use case is a financial product referencing an index in one of its past payments,
which is not supported by the current model. In that case the product can be valued as of a future
date, but no necessarily as of a past date.executor| Constructor and Description |
|---|
UnsupportedIndex(Exception exception)
Creates an unsupported index throwing an exception if his
getValue method is called. |
UnsupportedIndex(String name,
Exception exception)
Creates an unsupported index throwing an exception if his
getValue method is called. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
Set<String> |
queryUnderlyings()
Returns a set of underlying names referenced by this product component (i.e., required for valuation) or null if none.
|
getNamegetValuesgetFactorDrift, getValue, getValueForModifiedDatagetCurrency, getValue, getValue, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, toStringpublic UnsupportedIndex(String name, Exception exception)
getValue method is called.name - The name of the index.exception - The exception to be thrown if this index is valued.public UnsupportedIndex(Exception exception)
getValue method is called.exception - The exception.public RandomVariableInterface getValue(double evaluationTime, LIBORModelMonteCarloSimulationInterface model) throws CalculationException
AbstractLIBORMonteCarloProductgetValue in class AbstractIndexevaluationTime - 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 Set<String> queryUnderlyings()
AbstractProductComponentqueryUnderlyings in class AbstractProductComponentCopyright © 2017. All rights reserved.