Class Holdings
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.
- 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 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 Holdingsboolean
add(AssetPosition assetPosition)
Add an Asset Positionjava.util.Set<java.lang.String>
assetIDSet()
Retrieve the Set of Asset IDsAssetPosition
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 AmountAssetPosition
cash()
Retrieves the Cash Holdings PositionHoldings
clone()
Clone the Holdings InstanceAssetPosition[]
constrict(Holdings holdingsOther)
Constrict "This" Holdings to those of the Assets in the "Other" Holdingsboolean
contains(java.lang.String assetID)
Indicates if an Asset exists in the Holdingsjava.lang.String
currency()
Retrieve the Currencydouble
marketValue()
Retrieve the Market Value of the Holdingsint
size()
Retrieve the Size of the HoldingsAssetPosition[]
toArray()
Retrieve the Array Form of the Holdings Asset PositionMethods 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.ExceptionHoldings Constructor- Parameters:
name
- The Asset Nameid
- The Asset IDdescription
- The Asset Descriptioncurrency
- 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
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
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
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
Retrieves the Cash Holdings Position- Returns:
- The Cash Holdings Position
-
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
Constrict "This" Holdings to those of the Assets in the "Other" Holdings- Parameters:
holdingsOther
- The Other Holdings Instance- Returns:
- Constriction of "This" Holdings
-
clone
Clone the Holdings Instance- Returns:
- The Holdings Instance
-