Skip to content

Commit

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

	- Service State Credit Curve API - Daily Metrics #1 (1, 2, 3)
	- Service State Credit Curve API - Daily Metrics #2 (4, 5)
	- Service State Credit Curve API - Daily Metrics #3 (6, 7)
	- Service State Credit Curve API - Horizon Metrics #1 (8, 9)
	- Service State Credit Curve API - Horizon Metrics #2 (10, 11, 12)
	- Service State Credit Curve API - Horizon Metrics #3 (13, 14, 15)
	- Service State Credit Curve API - Horizon Metrics #4 (16, 17)
	- Service State Credit Curve API - Stubs (18, 19)
	- Service State Funding Curve API (20, 21, 22)
	- Service State Funding Curve API - Daily Metrics #1 (23, 24, 25)
	- Service State Funding Curve API - Daily Metrics #2 (26, 27, 28)
	- Service State Funding Curve API - Daily Metrics #3 (29, 30, 31)
	- Service State Funding Curve API - Horizon Metrics #1 (32, 33, 34)
	- Service State Funding Curve API - Horizon Metrics #2 (35, 36, 37)
	- Service State Funding Curve API - Horizon Metrics #3 (38, 39, 40)
	- Service State Funding Curve API - Horizon Metrics #4 (41, 42, 43)
	- Service State Funding Curve API - Historical Map #1 (44, 45, 46)
	- Service State Funding Curve API - Historical Map #2 (47, 48, 49)
	- Service State Funding Curve API - Stubs (50, 51, 52)
	- Service State Overnight Curve API (53, 54, 55)
	- Service State Overnight Curve API - Funding Metrics #1 (56, 57, 58)
	- Service State Overnight Curve API - Funding Metrics #2 (59, 60, 61)
	- Service State Overnight Curve API - Funding Metrics #3 (62, 63, 64)
	- Service State Overnight Curve API - Horizon Metrics #1 (65, 66, 67)
	- Service State Overnight Curve API - Horizon Metrics #2 (68, 69, 70)
	- Service State Overnight Curve API - Horizon Metrics #3 (71, 72, 73)
	- Service State Overnight Curve API - Horizon Metrics #4 (74, 75, 76)
	- Service State Overnight Curve API - Stubs (77, 78)
	- Service Scenario Bond Replication Run (79, 80, 81)
	- Service Scenario Named Field (82, 83, 84)
	- Service Scenario Named Field - Name (85, 86)
	- Service Scenario Named Field - Value (87, 88)
	- Service Scenario Named Field - Constructor (89, 90)
	- Service Scenario Named Field - Stubs (91, 92, 93)
	- Service Scenario Named Field Map #1 (94, 95, 96)
	- Service Scenario Named Field Map - Name (97, 98)
	- Service Scenario Named Field Map - Value (99, 100)
	- Service Scenario Named Field Map - Constructor (101, 102)
	- Service Scenario Named Field Map - Stubs (103, 104, 105)
	- Service Scenario Bond Replication Run - Named Field Map #1 (106, 107)
	- Service Scenario Bond Replication Run - Named Field Map #2 (108, 109)
	- Service Scenario Bond Replication Run - Constructor (110)
	- Service Scenario Bond Replication Run - Add Named Field (111, 112)
	- Service Scenario Bond Replication Run - Add Named Field Map (113, 114)
	- Service Scenario Bond Replication Run - Headers (115, 116, 117)
	- Service Scenario Bond Replication Run - Headers (118, 119, 120)


Samples:

IdeaDRIP:
  • Loading branch information
Lakshmik committed Dec 21, 2024
1 parent 84fa927 commit 5503476
Show file tree
Hide file tree
Showing 7 changed files with 675 additions and 412 deletions.
56 changes: 56 additions & 0 deletions ReleaseNotes/04_17_2024.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

Features:

Bug Fixes/Re-organization:

