Package org.drip.dynamics.hullwhite
Class SingleFactorStateEvolver
java.lang.Object
org.drip.dynamics.hullwhite.SingleFactorStateEvolver
- All Implemented Interfaces:
PointStateEvolver
public class SingleFactorStateEvolver extends java.lang.Object implements PointStateEvolver
SingleFactorStateEvolver provides the Hull-White One-Factor Gaussian HJM Short Rate Dynamics
Implementation.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = HJM, Hull White, LMM, and SABR Dynamic Evolution Models
- Package = Hull White Latent State Evolution
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description SingleFactorStateEvolver(FundingLabel lslFunding, double dblSigma, double dblA, R1ToR1 auIFRInitial, UnivariateSequenceGenerator usg)SingleFactorStateEvolver Constructor -
Method Summary
Modifier and Type Method Description doublea()Retrieve Adoublealpha(int iSpotDate, int iViewDate)Calculate the AlphaLSQMPointUpdateevolve(int iSpotDate, int iViewDate, int iSpotTimeIncrement, LSQMPointUpdate lsqmPrev)Evolve the Latent State and return the LSQM Point UpdateTrinomialTreeTransitionMetricsevolveTrinomialTree(int iSpotDate, int iInitialDate, int iTerminalDate, TrinomialTreeNodeMetrics hwnmInitial)Generate the Metrics associated with the Transition that results from using a Trinomial Tree Using the Starting Node MetricsTrinomialTreeSequenceMetricsevolveTrinomialTreeSequence(int iSpotDate, int iDayIncrement, int iNumIncrement)Evolve the Trinomial Tree SequencebooleanevolveTrinomialTreeSequence(int iSpotDate, int iInitialDate, int iDayIncrement, int iNumIncrement, TrinomialTreeNodeMetrics hwnm, TrinomialTreeSequenceMetrics hwsm)Evolve the Trinomial Tree SequenceFundingLabelfundingLabel()Retrieve the Funding LabelR1ToR1ifrInitialTermStructure()Retrieve the Initial Instantaneous Forward Rate Term StructureUnivariateSequenceGeneratorrsg()Retrieve the Random Sequence GeneratordoubleshortRateIncrement(int iSpotDate, int iViewDate, double dblShortRate, int iViewTimeIncrement)Calculate the Short Rate Incrementdoublesigma()Retrieve Sigmadoubletheta(int iSpotDate, int iViewDate)Calculate the ThetaMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SingleFactorStateEvolver
public SingleFactorStateEvolver(FundingLabel lslFunding, double dblSigma, double dblA, R1ToR1 auIFRInitial, UnivariateSequenceGenerator usg) throws java.lang.ExceptionSingleFactorStateEvolver Constructor- Parameters:
lslFunding- The Funding Latent State LabeldblSigma- SigmadblA- AauIFRInitial- The Initial Instantaneous Forward Rate Term Structureusg- Univariate Random Sequence Generator- Throws:
java.lang.Exception- Thrown if the Inputs are Invalid
-
-
Method Details
-
fundingLabel
Retrieve the Funding Label- Returns:
- The Funding Label
-
sigma
public double sigma()Retrieve Sigma- Returns:
- Sigma
-
a
public double a()Retrieve A- Returns:
- A
-
ifrInitialTermStructure
Retrieve the Initial Instantaneous Forward Rate Term Structure- Returns:
- The Initial Instantaneous Forward Rate Term Structure
-
rsg
Retrieve the Random Sequence Generator- Returns:
- The Random Sequence Generator
-
alpha
public double alpha(int iSpotDate, int iViewDate) throws java.lang.ExceptionCalculate the Alpha- Parameters:
iSpotDate- The Spot DateiViewDate- The View Date- Returns:
- Alpha
- Throws:
java.lang.Exception- Thrown if Alpha cannot be computed
-
theta
public double theta(int iSpotDate, int iViewDate) throws java.lang.ExceptionCalculate the Theta- Parameters:
iSpotDate- The Spot DateiViewDate- The View Date- Returns:
- Theta
- Throws:
java.lang.Exception- Thrown if Theta cannot be computed
-
shortRateIncrement
public double shortRateIncrement(int iSpotDate, int iViewDate, double dblShortRate, int iViewTimeIncrement) throws java.lang.ExceptionCalculate the Short Rate Increment- Parameters:
iSpotDate- The Spot DateiViewDate- The View DatedblShortRate- The Short RateiViewTimeIncrement- The View Time Increment- Returns:
- The Short Rate Increment
- Throws:
java.lang.Exception- Thrown if the Short Rate cannot be computed
-
evolve
public LSQMPointUpdate evolve(int iSpotDate, int iViewDate, int iSpotTimeIncrement, LSQMPointUpdate lsqmPrev)Description copied from interface:PointStateEvolverEvolve the Latent State and return the LSQM Point Update- Specified by:
evolvein interfacePointStateEvolver- Parameters:
iSpotDate- The Spot DateiViewDate- The View DateiSpotTimeIncrement- The Spot Time IncrementlsqmPrev- The Previous LSQM Point Update- Returns:
- The LSQM Point Update
-
evolveTrinomialTree
public TrinomialTreeTransitionMetrics evolveTrinomialTree(int iSpotDate, int iInitialDate, int iTerminalDate, TrinomialTreeNodeMetrics hwnmInitial)Generate the Metrics associated with the Transition that results from using a Trinomial Tree Using the Starting Node Metrics- Parameters:
iSpotDate- The Spot/Epoch DateiInitialDate- The Initial DateiTerminalDate- The Terminal DatehwnmInitial- The Initial Node Metrics- Returns:
- The Hull White Transition Metrics
-
evolveTrinomialTreeSequence
public boolean evolveTrinomialTreeSequence(int iSpotDate, int iInitialDate, int iDayIncrement, int iNumIncrement, TrinomialTreeNodeMetrics hwnm, TrinomialTreeSequenceMetrics hwsm)Evolve the Trinomial Tree Sequence- Parameters:
iSpotDate- The Spot DateiInitialDate- The Initial DateiDayIncrement- The Day IncrementiNumIncrement- Number of Times to Incrementhwnm- Starting Node Metricshwsm- The Sequence Metrics- Returns:
- TRUE - The Tree Successfully Evolved
-
evolveTrinomialTreeSequence
public TrinomialTreeSequenceMetrics evolveTrinomialTreeSequence(int iSpotDate, int iDayIncrement, int iNumIncrement)Evolve the Trinomial Tree Sequence- Parameters:
iSpotDate- The Spot DateiDayIncrement- The Day IncrementiNumIncrement- Number of Times to Increment- Returns:
- The Sequence Metrics
-