Class BlockAttribute
java.lang.Object
org.drip.portfolioconstruction.core.Block
org.drip.portfolioconstruction.composite.BlockAttribute
- Direct Known Subclasses:
AlphaGroup
public class BlockAttribute extends Block
BlockAttribute contains the Marginal Attributes for the specified Set of Assets.
- Module = Portfolio Core Module
- Library = Asset Allocation Analytics
- Project = Portfolio Construction under Allocation Constraints
- Package = Portfolio Construction Component Groups Suite
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description BlockAttribute(java.lang.String name, java.lang.String id, java.lang.String description)
BlockAttribute Constructor -
Method Summary
Modifier and Type Method Description boolean
add(java.lang.String assetID, double attribute)
Add an Asset's Attributejava.util.Map<java.lang.String,java.lang.Double>
attribute()
Retrieve the Map of Asset Attributesdouble[]
constrict(Holdings holdings)
Constrict the Attribute Values to those of the Holdingsboolean
contains(java.lang.String assetID)
Indicates if an Asset exists in the Holdingsdouble
value(java.lang.String assetID)
Retrieve the Asset's Attribute ValueMethods inherited from class org.drip.portfolioconstruction.core.Block
category, description, hashCode, id, name, Standard, timeStamp
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
BlockAttribute
public BlockAttribute(java.lang.String name, java.lang.String id, java.lang.String description) throws java.lang.ExceptionBlockAttribute Constructor- Parameters:
name
- The Nameid
- The IDdescription
- The Description- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
-
Method Details
-
add
public boolean add(java.lang.String assetID, double attribute)Add an Asset's Attribute- Parameters:
assetID
- The Asset IDattribute
- The Attribute- Returns:
- TRUE - The Asset's Attribute successfully added.
-
contains
public boolean contains(java.lang.String assetID)Indicates if an Asset exists in the Holdings- Parameters:
assetID
- The Asset ID- Returns:
- TRUE - The Asset is Part of the Holdings (may have Zero Value though)
-
value
public double value(java.lang.String assetID) throws java.lang.ExceptionRetrieve the Asset's Attribute Value- Parameters:
assetID
- The Asset ID- Returns:
- The Asset's Attribute Value
- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
attribute
public java.util.Map<java.lang.String,java.lang.Double> attribute()Retrieve the Map of Asset Attributes- Returns:
- Map of the Asset Attributes
-
constrict
Constrict the Attribute Values to those of the Holdings- Parameters:
holdings
- The Holdings Instance- Returns:
- The Array of Attribute Values
-