- Service State Credit Curve API - Daily Metrics #1 (1, 2, 3)
- Service State Credit Curve API - Daily Metrics #2 (4, 5)
- Service State Credit Curve API - Daily Metrics #3 (6, 7)
- Service State Credit Curve API - Horizon Metrics #1 (8, 9)
- Service State Credit Curve API - Horizon Metrics #2 (10, 11, 12)
- Service State Credit Curve API - Horizon Metrics #3 (13, 14, 15)
- Service State Credit Curve API - Horizon Metrics #4 (16, 17)
- Service State Credit Curve API - Stubs (18, 19)
- Service State Funding Curve API (20, 21, 22)
- Service State Funding Curve API - Daily Metrics #1 (23, 24, 25)
- Service State Funding Curve API - Daily Metrics #2 (26, 27, 28)
- Service State Funding Curve API - Daily Metrics #3 (29, 30, 31)
- Service State Funding Curve API - Horizon Metrics #1 (32, 33, 34)
- Service State Funding Curve API - Horizon Metrics #2 (35, 36, 37)
- Service State Funding Curve API - Horizon Metrics #3 (38, 39, 40)
- Service State Funding Curve API - Horizon Metrics #4 (41, 42, 43)
- Service State Funding Curve API - Historical Map #1 (44, 45, 46)
- Service State Funding Curve API - Historical Map #2 (47, 48, 49)
- Service State Funding Curve API - Stubs (50, 51, 52)
- Service State Overnight Curve API (53, 54, 55)
- Service State Overnight Curve API - Funding Metrics #1 (56, 57, 58)
- Service State Overnight Curve API - Funding Metrics #2 (59, 60, 61)
- Service State Overnight Curve API - Funding Metrics #3 (62, 63, 64)
- Service State Overnight Curve API - Horizon Metrics #1 (65, 66, 67)
- Service State Overnight Curve API - Horizon Metrics #2 (68, 69, 70)
- Service State Overnight Curve API - Horizon Metrics #3 (71, 72, 73)
- Service State Overnight Curve API - Horizon Metrics #4 (74, 75, 76)
- Service State Overnight Curve API - Stubs (77, 78)
- Service Scenario Bond Replication Run (79, 80, 81)
- Service Scenario Named Field (82, 83, 84)
- Service Scenario Named Field - Name (85, 86)
- Service Scenario Named Field - Value (87, 88)
- Service Scenario Named Field - Constructor (89, 90)
- Service Scenario Named Field - Stubs (91, 92, 93)
- Service Scenario Named Field Map #1 (94, 95, 96)
- Service Scenario Named Field Map - Name (97, 98)
- Service Scenario Named Field Map - Value (99, 100)
- Service Scenario Named Field Map - Constructor (101, 102)
- Service Scenario Named Field Map - Stubs (103, 104, 105)
- Service Scenario Bond Replication Run - Named Field Map #1 (106, 107)
- Service Scenario Bond Replication Run - Named Field Map #2 (108, 109)
- Service Scenario Bond Replication Run - Constructor (110)
- Service Scenario Bond Replication Run - Add Named Field (111, 112)
- Service Scenario Bond Replication Run - Add Named Field Map (113, 114)
- Service Scenario Bond Replication Run - Headers (115, 116, 117)
- Service Scenario Bond Replication Run - Headers (118, 119, 120)


Samples:

IdeaDRIP:
151 changes: 87 additions & 64 deletions src/main/java/org/drip/service/scenario/BondReplicationRun.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@

package org.drip.service.scenario;

import java.util.Map;

import org.drip.analytics.support.CaseInsensitiveHashMap;

/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/

/*!
* 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,29 +86,40 @@
*/

/**
* <i>BondReplicationRun</i> holds the Results of a Full Bond Replication Run.
*
* <br><br>
* <i>BondReplicationRun</i> holds the Results of a Full Bond Replication Run. It provides the following
* Functionality:
*
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationSupportLibrary.md">Computation Support</a></li>
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/service/README.md">Environment, Product/Definition Containers, and Scenario/State Manipulation APIs</a></li>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/service/scenario/README.md">Custom Scenario Service Metric Generator</a></li>
* <li>Empty <i>BondReplicationRun</i> Constructor</li>
* <li>Add a Named Field</li>
* <li>Add a Named Field Map</li>
* <li>Retrieve the Named Field Metrics</li>
* <li>Retrieve the Named Field Map Metrics</li>
* <li>Generate the Headers</li>
* <li>Generate the Values</li>
* <li>Display the Measures</li>
* </ul>
* <br><br>
*
* <br>
* <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/ComputationalCore.md">Computational Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationSupportLibrary.md">Computation Support</a></td></tr>
* <tr><td><b>Project</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/service/README.md">Environment, Product/Definition Containers, and Scenario/State Manipulation APIs</a></td></tr>
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/service/scenario/README.md">Custom Scenario Service Metric Generator</a></td></tr>
* </table>
* <br>
*
* @author Lakshmi Krishnamurthy
*/

