Skip to content

Commit

Permalink
Features:
Browse files Browse the repository at this point in the history
Bug Fixes/Re-organization:

	- State Inference Latent Sequence Builder - Calibrate Segment (1)
	- State Inference Latent Sequence Builder - Manifest Measure Sensitivity (2, 3, 4)
	- State Identifier Latent Label (5, 6, 7)
	- State Identifier Latent Label - Fully Qualified Name (8)
	- State Identifier Latent Label - Match (9)
	- State Identifier Collateral Label (10, 11, 12)
	- State Identifier Collateral Label - Constructor (13, 14, 15)
	- State Identifier Collateral Label - Fully Qualified Name (16)
	- State Identifier Collateral Label - Match (17, 18)
	- State Identifier Collateral Label - Standard (19, 20, 21)
	- State Identifier CSA Label (22, 23, 24)
	- State Identifier CSA Label - Currency (25, 26)
	- State Identifier CSA Label - Association (27, 28)
	- State Identifier CSA Label - Constructor (29, 30, 31)
	- State Identifier CSA Label - Fully Qualified Name (32)
	- State Identifier CSA Label - Match (33)
	- State Identifier Custom Label (34, 35, 36)
	- State Identifier Custom Label - Fully Qualified Name (37, 38)
	- State Identifier Custom Label - Constructor (39, 40)
	- State Identifier Custom Label - Match (41)
	- State Identifier Custom Label - Standard (42, 43, 44)
	- State Identifier Entity Designate Label #1 (45, 46, 47)
	- State Identifier Entity Designate Label #2 (48)
	- State Identifier Entity Designate Label - Match (49, 50, 51)
	- State Identifier Entity CDS Label #1 (52, 53, 54)
	- State Identifier Entity CDS Label #2 (55, 56)
	- State Identifier Entity CDS Label - Match (57, 58, 59)
	- State Identifier Entity Credit Label (60)


Samples:

IdeaDRIP:
  • Loading branch information
Lakshmik committed Dec 23, 2023
1 parent 30699bb commit 8ce8a2f
Show file tree
Hide file tree
Showing 10 changed files with 353 additions and 214 deletions.
38 changes: 38 additions & 0 deletions ReleaseNotes/02_14_2023.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

Features:

Bug Fixes/Re-organization:

- State Inference Latent Sequence Builder - Calibrate Segment (1)
- State Inference Latent Sequence Builder - Manifest Measure Sensitivity (2, 3, 4)
- State Identifier Latent Label (5, 6, 7)
- State Identifier Latent Label - Fully Qualified Name (8)
- State Identifier Latent Label - Match (9)
- State Identifier Collateral Label (10, 11, 12)
- State Identifier Collateral Label - Constructor (13, 14, 15)
- State Identifier Collateral Label - Fully Qualified Name (16)
- State Identifier Collateral Label - Match (17, 18)
- State Identifier Collateral Label - Standard (19, 20, 21)
- State Identifier CSA Label (22, 23, 24)
- State Identifier CSA Label - Currency (25, 26)
- State Identifier CSA Label - Association (27, 28)
- State Identifier CSA Label - Constructor (29, 30, 31)
- State Identifier CSA Label - Fully Qualified Name (32)
- State Identifier CSA Label - Match (33)
- State Identifier Custom Label (34, 35, 36)
- State Identifier Custom Label - Fully Qualified Name (37, 38)
- State Identifier Custom Label - Constructor (39, 40)
- State Identifier Custom Label - Match (41)
- State Identifier Custom Label - Standard (42, 43, 44)
- State Identifier Entity Designate Label #1 (45, 46, 47)
- State Identifier Entity Designate Label #2 (48)
- State Identifier Entity Designate Label - Match (49, 50, 51)
- State Identifier Entity CDS Label #1 (52, 53, 54)
- State Identifier Entity CDS Label #2 (55, 56)
- State Identifier Entity CDS Label - Match (57, 58, 59)
- State Identifier Entity Credit Label (60)


Samples:

IdeaDRIP:
Binary file modified ScheduleSheet.xlsx
Binary file not shown.
80 changes: 48 additions & 32 deletions src/main/java/org/drip/state/identifier/CSALabel.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

