WebCab Bonds
v2.01
(J2SE Edition)

webcab.lib.finance.pricing.models.rate
Class BlackKarasinski

java.lang.Object
  |
  +--webcab.lib.finance.pricing.models.StochasticDifferentialModel
        |
        +--webcab.lib.finance.pricing.core.models.MarkovModel
              |
              +--webcab.lib.finance.pricing.core.models.SemimartingaleMarkovModel
                    |
                    +--webcab.lib.finance.pricing.models.rate.BlackKarasinski

public class BlackKarasinski
extends SemimartingaleMarkovModel

Bkack&Karasinski is a one factor stochastic spot rate model. The spot rate process is a semimartingale. The stochastic differential equation is:

The model can be fitted.


Constructor Summary
BlackKarasinski(String name, Function phi, Function a, Function sigma, double initialRate)
          Creates a new BlackDermanToy instance.
 
Method Summary
 double evaluateCoef(int nProcess, int nCoef, double[] x)
           
 int[] getCategoriesForExternalReferences()
           
 double[][] getCorrelationMatrix()
           
 int getExternal()
           
 String[] getExternalReferences(Context context)
           
 double[] getExternalVariables(Context context)
           
 Context getInitialContext()
           
 int[] getNFactors()
           
 int getNumeraire()
           
 int getNVariables()
           
 int getTraded()
           
 StochasticDifferentialModel getUpdatedModel(Context context, double t)
          Sets the initial values of the models' variables to the ones given as parameters.
 
Methods inherited from class webcab.lib.finance.pricing.core.models.SemimartingaleMarkovModel
addInternalJumpConditions, comp, dV, evaluateNotTradedAbsoluteCoef, evaluateNotTradedTimeCoef, evaluateNotTradedWienerCoef, evaluateTimeCoef, evaluateWienerCoef, getAbsoluteCoef, getExternalCorrelationMatrix, getExternalReferencesInJumpConditions, getFixedVariablesForCondition, getJumpCondition, getJumpValue, getNExternalFactors, getNJumpConditions, getNotTradedAbsoluteCoef, getNotTradedTimeCoef, getNotTradedWienerCoef, getTimeCoef, getTotalExternalFactors, getTotalTradedFactors, getWienerCoef, hasExternalJumpConditions, resetOnDemand
 
Methods inherited from class webcab.lib.finance.pricing.core.models.MarkovModel
dV_MarkovModel, dV
 
Methods inherited from class webcab.lib.finance.pricing.models.StochasticDifferentialModel
compoundModel, compoundModel, compoundModel, compoundModel, compoundModel, compoundModel, dV_StochasticDifferentialModel, getCholeskyMatrix, getContext, getStartVariableForContext, getSuperModel, getTotalFactors, getVariables, seekRoot, seekUpwards, setCholeskyMatrix, setSuperModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlackKarasinski

public BlackKarasinski(String name,
                       Function phi,
                       Function a,
                       Function sigma,
                       double initialRate)
                throws InvalidParametersException
Creates a new BlackDermanToy instance.

Parameters:
name - the name of the spot rate context produced
phi - a function of one variable (some class implementing the Function interface).
sigma - a function of one variable (a class implementing the Function interface).
initialRate - the initial value of the spot rate
Throws:
InvalidParametersException
Method Detail

getNFactors

public int[] getNFactors()
Specified by:
getNFactors in class StochasticDifferentialModel

getNVariables

public int getNVariables()
Specified by:
getNVariables in class StochasticDifferentialModel

getNumeraire

public int getNumeraire()
Specified by:
getNumeraire in class StochasticDifferentialModel

getTraded

public int getTraded()
Specified by:
getTraded in class SemimartingaleMarkovModel

getExternal

public int getExternal()
Specified by:
getExternal in class SemimartingaleMarkovModel

getExternalVariables

public double[] getExternalVariables(Context context)
Specified by:
getExternalVariables in class SemimartingaleMarkovModel

getExternalReferences

public String[] getExternalReferences(Context context)
Specified by:
getExternalReferences in class SemimartingaleMarkovModel

getCategoriesForExternalReferences

public int[] getCategoriesForExternalReferences()
Specified by:
getCategoriesForExternalReferences in class SemimartingaleMarkovModel

getInitialContext

public Context getInitialContext()
Specified by:
getInitialContext in class StochasticDifferentialModel

getCorrelationMatrix

public double[][] getCorrelationMatrix()
Specified by:
getCorrelationMatrix in class StochasticDifferentialModel

evaluateCoef

public double evaluateCoef(int nProcess,
                           int nCoef,
                           double[] x)
                    throws BondsException
Specified by:
evaluateCoef in class SemimartingaleMarkovModel
BondsException

getUpdatedModel

public StochasticDifferentialModel getUpdatedModel(Context context,
                                                   double t)
                                            throws BondsException
Description copied from class: StochasticDifferentialModel
Sets the initial values of the models' variables to the ones given as parameters.

Specified by:
getUpdatedModel in class StochasticDifferentialModel
Parameters:
context - the context which will be the new initial context of the model
t - the initial moment for the model
Returns:
StochasticDifferentialModel
Throws:
BondsException

WebCab Bonds
v2.01
(J2SE Edition)