Package org.drip.historical.attribution
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.
- Module = Computational Core Module
- Library = Computation Support
- Project = Historical State Processing Utilities
- Package = Position Market Change Components Attribution
- 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 Inputsjava.lang.String
c1(java.lang.String strKey)
Retrieve the Custom C^1 Entry corresponding to the Specified Keyjava.lang.String
content()
Retrieve the Row of Content Fieldsdouble
cumulativeCouponAmount()
Retrieve the Cumulative Coupon AmountJulianDate
date(java.lang.String strKey)
Retrieve the Custom Date Entry corresponding to the Specified Keyjava.lang.String
header(java.lang.String strPrefix)
Retrieve the Row of Header Fieldsjava.util.Set<java.lang.String>
manifestMeasures()
Retrieve the Set of Manifest MeasuresPositionManifestMeasureSnap
manifestMeasureSnap(java.lang.String strManifestMeasure)
Retrieve the Snapshot associated with the specified Manifest Measurejava.lang.String
marketMeasureName()
Retrieve the Market Measure Namedouble
marketMeasureValue()
Retrieve the Market Measure Valuedouble
marketValue()
Retrieve the Position Market Valuedouble
r1(java.lang.String strKey)
Retrieve the Custom R^1 Entry corresponding to the Specified Keyboolean
setC1(java.lang.String strKey, java.lang.String strC1)
Set the Custom C^1 Entry corresponding to the Specified Keyboolean
setCumulativeCouponAmount(double dblCumulativeCouponAmount)
Set the Cumulative Coupon Amountboolean
setDate(java.lang.String strKey, JulianDate dtCustom)
Set the Custom Date Entry corresponding to the Specified Keyboolean
setMarketMeasureName(java.lang.String strMarketMeasureName)
Set the Market Measure Nameboolean
setMarketMeasureValue(double dblMarketMeasureValue)
Set the Market Measure Valueboolean
setR1(java.lang.String strKey, double dblR1)
Set the Custom R^1 Entry corresponding to the Specified Keyboolean
setR1(java.lang.String strKey, double dblR1, boolean bIgnoreNaN)
Set the Custom R^1 Entry corresponding to the Specified KeyJulianDate
snapDate()
Retrieve the Date of the SnapMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PositionMarketSnap
PositionMarketSnap Constructor- Parameters:
dtSnap
- The Snapshot DatedblMarketValue
- The Snapshot Market Value- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
-
Method Details
-
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 MeasuredblManifestMeasureRealization
- The Manifest Measure RealizationdblManifestMeasureSensitivity
- The Manifest Measure SensitivitydblManifestMeasureRollDown
- The Manifest Measure Roll Down- Returns:
- TRUE - The Manifest Measure Snap Metrics successfully added
-
manifestMeasureSnap
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
Set the Custom Date Entry corresponding to the Specified Key- Parameters:
strKey
- The KeydtCustom
- The Custom Date Entry- Returns:
- TRUE - Custom Date successfully set
-
date
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 KeystrC1
- 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 KeydblR1
- The Custom R^1 EntrybIgnoreNaN
- 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 KeydblR1
- The Custom R^1 Entry- Returns:
- TRUE - Custom Number successfully set
-
r1
public double r1(java.lang.String strKey) throws java.lang.ExceptionRetrieve 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.ExceptionRetrieve 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.ExceptionRetrieve 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
-