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.
- Module = Portfolio Core Module
- Library = Asset Allocation Analytics
- Project = Portfolio Construction under Allocation Constraints
- Package = Portfolio Construction Risk/Covariance Component
- 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 booleanaddAssetFactorLoading(java.lang.String assetID, java.lang.String factorID, double factorLoading)Add the Asset's Factor Loading CoefficientbooleanaddFactorAttribute(java.lang.String factorID1, java.lang.String factorID2, double crossFactorAttribute)Add the Cross Factor AttributebooleanaddSpecificAttribute(java.lang.String assetID, double specificAttribute)Add the Asset's Specific Attributejava.util.Map<java.lang.String,java.lang.Double>assetFactorLoading()Retrieve the Joint Asset-Factor Loading Mapjava.util.Map<java.lang.String,java.lang.Double>assetFactorLoading(java.lang.String assetID)Retrieve the Factor Loading for the specified AssetdoubleassetSpecificAttribute(java.lang.String assetID)Retrieve the Asset Specific AttributebooleancontainsAsset(java.lang.String assetID)Check if the Asset is representedbooleancontainsFactor(java.lang.String factorID)Check if the Factor is availabledoublecrossAssetAttribute(java.lang.String assetID1, java.lang.String assetID2)Compute the Cross Asset AttributedoublecrossFactorAttribute(java.lang.String factorID1, java.lang.String factorID2)Retrieve the Cross Factor Attribute Entryjava.util.Map<java.lang.String,java.lang.Double>factorAssetLoading()Retrieve the Joint Factor-Asset Loading Mapjava.util.Map<java.lang.String,java.lang.Double>factorAssetLoading(java.lang.String factorID)Retrieve the Loadings for the specified Factorjava.util.Map<java.lang.String,java.lang.Double>factorJointAttribute()Retrieve the Factor-to-Factor Attribute Mapjava.util.Map<java.lang.String,java.lang.Double>specificRisk()Retrieve the Asset Specific Attributestatic AttributeJointFactorStandard(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 AttributeJointFactorMethods inherited from class org.drip.portfolioconstruction.core.Block
category, description, hashCode, id, name, Standard, timeStampMethods 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.ExceptionAttributeJointFactor Constructor- Parameters:
name- The Nameid- The IDdescription- 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 Nameid- AttributeJointFactor Instance IDdescription- AttributeJointFactor DescriptionassetIDArray- Array of Asset IDsfactorIDArray- Array of FactorIDsassetFactorLoadingGrid- Matrix of Asset-Factor LoadingscrossFactorAttributeGrid- Matrix of Factor-Factor AttributesassetSpecificAttributeArray- 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 IDfactorID- The Factor IDfactorLoading- 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 IDfactorID2- The Factor #2 IDcrossFactorAttribute- 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 IDspecificAttribute- 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.ExceptionRetrieve the Cross Factor Attribute Entry- Parameters:
factorID1- The Factor ID #1factorID2- 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.ExceptionRetrieve 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.ExceptionCompute the Cross Asset Attribute- Parameters:
assetID1- Asset ID #1assetID2- Asset ID #2- Returns:
- The Cross Asset Attribute
- Throws:
java.lang.Exception- Thrown if the Inputs are Invalid
-