/*!
* Copyright (C) 2025 Lakshmi Krishnamurthy
* Copyright (C) 2024 Lakshmi Krishnamurthy
* Copyright (C) 2023 Lakshmi Krishnamurthy
* Copyright (C) 2022 Lakshmi Krishnamurthy
* Copyright (C) 2021 Lakshmi Krishnamurthy
* Copyright (C) 2020 Lakshmi Krishnamurthy
Expand Down Expand Up @@ -79,9 +82,18 @@
*/

/**
* <i>CSALabel</i> specifies the Label of of a Credit Support Annex (CSA) Specification. The References are:
* <i>CSALabel</i> specifies the Label of of a Credit Support Annex (CSA) Specification. It implements the
* following Functionality.
*
* <ul>
* <li><i>CSALabel</i> constructor</li>
* <li>Retrieve the CSA Currency</li>
* <li>Retrieve the CSA Specification Association/Organization</li>
* <li>Generate the ISDA CSA</li>
* </ul>
*
* The References are:
*
* <br><br>
* <ul>
* <li>
* Burgard, C., and M. Kjaer (2014): PDE Representations of Derivatives with Bilateral Counter Party
Expand All @@ -107,22 +119,27 @@
* </li>
* </ul>
*
* <br><br>
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></li>
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/state/README.md">Latent State Inference and Creation Utilities</a></li>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/state/identifier/README.md">Latent State Identifier Labels</a></li>
* </ul>
* <br><br>
* <br>
* <style>table, td, th {
* padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
* text-align: center; color: #0000ff;
* }
* </style>
*
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></td></tr>
* <tr><td><b>Project</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/state/README.md">Latent State Inference and Creation Utilities</a></td></tr>
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/state/identifier/README.md">Latent State Identifier Labels</a></td></tr>
* </table>
*
* @author Lakshmi Krishnamurthy
*/

public class CSALabel implements org.drip.state.identifier.LatentStateLabel
public class CSALabel implements LatentStateLabel
{
private java.lang.String _strCurrency = "";
private java.lang.String _strAssociation = "";
private String _currency = "";
private String _association = "";

/**
* Generate the ISDA CSA
Expand Down Expand Up @@ -150,21 +167,20 @@ public static final CSALabel ISDA (
/**
* CSALabel Constructor
*
* @param strCurrency The CSA Currency
* @param strAssociation The CSA Specifier
* @param currency The CSA Currency
* @param association The CSA Specifier
*
* @throws java.lang.Exception Thrown if the Inputs are Invalid
* @throws Exception Thrown if the Inputs are Invalid
*/

public CSALabel (
final java.lang.String strCurrency,
final java.lang.String strAssociation)
throws java.lang.Exception
final String currency,
final String association)
throws Exception
{
if (null == (_strCurrency = strCurrency) || _strCurrency.isEmpty() ||
null == (_strAssociation = strAssociation) || _strAssociation.isEmpty())
{
throw new java.lang.Exception ("CSALabel Constructor => Invalid Inputs");
if (null == (_currency = currency) || _currency.isEmpty() ||
null == (_association = association) || _association.isEmpty()) {
throw new Exception ("CSALabel Constructor => Invalid Inputs");
}
}

Expand All @@ -174,9 +190,9 @@ public CSALabel (
* @return The CSA Currency
*/

public java.lang.String currency()
public String currency()
{
return _strCurrency;
return _currency;
}

/**
Expand All @@ -185,20 +201,20 @@ public java.lang.String currency()
* @return The CSA Specification Association/Organization
*/

public java.lang.String association()
public String association()
{
return _strAssociation;
return _association;
}

@Override public java.lang.String fullyQualifiedName()
@Override public String fullyQualifiedName()
{
return _strCurrency + "::" + _strAssociation;
return _currency + "::" + _association;
}

@Override public boolean match (
final org.drip.state.identifier.LatentStateLabel lslOther)
final LatentStateLabel latentStateLabelOther)
{
return null == lslOther || !(lslOther instanceof org.drip.state.identifier.CSALabel) ? false :
fullyQualifiedName().equalsIgnoreCase (lslOther.fullyQualifiedName());
return null != latentStateLabelOther && latentStateLabelOther instanceof CSALabel &&
fullyQualifiedName().equalsIgnoreCase (latentStateLabelOther.fullyQualifiedName());
}
}
66 changes: 41 additions & 25 deletions src/main/java/org/drip/state/identifier/CollateralLabel.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

