Class AttributeJointFactor

java.lang.Object
org.drip.portfolioconstruction.core.Block
org.drip.portfolioconstruction.risk.AttributeJointFactor
Direct Known Subclasses:
AssetCovarianceFactor

public class AttributeJointFactor
extends Block
AttributeJointFactor contains the Factor Based Loadings that determines the Joint Attributes between the Pair of Assets.



Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    AttributeJointFactor​(java.lang.String name, java.lang.String id, java.lang.String description)
    AttributeJointFactor Constructor
  • Method Summary

    Modifier and Type Method Description
    boolean addAssetFactorLoading​(java.lang.String assetID, java.lang.String factorID, double factorLoading)
    Add the Asset's Factor Loading Coefficient
    boolean addFactorAttribute​(java.lang.String factorID1, java.lang.String factorID2, double crossFactorAttribute)
    Add the Cross Factor Attribute
    boolean addSpecificAttribute​(java.lang.String assetID, double specificAttribute)
    Add the Asset's Specific Attribute
    java.util.Map<java.lang.String,​java.lang.Double> assetFactorLoading()
    Retrieve the Joint Asset-Factor Loading Map
    java.util.Map<java.lang.String,​java.lang.Double> assetFactorLoading​(java.lang.String assetID)
    Retrieve the Factor Loading for the specified Asset
    double assetSpecificAttribute​(java.lang.String assetID)
    Retrieve the Asset Specific Attribute
    boolean containsAsset​(java.lang.String assetID)
    Check if the Asset is represented
    boolean containsFactor​(java.lang.String factorID)
    Check if the Factor is available
    double crossAssetAttribute​(java.lang.String assetID1, java.lang.String assetID2)
    Compute the Cross Asset Attribute
    double crossFactorAttribute​(java.lang.String factorID1, java.lang.String factorID2)
    Retrieve the Cross Factor Attribute Entry
    java.util.Map<java.lang.String,​java.lang.Double> factorAssetLoading()
    Retrieve the Joint Factor-Asset Loading Map
    java.util.Map<java.lang.String,​java.lang.Double> factorAssetLoading​(java.lang.String factorID)
    Retrieve the Loadings for the specified Factor
    java.util.Map<java.lang.String,​java.lang.Double> factorJointAttribute()
    Retrieve the Factor-to-Factor Attribute Map
    java.util.Map<java.lang.String,​java.lang.Double> specificRisk()
    Retrieve the Asset Specific Attribute
    static AttributeJointFactor Standard​(java.lang.String name, java.lang.String id, java.lang.String description, java.lang.String[] assetIDArray, java.lang.String[] factorIDArray, double[][] assetFactorLoadingGrid, double[][] crossFactorAttributeGrid, double[] assetSpecificAttributeArray)
    Generate a Standard Instance of AttributeJointFactor

    Methods inherited from class org.drip.portfolioconstruction.core.Block

    description, hashCode, id, name, Standard, timeStamp

    Methods inherited from class java.lang.Object

    equals, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AttributeJointFactor

      public AttributeJointFactor​(java.lang.String name, java.lang.String id, java.lang.String description) throws java.lang.Exception
      AttributeJointFactor Constructor
      Parameters:
      name - The Name
      id - The ID
      description - The Description
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • Standard

      public static final AttributeJointFactor Standard​(java.lang.String name, java.lang.String id, java.lang.String description, java.lang.String[] assetIDArray, java.lang.String[] factorIDArray, double[][] assetFactorLoadingGrid, double[][] crossFactorAttributeGrid, double[] assetSpecificAttributeArray)
      Generate a Standard Instance of AttributeJointFactor
      Parameters:
      name - AttributeJointFactor Instance Name
      id - AttributeJointFactor Instance ID
      description - AttributeJointFactor Description
      assetIDArray - Array of Asset IDs
      factorIDArray - Array of FactorIDs
      assetFactorLoadingGrid - Matrix of Asset-Factor Loadings
      crossFactorAttributeGrid - Matrix of Factor-Factor Attributes
      assetSpecificAttributeArray - Array of Specific Attributes
      Returns:
      The Standard Instance of AttributeJointFactor
    • assetFactorLoading

      public java.util.Map<java.lang.String,​java.lang.Double> assetFactorLoading()
      Retrieve the Joint Asset-Factor Loading Map
      Returns:
      The Joint Asset-Factor Loading Map
    • factorAssetLoading

      public java.util.Map<java.lang.String,​java.lang.Double> factorAssetLoading()
      Retrieve the Joint Factor-Asset Loading Map
      Returns:
      The Joint Factor-Asset Loading Map
    • factorJointAttribute

      public java.util.Map<java.lang.String,​java.lang.Double> factorJointAttribute()
      Retrieve the Factor-to-Factor Attribute Map
      Returns:
      The Factor-to-Joint Attribute Map
    • specificRisk

      public java.util.Map<java.lang.String,​java.lang.Double> specificRisk()
      Retrieve the Asset Specific Attribute
      Returns:
      The Asset Specific Attribute
    • addAssetFactorLoading

      public boolean addAssetFactorLoading​(java.lang.String assetID, java.lang.String factorID, double factorLoading)
      Add the Asset's Factor Loading Coefficient
      Parameters:
      assetID - The Asset ID
      factorID - The Factor ID
      factorLoading - The Factor Loading Coefficient
      Returns:
      TRUE - The Asset's Factor Loading Coefficient successfully added
    • addFactorAttribute

      public boolean addFactorAttribute​(java.lang.String factorID1, java.lang.String factorID2, double crossFactorAttribute)
      Add the Cross Factor Attribute
      Parameters:
      factorID1 - The Factor #1 ID
      factorID2 - The Factor #2 ID
      crossFactorAttribute - The Cross Factor Attribute
      Returns:
      TRUE - The Cross Factor Attribute successfully added
    • addSpecificAttribute

      public boolean addSpecificAttribute​(java.lang.String assetID, double specificAttribute)
      Add the Asset's Specific Attribute
      Parameters:
      assetID - The Asset ID
      specificAttribute - The Asset's Specific Attribute
      Returns:
      TRUE - The Asset's Specific Risk successfully added
    • containsAsset

      public boolean containsAsset​(java.lang.String assetID)
      Check if the Asset is represented
      Parameters:
      assetID - The Asset ID
      Returns:
      TRUE - The Asset is represented
    • containsFactor

      public boolean containsFactor​(java.lang.String factorID)
      Check if the Factor is available
      Parameters:
      factorID - The Factor ID
      Returns:
      TRUE - The Factor is available
    • assetFactorLoading

      public java.util.Map<java.lang.String,​java.lang.Double> assetFactorLoading​(java.lang.String assetID)
      Retrieve the Factor Loading for the specified Asset
      Parameters:
      assetID - The Asset ID
      Returns:
      The Factor Loading for the specified Asset
    • factorAssetLoading

      public java.util.Map<java.lang.String,​java.lang.Double> factorAssetLoading​(java.lang.String factorID)
      Retrieve the Loadings for the specified Factor
      Parameters:
      factorID - The Factor ID
      Returns:
      The Loadings for the specified Factor
    • crossFactorAttribute

      public double crossFactorAttribute​(java.lang.String factorID1, java.lang.String factorID2) throws java.lang.Exception
      Retrieve the Cross Factor Attribute Entry
      Parameters:
      factorID1 - The Factor ID #1
      factorID2 - The Factor ID #2
      Returns:
      The Cross Factor Attribute Entry
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • assetSpecificAttribute

      public double assetSpecificAttribute​(java.lang.String assetID) throws java.lang.Exception
      Retrieve the Asset Specific Attribute
      Parameters:
      assetID - The Asset ID
      Returns:
      The Asset Specific Attribute
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • crossAssetAttribute

      public double crossAssetAttribute​(java.lang.String assetID1, java.lang.String assetID2) throws java.lang.Exception
      Compute the Cross Asset Attribute
      Parameters:
      assetID1 - Asset ID #1
      assetID2 - Asset ID #2
      Returns:
      The Cross Asset Attribute
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid