Class MultivariateMoments

java.lang.Object
org.drip.measure.statistics.MultivariateMoments

public class MultivariateMoments
extends java.lang.Object
MultivariateMoments generates and holds the Specified Multivariate Series Mean, Co-variance, and other selected Moments.

Author:
Lakshmi Krishnamurthy
  • Method Summary

    Modifier and Type Method Description
    boolean addCovariance​(java.lang.String strVariate1Name, java.lang.String strVariate2Name, double dblCovariance)
    Add the Co-variance for the Named Variate Pair
    boolean addMean​(java.lang.String strVariateName, double dblMean)
    Add the Mean for the Named Variate
    double correlation​(java.lang.String strVariate1Name, java.lang.String strVariate2Name)
    Retrieve the Correlation between the Named Variate Pair
    double covariance​(java.lang.String strVariate1Name, java.lang.String strVariate2Name)
    Retrieve the Co-variance of the Named Variate Pair
    double mean​(java.lang.String strVariateName)
    Retrieve the Mean of the Named Variate
    int numVariate()
    Retrieve the Number of Variates in the Distribution
    static MultivariateMoments Standard​(java.lang.String[] astrVariateName, double[][] aadblVariate)
    Generate the MultivariateMetrics Instance from the Series Realizations provided
    static MultivariateMoments Standard​(java.lang.String[] astrVariateName, double[] adblMean, double[][] aadblCovariance)
    Generate the MultivariateMetrics Instance from the Specified Mean and Co-variance Inputs
    double variance​(java.lang.String strVariateName)
    Retrieve the Variance of the Named Variate
    java.util.Set<java.lang.String> variateList()
    Retrieve the Variates for which the Metrics are available

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • Standard

      public static final MultivariateMoments Standard​(java.lang.String[] astrVariateName, double[][] aadblVariate)
      Generate the MultivariateMetrics Instance from the Series Realizations provided
      Parameters:
      astrVariateName - Array of Variate Name Headers
      aadblVariate - Array of Variate Realization Arrays
      Returns:
      The MultivariateMetrics Instance
    • Standard

      public static final MultivariateMoments Standard​(java.lang.String[] astrVariateName, double[] adblMean, double[][] aadblCovariance)
      Generate the MultivariateMetrics Instance from the Specified Mean and Co-variance Inputs
      Parameters:
      astrVariateName - Array of Variate Name Headers
      adblMean - Array of Variate Means
      aadblCovariance - Double Array of the Variate Co-variance
      Returns:
      The MultivariateMetrics Instance
    • numVariate

      public int numVariate()
      Retrieve the Number of Variates in the Distribution
      Returns:
      The Number of Variates in the Distribution
    • variateList

      public java.util.Set<java.lang.String> variateList()
      Retrieve the Variates for which the Metrics are available
      Returns:
      The Set of Variates
    • addMean

      public boolean addMean​(java.lang.String strVariateName, double dblMean)
      Add the Mean for the Named Variate
      Parameters:
      strVariateName - The Named Variate
      dblMean - The Variate Mean
      Returns:
      TRUE - The Variate Mean successfully added
    • mean

      public double mean​(java.lang.String strVariateName) throws java.lang.Exception
      Retrieve the Mean of the Named Variate
      Parameters:
      strVariateName - The Named Variate
      Returns:
      Mean of the Named Variate
      Throws:
      java.lang.Exception - Thrown if the Named Variate Mean cannot be retrieved
    • addCovariance

      public boolean addCovariance​(java.lang.String strVariate1Name, java.lang.String strVariate2Name, double dblCovariance)
      Add the Co-variance for the Named Variate Pair
      Parameters:
      strVariate1Name - The Named Variate #1
      strVariate2Name - The Named Variate #2
      dblCovariance - The Variate Mean
      Returns:
      TRUE - The Variate Pair Co-variance successfully added
    • variance

      public double variance​(java.lang.String strVariateName) throws java.lang.Exception
      Retrieve the Variance of the Named Variate
      Parameters:
      strVariateName - The Named Variate
      Returns:
      Variance of the Named Variate
      Throws:
      java.lang.Exception - Thrown if the Named Variate Variance cannot be retrieved
    • covariance

      public double covariance​(java.lang.String strVariate1Name, java.lang.String strVariate2Name) throws java.lang.Exception
      Retrieve the Co-variance of the Named Variate Pair
      Parameters:
      strVariate1Name - The Named Variate #1
      strVariate2Name - The Named Variate #2
      Returns:
      Co-variance of the Named Variate Pair
      Throws:
      java.lang.Exception - Thrown if the Named Variate Co-variance cannot be retrieved
    • correlation

      public double correlation​(java.lang.String strVariate1Name, java.lang.String strVariate2Name) throws java.lang.Exception
      Retrieve the Correlation between the Named Variate Pair
      Parameters:
      strVariate1Name - The Named Variate #1
      strVariate2Name - The Named Variate #2
      Returns:
      Correlation between the Named Variate Pair
      Throws:
      java.lang.Exception - Thrown if the Named Variate Correlation cannot be retrieved