Class MultiFactorVolatility

java.lang.Object
org.drip.dynamics.hjm.MultiFactorVolatility
Direct Known Subclasses:
LognormalLIBORVolatility

public class MultiFactorVolatility
extends java.lang.Object
MultiFactorVolatility implements the Volatility of the Multi-factor Stochastic Evolution Process. The Factors may come from the Underlying Stochastic Variables, or from Principal Components.

Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • MultiFactorVolatility

      public MultiFactorVolatility​(MarketSurface[] aMSVolatility, PrincipalFactorSequenceGenerator pfsg) throws java.lang.Exception
      MultiFactorVolatility Constructor
      Parameters:
      aMSVolatility - Array of the Multi-Factor Volatility Surfaces
      pfsg - Principal Factor Sequence Generator
      Throws:
      java.lang.Exception - Thrown if Inputs are Invalid
  • Method Details

    • volatilitySurface

      public MarketSurface[] volatilitySurface()
      Retrieve the Array of Volatility Surfaces
      Returns:
      The Array of Volatility Surfaces
    • msg

      Retrieve the Principal Factor Sequence Generator
      Returns:
      The Principal Factor Sequence Generator
    • xDateVolatilityFunction

      public R1ToR1 xDateVolatilityFunction​(int iFactorIndex, int iXDate)
      Retrieve the Factor-Specific Univariate Volatility Function for the Specified Date
      Parameters:
      iFactorIndex - The Factor Index
      iXDate - The X Date
      Returns:
      The Factor-Specific Univariate Volatility Function for the Specified Date
    • volatilityIntegral

      public double volatilityIntegral​(int iFactorIndex, int iXDate, int iYDate) throws java.lang.Exception
      Compute the Factor Volatility Integral
      Parameters:
      iFactorIndex - The Factor Index
      iXDate - The X Date
      iYDate - The Y Date
      Returns:
      The Factor Volatility Integral
      Throws:
      java.lang.Exception - Thrown if the Factor Volatility Integral cannot be computed
    • factorPointVolatility

      public double factorPointVolatility​(int iFactorIndex, int iXDate, int iYDate) throws java.lang.Exception
      Compute the Factor Point Volatility
      Parameters:
      iFactorIndex - The Factor Index
      iXDate - The X Date
      iYDate - The Y Date
      Returns:
      The Factor Point Volatility
      Throws:
      java.lang.Exception - Thrown if the Factor Point Volatility cannot be computed
    • factorPointVolatility

      public double[] factorPointVolatility​(int iXDate, int iYDate)
      Compute the Array of Factor Point Volatilities
      Parameters:
      iXDate - The X Date
      iYDate - The Y Date
      Returns:
      The Array of Factor Point Volatilities
    • weightedFactorPointVolatility

      public double weightedFactorPointVolatility​(int iFactorIndex, int iXDate, int iYDate) throws java.lang.Exception
      Compute the Weighted Factor Point Volatility
      Parameters:
      iFactorIndex - The Factor Index
      iXDate - The X Date
      iYDate - The Y Date
      Returns:
      The Weighted Factor Point Volatility
      Throws:
      java.lang.Exception - Thrown if the Weighted Factor Point Volatility cannot be computed
    • pointVolatilityModulus

      public double pointVolatilityModulus​(int iXDate, int iYDate) throws java.lang.Exception
      Compute the Point Volatility Modulus
      Parameters:
      iXDate - The X Date
      iYDate - The Y Date
      Returns:
      The Point Volatility Modulus
      Throws:
      java.lang.Exception - Thrown if the Point Volatility Modulus cannot be computed
    • pointVolatilityModulusDerivative

      public double pointVolatilityModulusDerivative​(int iXDate, int iYDate, int iOrder, boolean bTerminal) throws java.lang.Exception
      Compute the Point Volatility Modulus Derivative
      Parameters:
      iXDate - The X Date
      iYDate - The Y Date
      iOrder - The Derivative Order
      bTerminal - TRUE - Derivative off of the Y Date; FALSE - Derivative off of the X Date
      Returns:
      The Point Volatility Modulus Derivative
      Throws:
      java.lang.Exception - Thrown if the Point Volatility Modulus Derivative cannot be computed