public class LinearCombinationIndex extends AbstractIndex
| Constructor and Description |
|---|
LinearCombinationIndex(double scaling1,
AbstractProductComponent index1,
double scaling2,
AbstractProductComponent index2)
Create a linear combination index paying scaling1 * index1(t) + scaling2 * index2(t)
|
| Modifier and Type | Method and Description |
|---|---|
AbstractProductComponent |
getIndex1()
Returns the index 1.
|
AbstractProductComponent |
getIndex2()
Returns the index 2.
|
double |
getScaling1()
Returns the scaling 1.
|
double |
getScaling2()
Returns the scaling 2.
|
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.
|
Set<String> |
queryUnderlyings()
Returns a set of underlying names referenced by this product component (i.e., required for valuation) or null if none.
|
String |
toString() |
getNamegetExecutor, getValuesgetFactorDrift, getValue, getValueForModifiedDatagetCurrency, getValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCurrency, getValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedDatapublic LinearCombinationIndex(double scaling1,
AbstractProductComponent index1,
double scaling2,
AbstractProductComponent index2)
scaling1 - Scaling for first index.index1 - First index.scaling2 - Scaling for second index.index2 - Second index.public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException
TermStructureMonteCarloProductgetValue in interface TermStructureMonteCarloProductgetValue 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 AbstractProductComponent getIndex1()
public AbstractProductComponent getIndex2()
public double getScaling1()
public double getScaling2()
public Set<String> queryUnderlyings()
AbstractProductComponentqueryUnderlyings in class AbstractProductComponentpublic String toString()
toString in class AbstractMonteCarloProductCopyright © 2019. All rights reserved.