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.
- Module = Portfolio Core Module
- Library = Asset Allocation Analytics
- Project = Portfolio Construction under Allocation Constraints
- Package = "Lean" Portfolio Construction Utilities Suite
- 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 Valuesjava.util.Set<java.lang.String>
assetSet()
Retrieve the Set of Assetsjava.util.Map<java.lang.String,java.lang.Double>
assetWeightMap()
Retrieve the Map of Asset Weightsdouble
cashValue()
Retrieve the Holdings Cash Valuedouble
cashWeight()
Retrieve the Cash WeightHoldingsContainer
clone()
Clone the Holdings Container Instancedouble
marketValue()
Retrieve the Holdings Market Valueboolean
removeAsset(java.lang.String assetID)
Remove the Asset corresponding to the IDboolean
setAsset(java.lang.String assetID, double assetMarketValue)
Set the Asset to its Market Value on the Holdingsboolean
setCashValue(double cashValue)
Set the Cash Value on the Holdingsboolean
updateAsset(java.lang.String assetID, double assetMarketValue)
Update the Asset to its Market Value on the HoldingsMethods 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 IDassetMarketValue
- 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 IDassetMarketValue
- 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
Clone the Holdings Container Instance- Returns:
- Cloned Holdings Container Instance
-