java.lang.Object
org.drip.portfolioconstruction.core.Block
org.drip.portfolioconstruction.composite.Holdings

public class Holdings
extends Block
Holdings is a Portfolio of Holdings in the specified Set of Assets.

Author:
Lakshmi Krishnamurthy
  • Constructor Summary

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

    Modifier and Type Method Description
    double absoluteMarketValue()
    Retrieve the Absolute Market Value of the Holdings
    boolean add​(AssetPosition assetPosition)
    Add an Asset Position
    java.util.Set<java.lang.String> assetIDSet()
    Retrieve the Set of Asset IDs
    AssetPosition assetPosition​(java.lang.String assetID)
    Retrieves the Holdings Asset Position for the Asset (if it exists)
    java.util.Map<java.lang.String,​AssetPosition> assetPositionMap()
    Retrieve the Map of Holdings Amount
    AssetPosition cash()
    Retrieves the Cash Holdings Position
    Holdings clone()
    Clone the Holdings Instance
    AssetPosition[] constrict​(Holdings holdingsOther)
    Constrict "This" Holdings to those of the Assets in the "Other" Holdings
    boolean contains​(java.lang.String assetID)
    Indicates if an Asset exists in the Holdings
    java.lang.String currency()
    Retrieve the Currency
    double marketValue()
    Retrieve the Market Value of the Holdings
    int size()
    Retrieve the Size of the Holdings
    AssetPosition[] toArray()
    Retrieve the Array Form of the Holdings Asset Position

    Methods 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

    • Holdings

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

    • assetIDSet

      public java.util.Set<java.lang.String> assetIDSet()
      Retrieve the Set of Asset IDs
      Returns:
      The Set of Asset IDs
    • assetPositionMap

      public java.util.Map<java.lang.String,​AssetPosition> assetPositionMap()
      Retrieve the Map of Holdings Amount
      Returns:
      The Map of Holdings Amount
    • size

      public int size()
      Retrieve the Size of the Holdings
      Returns:
      Size of the Holdings
    • add

      public boolean add​(AssetPosition assetPosition)
      Add an Asset Position
      Parameters:
      assetPosition - The Asset Position
      Returns:
      TRUE - The Asset Position has been 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)
    • assetPosition

      public AssetPosition assetPosition​(java.lang.String assetID)
      Retrieves the Holdings Asset Position for the Asset (if it exists)
      Parameters:
      assetID - The Asset ID
      Returns:
      The Holdings Asset Position for the Asset (if it exists)
    • currency

      public java.lang.String currency()
      Retrieve the Currency
      Returns:
      The Currency
    • cash

      public AssetPosition cash()
      Retrieves the Cash Holdings Position
      Returns:
      The Cash Holdings Position
    • toArray

      public AssetPosition[] toArray()
      Retrieve the Array Form of the Holdings Asset Position
      Returns:
      Array Form of the Holdings Asset Position
    • marketValue

      public double marketValue()
      Retrieve the Market Value of the Holdings
      Returns:
      Market Value of the Holdings
    • absoluteMarketValue

      public double absoluteMarketValue()
      Retrieve the Absolute Market Value of the Holdings
      Returns:
      Absolute Market Value of the Holdings
    • constrict

      public AssetPosition[] constrict​(Holdings holdingsOther)
      Constrict "This" Holdings to those of the Assets in the "Other" Holdings
      Parameters:
      holdingsOther - The Other Holdings Instance
      Returns:
      Constriction of "This" Holdings
    • clone

      public Holdings clone()
      Clone the Holdings Instance
      Returns:
      The Holdings Instance