diff --git a/ReleaseNotes/01_30_2023.txt b/ReleaseNotes/01_30_2023.txt
new file mode 100644
index 000000000000..01a6acb0fe77
--- /dev/null
+++ b/ReleaseNotes/01_30_2023.txt
@@ -0,0 +1,36 @@
+
+Features:
+
+Bug Fixes/Re-organization:
+
+ - R^d Path Vertex Realizations Evolution #1 (1, 2)
+ - R^d Path Vertex Realizations Evolution #2 (3, 4, 5)
+ - R^d Path Vertex Realizations Evolution #3 (6, 7, 8)
+ - State Sequence R^d Path Vertex Annotation (9)
+ - State Sequence Path Vertex Govvie Curve (10, 11, 12)
+ - State Sequence Path Vertex Govvie Constructor (13, 14, 15)
+ - State Sequence Path Vertex Govvie Builder Settings (16, 17)
+ - State Sequence Path Vertex Govvie #1 (18, 19, 20)
+ - State Sequence Path Vertex Govvie #2 (21, 22, 23)
+ - State Sequence Path Vertex Govvie #3 (24, 25)
+ - State Sequence Path Vertex Govvie Standard (26, 27, 28)
+ - State Sequence Path Govvie Constructor (29, 30, 31)
+ - State Sequence Path Govvie Builder Settings (32, 33)
+ - State Sequence Path Govvie Curve (34, 35, 36)
+ - State Sequence Path Govvie (37)
+ - Template IRS AUD (38, 39, 40)
+ - Template IRS CAD (41, 42)
+ - Template IRS CHF (43, 44)
+ - Template IRS CNY (45, 46)
+ - Template IRS DKK (47, 48)
+ - Template IRS EUR (49, 50)
+ - Template IRS GBP (51, 52)
+ - Template IRS HKD (53, 54)
+ - Template IRS INR (55, 56)
+ - Template IRS JPY LIBOR (57, 58)
+ - Template IRS JPY TIBOR (59, 60)
+
+
+Samples:
+
+IdeaDRIP:
diff --git a/ScheduleSheet.xlsx b/ScheduleSheet.xlsx
index e7dbbf02f3c9..cc425acc6bdb 100644
Binary files a/ScheduleSheet.xlsx and b/ScheduleSheet.xlsx differ
diff --git a/src/main/java/org/drip/state/sequence/PathGovvie.java b/src/main/java/org/drip/state/sequence/PathGovvie.java
index 177328180a08..6e6cc0544be3 100644
--- a/src/main/java/org/drip/state/sequence/PathGovvie.java
+++ b/src/main/java/org/drip/state/sequence/PathGovvie.java
@@ -1,11 +1,18 @@
package org.drip.state.sequence;
+import org.drip.analytics.date.JulianDate;
+import org.drip.state.govvie.GovvieCurve;
+import org.drip.state.nonlinear.FlatForwardGovvieCurve;
+
/*
* -*- 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
@@ -80,7 +87,15 @@
/**
* PathGovvie exposes the Functionality to generate a Sequence of Govvie Curve Realizations across
- * Multiple Paths.
+ * Multiple Paths. It exposes the following functionality:
+ *
+ *
+ *
+ * - PathGovvie Constructor
+ * - Retrieve the Govvie Builder Settings Instance
+ * - Generate the Rd Path Govvie Curves using the Ground State Yield
+ *
+ *
*
*
*
@@ -94,91 +109,105 @@
* @author Lakshmi Krishnamurthy
*/
-public class PathGovvie extends org.drip.state.sequence.PathRd {
- private org.drip.state.sequence.GovvieBuilderSettings _gbs = null;
+public class PathGovvie extends PathRd
+{
+ private GovvieBuilderSettings _govvieBuilderSettings = null;
/**
* PathGovvie Constructor
*
- * @param gbs Govvie Builder Settings Instance
- * @param dblVolatility Volatility
- * @param bLogNormal TRUE - The Generated Random Numbers are Log Normal
+ * @param govvieBuilderSettings Govvie Builder Settings Instance
+ * @param volatility Volatility
+ * @param logNormal TRUE - The Generated Random Numbers are Log Normal
*
- * @throws java.lang.Exception Thrown if the Inputs are Invalid
+ * @throws Exception Thrown if the Inputs are Invalid
*/
public PathGovvie (
- final org.drip.state.sequence.GovvieBuilderSettings gbs,
- final double dblVolatility,
- final boolean bLogNormal)
- throws java.lang.Exception
+ final GovvieBuilderSettings govvieBuilderSettings,
+ final double volatility,
+ final boolean logNormal)
+ throws Exception
{
- super (gbs.groundForwardYield(), dblVolatility, bLogNormal);
+ super (govvieBuilderSettings.groundForwardYield(), volatility, logNormal);
- if (null == (_gbs = gbs)) throw new java.lang.Exception ("PathGovvie Constructor => Invalid Inputs");
+ if (null == (_govvieBuilderSettings = govvieBuilderSettings)) {
+ throw new Exception ("PathGovvie Constructor => Invalid Inputs");
+ }
}
/**
- * Generate the Govvie Builder Settings Instance
+ * Retrieve the Govvie Builder Settings Instance
*
* @return The Govvie Builder Settings Instance
*/
- public org.drip.state.sequence.GovvieBuilderSettings govvieBuilderSettings()
+ public GovvieBuilderSettings govvieBuilderSettings()
{
- return _gbs;
+ return _govvieBuilderSettings;
}
/**
- * Generate the R^d Path Govvie Curves using the Initial R^d and the Evolution Time Width
+ * Generate the Rd Path Govvie Curves using the Ground State Yield
*
- * @param iNumPath Number of Paths
+ * @param pathCount Number of Paths
*
- * @return The R^d Path//Vertex Govvie Curves
+ * @return The Rd Path/Vertex Govvie Curves
*/
- public org.drip.state.govvie.GovvieCurve[] curveSequence (
- final int iNumPath)
+ public GovvieCurve[] curveSequence (
+ final int pathCount)
{
- java.lang.String strCurrency = _gbs.groundState().currency();
+ String currency = _govvieBuilderSettings.groundState().currency();
- org.drip.analytics.date.JulianDate dtSpot = _gbs.spot();
+ JulianDate spotDate = _govvieBuilderSettings.spot();
- double[][] aadblPathSequence = sequence (iNumPath);
+ double[][] pathSequenceGrid = sequence (pathCount);
- java.lang.String strTreasuryCode = _gbs.code();
+ String treasuryCode = _govvieBuilderSettings.code();
- java.lang.String[] astrTenor = _gbs.tenors();
+ String[] tenorArray = _govvieBuilderSettings.tenors();
- if (null == aadblPathSequence) return null;
+ if (null == pathSequenceGrid) {
+ return null;
+ }
- int iEpochDate = dtSpot.julian();
+ int epochDate = spotDate.julian();
- int iNumTenor = astrTenor.length;
- int[] aiDate = new int[iNumTenor];
- org.drip.state.nonlinear.FlatForwardGovvieCurve[] aFFGC = new
- org.drip.state.nonlinear.FlatForwardGovvieCurve[iNumPath];
+ int tenorCount = tenorArray.length;
+ int[] tenorDateArray = new int[tenorCount];
+ FlatForwardGovvieCurve[] flatForwardGovvieCurveArray = new FlatForwardGovvieCurve[pathCount];
- for (int iTenor = 0; iTenor < iNumTenor; ++iTenor) {
- org.drip.analytics.date.JulianDate dtTenor = dtSpot.addTenor (astrTenor[iTenor]);
+ for (int tenorIndex = 0; tenorIndex < tenorCount; ++tenorIndex) {
+ JulianDate tenorDate = spotDate.addTenor (tenorArray[tenorIndex]);
- if (null == dtTenor) return null;
+ if (null == tenorDate) {
+ return null;
+ }
- aiDate[iTenor] = dtTenor.julian();
+ tenorDateArray[tenorIndex] = tenorDate.julian();
}
- for (int iPath = 0; iPath < iNumPath; ++iPath) {
+ for (int pathIndex = 0; pathIndex < pathCount; ++pathIndex) {
try {
- if (null == (aFFGC[iPath] = new org.drip.state.nonlinear.FlatForwardGovvieCurve (iEpochDate,
- strTreasuryCode, strCurrency, aiDate, aadblPathSequence[iPath])))
+ if (null == (
+ flatForwardGovvieCurveArray[pathIndex] = new FlatForwardGovvieCurve (
+ epochDate,
+ treasuryCode,
+ currency,
+ tenorDateArray,
+ pathSequenceGrid[pathIndex]
+ )
+ )) {
return null;
- } catch (java.lang.Exception e) {
+ }
+ } catch (Exception e) {
e.printStackTrace();
return null;
}
}
- return aFFGC;
+ return flatForwardGovvieCurveArray;
}
}
diff --git a/src/main/java/org/drip/state/sequence/PathVertexGovvie.java b/src/main/java/org/drip/state/sequence/PathVertexGovvie.java
index c18362086141..07ecb63b84e3 100644
--- a/src/main/java/org/drip/state/sequence/PathVertexGovvie.java
+++ b/src/main/java/org/drip/state/sequence/PathVertexGovvie.java
@@ -1,11 +1,21 @@
package org.drip.state.sequence;
+import org.drip.analytics.date.JulianDate;
+import org.drip.analytics.support.Helper;
+import org.drip.measure.discrete.CorrelatedPathVertexDimension;
+import org.drip.measure.process.DiffusionEvolver;
+import org.drip.state.govvie.GovvieCurve;
+import org.drip.state.nonlinear.FlatForwardGovvieCurve;
+
/*
* -*- 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
@@ -79,7 +89,20 @@
*/
/**
- * PathVertexGovvie exposes the Functionality to generate a Sequence of Path/Vertex Govvie Curves.
+ * PathVertexGovvie exposes the Functionality to generate a Sequence of Path/Vertex Govvie Curves. It
+ * exposes the following functionality:
+ *
+ *
+ *
+ * - PathVertexGovvie Constructor
+ * - Generate the Govvie Builder Settings Instance
+ * - Generate the Rd Path/Vertex Govvie Curves using the Initial Rd and the Evolution Time Increment Array
+ * - Generate the Rd Path/Vertex Govvie Curves using the Initial Rd and a Fixed Evolution Time Width
+ * - Generate the Rd Path/Vertex Govvie Curves using the Initial Rd and the Array of Forward Evolution Tenors
+ * - Generate the Rd Path/Vertex Govvie Curves using the Initial Rd and the Array of Forward Evolution Dates
+ * - Generate a Standard Instance of PathVertexGovvie
+ *
+ *
*
*
*
@@ -93,47 +116,58 @@
* @author Lakshmi Krishnamurthy
*/
-public class PathVertexGovvie extends org.drip.state.sequence.PathVertexRd {
- private org.drip.state.sequence.GovvieBuilderSettings _gbs = null;
+public class PathVertexGovvie extends PathVertexRd
+{
+ private GovvieBuilderSettings _govvieBuilderSettings = null;
- private org.drip.state.govvie.GovvieCurve[][] curveVertex (
- final double[][][] aaadblPathForward)
+ private GovvieCurve[][] curveVertex (
+ final double[][][] forwardPathRdVertexRealization)
{
- if (null == aaadblPathForward) return null;
+ if (null == forwardPathRdVertexRealization) {
+ return null;
+ }
- org.drip.measure.discrete.CorrelatedPathVertexDimension cpvd = cpvd();
+ CorrelatedPathVertexDimension correlatedPathVertexDimension = cpvd();
- int iNumPath = cpvd.numPath();
+ int pathCount = correlatedPathVertexDimension.numPath();
- int iNumVertex = cpvd.numVertex();
+ int timeVertexCount = correlatedPathVertexDimension.numVertex();
- java.lang.String[] astrTenor = _gbs.tenors();
+ String[] tenorArray = _govvieBuilderSettings.tenors();
- java.lang.String strTreasuryCode = _gbs.code();
+ String treasuryCode = _govvieBuilderSettings.code();
- org.drip.analytics.date.JulianDate dtSpot = _gbs.spot();
+ JulianDate spotDate = _govvieBuilderSettings.spot();
- java.lang.String strCurrency = _gbs.groundState().currency();
+ String currency = _govvieBuilderSettings.groundState().currency();
- org.drip.state.nonlinear.FlatForwardGovvieCurve[][] aaFFGC = new
- org.drip.state.nonlinear.FlatForwardGovvieCurve[iNumPath][iNumVertex];
+ FlatForwardGovvieCurve[][] flatForwardGovvieCurveGrid =
+ new FlatForwardGovvieCurve[pathCount][timeVertexCount];
- for (int iTimeVertex = 0; iTimeVertex < iNumVertex; ++iTimeVertex) {
- org.drip.analytics.date.JulianDate dtEvent = dtSpot.addYears (iTimeVertex + 1);
+ for (int timeVertexIndex = 0; timeVertexIndex < timeVertexCount; ++timeVertexIndex) {
+ JulianDate eventDate = spotDate.addYears (timeVertexIndex + 1);
- if (null == dtEvent) return null;
+ if (null == eventDate) {
+ return null;
+ }
- int iEventDate = dtEvent.julian();
+ int eventDateInteger = eventDate.julian();
- int[] aiDate = org.drip.analytics.support.Helper.TenorToDate (dtEvent, astrTenor);
+ int[] tenorDateArray = Helper.TenorToDate (eventDate, tenorArray);
- for (int iPath = 0; iPath < iNumPath; ++iPath) {
+ for (int pathIndex = 0; pathIndex < pathCount; ++pathIndex) {
try {
- if (null == (aaFFGC[iPath][iTimeVertex] = new
- org.drip.state.nonlinear.FlatForwardGovvieCurve (iEventDate, strTreasuryCode,
- strCurrency, aiDate, aaadblPathForward[iPath][iTimeVertex])))
+ if (null == (
+ flatForwardGovvieCurveGrid[pathIndex][timeVertexIndex] = new FlatForwardGovvieCurve (
+ eventDateInteger,
+ treasuryCode,
+ currency,
+ tenorDateArray,
+ forwardPathRdVertexRealization[pathIndex][timeVertexIndex]
+ ))) {
return null;
- } catch (java.lang.Exception e) {
+ }
+ } catch (Exception e) {
e.printStackTrace();
return null;
@@ -141,37 +175,43 @@ private org.drip.state.govvie.GovvieCurve[][] curveVertex (
}
}
- return aaFFGC;
+ return flatForwardGovvieCurveGrid;
}
/**
* Generate a Standard Instance of PathVertexGovvie
*
- * @param gbs Govvie Builder Settings Instance
- * @param cpvd Latent State Evolver CPVD Instance
- * @param de The Latent State Diffusion Evolver
+ * @param govvieBuilderSettings Govvie Builder Settings Instance
+ * @param correlatedPathVertexDimension Latent State Evolver CPVD Instance
+ * @param diffusionEvolver The Latent State Diffusion Evolver
*
* @return Standard Instance of PathVertexGovvie
*/
public static final PathVertexGovvie Standard (
- final org.drip.state.sequence.GovvieBuilderSettings gbs,
- final org.drip.measure.discrete.CorrelatedPathVertexDimension cpvd,
- final org.drip.measure.process.DiffusionEvolver de)
+ final GovvieBuilderSettings govvieBuilderSettings,
+ final CorrelatedPathVertexDimension correlatedPathVertexDimension,
+ final DiffusionEvolver diffusionEvolver)
{
- if (null == cpvd || null == de) return null;
+ if (null == correlatedPathVertexDimension || null == diffusionEvolver) {
+ return null;
+ }
- int iNumDimension = cpvd.numDimension();
+ int dimension = correlatedPathVertexDimension.numDimension();
- org.drip.measure.process.DiffusionEvolver[] aDE = new
- org.drip.measure.process.DiffusionEvolver[iNumDimension];
+ DiffusionEvolver[] diffusionEvolverArray = new DiffusionEvolver[dimension];
- for (int iDimension = 0; iDimension < iNumDimension; ++iDimension)
- aDE[iDimension] = de;
+ for (int dimensionIndex = 0; dimensionIndex < dimension; ++dimensionIndex) {
+ diffusionEvolverArray[dimensionIndex] = diffusionEvolver;
+ }
try {
- return new PathVertexGovvie (gbs, cpvd, aDE);
- } catch (java.lang.Exception e) {
+ return new PathVertexGovvie (
+ govvieBuilderSettings,
+ correlatedPathVertexDimension,
+ diffusionEvolverArray
+ );
+ } catch (Exception e) {
e.printStackTrace();
}
@@ -181,23 +221,24 @@ public static final PathVertexGovvie Standard (
/**
* PathVertexGovvie Constructor
*
- * @param gbs Govvie Builder Settings
- * @param cpvd Latent State Evolver CPVD Instance
- * @param aDE Array of the Latent State Diffusion Evolvers
+ * @param govvieBuilderSettings Govvie Builder Settings
+ * @param correlatedPathVertexDimension Latent State Evolver CPVD Instance
+ * @param diffusionEvolverArray Array of the Latent State Diffusion Evolvers
*
- * @throws java.lang.Exception Thrown if the Inputs are Invalid
+ * @throws Exception Thrown if the Inputs are Invalid
*/
public PathVertexGovvie (
- final org.drip.state.sequence.GovvieBuilderSettings gbs,
- final org.drip.measure.discrete.CorrelatedPathVertexDimension cpvd,
- final org.drip.measure.process.DiffusionEvolver[] aDE)
- throws java.lang.Exception
+ final GovvieBuilderSettings govvieBuilderSettings,
+ final CorrelatedPathVertexDimension correlatedPathVertexDimension,
+ final DiffusionEvolver[] diffusionEvolverArray)
+ throws Exception
{
- super (cpvd, aDE);
+ super (correlatedPathVertexDimension, diffusionEvolverArray);
- if (null == (_gbs = gbs))
- throw new java.lang.Exception ("PathVertexGovvie Constructor => Invalid Inputs");
+ if (null == (_govvieBuilderSettings = govvieBuilderSettings)) {
+ throw new Exception ("PathVertexGovvie Constructor => Invalid Inputs");
+ }
}
/**
@@ -206,64 +247,76 @@ public PathVertexGovvie (
* @return The Govvie Builder Settings Instance
*/
- public org.drip.state.sequence.GovvieBuilderSettings govvieBuilderSettings()
+ public GovvieBuilderSettings govvieBuilderSettings()
{
- return _gbs;
+ return _govvieBuilderSettings;
}
/**
- * Generate the R^d Path/Vertex Govvie Curves using the Initial R^d and the Evolution Time Width
+ * Generate the Rd Path/Vertex Govvie Curves using the Initial Rd and the Evolution
+ * Time Increment Array
*
- * @param adblTimeIncrement Array of the Evolution Time Widths
+ * @param timeIncrementArray Array of the Evolution Time Widths
*
- * @return The R^d Path//Vertex Govvie Curves
+ * @return The Rd Path//Vertex Govvie Curves
*/
- public org.drip.state.govvie.GovvieCurve[][] pathVertex (
- final double[] adblTimeIncrement)
+ public GovvieCurve[][] pathVertex (
+ final double[] timeIncrementArray)
{
- return curveVertex (pathVertex (_gbs.groundForwardYield(), adblTimeIncrement));
+ return curveVertex (pathVertex (_govvieBuilderSettings.groundForwardYield(), timeIncrementArray));
}
/**
- * Generate the R^d Path/Vertex Govvie Curves using the Initial R^d and the Evolution Time Width
+ * Generate the Rd Path/Vertex Govvie Curves using the Initial Rd and a Fixed
+ * Evolution Time Width
*
- * @param dblTimeIncrement The Evolution Time Widths
+ * @param timeIncrement The Evolution Time Widths
*
- * @return The R^d Path//Vertex Govvie Curves
+ * @return The Rd Path//Vertex Govvie Curves
*/
- public org.drip.state.govvie.GovvieCurve[][] pathVertex (
- final double dblTimeIncrement)
+ public GovvieCurve[][] pathVertex (
+ final double timeIncrement)
{
- return curveVertex (pathVertex (_gbs.groundForwardYield(), dblTimeIncrement));
+ return curveVertex (pathVertex (_govvieBuilderSettings.groundForwardYield(), timeIncrement));
}
/**
- * Generate the R^d Path/Vertex Govvie Curves using the Initial R^d and the Array of Event Tenors
+ * Generate the Rd Path/Vertex Govvie Curves using the Initial Rd and the Array of
+ * Forward Evolution Tenors
*
- * @param astrEventTenor The Array of Event Tenors
+ * @param forwardEvolutionTenorArray The Array of Forward Evolution Tenors
*
- * @return The R^d Path//Vertex Govvie Curves
+ * @return The Rd Path/Vertex Govvie Curves
*/
- public org.drip.state.govvie.GovvieCurve[][] pathVertex (
- final java.lang.String[] astrEventTenor)
+ public GovvieCurve[][] pathVertex (
+ final String[] forwardEvolutionTenorArray)
{
- return curveVertex (pathVertex (_gbs.groundForwardYield(), astrEventTenor));
+ return curveVertex (
+ pathVertex (_govvieBuilderSettings.groundForwardYield(), forwardEvolutionTenorArray)
+ );
}
/**
- * Generate the R^d Path/Vertex Govvie Curves using the Initial R^d and the Array of Event Tenors
+ * Generate the Rd Path/Vertex Govvie Curves using the Initial Rd and the Array of
+ * Forward Evolution Dates
*
- * @param aiEventDate The Array of Event Dates
+ * @param forwardEventDateArray The Array of Forward Event Dates
*
- * @return The R^d Path//Vertex Govvie Curves
+ * @return The Rd Path/Vertex Govvie Curves
*/
- public org.drip.state.govvie.GovvieCurve[][] pathVertex (
- final int[] aiEventDate)
+ public GovvieCurve[][] pathVertex (
+ final int[] forwardEventDateArray)
{
- return curveVertex (pathVertex (_gbs.groundForwardYield(), _gbs.spot().julian(), aiEventDate));
+ return curveVertex (
+ pathVertex (
+ _govvieBuilderSettings.groundForwardYield(),
+ _govvieBuilderSettings.spot().julian(),
+ forwardEventDateArray
+ )
+ );
}
}
diff --git a/src/main/java/org/drip/template/irs/AUD.java b/src/main/java/org/drip/template/irs/AUD.java
index 291b53c8e990..5ec975f373b4 100644
--- a/src/main/java/org/drip/template/irs/AUD.java
+++ b/src/main/java/org/drip/template/irs/AUD.java
@@ -17,6 +17,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
@@ -106,52 +109,47 @@
* @author Lakshmi Krishnamurthy
*/
-public class AUD {
+public class AUD
+{
/**
* Entry Point
*
- * @param args Argument Array
+ * @param argumentArray Argument Array
*
* @throws Exception Propagate the Exception encountered
*/
public static final void main (
- final String[] args)
+ final String[] argumentArray)
throws Exception
{
EnvManager.InitEnv ("");
- JulianDate dtSpot = DateUtil.Today();
+ JulianDate spotDate = DateUtil.Today();
- String strCurrency = "AUD";
- String strMaturityTenor = "5Y";
+ String currency = "AUD";
+ String maturityTenor = "5Y";
FixFloatComponent irs = OTCInstrumentBuilder.FixFloatStandard (
- dtSpot,
- strCurrency,
+ spotDate,
+ currency,
"ALL",
- strMaturityTenor,
+ maturityTenor,
"MAIN",
0.0206
);
- CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();
+ CurveSurfaceQuoteContainer marketDataContainer = new CurveSurfaceQuoteContainer();
- csqc.setFundingState (
+ marketDataContainer.setFundingState (
LatentMarketStateBuilder.SmoothFundingCurve (
- dtSpot,
- strCurrency,
- new String[] {
- "04D", "07D", "14D", "30D", "60D"
- },
- new double[] {
- 0.0017, 0.0017, 0.0018, 0.0020, 0.0023
- },
+ spotDate,
+ currency,
+ new String[] {"04D", "07D", "14D", "30D", "60D"},
+ new double[] {0.0017, 0.0017, 0.0018, 0.0020, 0.0023},
"ForwardRate",
- new double[] {
- 0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160
- },
+ new double[] {0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160},
"ForwardRate",
new String[] {
"04Y", "05Y", "06Y", "07Y", "08Y", "09Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y"
@@ -163,15 +161,15 @@ public static final void main (
)
);
- Map mapOutput = irs.value (
- ValuationParams.Spot (dtSpot.julian()),
+ Map measureMap = irs.value (
+ ValuationParams.Spot (spotDate.julian()),
null,
- csqc,
+ marketDataContainer,
null
);
- for (Map.Entry me : mapOutput.entrySet())
- System.out.println ("\t | " + me.getKey() + " => " + me.getValue() + " ||");
+ for (Map.Entry measureMapEntry : measureMap.entrySet())
+ System.out.println ("\t | " + measureMapEntry.getKey() + " => " + measureMapEntry.getValue() + " ||");
System.out.println ("\t |------------------------------||");
@@ -205,19 +203,24 @@ public static final void main (
System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.derivedStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.derivedStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- cp.floaterLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ compositePeriod.floaterLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
@@ -250,18 +253,23 @@ public static final void main (
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.referenceStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.referenceStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
diff --git a/src/main/java/org/drip/template/irs/CAD.java b/src/main/java/org/drip/template/irs/CAD.java
index 0c76eaccc68e..1230ee43bf27 100644
--- a/src/main/java/org/drip/template/irs/CAD.java
+++ b/src/main/java/org/drip/template/irs/CAD.java
@@ -17,6 +17,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
@@ -106,52 +109,47 @@
* @author Lakshmi Krishnamurthy
*/
-public class CAD {
+public class CAD
+{
/**
* Entry Point
*
- * @param args Argument Array
+ * @param argumentArray Argument Array
*
* @throws Exception Propagate the Exception encountered
*/
public static final void main (
- final String[] args)
+ final String[] argumentArray)
throws Exception
{
EnvManager.InitEnv ("");
- JulianDate dtSpot = DateUtil.Today();
+ JulianDate spotDate = DateUtil.Today();
- String strCurrency = "CAD";
- String strMaturityTenor = "5Y";
+ String currency = "CAD";
+ String maturityTenor = "5Y";
FixFloatComponent irs = OTCInstrumentBuilder.FixFloatStandard (
- dtSpot,
- strCurrency,
+ spotDate,
+ currency,
"ALL",
- strMaturityTenor,
+ maturityTenor,
"MAIN",
0.0206
);
- CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();
+ CurveSurfaceQuoteContainer marketDataContainer = new CurveSurfaceQuoteContainer();
- csqc.setFundingState (
+ marketDataContainer.setFundingState (
LatentMarketStateBuilder.SmoothFundingCurve (
- dtSpot,
- strCurrency,
- new String[] {
- "04D", "07D", "14D", "30D", "60D"
- },
- new double[] {
- 0.0017, 0.0017, 0.0018, 0.0020, 0.0023
- },
+ spotDate,
+ currency,
+ new String[] {"04D", "07D", "14D", "30D", "60D"},
+ new double[] {0.0017, 0.0017, 0.0018, 0.0020, 0.0023},
"ForwardRate",
- new double[] {
- 0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160
- },
+ new double[] {0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160},
"ForwardRate",
new String[] {
"04Y", "05Y", "06Y", "07Y", "08Y", "09Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y"
@@ -163,15 +161,15 @@ public static final void main (
)
);
- Map mapOutput = irs.value (
- ValuationParams.Spot (dtSpot.julian()),
+ Map measureMap = irs.value (
+ ValuationParams.Spot (spotDate.julian()),
null,
- csqc,
+ marketDataContainer,
null
);
- for (Map.Entry me : mapOutput.entrySet())
- System.out.println ("\t | " + me.getKey() + " => " + me.getValue() + " ||");
+ for (Map.Entry measureMapEntry : measureMap.entrySet())
+ System.out.println ("\t | " + measureMapEntry.getKey() + " => " + measureMapEntry.getValue() + " ||");
System.out.println ("\t |------------------------------||");
@@ -205,19 +203,24 @@ public static final void main (
System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.derivedStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.derivedStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- cp.floaterLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ compositePeriod.floaterLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
@@ -250,18 +253,23 @@ public static final void main (
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.referenceStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.referenceStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
diff --git a/src/main/java/org/drip/template/irs/CHF.java b/src/main/java/org/drip/template/irs/CHF.java
index 0799a60a6059..ac93d645f4cf 100644
--- a/src/main/java/org/drip/template/irs/CHF.java
+++ b/src/main/java/org/drip/template/irs/CHF.java
@@ -17,6 +17,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
@@ -106,52 +109,47 @@
* @author Lakshmi Krishnamurthy
*/
-public class CHF {
+public class CHF
+{
/**
* Entry Point
*
- * @param args Argument Array
+ * @param argumentArray Argument Array
*
* @throws Exception Propagate the Exception encountered
*/
public static final void main (
- final String[] args)
+ final String[] argumentArray)
throws Exception
{
EnvManager.InitEnv ("");
- JulianDate dtSpot = DateUtil.Today();
+ JulianDate spotDate = DateUtil.Today();
- String strCurrency = "CHF";
- String strMaturityTenor = "5Y";
+ String currency = "CHF";
+ String maturityTenor = "5Y";
FixFloatComponent irs = OTCInstrumentBuilder.FixFloatStandard (
- dtSpot,
- strCurrency,
+ spotDate,
+ currency,
"ALL",
- strMaturityTenor,
+ maturityTenor,
"MAIN",
0.0206
);
- CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();
+ CurveSurfaceQuoteContainer marketDataContainer = new CurveSurfaceQuoteContainer();
- csqc.setFundingState (
+ marketDataContainer.setFundingState (
LatentMarketStateBuilder.SmoothFundingCurve (
- dtSpot,
- strCurrency,
- new String[] {
- "04D", "07D", "14D", "30D", "60D"
- },
- new double[] {
- 0.0017, 0.0017, 0.0018, 0.0020, 0.0023
- },
+ spotDate,
+ currency,
+ new String[] {"04D", "07D", "14D", "30D", "60D"},
+ new double[] {0.0017, 0.0017, 0.0018, 0.0020, 0.0023},
"ForwardRate",
- new double[] {
- 0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160
- },
+ new double[] {0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160},
"ForwardRate",
new String[] {
"04Y", "05Y", "06Y", "07Y", "08Y", "09Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y"
@@ -163,64 +161,69 @@ public static final void main (
)
);
- Map mapOutput = irs.value (
- ValuationParams.Spot (dtSpot.julian()),
+ Map measureMap = irs.value (
+ ValuationParams.Spot (spotDate.julian()),
null,
- csqc,
+ marketDataContainer,
null
);
- for (Map.Entry me : mapOutput.entrySet())
- System.out.println ("\t | " + me.getKey() + " => " + me.getValue() + " ||");
+ for (Map.Entry measureMapEntry : measureMap.entrySet())
+ System.out.println ("\t | " + measureMapEntry.getKey() + " => " + measureMapEntry.getValue() + " ||");
System.out.println ("\t |------------------------------||");
- System.out.println ("\n\n\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\n\n\t\t|----------------------------------------------------------------------------------------------------------------------||");
- System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
+ System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
- System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
+ System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
- System.out.println ("\t\t| Start Date ||");
+ System.out.println ("\t\t| Start Date ||");
- System.out.println ("\t\t| End Date ||");
+ System.out.println ("\t\t| End Date ||");
- System.out.println ("\t\t| Pay Date ||");
+ System.out.println ("\t\t| Pay Date ||");
- System.out.println ("\t\t| FX Fixing Date ||");
+ System.out.println ("\t\t| FX Fixing Date ||");
- System.out.println ("\t\t| Base Notional ||");
+ System.out.println ("\t\t| Base Notional ||");
- System.out.println ("\t\t| Period DCF ||");
+ System.out.println ("\t\t| Period DCF ||");
- System.out.println ("\t\t| Tenor ||");
+ System.out.println ("\t\t| Tenor ||");
- System.out.println ("\t\t| Funding Label ||");
+ System.out.println ("\t\t| Funding Label ||");
- System.out.println ("\t\t| Forward Label ||");
+ System.out.println ("\t\t| Forward Label ||");
- System.out.println ("\t\t| Pay Discount Factor ||");
+ System.out.println ("\t\t| Pay Discount Factor ||");
- System.out.println ("\t\t| Coupon Rate ||");
+ System.out.println ("\t\t| Coupon Rate ||");
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.derivedStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.derivedStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- cp.floaterLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ compositePeriod.floaterLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
System.out.println ("\n\n\t\t|--------------------------------------------------------------------------------------------------------||");
@@ -250,18 +253,23 @@ public static final void main (
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.referenceStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.referenceStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
diff --git a/src/main/java/org/drip/template/irs/CNY.java b/src/main/java/org/drip/template/irs/CNY.java
index 6fb6418aa57b..36c7ced1c641 100644
--- a/src/main/java/org/drip/template/irs/CNY.java
+++ b/src/main/java/org/drip/template/irs/CNY.java
@@ -17,6 +17,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
@@ -106,52 +109,47 @@
* @author Lakshmi Krishnamurthy
*/
-public class CNY {
+public class CNY
+{
/**
* Entry Point
*
- * @param args Argument Array
+ * @param argumentArray Argument Array
*
* @throws Exception Propagate the Exception encountered
*/
public static final void main (
- final String[] args)
+ final String[] argumentArray)
throws Exception
{
EnvManager.InitEnv ("");
- JulianDate dtSpot = DateUtil.Today();
+ JulianDate spotDate = DateUtil.Today();
- String strCurrency = "CNY";
- String strMaturityTenor = "5Y";
+ String currency = "CNY";
+ String maturityTenor = "5Y";
FixFloatComponent irs = OTCInstrumentBuilder.FixFloatStandard (
- dtSpot,
- strCurrency,
+ spotDate,
+ currency,
"ALL",
- strMaturityTenor,
+ maturityTenor,
"MAIN",
0.0206
);
- CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();
+ CurveSurfaceQuoteContainer marketDataContainer = new CurveSurfaceQuoteContainer();
- csqc.setFundingState (
+ marketDataContainer.setFundingState (
LatentMarketStateBuilder.SmoothFundingCurve (
- dtSpot,
- strCurrency,
- new String[] {
- "04D", "07D", "14D", "30D", "60D"
- },
- new double[] {
- 0.0017, 0.0017, 0.0018, 0.0020, 0.0023
- },
+ spotDate,
+ currency,
+ new String[] {"04D", "07D", "14D", "30D", "60D"},
+ new double[] {0.0017, 0.0017, 0.0018, 0.0020, 0.0023},
"ForwardRate",
- new double[] {
- 0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160
- },
+ new double[] {0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160},
"ForwardRate",
new String[] {
"04Y", "05Y", "06Y", "07Y", "08Y", "09Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y"
@@ -163,15 +161,15 @@ public static final void main (
)
);
- Map mapOutput = irs.value (
- ValuationParams.Spot (dtSpot.julian()),
+ Map measureMap = irs.value (
+ ValuationParams.Spot (spotDate.julian()),
null,
- csqc,
+ marketDataContainer,
null
);
- for (Map.Entry me : mapOutput.entrySet())
- System.out.println ("\t | " + me.getKey() + " => " + me.getValue() + " ||");
+ for (Map.Entry measureMapEntry : measureMap.entrySet())
+ System.out.println ("\t | " + measureMapEntry.getKey() + " => " + measureMapEntry.getValue() + " ||");
System.out.println ("\t |------------------------------||");
@@ -205,19 +203,24 @@ public static final void main (
System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.derivedStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.derivedStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- cp.floaterLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ compositePeriod.floaterLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
@@ -250,18 +253,23 @@ public static final void main (
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.referenceStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.referenceStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
diff --git a/src/main/java/org/drip/template/irs/DKK.java b/src/main/java/org/drip/template/irs/DKK.java
index 92ef210ee5a7..bd206aaaa866 100644
--- a/src/main/java/org/drip/template/irs/DKK.java
+++ b/src/main/java/org/drip/template/irs/DKK.java
@@ -17,6 +17,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
@@ -106,52 +109,47 @@
* @author Lakshmi Krishnamurthy
*/
-public class DKK {
+public class DKK
+{
/**
* Entry Point
*
- * @param args Argument Array
+ * @param argumentArray Argument Array
*
* @throws Exception Propagate the Exception encountered
*/
public static final void main (
- final String[] args)
+ final String[] argumentArray)
throws Exception
{
EnvManager.InitEnv ("");
- JulianDate dtSpot = DateUtil.Today();
+ JulianDate spotDate = DateUtil.Today();
- String strCurrency = "DKK";
- String strMaturityTenor = "5Y";
+ String currency = "DKK";
+ String maturityTenor = "5Y";
FixFloatComponent irs = OTCInstrumentBuilder.FixFloatStandard (
- dtSpot,
- strCurrency,
+ spotDate,
+ currency,
"ALL",
- strMaturityTenor,
+ maturityTenor,
"MAIN",
0.0206
);
- CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();
+ CurveSurfaceQuoteContainer marketDataContainer = new CurveSurfaceQuoteContainer();
- csqc.setFundingState (
+ marketDataContainer.setFundingState (
LatentMarketStateBuilder.SmoothFundingCurve (
- dtSpot,
- strCurrency,
- new String[] {
- "04D", "07D", "14D", "30D", "60D"
- },
- new double[] {
- 0.0017, 0.0017, 0.0018, 0.0020, 0.0023
- },
+ spotDate,
+ currency,
+ new String[] {"04D", "07D", "14D", "30D", "60D"},
+ new double[] {0.0017, 0.0017, 0.0018, 0.0020, 0.0023},
"ForwardRate",
- new double[] {
- 0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160
- },
+ new double[] {0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160},
"ForwardRate",
new String[] {
"04Y", "05Y", "06Y", "07Y", "08Y", "09Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y"
@@ -163,64 +161,69 @@ public static final void main (
)
);
- Map mapOutput = irs.value (
- ValuationParams.Spot (dtSpot.julian()),
+ Map measureMap = irs.value (
+ ValuationParams.Spot (spotDate.julian()),
null,
- csqc,
+ marketDataContainer,
null
);
- for (Map.Entry me : mapOutput.entrySet())
- System.out.println ("\t | " + me.getKey() + " => " + me.getValue() + " ||");
+ for (Map.Entry measureMapEntry : measureMap.entrySet())
+ System.out.println ("\t | " + measureMapEntry.getKey() + " => " + measureMapEntry.getValue() + " ||");
System.out.println ("\t |------------------------------||");
- System.out.println ("\n\n\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\n\n\t\t|----------------------------------------------------------------------------------------------------------------------||");
- System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
+ System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
- System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
+ System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
- System.out.println ("\t\t| Start Date ||");
+ System.out.println ("\t\t| Start Date ||");
- System.out.println ("\t\t| End Date ||");
+ System.out.println ("\t\t| End Date ||");
- System.out.println ("\t\t| Pay Date ||");
+ System.out.println ("\t\t| Pay Date ||");
- System.out.println ("\t\t| FX Fixing Date ||");
+ System.out.println ("\t\t| FX Fixing Date ||");
- System.out.println ("\t\t| Base Notional ||");
+ System.out.println ("\t\t| Base Notional ||");
- System.out.println ("\t\t| Period DCF ||");
+ System.out.println ("\t\t| Period DCF ||");
- System.out.println ("\t\t| Tenor ||");
+ System.out.println ("\t\t| Tenor ||");
- System.out.println ("\t\t| Funding Label ||");
+ System.out.println ("\t\t| Funding Label ||");
- System.out.println ("\t\t| Forward Label ||");
+ System.out.println ("\t\t| Forward Label ||");
- System.out.println ("\t\t| Pay Discount Factor ||");
+ System.out.println ("\t\t| Pay Discount Factor ||");
- System.out.println ("\t\t| Coupon Rate ||");
+ System.out.println ("\t\t| Coupon Rate ||");
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.derivedStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.derivedStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- cp.floaterLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ compositePeriod.floaterLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
System.out.println ("\n\n\t\t|--------------------------------------------------------------------------------------------------------||");
@@ -250,18 +253,23 @@ public static final void main (
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.referenceStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.referenceStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
diff --git a/src/main/java/org/drip/template/irs/EUR.java b/src/main/java/org/drip/template/irs/EUR.java
index 06e94d0ae71a..e1d8811f318d 100644
--- a/src/main/java/org/drip/template/irs/EUR.java
+++ b/src/main/java/org/drip/template/irs/EUR.java
@@ -17,6 +17,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
@@ -106,52 +109,47 @@
* @author Lakshmi Krishnamurthy
*/
-public class EUR {
+public class EUR
+{
/**
* Entry Point
*
- * @param args Argument Array
+ * @param argumentArray Argument Array
*
* @throws Exception Propagate the Exception encountered
*/
public static final void main (
- final String[] args)
+ final String[] argumentArray)
throws Exception
{
EnvManager.InitEnv ("");
- JulianDate dtSpot = DateUtil.Today();
+ JulianDate spotDate = DateUtil.Today();
- String strCurrency = "EUR";
- String strMaturityTenor = "5Y";
+ String currency = "EUR";
+ String maturityTenor = "5Y";
FixFloatComponent irs = OTCInstrumentBuilder.FixFloatStandard (
- dtSpot,
- strCurrency,
+ spotDate,
+ currency,
"ALL",
- strMaturityTenor,
+ maturityTenor,
"MAIN",
0.0206
);
- CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();
+ CurveSurfaceQuoteContainer marketDataContainer = new CurveSurfaceQuoteContainer();
- csqc.setFundingState (
+ marketDataContainer.setFundingState (
LatentMarketStateBuilder.SmoothFundingCurve (
- dtSpot,
- strCurrency,
- new String[] {
- "04D", "07D", "14D", "30D", "60D"
- },
- new double[] {
- 0.0017, 0.0017, 0.0018, 0.0020, 0.0023
- },
+ spotDate,
+ currency,
+ new String[] {"04D", "07D", "14D", "30D", "60D"},
+ new double[] {0.0017, 0.0017, 0.0018, 0.0020, 0.0023},
"ForwardRate",
- new double[] {
- 0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160
- },
+ new double[] {0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160},
"ForwardRate",
new String[] {
"04Y", "05Y", "06Y", "07Y", "08Y", "09Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y"
@@ -163,64 +161,69 @@ public static final void main (
)
);
- Map mapOutput = irs.value (
- ValuationParams.Spot (dtSpot.julian()),
+ Map measureMap = irs.value (
+ ValuationParams.Spot (spotDate.julian()),
null,
- csqc,
+ marketDataContainer,
null
);
- for (Map.Entry me : mapOutput.entrySet())
- System.out.println ("\t | " + me.getKey() + " => " + me.getValue() + " ||");
+ for (Map.Entry measureMapEntry : measureMap.entrySet())
+ System.out.println ("\t | " + measureMapEntry.getKey() + " => " + measureMapEntry.getValue() + " ||");
System.out.println ("\t |------------------------------||");
- System.out.println ("\n\n\t\t|-------------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\n\n\t\t|----------------------------------------------------------------------------------------------------------------------||");
- System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
+ System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
- System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
+ System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
- System.out.println ("\t\t| Start Date ||");
+ System.out.println ("\t\t| Start Date ||");
- System.out.println ("\t\t| End Date ||");
+ System.out.println ("\t\t| End Date ||");
- System.out.println ("\t\t| Pay Date ||");
+ System.out.println ("\t\t| Pay Date ||");
- System.out.println ("\t\t| FX Fixing Date ||");
+ System.out.println ("\t\t| FX Fixing Date ||");
- System.out.println ("\t\t| Base Notional ||");
+ System.out.println ("\t\t| Base Notional ||");
- System.out.println ("\t\t| Period DCF ||");
+ System.out.println ("\t\t| Period DCF ||");
- System.out.println ("\t\t| Tenor ||");
+ System.out.println ("\t\t| Tenor ||");
- System.out.println ("\t\t| Funding Label ||");
+ System.out.println ("\t\t| Funding Label ||");
- System.out.println ("\t\t| Forward Label ||");
+ System.out.println ("\t\t| Forward Label ||");
- System.out.println ("\t\t| Pay Discount Factor ||");
+ System.out.println ("\t\t| Pay Discount Factor ||");
- System.out.println ("\t\t| Coupon Rate ||");
+ System.out.println ("\t\t| Coupon Rate ||");
- System.out.println ("\t\t|-------------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.derivedStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.derivedStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- cp.floaterLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ compositePeriod.floaterLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
- System.out.println ("\t\t|-------------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
System.out.println ("\n\n\t\t|--------------------------------------------------------------------------------------------------------||");
@@ -250,18 +253,23 @@ public static final void main (
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.referenceStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.referenceStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
diff --git a/src/main/java/org/drip/template/irs/GBP.java b/src/main/java/org/drip/template/irs/GBP.java
index a9472da9ea01..0bc0648f9852 100644
--- a/src/main/java/org/drip/template/irs/GBP.java
+++ b/src/main/java/org/drip/template/irs/GBP.java
@@ -17,6 +17,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
@@ -106,52 +109,47 @@
* @author Lakshmi Krishnamurthy
*/
-public class GBP {
+public class GBP
+{
/**
* Entry Point
*
- * @param args Argument Array
+ * @param argumentArray Argument Array
*
* @throws Exception Propagate the Exception encountered
*/
public static final void main (
- final String[] args)
+ final String[] argumentArray)
throws Exception
{
EnvManager.InitEnv ("");
- JulianDate dtSpot = DateUtil.Today();
+ JulianDate spotDate = DateUtil.Today();
- String strCurrency = "GBP";
- String strMaturityTenor = "5Y";
+ String currency = "GBP";
+ String maturityTenor = "5Y";
FixFloatComponent irs = OTCInstrumentBuilder.FixFloatStandard (
- dtSpot,
- strCurrency,
+ spotDate,
+ currency,
"ALL",
- strMaturityTenor,
+ maturityTenor,
"MAIN",
0.0206
);
- CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();
+ CurveSurfaceQuoteContainer marketDataContainer = new CurveSurfaceQuoteContainer();
- csqc.setFundingState (
+ marketDataContainer.setFundingState (
LatentMarketStateBuilder.SmoothFundingCurve (
- dtSpot,
- strCurrency,
- new String[] {
- "04D", "07D", "14D", "30D", "60D"
- },
- new double[] {
- 0.0017, 0.0017, 0.0018, 0.0020, 0.0023
- },
+ spotDate,
+ currency,
+ new String[] {"04D", "07D", "14D", "30D", "60D"},
+ new double[] {0.0017, 0.0017, 0.0018, 0.0020, 0.0023},
"ForwardRate",
- new double[] {
- 0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160
- },
+ new double[] {0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160},
"ForwardRate",
new String[] {
"04Y", "05Y", "06Y", "07Y", "08Y", "09Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y"
@@ -163,64 +161,69 @@ public static final void main (
)
);
- Map mapOutput = irs.value (
- ValuationParams.Spot (dtSpot.julian()),
+ Map measureMap = irs.value (
+ ValuationParams.Spot (spotDate.julian()),
null,
- csqc,
+ marketDataContainer,
null
);
- for (Map.Entry me : mapOutput.entrySet())
- System.out.println ("\t | " + me.getKey() + " => " + me.getValue() + " ||");
+ for (Map.Entry measureMapEntry : measureMap.entrySet())
+ System.out.println ("\t | " + measureMapEntry.getKey() + " => " + measureMapEntry.getValue() + " ||");
System.out.println ("\t |------------------------------||");
- System.out.println ("\n\n\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\n\n\t\t|----------------------------------------------------------------------------------------------------------------------||");
- System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
+ System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
- System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
+ System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
- System.out.println ("\t\t| Start Date ||");
+ System.out.println ("\t\t| Start Date ||");
- System.out.println ("\t\t| End Date ||");
+ System.out.println ("\t\t| End Date ||");
- System.out.println ("\t\t| Pay Date ||");
+ System.out.println ("\t\t| Pay Date ||");
- System.out.println ("\t\t| FX Fixing Date ||");
+ System.out.println ("\t\t| FX Fixing Date ||");
- System.out.println ("\t\t| Base Notional ||");
+ System.out.println ("\t\t| Base Notional ||");
- System.out.println ("\t\t| Period DCF ||");
+ System.out.println ("\t\t| Period DCF ||");
- System.out.println ("\t\t| Tenor ||");
+ System.out.println ("\t\t| Tenor ||");
- System.out.println ("\t\t| Funding Label ||");
+ System.out.println ("\t\t| Funding Label ||");
- System.out.println ("\t\t| Forward Label ||");
+ System.out.println ("\t\t| Forward Label ||");
- System.out.println ("\t\t| Pay Discount Factor ||");
+ System.out.println ("\t\t| Pay Discount Factor ||");
- System.out.println ("\t\t| Coupon Rate ||");
+ System.out.println ("\t\t| Coupon Rate ||");
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.derivedStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.derivedStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- cp.floaterLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ compositePeriod.floaterLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
System.out.println ("\n\n\t\t|--------------------------------------------------------------------------------------------------------||");
@@ -250,18 +253,23 @@ public static final void main (
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.referenceStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.referenceStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
diff --git a/src/main/java/org/drip/template/irs/HKD.java b/src/main/java/org/drip/template/irs/HKD.java
index f114d84e0275..60e1eef9641d 100644
--- a/src/main/java/org/drip/template/irs/HKD.java
+++ b/src/main/java/org/drip/template/irs/HKD.java
@@ -17,6 +17,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
@@ -106,52 +109,47 @@
* @author Lakshmi Krishnamurthy
*/
-public class HKD {
+public class HKD
+{
/**
* Entry Point
*
- * @param args Argument Array
+ * @param argumentArray Argument Array
*
* @throws Exception Propagate the Exception encountered
*/
public static final void main (
- final String[] args)
+ final String[] argumentArray)
throws Exception
{
EnvManager.InitEnv ("");
- JulianDate dtSpot = DateUtil.Today();
+ JulianDate spotDate = DateUtil.Today();
- String strCurrency = "HKD";
- String strMaturityTenor = "5Y";
+ String currency = "HKD";
+ String maturityTenor = "5Y";
FixFloatComponent irs = OTCInstrumentBuilder.FixFloatStandard (
- dtSpot,
- strCurrency,
+ spotDate,
+ currency,
"ALL",
- strMaturityTenor,
+ maturityTenor,
"MAIN",
0.0206
);
- CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();
+ CurveSurfaceQuoteContainer marketDataContainer = new CurveSurfaceQuoteContainer();
- csqc.setFundingState (
+ marketDataContainer.setFundingState (
LatentMarketStateBuilder.SmoothFundingCurve (
- dtSpot,
- strCurrency,
- new String[] {
- "04D", "07D", "14D", "30D", "60D"
- },
- new double[] {
- 0.0017, 0.0017, 0.0018, 0.0020, 0.0023
- },
+ spotDate,
+ currency,
+ new String[] {"04D", "07D", "14D", "30D", "60D"},
+ new double[] {0.0017, 0.0017, 0.0018, 0.0020, 0.0023},
"ForwardRate",
- new double[] {
- 0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160
- },
+ new double[] {0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160},
"ForwardRate",
new String[] {
"04Y", "05Y", "06Y", "07Y", "08Y", "09Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y"
@@ -163,64 +161,69 @@ public static final void main (
)
);
- Map mapOutput = irs.value (
- ValuationParams.Spot (dtSpot.julian()),
+ Map measureMap = irs.value (
+ ValuationParams.Spot (spotDate.julian()),
null,
- csqc,
+ marketDataContainer,
null
);
- for (Map.Entry me : mapOutput.entrySet())
- System.out.println ("\t | " + me.getKey() + " => " + me.getValue() + " ||");
+ for (Map.Entry measureMapEntry : measureMap.entrySet())
+ System.out.println ("\t | " + measureMapEntry.getKey() + " => " + measureMapEntry.getValue() + " ||");
System.out.println ("\t |------------------------------||");
- System.out.println ("\n\n\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\n\n\t\t|----------------------------------------------------------------------------------------------------------------------||");
- System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
+ System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
- System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
+ System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
- System.out.println ("\t\t| Start Date ||");
+ System.out.println ("\t\t| Start Date ||");
- System.out.println ("\t\t| End Date ||");
+ System.out.println ("\t\t| End Date ||");
- System.out.println ("\t\t| Pay Date ||");
+ System.out.println ("\t\t| Pay Date ||");
- System.out.println ("\t\t| FX Fixing Date ||");
+ System.out.println ("\t\t| FX Fixing Date ||");
- System.out.println ("\t\t| Base Notional ||");
+ System.out.println ("\t\t| Base Notional ||");
- System.out.println ("\t\t| Period DCF ||");
+ System.out.println ("\t\t| Period DCF ||");
- System.out.println ("\t\t| Tenor ||");
+ System.out.println ("\t\t| Tenor ||");
- System.out.println ("\t\t| Funding Label ||");
+ System.out.println ("\t\t| Funding Label ||");
- System.out.println ("\t\t| Forward Label ||");
+ System.out.println ("\t\t| Forward Label ||");
- System.out.println ("\t\t| Pay Discount Factor ||");
+ System.out.println ("\t\t| Pay Discount Factor ||");
- System.out.println ("\t\t| Coupon Rate ||");
+ System.out.println ("\t\t| Coupon Rate ||");
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.derivedStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.derivedStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- cp.floaterLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ compositePeriod.floaterLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
System.out.println ("\n\n\t\t|--------------------------------------------------------------------------------------------------------||");
@@ -250,18 +253,23 @@ public static final void main (
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.referenceStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.referenceStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
diff --git a/src/main/java/org/drip/template/irs/INR.java b/src/main/java/org/drip/template/irs/INR.java
index 98d1a72c7f74..220fd8e81108 100644
--- a/src/main/java/org/drip/template/irs/INR.java
+++ b/src/main/java/org/drip/template/irs/INR.java
@@ -17,6 +17,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
@@ -106,52 +109,47 @@
* @author Lakshmi Krishnamurthy
*/
-public class INR {
+public class INR
+{
/**
* Entry Point
*
- * @param args Argument Array
+ * @param argumentArray Argument Array
*
* @throws Exception Propagate the Exception encountered
*/
public static final void main (
- final String[] args)
+ final String[] argumentArray)
throws Exception
{
EnvManager.InitEnv ("");
- JulianDate dtSpot = DateUtil.Today();
+ JulianDate spotDate = DateUtil.Today();
- String strCurrency = "INR";
- String strMaturityTenor = "5Y";
+ String currency = "INR";
+ String maturityTenor = "5Y";
FixFloatComponent irs = OTCInstrumentBuilder.FixFloatStandard (
- dtSpot,
- strCurrency,
+ spotDate,
+ currency,
"ALL",
- strMaturityTenor,
+ maturityTenor,
"MAIN",
0.0206
);
- CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();
+ CurveSurfaceQuoteContainer marketDataContainer = new CurveSurfaceQuoteContainer();
- csqc.setFundingState (
+ marketDataContainer.setFundingState (
LatentMarketStateBuilder.SmoothFundingCurve (
- dtSpot,
- strCurrency,
- new String[] {
- "04D", "07D", "14D", "30D", "60D"
- },
- new double[] {
- 0.0017, 0.0017, 0.0018, 0.0020, 0.0023
- },
+ spotDate,
+ currency,
+ new String[] {"04D", "07D", "14D", "30D", "60D"},
+ new double[] {0.0017, 0.0017, 0.0018, 0.0020, 0.0023},
"ForwardRate",
- new double[] {
- 0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160
- },
+ new double[] {0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160},
"ForwardRate",
new String[] {
"04Y", "05Y", "06Y", "07Y", "08Y", "09Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y"
@@ -163,64 +161,69 @@ public static final void main (
)
);
- Map mapOutput = irs.value (
- ValuationParams.Spot (dtSpot.julian()),
+ Map measureMap = irs.value (
+ ValuationParams.Spot (spotDate.julian()),
null,
- csqc,
+ marketDataContainer,
null
);
- for (Map.Entry me : mapOutput.entrySet())
- System.out.println ("\t | " + me.getKey() + " => " + me.getValue() + " ||");
+ for (Map.Entry measureMapEntry : measureMap.entrySet())
+ System.out.println ("\t | " + measureMapEntry.getKey() + " => " + measureMapEntry.getValue() + " ||");
System.out.println ("\t |------------------------------||");
- System.out.println ("\n\n\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\n\n\t\t|----------------------------------------------------------------------------------------------------------------------||");
- System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
+ System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
- System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
+ System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
- System.out.println ("\t\t| Start Date ||");
+ System.out.println ("\t\t| Start Date ||");
- System.out.println ("\t\t| End Date ||");
+ System.out.println ("\t\t| End Date ||");
- System.out.println ("\t\t| Pay Date ||");
+ System.out.println ("\t\t| Pay Date ||");
- System.out.println ("\t\t| FX Fixing Date ||");
+ System.out.println ("\t\t| FX Fixing Date ||");
- System.out.println ("\t\t| Base Notional ||");
+ System.out.println ("\t\t| Base Notional ||");
- System.out.println ("\t\t| Period DCF ||");
+ System.out.println ("\t\t| Period DCF ||");
- System.out.println ("\t\t| Tenor ||");
+ System.out.println ("\t\t| Tenor ||");
- System.out.println ("\t\t| Funding Label ||");
+ System.out.println ("\t\t| Funding Label ||");
- System.out.println ("\t\t| Forward Label ||");
+ System.out.println ("\t\t| Forward Label ||");
- System.out.println ("\t\t| Pay Discount Factor ||");
+ System.out.println ("\t\t| Pay Discount Factor ||");
- System.out.println ("\t\t| Coupon Rate ||");
+ System.out.println ("\t\t| Coupon Rate ||");
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.derivedStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.derivedStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- cp.floaterLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ compositePeriod.floaterLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
System.out.println ("\n\n\t\t|--------------------------------------------------------------------------------------------------------||");
@@ -250,18 +253,23 @@ public static final void main (
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.referenceStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.referenceStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
diff --git a/src/main/java/org/drip/template/irs/JPYLIBOR.java b/src/main/java/org/drip/template/irs/JPYLIBOR.java
index 04000222eadd..08c0cd4483cc 100644
--- a/src/main/java/org/drip/template/irs/JPYLIBOR.java
+++ b/src/main/java/org/drip/template/irs/JPYLIBOR.java
@@ -17,6 +17,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
@@ -106,52 +109,47 @@
* @author Lakshmi Krishnamurthy
*/
-public class JPYLIBOR {
+public class JPYLIBOR
+{
/**
* Entry Point
*
- * @param args Argument Array
+ * @param argumentArray Argument Array
*
* @throws Exception Propagate the Exception encountered
*/
public static final void main (
- final String[] args)
+ final String[] argumentArray)
throws Exception
{
EnvManager.InitEnv ("");
- JulianDate dtSpot = DateUtil.Today();
+ JulianDate spotDate = DateUtil.Today();
- String strCurrency = "JPY";
- String strMaturityTenor = "5Y";
+ String currency = "JPY";
+ String maturityTenor = "5Y";
FixFloatComponent irs = OTCInstrumentBuilder.FixFloatStandard (
- dtSpot,
- strCurrency,
+ spotDate,
+ currency,
"ALL",
- strMaturityTenor,
+ maturityTenor,
"MAIN",
0.0206
);
- CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();
+ CurveSurfaceQuoteContainer marketDataContainer = new CurveSurfaceQuoteContainer();
- csqc.setFundingState (
+ marketDataContainer.setFundingState (
LatentMarketStateBuilder.SmoothFundingCurve (
- dtSpot,
- strCurrency,
- new String[] {
- "04D", "07D", "14D", "30D", "60D"
- },
- new double[] {
- 0.0017, 0.0017, 0.0018, 0.0020, 0.0023
- },
+ spotDate,
+ currency,
+ new String[] {"04D", "07D", "14D", "30D", "60D"},
+ new double[] {0.0017, 0.0017, 0.0018, 0.0020, 0.0023},
"ForwardRate",
- new double[] {
- 0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160
- },
+ new double[] {0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160},
"ForwardRate",
new String[] {
"04Y", "05Y", "06Y", "07Y", "08Y", "09Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y"
@@ -163,64 +161,69 @@ public static final void main (
)
);
- Map mapOutput = irs.value (
- ValuationParams.Spot (dtSpot.julian()),
+ Map measureMap = irs.value (
+ ValuationParams.Spot (spotDate.julian()),
null,
- csqc,
+ marketDataContainer,
null
);
- for (Map.Entry me : mapOutput.entrySet())
- System.out.println ("\t | " + me.getKey() + " => " + me.getValue() + " ||");
+ for (Map.Entry measureMapEntry : measureMap.entrySet())
+ System.out.println ("\t | " + measureMapEntry.getKey() + " => " + measureMapEntry.getValue() + " ||");
System.out.println ("\t |------------------------------||");
- System.out.println ("\n\n\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\n\n\t\t|----------------------------------------------------------------------------------------------------------------------||");
- System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
+ System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
- System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
+ System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
- System.out.println ("\t\t| Start Date ||");
+ System.out.println ("\t\t| Start Date ||");
- System.out.println ("\t\t| End Date ||");
+ System.out.println ("\t\t| End Date ||");
- System.out.println ("\t\t| Pay Date ||");
+ System.out.println ("\t\t| Pay Date ||");
- System.out.println ("\t\t| FX Fixing Date ||");
+ System.out.println ("\t\t| FX Fixing Date ||");
- System.out.println ("\t\t| Base Notional ||");
+ System.out.println ("\t\t| Base Notional ||");
- System.out.println ("\t\t| Period DCF ||");
+ System.out.println ("\t\t| Period DCF ||");
- System.out.println ("\t\t| Tenor ||");
+ System.out.println ("\t\t| Tenor ||");
- System.out.println ("\t\t| Funding Label ||");
+ System.out.println ("\t\t| Funding Label ||");
- System.out.println ("\t\t| Forward Label ||");
+ System.out.println ("\t\t| Forward Label ||");
- System.out.println ("\t\t| Pay Discount Factor ||");
+ System.out.println ("\t\t| Pay Discount Factor ||");
- System.out.println ("\t\t| Coupon Rate ||");
+ System.out.println ("\t\t| Coupon Rate ||");
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.derivedStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.derivedStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- cp.floaterLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ compositePeriod.floaterLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
System.out.println ("\n\n\t\t|--------------------------------------------------------------------------------------------------------||");
@@ -250,18 +253,23 @@ public static final void main (
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.referenceStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.referenceStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
diff --git a/src/main/java/org/drip/template/irs/JPYTIBOR.java b/src/main/java/org/drip/template/irs/JPYTIBOR.java
index 5bae822aa64d..027f3e139839 100644
--- a/src/main/java/org/drip/template/irs/JPYTIBOR.java
+++ b/src/main/java/org/drip/template/irs/JPYTIBOR.java
@@ -17,6 +17,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
@@ -106,52 +109,47 @@
* @author Lakshmi Krishnamurthy
*/
-public class JPYTIBOR {
+public class JPYTIBOR
+{
/**
* Entry Point
*
- * @param args Argument Array
+ * @param argumentArray Argument Array
*
* @throws Exception Propagate the Exception encountered
*/
public static final void main (
- final String[] args)
+ final String[] argumentArray)
throws Exception
{
EnvManager.InitEnv ("");
- JulianDate dtSpot = DateUtil.Today();
+ JulianDate spotDate = DateUtil.Today();
- String strCurrency = "JPY";
- String strMaturityTenor = "5Y";
+ String currency = "JPY";
+ String maturityTenor = "5Y";
FixFloatComponent irs = OTCInstrumentBuilder.FixFloatStandard (
- dtSpot,
- strCurrency,
+ spotDate,
+ currency,
"ALL",
- strMaturityTenor,
+ maturityTenor,
"TIBOR",
0.0206
);
- CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();
+ CurveSurfaceQuoteContainer marketDataContainer = new CurveSurfaceQuoteContainer();
- csqc.setFundingState (
+ marketDataContainer.setFundingState (
LatentMarketStateBuilder.SmoothFundingCurve (
- dtSpot,
- strCurrency,
- new String[] {
- "04D", "07D", "14D", "30D", "60D"
- },
- new double[] {
- 0.0017, 0.0017, 0.0018, 0.0020, 0.0023
- },
+ spotDate,
+ currency,
+ new String[] {"04D", "07D", "14D", "30D", "60D"},
+ new double[] {0.0017, 0.0017, 0.0018, 0.0020, 0.0023},
"ForwardRate",
- new double[] {
- 0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160
- },
+ new double[] {0.0027, 0.0032, 0.0041, 0.0054, 0.0077, 0.0104, 0.0134, 0.0160},
"ForwardRate",
new String[] {
"04Y", "05Y", "06Y", "07Y", "08Y", "09Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y"
@@ -163,64 +161,69 @@ public static final void main (
)
);
- Map mapOutput = irs.value (
- ValuationParams.Spot (dtSpot.julian()),
+ Map measureMap = irs.value (
+ ValuationParams.Spot (spotDate.julian()),
null,
- csqc,
+ marketDataContainer,
null
);
- for (Map.Entry me : mapOutput.entrySet())
- System.out.println ("\t | " + me.getKey() + " => " + me.getValue() + " ||");
+ for (Map.Entry measureMapEntry : measureMap.entrySet())
+ System.out.println ("\t | " + measureMapEntry.getKey() + " => " + measureMapEntry.getValue() + " ||");
System.out.println ("\t |------------------------------||");
- System.out.println ("\n\n\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\n\n\t\t|----------------------------------------------------------------------------------------------------------------------||");
- System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
+ System.out.println ("\t\t| Floating Stream Cash Flow Details ||");
- System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
+ System.out.println ("\t\t| -------- ------ ---- ---- ------- ||");
- System.out.println ("\t\t| Start Date ||");
+ System.out.println ("\t\t| Start Date ||");
- System.out.println ("\t\t| End Date ||");
+ System.out.println ("\t\t| End Date ||");
- System.out.println ("\t\t| Pay Date ||");
+ System.out.println ("\t\t| Pay Date ||");
- System.out.println ("\t\t| FX Fixing Date ||");
+ System.out.println ("\t\t| FX Fixing Date ||");
- System.out.println ("\t\t| Base Notional ||");
+ System.out.println ("\t\t| Base Notional ||");
- System.out.println ("\t\t| Period DCF ||");
+ System.out.println ("\t\t| Period DCF ||");
- System.out.println ("\t\t| Tenor ||");
+ System.out.println ("\t\t| Tenor ||");
- System.out.println ("\t\t| Funding Label ||");
+ System.out.println ("\t\t| Funding Label ||");
- System.out.println ("\t\t| Forward Label ||");
+ System.out.println ("\t\t| Forward Label ||");
- System.out.println ("\t\t| Pay Discount Factor ||");
+ System.out.println ("\t\t| Pay Discount Factor ||");
- System.out.println ("\t\t| Coupon Rate ||");
+ System.out.println ("\t\t| Coupon Rate ||");
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.derivedStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.derivedStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- cp.floaterLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ compositePeriod.floaterLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
- System.out.println ("\t\t|-----------------------------------------------------------------------------------------------------------------------||");
+ System.out.println ("\t\t|----------------------------------------------------------------------------------------------------------------------||");
System.out.println ("\n\n\t\t|--------------------------------------------------------------------------------------------------------||");
@@ -250,18 +253,23 @@ public static final void main (
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");
- for (CompositePeriod cp : irs.referenceStream().cashFlowPeriod())
+ for (CompositePeriod compositePeriod : irs.referenceStream().cashFlowPeriod())
System.out.println ("\t\t| [" +
- new JulianDate (cp.startDate()) + " - " +
- new JulianDate (cp.endDate()) + "] => " +
- new JulianDate (cp.payDate()) + " | " +
- new JulianDate (cp.fxFixingDate()) + " | " +
- FormatUtil.FormatDouble (cp.baseNotional(), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponDCF(), 1, 4, 1.) + " | " +
- cp.tenor() + " | " +
- cp.fundingLabel().fullyQualifiedName() + " | " +
- FormatUtil.FormatDouble (cp.df (csqc), 1, 4, 1.) + " | " +
- FormatUtil.FormatDouble (cp.couponMetrics (dtSpot.julian(), csqc).rate(), 1, 2, 100.) + "% ||"
+ new JulianDate (compositePeriod.startDate()) + " - " +
+ new JulianDate (compositePeriod.endDate()) + "] => " +
+ new JulianDate (compositePeriod.payDate()) + " | " +
+ new JulianDate (compositePeriod.fxFixingDate()) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.baseNotional(), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (compositePeriod.couponDCF(), 1, 4, 1.) + " | " +
+ compositePeriod.tenor() + " | " +
+ compositePeriod.fundingLabel().fullyQualifiedName() + " | " +
+ FormatUtil.FormatDouble (compositePeriod.df (marketDataContainer), 1, 4, 1.) + " | " +
+ FormatUtil.FormatDouble (
+ compositePeriod.couponMetrics (spotDate.julian(), marketDataContainer).rate(),
+ 1,
+ 2,
+ 100.
+ ) + "% ||"
);
System.out.println ("\t\t|--------------------------------------------------------------------------------------------------------||");