public class BondReplicationRun {
private java.util.Map<java.lang.String, org.drip.service.scenario.NamedField> _mapNF = new
org.drip.analytics.support.CaseInsensitiveHashMap<org.drip.service.scenario.NamedField>();
public class BondReplicationRun
{
private Map<String, NamedField> _namedFieldMap = new CaseInsensitiveHashMap<NamedField>();

private java.util.Map<java.lang.String, org.drip.service.scenario.NamedFieldMap> _mapNFM = new
org.drip.analytics.support.CaseInsensitiveHashMap<org.drip.service.scenario.NamedFieldMap>();
private Map<String, NamedFieldMap> _namedFieldMapMap = new CaseInsensitiveHashMap<NamedFieldMap>();

/**
* Empty ReplicationRun Constructor
* Empty <i>BondReplicationRun</i> Constructor
*/

public BondReplicationRun()
Expand All @@ -111,35 +129,39 @@ public BondReplicationRun()
/**
* Add a Named Field
*
* @param nf The Named Field
* @param namedField The Named Field
*
* @return TRUE - The Named Field Successfully added
*/

public boolean addNamedField (
final org.drip.service.scenario.NamedField nf)
final NamedField namedField)
{
if (null == nf) return false;
if (null == namedField) {
return false;
}

_mapNF.put (nf.name(), nf);
_namedFieldMap.put (namedField.name(), namedField);

return true;
}

/**
* Add a Named Field Map
*
* @param nfm The Named Field Map
* @param namedFieldMap The Named Field Map
*
* @return TRUE - The Named Field Map Successfully added
*/

public boolean addNamedFieldMap (
final org.drip.service.scenario.NamedFieldMap nfm)
final NamedFieldMap namedFieldMap)
{
if (null == nfm) return false;
if (null == namedFieldMap) {
return false;
}

_mapNFM.put (nfm.name(), nfm);
_namedFieldMapMap.put (namedFieldMap.name(), namedFieldMap);

return true;
}
Expand All @@ -150,9 +172,9 @@ public boolean addNamedFieldMap (
* @return The Named Field Metrics
*/

public java.util.Map<java.lang.String, org.drip.service.scenario.NamedField> namedField()
public Map<String, NamedField> namedField()
{
return _mapNF;
return _namedFieldMap;
}

/**
Expand All @@ -161,36 +183,36 @@ public java.util.Map<java.lang.String, org.drip.service.scenario.NamedField> nam
* @return The Named Field Map Metrics
*/

public java.util.Map<java.lang.String, org.drip.service.scenario.NamedFieldMap> namedFieldMap()
public Map<String, NamedFieldMap> namedFieldMap()
{
return _mapNFM;
return _namedFieldMapMap;
}

/**
* Generate The Headers
* Generate the Headers
*
* @return The Headers
*/

public java.lang.String header()
public String header()
{
java.lang.String strHeader = "";
String header = "";

for (java.util.Map.Entry<java.lang.String, org.drip.service.scenario.NamedField> meNF :
_mapNF.entrySet())
strHeader = strHeader + meNF.getKey() + ",";
for (Map.Entry<String, NamedField> namedFieldMapEntry : _namedFieldMap.entrySet()) {
header = header + namedFieldMapEntry.getKey() + ",";
}

for (java.util.Map.Entry<java.lang.String, org.drip.service.scenario.NamedFieldMap> meNFM :
_mapNFM.entrySet()) {
java.lang.String strNFMKey = meNFM.getKey() + ",";
for (Map.Entry<String, NamedFieldMap> namedFieldMapMapEntry : _namedFieldMapMap.entrySet()) {
String namedFieldMapMapEntryKey = namedFieldMapMapEntry.getKey() + ",";

org.drip.service.scenario.NamedFieldMap nfm = meNFM.getValue();
NamedFieldMap namedFieldMap = namedFieldMapMapEntry.getValue();

for (java.util.Map.Entry<java.lang.String, java.lang.Double> meNFMEntry : nfm.value().entrySet())
strHeader = strHeader + strNFMKey + "::" + meNFMEntry.getKey() + ",";
for (Map.Entry<String, Double> meNFMEntry : namedFieldMap.value().entrySet()) {
header = header + namedFieldMapMapEntryKey + "::" + meNFMEntry.getKey() + ",";
}
}

return strHeader;
return header;
}

/**
Expand All @@ -199,23 +221,23 @@ public java.lang.String header()
* @return The Values
*/

public java.lang.String value()
public String value()
{
java.lang.String strValue = "";

for (java.util.Map.Entry<java.lang.String, org.drip.service.scenario.NamedField> meNF :
_mapNF.entrySet())
strValue = strValue + meNF.getValue().value() + ",";
String value = "";

for (java.util.Map.Entry<java.lang.String, org.drip.service.scenario.NamedFieldMap> meNFM :
_mapNFM.entrySet()) {
org.drip.service.scenario.NamedFieldMap nfm = meNFM.getValue();
for (Map.Entry<String, NamedField> namedFieldMapEntry : _namedFieldMap.entrySet()) {
value = value + namedFieldMapEntry.getValue().value() + ",";
}

for (java.util.Map.Entry<java.lang.String, java.lang.Double> meNFMEntry : nfm.value().entrySet())
strValue = strValue + meNFMEntry.getValue() + ",";
for (Map.Entry<String, NamedFieldMap> namedFieldMapMapEntry : _namedFieldMapMap.entrySet()) {
for (Map.Entry<String, Double> namedFieldMapMapValueEntry :
namedFieldMapMapEntry.getValue().value().entrySet())
{
value = value + namedFieldMapMapValueEntry.getValue() + ",";
}
}

return strValue;
return value;
}

/**
Expand All @@ -224,25 +246,26 @@ public java.lang.String value()
* @return The Measures
*/

public java.lang.String display()
public String display()
{
java.lang.String strValue = "";
String value = "";

for (java.util.Map.Entry<java.lang.String, org.drip.service.scenario.NamedField> meNF :
_mapNF.entrySet())
strValue = strValue + meNF.getKey() + " => " + meNF.getValue().value() + "\n";
for (Map.Entry<String, NamedField> namedFieldMapEntry : _namedFieldMap.entrySet()) {
value = value + namedFieldMapEntry.getKey() + " => " + namedFieldMapEntry.getValue().value() +
"\n";
}

for (java.util.Map.Entry<java.lang.String, org.drip.service.scenario.NamedFieldMap> meNFM :
_mapNFM.entrySet()) {
org.drip.service.scenario.NamedFieldMap nfm = meNFM.getValue();
for (Map.Entry<String, NamedFieldMap> namedFieldMapMapEntry : _namedFieldMapMap.entrySet()) {
NamedFieldMap namedFieldMap = namedFieldMapMapEntry.getValue();

java.lang.String strNFMKey = meNFM.getKey();
String namedFieldMapMapEntryKey = namedFieldMapMapEntry.getKey();

for (java.util.Map.Entry<java.lang.String, java.lang.Double> meNFMEntry : nfm.value().entrySet())
strValue = strValue + strNFMKey + "::" + meNFMEntry.getKey() + " => " + meNFMEntry.getValue()
+ "\n";
for (Map.Entry<String, Double> namedFieldMapMapEntryValue : namedFieldMap.value().entrySet()) {
value = value + namedFieldMapMapEntryKey + "::" + namedFieldMapMapEntryValue.getKey() +
" => " + namedFieldMapMapEntryValue.getValue() + "\n";
}
}

return strValue;
return value;
}
}
Loading

0 comments on commit 5503476

Please sign in to comment.