Interface FiniteDifferenceInterestRateModel
- All Superinterfaces:
FiniteDifferenceModel, Model
- All Known Implementing Classes:
FDMHullWhiteModel
The interface is designed to remain close to the philosophy of the Monte Carlo interest-rate framework of finmath while exposing the additional ingredients required by a partial-differential-equation discretization.
A model implementing this interface is assumed to satisfy the following two principles:
- it fits the initially observed term structure automatically through an
underlying bootstrapped
AnalyticModel, - it admits a finite-dimensional Markovian state representation, so that the PDE is solved on a grid of state variables rather than on a full curve of maturities.
More precisely, the model is described by a state vector
X_t = (X_t^{(1)}, \ldots, X_t^{(d)})
evolving under dynamics of the form
dX_t = \mu(t,X_t)\,dt + \lambda(t,X_t)\,dW_t,
where the drift vector \mu and factor-loading matrix
\lambda are returned by getDrift(double, double...) and
getFactorLoading(double, double...). Observable term-structure
quantities are reconstructed from the state. In particular, forward rates are
obtained through
F(t;T_1,T_2) = \Phi(t,T_1,T_2,X_t),
where the forwarding curve is identified explicitly in the multi-curve setting.
The interface does not encode a short-rate-only point of view. In
particular, no method like getShortRate(...) is required at this
level. This keeps the contract suitable for short-rate models, Gaussian HJM /
Cheyette models, and other Markovian term-structure specifications.
The default boundary implementation returns
StandardBoundaryCondition.none() in every spatial direction.
Model-specific classes may override this when Dirichlet or Neumann boundary
information is available analytically.
- Author:
- Alessandro Gnoatto
-
Method Summary
Modifier and TypeMethodDescriptionReturns the analytic multi-curve model used as the initial condition of the stochastic term-structure model.default BoundaryCondition[]getBoundaryConditionsAtLowerBoundary(FiniteDifferenceInterestRateProduct product, double time, double... stateVariables) Returns the lower-boundary conditions for the current product and state.default BoundaryCondition[]getBoundaryConditionsAtUpperBoundary(FiniteDifferenceInterestRateProduct product, double time, double... stateVariables) Returns the upper-boundary conditions for the current product and state.getCloneWithModifiedSpaceTimeDiscretization(SpaceTimeDiscretization spaceTimeDiscretization) Returns a clone of the model using a modified space-time discretization.doublegetDiscountBond(double time, double maturity, double... stateVariables) Returns the value at timetimeof the discount bond maturing atmaturity, conditional on the current model state.double[]getDrift(double time, double... stateVariables) Returns the drift vector of the Markovian state process.double[][]getFactorLoading(double time, double... stateVariables) Returns the factor-loading matrix of the Markovian state process.doublegetForwardRate(String forwardCurveName, double time, double periodStart, double periodEnd, double... stateVariables) Returns the simply compounded forward rate associated with a given forwarding curve and accrual period.double[]Returns the initial value of the Markovian state variables.default doublegetLibor(String forwardCurveName, double time, double periodStart, double periodEnd, double... stateVariables) Alias forgetForwardRate(String, double, double, double, double...)using the Monte Carlo terminology.Methods inherited from interface FiniteDifferenceModel
getSpaceTimeDiscretization
-
Method Details
-
getAnalyticModel
AnalyticModel getAnalyticModel()Returns the analytic multi-curve model used as the initial condition of the stochastic term-structure model.The returned
AnalyticModelis assumed to contain the bootstrapped market curves used to anchor the model to the observed initial term structure.- Returns:
- The initial analytic multi-curve model.
-
getInitialValue
double[] getInitialValue()Returns the initial value of the Markovian state variables.- Returns:
- The initial state vector.
-
getDrift
double[] getDrift(double time, double... stateVariables) Returns the drift vector of the Markovian state process.This method provides the deterministic part of the state dynamics
dX_t = \mu(t,X_t)\,dt + \lambda(t,X_t)\,dW_t.
- Parameters:
time- The current time.stateVariables- The current state vector.- Returns:
- The drift vector at the given state.
-
getFactorLoading
double[][] getFactorLoading(double time, double... stateVariables) Returns the factor-loading matrix of the Markovian state process.If
ddenotes the state dimension andmthe Brownian dimension, then the returned array has shaped x m.- Parameters:
time- The current time.stateVariables- The current state vector.- Returns:
- The factor-loading matrix at the given state.
-
getDiscountBond
double getDiscountBond(double time, double maturity, double... stateVariables) Returns the value at timetimeof the discount bond maturing atmaturity, conditional on the current model state.In a multi-curve setting this method refers to the discounting curve.
- Parameters:
time- The evaluation time.maturity- The maturity of the discount bond.stateVariables- The current state vector.- Returns:
- The discount bond value.
-
getForwardRate
double getForwardRate(String forwardCurveName, double time, double periodStart, double periodEnd, double... stateVariables) Returns the simply compounded forward rate associated with a given forwarding curve and accrual period.This is the finite-difference analogue of the Monte Carlo
getLibor(...)philosophy. The forwarding curve is identified explicitly because, in a multi-curve framework, it is in general distinct from the discount curve.- Parameters:
forwardCurveName- The name of the forwarding curve.time- The evaluation time.periodStart- The start of the accrual period.periodEnd- The end of the accrual period.stateVariables- The current state vector.- Returns:
- The forward rate for the specified accrual period.
-
getLibor
default double getLibor(String forwardCurveName, double time, double periodStart, double periodEnd, double... stateVariables) Alias forgetForwardRate(String, double, double, double, double...)using the Monte Carlo terminology.- Parameters:
forwardCurveName- The name of the forwarding curve.time- The evaluation time.periodStart- The start of the accrual period.periodEnd- The end of the accrual period.stateVariables- The current state vector.- Returns:
- The forward rate for the specified accrual period.
-
getCloneWithModifiedSpaceTimeDiscretization
FiniteDifferenceInterestRateModel getCloneWithModifiedSpaceTimeDiscretization(SpaceTimeDiscretization spaceTimeDiscretization) Returns a clone of the model using a modified space-time discretization.- Parameters:
spaceTimeDiscretization- The new space-time discretization.- Returns:
- A clone with the modified discretization.
-
getBoundaryConditionsAtLowerBoundary
default BoundaryCondition[] getBoundaryConditionsAtLowerBoundary(FiniteDifferenceInterestRateProduct product, double time, double... stateVariables) Returns the lower-boundary conditions for the current product and state.The default implementation returns
StandardBoundaryCondition.none()in every spatial direction.- Parameters:
product- The product being priced.time- The current time.stateVariables- The current boundary state.- Returns:
- Boundary conditions at the lower boundary.
-
getBoundaryConditionsAtUpperBoundary
default BoundaryCondition[] getBoundaryConditionsAtUpperBoundary(FiniteDifferenceInterestRateProduct product, double time, double... stateVariables) Returns the upper-boundary conditions for the current product and state.The default implementation returns
StandardBoundaryCondition.none()in every spatial direction.- Parameters:
product- The product being priced.time- The current time.stateVariables- The current boundary state.- Returns:
- Boundary conditions at the upper boundary.
-