Skip to content

Commit

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

	- SIMM Margin Risk Measure Aggregate IR (1)
	- SIMM Margin Risk Measure Aggregate IR - Core SBA Variance (2, 3)
	- SIMM Margin Risk Measure Aggregate IR - Residual SBA Variance (4, 5)
	- SIMM Margin Risk Measure Aggregate IR - Bucket Map (6, 7)
	- SIMM Margin Risk Measure Aggregate IR - Constructor (8, 9)
	- SIMM Margin Risk Measure Aggregate IR - SBA (10)
	- SIMM Margin Sensitivity Aggregate CR (11, 12, 13)
	- SIMM Margin Sensitivity Aggregate CR - Cumulative #4 (14, 15)
	- SIMM Margin Sensitivity Aggregate CR - Component Covariance Map (16, 17)
	- SIMM Margin Sensitivity Aggregate CR - Constructor (18, 19)
	- SIMM Margin Sensitivity Aggregate CR - Covariance #1 (20)
	- SIMM Margin Sensitivity Aggregate CR - Covariance #2 (21)
	- SIMM Margin Sensitivity Aggregate CR - Covariance OIS (22, 23)
	- SIMM Margin Sensitivity Aggregate CR - Covariance OIS PRIME (24, 25)
	- SIMM Margin Sensitivity Aggregate CR - Covariance OIS LIBOR 1M (26, 27)
	- SIMM Margin Sensitivity Aggregate CR - Covariance OIS LIBOR 3M (28, 29)
	- SIMM Margin Sensitivity Aggregate CR - Covariance OIS LIBOR 6M (30, 31)
	- SIMM Margin Sensitivity Aggregate CR - Covariance OIS LIBOR 12M (32, 33)
	- SIMM Margin Sensitivity Aggregate CR - Covariance OIS MUNICIPAL (34, 35)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 1M PRIME (36, 37)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 1M (38, 39)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 1M 3M (40, 41)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 1M 6M (42, 43)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 1M 12M (44, 45)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 1M MUNICIPAL (46, 47)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 3M PRIME (48, 49)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 3M (50, 51)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 3M 6M (52, 53)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 3M 12M (54, 55)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 3M MUNICIPAL (56, 57)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 6M PRIME (58, 59)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 6M (60, 61)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 6M 12M (62, 63)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 6M MUNICIPAL (64, 65)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 12M PRIME (66, 67)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 12M (68, 69)
	- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 12M MUNICIPAL (70, 71)
	- SIMM Margin Sensitivity Aggregate CR - Covariance PRIME (72, 73)
	- SIMM Margin Sensitivity Aggregate CR - Covariance PRIME MUNICIPAL (74, 75)
	- SIMM Margin Sensitivity Aggregate CR - Covariance MUNICIPAL (76, 77)
	- SIMM Margin Sensitivity Aggregate CR - Cumulative #1 (78, 79)
	- SIMM Margin Sensitivity Aggregate CR - Constructor (80, 81)
	- SIMM Margin Sensitivity Aggregate CR - Cumulative #2 (82)
	- SIMM Margin Sensitivity Aggregate CR - Cumulative #3 (83)
	- SIMM Parameters Bucket Curvature Settings (84, 85, 86)
	- SIMM Parameters Liquidity Settings (87, 88, 89)
	- SIMM Parameters Liquidity Settings - Concentration Threshold (90, 91)
	- SIMM Parameters Liquidity Settings - Constructor (92)
	- SIMM Parameters Bucket Senstivity Settings (93, 94, 95)
	- SIMM Parameters Bucket Senstivity Settings - Risk Weight (96, 97)
	- SIMM Parameters Bucket Senstivity Settings - Member Correlation (98, 99)
	- SIMM Parameters Bucket Senstivity Settings - ISDA EQ 2.0 (100, 101)
	- SIMM Parameters Bucket Senstivity Settings - ISDA EQ 2.1 (102, 103)
	- SIMM Parameters Bucket Senstivity Settings - ISDA EQ 2.4 (104, 105)
	- SIMM Parameters Bucket Senstivity Settings - ISDA CT 2.0 (106, 107)
	- SIMM Parameters Bucket Senstivity Settings - ISDA CT 2.1 (108, 109)
	- SIMM Parameters Bucket Senstivity Settings - ISDA CT 2.4 (110, 111)
	- SIMM Parameters Bucket Senstivity Settings - ISDA FX 2.0 (112, 113)
	- SIMM Parameters Bucket Senstivity Settings - ISDA FX 2.1 (114, 115)
	- SIMM Parameters Bucket Senstivity Settings - ISDA FX 2.4 (116, 117)
	- SIMM Parameters Bucket Senstivity Settings - Constructor (118, 119)
	- SIMM Parameters Bucket Senstivity Settings CR (120)