/*!
* Copyright (C) 2025 Lakshmi Krishnamurthy
* Copyright (C) 2024 Lakshmi Krishnamurthy
* Copyright (C) 2023 Lakshmi Krishnamurthy
* Copyright (C) 2022 Lakshmi Krishnamurthy
* Copyright (C) 2021 Lakshmi Krishnamurthy
* Copyright (C) 2020 Lakshmi Krishnamurthy
Expand Down Expand Up @@ -83,37 +86,49 @@

/**
* <i>CollateralLabel</i> contains the Identifier Parameters referencing the Latent State of the named
* Collateral Discount Curve. Currently it only contains the collateral currency.
*
* <br><br>
* Collateral Discount Curve. Currently it only contains the collateral currency. It implements the following
* Functionality.
*
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></li>
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/state/README.md">Latent State Inference and Creation Utilities</a></li>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/state/identifier/README.md">Latent State Identifier Labels</a></li>
* <li>Make a Standard Collateral Label from the Collateral Currency</li>
* <li><i>CollateralLabel</i> constructor</li>
* </ul>
* <br><br>
*
* <br>
* <style>table, td, th {
* padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
* text-align: center; color: #0000ff;
* }
* </style>
*
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></td></tr>
* <tr><td><b>Project</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/state/README.md">Latent State Inference and Creation Utilities</a></td></tr>
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/state/identifier/README.md">Latent State Identifier Labels</a></td></tr>
* </table>
*
* @author Lakshmi Krishnamurthy
*/

public class CollateralLabel implements org.drip.state.identifier.LatentStateLabel {
private java.lang.String _strCurrency = "";
public class CollateralLabel implements LatentStateLabel
{
private String _currency = "";

/**
* Make a Standard Collateral Label from the Collateral Currency
*
* @param strCurrency The Collateral Currency
* @param currency The Collateral Currency
*
* @return The Collateral Label
*/

public static final CollateralLabel Standard (
final java.lang.String strCurrency)
final String currency)
{
try {
return new CollateralLabel (strCurrency);
} catch (java.lang.Exception e) {
return new CollateralLabel (currency);
} catch (Exception e) {
e.printStackTrace();
}

Expand All @@ -123,28 +138,29 @@ public static final CollateralLabel Standard (
/**
* CollateralLabel constructor
*
* @param strCurrency Collateral Currency
* @param currency Collateral Currency
*
* @throws java.lang.Exception Thrown if the inputs are invalid
* @throws Exception Thrown if the inputs are invalid
*/

private CollateralLabel (
final java.lang.String strCurrency)
throws java.lang.Exception
final String currency)
throws Exception
{
if (null == (_strCurrency = strCurrency) || _strCurrency.isEmpty())
throw new java.lang.Exception ("CollateralLabel ctr: Invalid Inputs");
if (null == (_currency = currency) || _currency.isEmpty()) {
throw new Exception ("CollateralLabel ctr: Invalid Inputs");
}
}

@Override public java.lang.String fullyQualifiedName()
@Override public String fullyQualifiedName()
{
return _strCurrency;
return _currency;
}

@Override public boolean match (
final org.drip.state.identifier.LatentStateLabel lslOther)
final LatentStateLabel latentStateLabelOther)
{
return null == lslOther || !(lslOther instanceof org.drip.state.identifier.CollateralLabel) ? false :
_strCurrency.equalsIgnoreCase (lslOther.fullyQualifiedName());
return null != latentStateLabelOther && latentStateLabelOther instanceof CollateralLabel &&
_currency.equalsIgnoreCase (latentStateLabelOther.fullyQualifiedName());
}
}
Loading

0 comments on commit 8ce8a2f

Please sign in to comment.