Class DiffSkewness

java.lang.Object
com.polytechnik.utils.DiffSkewness

public class DiffSkewness extends Object
Build two--node Gauss quadrature and calculate its characteristics as parameter--dependent values. An example of such such characterists can be distribution skewness and its derivatives.
  • Field Details

  • Constructor Details

  • Method Details

    • getGamma1

      public double getGamma1(double x)
      Calculate Skewness asympthotics.
    • getGamma

      public DerivativesCalculateable getGamma()
      Calculate Skewness & Sekewness derivatives.
    • getSkewnessAt

      public Skewness getSkewnessAt(double p)
      Calculate skewness for the moments: origmoments[k]+di*Qm(p).
    • getOrthogonalPolynomial2Coefs

      public DerivativesCalculateable[] getOrthogonalPolynomial2Coefs()
      Returns second order monic orthogonal polynomial coefficients. The polynomial is built on parameter-dependent measure.
    • getL4Volatility

      public DerivativesCalculateable getL4Volatility()
      Returns L^4 volatility (within a constant, assume a_4=0).
    • getL2Volatility

      public DerivativesCalculateable getL2Volatility()
      Returns L^2 volatility.
    • getX1X2midpoint

      public DerivativesCalculateable getX1X2midpoint()
      Returns the midpoint (x_1+x_2)/2.
    • getX2minusX1

      public DerivativesCalculateable getX2minusX1()
      Returns quadrature nodes difference x_2-x_1. This difference can be successfully used in place of standard deviation. It has proper asymthotic and no divergence, thus provide much better stability in most cases.
    • getX1X2

      public DerivativesCalculateable[] getX1X2()
      Returns x1 & x2 quadrature nodes.
    • getXaverage

      public DerivativesCalculateable getXaverage()
      Parameter--dependent average (the root of first order orthogonal polynomial).
    • getDiffSkewness_FromMonomials

      public static DiffSkewness getDiffSkewness_FromMonomials(double m0, double m1, double m2, double m3, double dm)
    • getNOM_SDENOM_FromMonomials

      public static double[][] getNOM_SDENOM_FromMonomials(double m0, double m1, double m2, double m3, double dm)
      Internal method! I made it public for unit test purposes only! Calculates arrays for skewness calculation: Skewness=NOM(p)/sqrt(SQDENOM(p)).
      Returns:
      array with [0]: NOM, [1]: SQDENOM, [2]: NOM(calculated directly) [3]: null, [4]: original moments.