WebCab Bonds
v2.01
(J2SE Edition)

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


Field Summary
 
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
 
Constructor Summary
GenericSpotRateContext(GenericSpotRateContext genericSpotRateContext)
           
GenericSpotRateContext(String contextName, double value)
           
 
Method Summary
 Object clone()
           
 int[] getLocalIndexesForVariablesOnWhichContextFunctionsDepend(int type)
           
 double getSpotRate()
          Returns the value of the spot rate.
 int getSpotRateIndex()
           
 int[] getTypes()
          Returns all the categories supported by this node
 void setSpotRate(double spotRate)
           
 
Methods inherited from class webcab.lib.finance.pricing.core.contexts.GenericScalarContext
getValue, getValueIndex, setValue
 
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface webcab.lib.finance.pricing.contexts.ScalarContext
getValue
 
Methods inherited from interface webcab.lib.finance.pricing.core.contexts.SpotRateContextW
getValueIndex, setValue
 
Methods inherited from interface webcab.lib.finance.pricing.core.contexts.ScalarContextRW
getValueIndex, setValue
 

Constructor Detail

GenericSpotRateContext

public GenericSpotRateContext(String contextName,
                              double value)

GenericSpotRateContext

public GenericSpotRateContext(GenericSpotRateContext genericSpotRateContext)
Method Detail

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

WebCab Bonds
v2.01
(J2SE Edition)