Samples:

IdeaDRIP:
  • Loading branch information
Lakshmik committed Jun 16, 2024
1 parent 6abdc87 commit 199a3d7
Show file tree
Hide file tree
Showing 9 changed files with 324 additions and 304 deletions.
72 changes: 72 additions & 0 deletions ReleaseNotes/01_04_2024.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@

Features:

Bug Fixes/Re-organization:

- SIMM Margin Risk Measure Aggregate IR (1)
- SIMM Margin Risk Measure Aggregate IR - Core SBA Variance (2, 3)
- SIMM Margin Risk Measure Aggregate IR - Residual SBA Variance (4, 5)
- SIMM Margin Risk Measure Aggregate IR - Bucket Map (6, 7)
- SIMM Margin Risk Measure Aggregate IR - Constructor (8, 9)
- SIMM Margin Risk Measure Aggregate IR - SBA (10)
- SIMM Margin Sensitivity Aggregate CR (11, 12, 13)
- SIMM Margin Sensitivity Aggregate CR - Cumulative #4 (14, 15)
- SIMM Margin Sensitivity Aggregate CR - Component Covariance Map (16, 17)
- SIMM Margin Sensitivity Aggregate CR - Constructor (18, 19)
- SIMM Margin Sensitivity Aggregate CR - Covariance #1 (20)
- SIMM Margin Sensitivity Aggregate CR - Covariance #2 (21)
- SIMM Margin Sensitivity Aggregate CR - Covariance OIS (22, 23)
- SIMM Margin Sensitivity Aggregate CR - Covariance OIS PRIME (24, 25)
- SIMM Margin Sensitivity Aggregate CR - Covariance OIS LIBOR 1M (26, 27)
- SIMM Margin Sensitivity Aggregate CR - Covariance OIS LIBOR 3M (28, 29)
- SIMM Margin Sensitivity Aggregate CR - Covariance OIS LIBOR 6M (30, 31)
- SIMM Margin Sensitivity Aggregate CR - Covariance OIS LIBOR 12M (32, 33)
- SIMM Margin Sensitivity Aggregate CR - Covariance OIS MUNICIPAL (34, 35)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 1M PRIME (36, 37)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 1M (38, 39)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 1M 3M (40, 41)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 1M 6M (42, 43)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 1M 12M (44, 45)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 1M MUNICIPAL (46, 47)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 3M PRIME (48, 49)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 3M (50, 51)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 3M 6M (52, 53)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 3M 12M (54, 55)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 3M MUNICIPAL (56, 57)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 6M PRIME (58, 59)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 6M (60, 61)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 6M 12M (62, 63)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 6M MUNICIPAL (64, 65)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 12M PRIME (66, 67)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 12M (68, 69)
- SIMM Margin Sensitivity Aggregate CR - Covariance LIBOR 12M MUNICIPAL (70, 71)
- SIMM Margin Sensitivity Aggregate CR - Covariance PRIME (72, 73)
- SIMM Margin Sensitivity Aggregate CR - Covariance PRIME MUNICIPAL (74, 75)
- SIMM Margin Sensitivity Aggregate CR - Covariance MUNICIPAL (76, 77)
- SIMM Margin Sensitivity Aggregate CR - Cumulative #1 (78, 79)
- SIMM Margin Sensitivity Aggregate CR - Constructor (80, 81)
- SIMM Margin Sensitivity Aggregate CR - Cumulative #2 (82)
- SIMM Margin Sensitivity Aggregate CR - Cumulative #3 (83)
- SIMM Parameters Bucket Curvature Settings (84, 85, 86)
- SIMM Parameters Liquidity Settings (87, 88, 89)
- SIMM Parameters Liquidity Settings - Concentration Threshold (90, 91)
- SIMM Parameters Liquidity Settings - Constructor (92)
- SIMM Parameters Bucket Senstivity Settings (93, 94, 95)
- SIMM Parameters Bucket Senstivity Settings - Risk Weight (96, 97)
- SIMM Parameters Bucket Senstivity Settings - Member Correlation (98, 99)
- SIMM Parameters Bucket Senstivity Settings - ISDA EQ 2.0 (100, 101)
- SIMM Parameters Bucket Senstivity Settings - ISDA EQ 2.1 (102, 103)
- SIMM Parameters Bucket Senstivity Settings - ISDA EQ 2.4 (104, 105)
- SIMM Parameters Bucket Senstivity Settings - ISDA CT 2.0 (106, 107)
- SIMM Parameters Bucket Senstivity Settings - ISDA CT 2.1 (108, 109)
- SIMM Parameters Bucket Senstivity Settings - ISDA CT 2.4 (110, 111)
- SIMM Parameters Bucket Senstivity Settings - ISDA FX 2.0 (112, 113)
- SIMM Parameters Bucket Senstivity Settings - ISDA FX 2.1 (114, 115)
- SIMM Parameters Bucket Senstivity Settings - ISDA FX 2.4 (116, 117)
- SIMM Parameters Bucket Senstivity Settings - Constructor (118, 119)
- SIMM Parameters Bucket Senstivity Settings CR (120)


