Class PositionMarketSnap

java.lang.Object
org.drip.historical.attribution.PositionMarketSnap
Direct Known Subclasses:
BondMarketSnap, CDSMarketSnap, TreasuryFuturesMarketSnap

public class PositionMarketSnap
extends java.lang.Object
PositionMarketSnap contains the Metrics Snapshot associated with the relevant Manifest Measures for a given Position.

Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    PositionMarketSnap​(JulianDate dtSnap, double dblMarketValue)
    PositionMarketSnap Constructor
  • Method Summary

    Modifier and Type Method Description
    boolean addManifestMeasureSnap​(java.lang.String strManifestMeasure, double dblManifestMeasureRealization, double dblManifestMeasureSensitivity, double dblManifestMeasureRollDown)
    Add an Instance of the Position Manifest Measure Snap from the Specified Inputs
    java.lang.String c1​(java.lang.String strKey)
    Retrieve the Custom C^1 Entry corresponding to the Specified Key
    java.lang.String content()
    Retrieve the Row of Content Fields
    double cumulativeCouponAmount()
    Retrieve the Cumulative Coupon Amount
    JulianDate date​(java.lang.String strKey)
    Retrieve the Custom Date Entry corresponding to the Specified Key
    java.lang.String header​(java.lang.String strPrefix)
    Retrieve the Row of Header Fields
    java.util.Set<java.lang.String> manifestMeasures()
    Retrieve the Set of Manifest Measures
    PositionManifestMeasureSnap manifestMeasureSnap​(java.lang.String strManifestMeasure)
    Retrieve the Snapshot associated with the specified Manifest Measure
    java.lang.String marketMeasureName()
    Retrieve the Market Measure Name
    double marketMeasureValue()
    Retrieve the Market Measure Value
    double marketValue()
    Retrieve the Position Market Value
    double r1​(java.lang.String strKey)
    Retrieve the Custom R^1 Entry corresponding to the Specified Key
    boolean setC1​(java.lang.String strKey, java.lang.String strC1)
    Set the Custom C^1 Entry corresponding to the Specified Key
    boolean setCumulativeCouponAmount​(double dblCumulativeCouponAmount)
    Set the Cumulative Coupon Amount
    boolean setDate​(java.lang.String strKey, JulianDate dtCustom)
    Set the Custom Date Entry corresponding to the Specified Key
    boolean setMarketMeasureName​(java.lang.String strMarketMeasureName)
    Set the Market Measure Name
    boolean setMarketMeasureValue​(double dblMarketMeasureValue)
    Set the Market Measure Value
    boolean setR1​(java.lang.String strKey, double dblR1)
    Set the Custom R^1 Entry corresponding to the Specified Key
    boolean setR1​(java.lang.String strKey, double dblR1, boolean bIgnoreNaN)
    Set the Custom R^1 Entry corresponding to the Specified Key
    JulianDate snapDate()
    Retrieve the Date of the Snap

    Methods inherited from class java.lang.Object

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

    • PositionMarketSnap

      public PositionMarketSnap​(JulianDate dtSnap, double dblMarketValue) throws java.lang.Exception
      PositionMarketSnap Constructor
      Parameters:
      dtSnap - The Snapshot Date
      dblMarketValue - The Snapshot Market Value
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • snapDate

      public JulianDate snapDate()
      Retrieve the Date of the Snap
      Returns:
      Date of the Snap
    • marketValue

      public double marketValue()
      Retrieve the Position Market Value
      Returns:
      The Position Market Value
    • addManifestMeasureSnap

      public boolean addManifestMeasureSnap​(java.lang.String strManifestMeasure, double dblManifestMeasureRealization, double dblManifestMeasureSensitivity, double dblManifestMeasureRollDown)
      Add an Instance of the Position Manifest Measure Snap from the Specified Inputs
      Parameters:
      strManifestMeasure - The Manifest Measure
      dblManifestMeasureRealization - The Manifest Measure Realization
      dblManifestMeasureSensitivity - The Manifest Measure Sensitivity
      dblManifestMeasureRollDown - The Manifest Measure Roll Down
      Returns:
      TRUE - The Manifest Measure Snap Metrics successfully added
    • manifestMeasureSnap

      public PositionManifestMeasureSnap manifestMeasureSnap​(java.lang.String strManifestMeasure)
      Retrieve the Snapshot associated with the specified Manifest Measure
      Parameters:
      strManifestMeasure - The Manifest Measure
      Returns:
      The Snapshot associated with the specified Manifest Measure
    • manifestMeasures

      public java.util.Set<java.lang.String> manifestMeasures()
      Retrieve the Set of Manifest Measures
      Returns:
      The Set of Manifest Measures
    • setDate

      public boolean setDate​(java.lang.String strKey, JulianDate dtCustom)
      Set the Custom Date Entry corresponding to the Specified Key
      Parameters:
      strKey - The Key
      dtCustom - The Custom Date Entry
      Returns:
      TRUE - Custom Date successfully set
    • date

      public JulianDate date​(java.lang.String strKey)
      Retrieve the Custom Date Entry corresponding to the Specified Key
      Parameters:
      strKey - The Key
      Returns:
      The Custom Date Entry
    • setC1

      public boolean setC1​(java.lang.String strKey, java.lang.String strC1)
      Set the Custom C^1 Entry corresponding to the Specified Key
      Parameters:
      strKey - The Key
      strC1 - The Custom C^1 Entry
      Returns:
      TRUE - Custom C^1 Entry successfully set
    • c1

      public java.lang.String c1​(java.lang.String strKey)
      Retrieve the Custom C^1 Entry corresponding to the Specified Key
      Parameters:
      strKey - The Key
      Returns:
      The Custom C^1 Entry
    • setR1

      public boolean setR1​(java.lang.String strKey, double dblR1, boolean bIgnoreNaN)
      Set the Custom R^1 Entry corresponding to the Specified Key
      Parameters:
      strKey - The Key
      dblR1 - The Custom R^1 Entry
      bIgnoreNaN - TRUE - Ignore NaN Entry
      Returns:
      TRUE - Custom Number successfully set
    • setR1

      public boolean setR1​(java.lang.String strKey, double dblR1)
      Set the Custom R^1 Entry corresponding to the Specified Key
      Parameters:
      strKey - The Key
      dblR1 - The Custom R^1 Entry
      Returns:
      TRUE - Custom Number successfully set
    • r1

      public double r1​(java.lang.String strKey) throws java.lang.Exception
      Retrieve the Custom R^1 Entry corresponding to the Specified Key
      Parameters:
      strKey - The Key
      Returns:
      The Custom R^1 Entry
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • setMarketMeasureName

      public boolean setMarketMeasureName​(java.lang.String strMarketMeasureName)
      Set the Market Measure Name
      Parameters:
      strMarketMeasureName - The Market Measure Name
      Returns:
      The Market Measure Name successfully set
    • marketMeasureName

      public java.lang.String marketMeasureName()
      Retrieve the Market Measure Name
      Returns:
      The Market Measure Name
    • setMarketMeasureValue

      public boolean setMarketMeasureValue​(double dblMarketMeasureValue)
      Set the Market Measure Value
      Parameters:
      dblMarketMeasureValue - The Market Measure Value
      Returns:
      The Market Measure Value successfully set
    • marketMeasureValue

      public double marketMeasureValue() throws java.lang.Exception
      Retrieve the Market Measure Value
      Returns:
      The Market Measure Value
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • setCumulativeCouponAmount

      public boolean setCumulativeCouponAmount​(double dblCumulativeCouponAmount)
      Set the Cumulative Coupon Amount
      Parameters:
      dblCumulativeCouponAmount - The Cumulative Coupon Amount
      Returns:
      TRUE - The Cumulative Coupon Amount successfully set
    • cumulativeCouponAmount

      public double cumulativeCouponAmount() throws java.lang.Exception
      Retrieve the Cumulative Coupon Amount
      Returns:
      The Cumulative Coupon Amount
      Throws:
      java.lang.Exception - Thrown if the Cumulative Coupon Amount cannot be obtained
    • header

      public java.lang.String header​(java.lang.String strPrefix)
      Retrieve the Row of Header Fields
      Parameters:
      strPrefix - The Prefix that precedes each Header Field
      Returns:
      The Row of Header Fields
    • content

      public java.lang.String content()
      Retrieve the Row of Content Fields
      Returns:
      The Row of Content Fields