Interface FiniteDifferenceEquityModel

All Superinterfaces:
FiniteDifferenceBoundary, FiniteDifferenceModel, Model
All Known Implementing Classes:
FDMBachelierModel, FDMBatesModel, FDMBlackScholesModel, FDMCevModel, FDMHestonModel, FDMMertonModel, FDMMultiAssetBlackScholesModel, FDMSabrModel, FDMVarianceGammaModel

public interface FiniteDifferenceEquityModel extends FiniteDifferenceModel, FiniteDifferenceBoundary
Interface for a finite-difference equity model.

Implementations provide the coefficients and market data required by the finite-difference solvers, in particular discount curves, drift coefficients, factor loadings, boundary conditions, and the initial state.

The framework is formulated in terms of the chosen PDE state variables. It does not assume that the first spatial coordinate is necessarily the spot price S. It may instead be S, log(S), or any other state variable for which the model provides consistent coefficients.

Therefore, getDrift(double, double...) and getFactorLoading(double, double...) must return coefficients that are expressed in exactly the same coordinates as those used in the space-time discretization.

Example:

  • if the grid variable is S, then the drift and factor loadings should correspond to the SDE for S,
  • if the grid variable is log(S), then the drift and factor loadings should correspond to the SDE for log(S).

The interface is dimension agnostic: it supports one-dimensional and multi-dimensional equity models alike. In particular, multi-asset models may provide one dividend-yield curve per underlying via getDividendYieldCurves().

Author:
Alessandro Gnoatto
  • Method Details

    • getRiskFreeCurve

      DiscountCurve getRiskFreeCurve()
      Returns the risk-free discount curve used for pricing.
      Returns:
      The risk-free discount curve.
    • getDividendYieldCurve

      DiscountCurve getDividendYieldCurve()
      Returns the dividend-yield discount curve.

      This is the legacy single-asset accessor and remains part of the interface to preserve backward compatibility with the current code base.

      For true multi-asset models with one dividend curve per underlying, prefer getDividendYieldCurves(). Such models may override this method with a convention suitable for backward compatibility.

      Returns:
      The dividend-yield discount curve.
    • getDividendYieldCurves

      default DiscountCurve[] getDividendYieldCurves()
      Returns the dividend-yield discount curves of the model.

      The default implementation preserves backward compatibility with the current single-asset code base by wrapping getDividendYieldCurve() into a one-element array.

      Multi-asset models should override this method and return one dividend- yield curve per underlying asset, ordered consistently with the model state vector.

      Returns:
      The dividend-yield discount curves.
    • getDrift

      double[] getDrift(double time, double... stateVariables)
      Returns the drift vector of the model state variables.

      The returned coefficients must be expressed in the same coordinates as the PDE state variables used by the finite-difference solver.

      If the state vector is X = (X1, ..., Xn), then this method returns the vector mu(t, X) in

      dX_i(t) = mu_i(t, X_t) dt + ....

      Parameters:
      time - The evaluation time.
      stateVariables - The current values of the model state variables.
      Returns:
      The drift vector.
    • getFactorLoading

      double[][] getFactorLoading(double time, double... stateVariables)
      Returns the factor-loading matrix of the model state variables.

      The returned coefficients must be expressed in the same coordinates as the PDE state variables used by the finite-difference solver.

      If the state vector is X = (X1, ..., Xn), then this method returns the matrix b(t, X) in

      dX_i(t) = mu_i(t, X_t) dt + sum_j b_{i,j}(t, X_t) dW_j(t).

      Parameters:
      time - The evaluation time.
      stateVariables - The current values of the model state variables.
      Returns:
      The factor-loading matrix.
    • getJumpComponent

      default Optional<JumpComponent> getJumpComponent()
      Returns the optional jump component of the infinitesimal generator.

      The default implementation returns Optional.empty(), corresponding to a purely diffusive model.

      If present, the returned JumpComponent provides the data needed to assemble the non-local jump part of the generator. The local coefficients returned by getDrift(double, double...) and getFactorLoading(double, double...) keep their current meaning and should remain consistent with the PDE state variables used by the finite-difference discretization.

      In particular, under the stock-coordinate convention intended for jump models in this framework, getDrift(double, double...) should continue to return the drift of the local first-order term, while the jump component defines the non-local operator in compensated form.

      For a one-dimensional spot variable S, the jump contribution is understood in the form

      integral [ f(S exp(y)) - f(S) - S (exp(y) - 1) f'(S) ] nu(dy).
      

      The interpretation of the jump data must remain consistent with the chosen PDE state variables.

      Returns:
      An Optional containing the jump component of the infinitesimal generator, or Optional.empty() if the model has no jump part.
    • getCloneWithModifiedSpaceTimeDiscretization

      FiniteDifferenceEquityModel getCloneWithModifiedSpaceTimeDiscretization(SpaceTimeDiscretization newSpaceTimeDiscretization)
      Returns a clone of this model with a modified space-time discretization.

      The returned model should represent the same stochastic dynamics and market data as the original one, but on the provided discretization.

      Parameters:
      newSpaceTimeDiscretization - The new space-time discretization.
      Returns:
      A clone of this model with the modified discretization.
    • getInitialValue

      double[] getInitialValue()
      Returns the initial state vector of the model.

      The returned values must be consistent with the state variables used by the PDE. For example, if the first spatial coordinate is log(S), then the first component should be log(S0) rather than S0.

      Returns:
      The initial state vector.