webcab.lib.finance.pricing.core.contexts
Class GenericSpotRateContext
java.lang.Object
|
+--webcab.lib.finance.pricing.contexts.Context
|
+--webcab.lib.finance.pricing.core.contexts.GenericScalarContext
|
+--webcab.lib.finance.pricing.core.contexts.GenericSpotRateContext
- All Implemented Interfaces:
- ScalarContext, ScalarContextRW, webcab.lib.finance.pricing.core.contexts.ScalarContextW, SpotRateContext, SpotRateContextRW, SpotRateContextW
- public class GenericSpotRateContext
- extends GenericScalarContext
- implements SpotRateContextRW
| Fields inherited from class webcab.lib.finance.pricing.contexts.Context |
ARITHMETIC_AVERAGE, contextGraph, FORWARD_RATE, FORWARD_RATE_VOLATILITY, GEOMETRIC_AVERAGE, LONG_RATE, MAX, MIN, MONEY_MARKET, MULTIFACTOR_FORWARD_RATE_VOLATILITY, NUMERAIRE, PRICE, SCALAR, SPOT_RATE, TRIGGER, VOID, VOLATILITY |
| Methods inherited from class webcab.lib.finance.pricing.contexts.Context |
applyDeltaContext, findAppliableContextNamed, findAppliableContextOfIndex, findAppliableContextOfType, findDependentContextNamed, findDependentContextOfIndex, findDependentContextOfType, getBaseIndex, getGlobalIndexesForVariablesOnWhichContextFunctionsDepend, getMemoryVariable, getName, getNMemoryVariables, getNVariables, getTypeName, getTypeNameOfIndex, getTypeNames, getUpdatedMemoryVariables, getVariable, hasMemory, hasType, memoryNotRecovered, setMemoryVariable, setMemoryVariables, setName, setVariable, toString |
GenericSpotRateContext
public GenericSpotRateContext(String contextName,
double value)
GenericSpotRateContext
public GenericSpotRateContext(GenericSpotRateContext genericSpotRateContext)
getSpotRate
public double getSpotRate()
- Description copied from interface:
SpotRateContext
- Returns the value of the spot rate. It can be interpreted also as the drift
of some variable.
- Specified by:
getSpotRate in interface SpotRateContext
- Returns:
- double
setSpotRate
public void setSpotRate(double spotRate)
- Specified by:
setSpotRate in interface SpotRateContextW
getSpotRateIndex
public int getSpotRateIndex()
- Specified by:
getSpotRateIndex in interface SpotRateContextW
getTypes
public int[] getTypes()
- Description copied from class:
Context
- Returns all the categories supported by this node
- Overrides:
getTypes in class GenericScalarContext
getLocalIndexesForVariablesOnWhichContextFunctionsDepend
public int[] getLocalIndexesForVariablesOnWhichContextFunctionsDepend(int type)
throws BondsException
- Overrides:
getLocalIndexesForVariablesOnWhichContextFunctionsDepend in class GenericScalarContext
BondsException
clone
public Object clone()
- Overrides:
clone in class GenericScalarContext