Class HoldingsContainer

java.lang.Object
org.drip.portfolioconstruction.lean.HoldingsContainer

public class HoldingsContainer
extends java.lang.Object
HoldingsContainer implements the container that maintains the Asset Holdings Market Value and Weight.

Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    HoldingsContainer()
    Empty HoldingsContainer Constructor
  • Method Summary

    Modifier and Type Method Description
    java.util.Map<java.lang.String,​java.lang.Double> assetMarketValueMap()
    Retrieve the Map of Asset Market Values
    java.util.Set<java.lang.String> assetSet()
    Retrieve the Set of Assets
    java.util.Map<java.lang.String,​java.lang.Double> assetWeightMap()
    Retrieve the Map of Asset Weights
    double cashValue()
    Retrieve the Holdings Cash Value
    double cashWeight()
    Retrieve the Cash Weight
    HoldingsContainer clone()
    Clone the Holdings Container Instance
    double marketValue()
    Retrieve the Holdings Market Value
    boolean removeAsset​(java.lang.String assetID)
    Remove the Asset corresponding to the ID
    boolean setAsset​(java.lang.String assetID, double assetMarketValue)
    Set the Asset to its Market Value on the Holdings
    boolean setCashValue​(double cashValue)
    Set the Cash Value on the Holdings
    boolean updateAsset​(java.lang.String assetID, double assetMarketValue)
    Update the Asset to its Market Value on the Holdings

    Methods inherited from class java.lang.Object

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

    • HoldingsContainer

      public HoldingsContainer()
      Empty HoldingsContainer Constructor
  • Method Details

    • assetMarketValueMap

      public java.util.Map<java.lang.String,​java.lang.Double> assetMarketValueMap()
      Retrieve the Map of Asset Market Values
      Returns:
      Map of Asset Market Values
    • assetWeightMap

      public java.util.Map<java.lang.String,​java.lang.Double> assetWeightMap()
      Retrieve the Map of Asset Weights
      Returns:
      Map of Asset Market Values
    • marketValue

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

      public double cashValue()
      Retrieve the Holdings Cash Value
      Returns:
      Holdings Cash Value
    • setAsset

      public boolean setAsset​(java.lang.String assetID, double assetMarketValue)
      Set the Asset to its Market Value on the Holdings
      Parameters:
      assetID - Asset ID
      assetMarketValue - Asset Market Value
      Returns:
      TRUE - Asset successfully set on the Holdings
    • updateAsset

      public boolean updateAsset​(java.lang.String assetID, double assetMarketValue)
      Update the Asset to its Market Value on the Holdings
      Parameters:
      assetID - Asset ID
      assetMarketValue - Asset Market Value
      Returns:
      TRUE - Asset successfully updated on the Holdings
    • setCashValue

      public boolean setCashValue​(double cashValue)
      Set the Cash Value on the Holdings
      Parameters:
      cashValue - Cash Value
      Returns:
      TRUE - Cash Value successfully set on the Holdings
    • assetSet

      public java.util.Set<java.lang.String> assetSet()
      Retrieve the Set of Assets
      Returns:
      Set of Assets
    • cashWeight

      public double cashWeight()
      Retrieve the Cash Weight
      Returns:
      Cash Weight
    • removeAsset

      public boolean removeAsset​(java.lang.String assetID)
      Remove the Asset corresponding to the ID
      Parameters:
      assetID - Asset ID
      Returns:
      TRUE - Asset successfully removed
    • clone

      public HoldingsContainer clone()
      Clone the Holdings Container Instance
      Returns:
      Cloned Holdings Container Instance