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.

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 Attribute
    java.util.Map<java.lang.String,​java.lang.Double> attribute()
    Retrieve the Map of Asset Attributes
    double[] constrict​(Holdings holdings)
    Constrict the Attribute Values to those of the Holdings
    boolean contains​(java.lang.String assetID)
    Indicates if an Asset exists in the Holdings
    double value​(java.lang.String assetID)
    Retrieve the Asset's Attribute Value

    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

    • BlockAttribute

      public BlockAttribute​(java.lang.String name, java.lang.String id, java.lang.String description) throws java.lang.Exception
      BlockAttribute Constructor
      Parameters:
      name - The Name
      id - The ID
      description - 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 ID
      attribute - 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.Exception
      Retrieve 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

      public double[] constrict​(Holdings holdings)
      Constrict the Attribute Values to those of the Holdings
      Parameters:
      holdings - The Holdings Instance
      Returns:
      The Array of Attribute Values