Samples:

IdeaDRIP:
Binary file modified ScheduleSheet.xlsx
Binary file not shown.
28 changes: 11 additions & 17 deletions src/main/java/org/drip/simm/margin/RiskMeasureAggregateIR.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@
* It provides the following Functionality:
*
* <ul>
* <li><i>RiskMeasureAggregate</i> Constructor</li>
* <li><i>RiskMeasureAggregateIR</i> Constructor</li>
* <li>Retrieve the Core SBA Variance</li>
* <li>Retrieve the Residual SBA Variance</li>
* <li>Retrieve the Aggregate Bucket Map</li>
* <li>Retrieve the Total SBA Margin</li>
* </ul>
*
* <br>
Expand All @@ -135,11 +139,10 @@ public class RiskMeasureAggregateIR
{
private double _coreSBAVariance = Double.NaN;
private double _residualSBAVariance = Double.NaN;
private Map<String, BucketAggregateIR> _bucketAggregateMap =
null;
private Map<String, BucketAggregateIR> _bucketAggregateMap = null;

/**
* RiskMeasureAggregateIR Constructor
* <i>RiskMeasureAggregateIR</i> Constructor
*
* @param bucketAggregateMap IR Bucket Aggregate Map
* @param coreSBAVariance The Core SBA Variance
Expand All @@ -155,17 +158,10 @@ public RiskMeasureAggregateIR (
throws Exception
{
if (null == (_bucketAggregateMap = bucketAggregateMap) ||
!NumberUtil.IsValid (
_coreSBAVariance = coreSBAVariance
) ||
!NumberUtil.IsValid (
_residualSBAVariance = residualSBAVariance
)
)
!NumberUtil.IsValid (_coreSBAVariance = coreSBAVariance) ||
!NumberUtil.IsValid (_residualSBAVariance = residualSBAVariance))
{
throw new Exception (
"RiskMeasureAggregateIR Constructor => Invalid Inputs"
);
throw new Exception ("RiskMeasureAggregateIR Constructor => Invalid Inputs");
}
}

Expand Down Expand Up @@ -210,8 +206,6 @@ public Map<String, BucketAggregateIR> bucketAggregateMap()

public double sba()
{
return Math.sqrt (
_coreSBAVariance + _residualSBAVariance
);
return Math.sqrt (_coreSBAVariance + _residualSBAVariance);
}
}
43 changes: 24 additions & 19 deletions src/main/java/org/drip/simm/margin/SensitivityAggregateCR.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
*/

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

/**
* <i>SensitivityAggregateCR</i> holds the IM Margin Sensitivity Co-variances within a single Bucket for each
* of the CR Component Risk Factors. The References are:
* of the CR Component Risk Factors. The References are:
*
* <br><br>
* <ul>
Expand All @@ -110,15 +113,24 @@
* https://www.isda.org/a/oFiDE/isda-simm-v2.pdf
* </li>
* </ul>
*
* <br><br>
*
* It provides the following Functionality:
*
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/PortfolioCore.md">Portfolio Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/MarginAnalyticsLibrary.md">Initial and Variation Margin Analytics</a></li>
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/simm/README.md">Initial Margin Analytics based on ISDA SIMM and its Variants</a></li>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/simm/margin/README.md">ISDA SIMM Risk Factor Margin Metrics</a></li>
* <li><i>SensitivityAggregateCR</i> Constructor</li>
* <li>Retrieve the Component Margin Covariance Map</li>
* <li>Compute the Cumulative Margin Covariance</li>
* <li>Compute the Cumulative Sensitivity Margin</li>
* <li>Retrieve the Cumulative Margin Sensitivity</li>
* </ul>
* <br><br>
*
* <br>
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/PortfolioCore.md">Portfolio Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/MarginAnalyticsLibrary.md">Initial and Variation Margin Analytics</a></td></tr>
* <tr><td><b>Project</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/simm/README.md">Initial Margin Analytics based on ISDA SIMM and its Variants</a></td></tr>
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/simm/margin/README.md">ISDA SIMM Risk Factor Margin Metrics</a></td></tr>
* </table>
*
* @author Lakshmi Krishnamurthy
*/
Expand All @@ -129,7 +141,7 @@ public class SensitivityAggregateCR
private Map<String, Double> _componentMarginCovarianceMap = null;

/**
* SensitivityAggregateCR Constructor
* <i>SensitivityAggregateCR</i> Constructor
*
* @param componentMarginCovarianceMap The Component Margin Co-variance Map
* @param cumulativeMarginSensitivity The Cumulative Margin Sensitivity
Expand All @@ -144,14 +156,9 @@ public SensitivityAggregateCR (
{
if (null == (_componentMarginCovarianceMap = componentMarginCovarianceMap) ||
0 == _componentMarginCovarianceMap.size() ||
!NumberUtil.IsValid (
_cumulativeMarginSensitivity = cumulativeMarginSensitivity
)
)
!NumberUtil.IsValid (_cumulativeMarginSensitivity = cumulativeMarginSensitivity))
{
throw new Exception (
"SensitivityAggregateCR Constructor => Invalid Inputs"
);
throw new Exception ("SensitivityAggregateCR Constructor => Invalid Inputs");
}
}

Expand Down Expand Up @@ -194,9 +201,7 @@ public double cumulativeMarginCovariance()

public double cumulativeMargin()
{
return Math.sqrt (
cumulativeMarginCovariance()
);
return Math.sqrt (cumulativeMarginCovariance());
}

/**
Expand Down
Loading

0 comments on commit 199a3d7

Please sign in to comment.