webcab.lib.finance.pricing.core.contexts
Class GenericArithmeticAverageContext
java.lang.Object
|
+--webcab.lib.finance.pricing.contexts.Context
|
+--webcab.lib.finance.pricing.core.contexts.GenericScalarContext
|
+--webcab.lib.finance.pricing.core.contexts.GenericArithmeticAverageContext
- All Implemented Interfaces:
- ArithmeticAverageContext, ScalarContext, ScalarContextRW, webcab.lib.finance.pricing.core.contexts.ScalarContextW
- public class GenericArithmeticAverageContext
- extends GenericScalarContext
- implements ArithmeticAverageContext
| 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, getVariable, hasMemory, hasType, memoryNotRecovered, setMemoryVariable, setMemoryVariables, setName, setVariable, toString |
GenericArithmeticAverageContext
public GenericArithmeticAverageContext(String contextName,
double value)
GenericArithmeticAverageContext
public GenericArithmeticAverageContext(GenericArithmeticAverageContext genericArithmeticAverageContext)
getArithmeticAverage
public double getArithmeticAverage()
throws BondsException
- Description copied from interface:
ArithmeticAverageContext
- Returns the arithmetic average.
- Specified by:
getArithmeticAverage in interface ArithmeticAverageContext
- Returns:
- double
- Throws:
BondsException
getUpdatedMemoryVariables
public double[] getUpdatedMemoryVariables(double t,
double dt)
throws BondsException
- Overrides:
getUpdatedMemoryVariables in class Context
BondsException
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