Skip to content

Commit

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

	- SIMM Equity EQ Settings Container 2.1 - Init (1, 2, 3)
	- SIMM Equity EQ Settings Container 2.1 - Bucket Set (4)
	- SIMM Equity EQ Settings Container 2.1 - Contains Bucket (5)
	- SIMM Equity EQ Settings Container 2.1 - Bucket (6)
	- SIMM Equity EQ Settings Container 2.1 - Cross Bucket Principal Covariance (7)
	- SIMM Equity EQ Settings Container 2.4 (8, 9)
	- SIMM Equity EQ Settings Container 2.4 - Cross Bucket Correlation (10, 11)
	- SIMM Equity EQ Settings Container 2.4 - Bucket Map (12, 13)
	- SIMM Equity EQ Settings Container 2.4 - Set Up Cross Bucket Correlation #1 (14, 15, 16)
	- SIMM Equity EQ Settings Container 2.4 - Set Up Cross Bucket Correlation #2 (17, 18, 19)
	- SIMM Equity EQ Settings Container 2.4 - Init #1 (20, 21, 22)
	- SIMM Equity EQ Settings Container 2.4 - Init #2 (23, 24, 25)
	- SIMM Equity EQ Settings Container 2.4 - Bucket Set (26)
	- SIMM Equity EQ Settings Container 2.4 - Contains Bucket (27)
	- SIMM Equity EQ Settings Container 2.4 - Bucket (28)
	- SIMM Equity EQ Settings Container 2.4 - Cross Bucket Principal Covariance (29)
	- SIMM Equity EQ Settings Container 2.0 (30, 31)
	- SIMM Equity EQ Settings Container 2.0 - Historical Volatility Ratio (HVR) (32)
	- SIMM Equity EQ Settings Container 2.0 - Residual Bucket Correlation (33)
	- SIMM Equity EQ Settings Container 2.1 (34, 35)
	- SIMM Equity EQ Settings Container 2.1 - Historical Volatility Ratio (HVR) (36)
	- SIMM Equity EQ Settings Container 2.1 - Residual Bucket Correlation (37)
	- SIMM Equity EQ Settings Container 2.4 (38, 39)
	- SIMM Equity EQ Settings Container 2.4 - Historical Volatility Ratio (HVR) (40)
	- SIMM Equity EQ Settings Container 2.4 - Residual Bucket Correlation (41)
	- SIMM Equity Market Capitalization Systemics (42, 43)
	- SIMM Equity Market Capitalization Systemics - The "Large" (44)
	- SIMM Equity Market Capitalization Systemics - The "Small" (45)
	- SIMM Equity Market Capitalization Systemics - The "All" (46)
	- SIMM Equity Market Capitalization Systemics - Cutoff for the Large (47)
	- SIMM Equity Region Systemics (48, 49)
	- SIMM Equity Region Systemics - The "Emerging Markets" (50)
	- SIMM Equity Region Systemics - The "Developed Markets" (51)
	- SIMM Equity Region Systemics - The "All" Region (52)
	- SIMM Equity Region Systemics - Array of Developed Countries (53)
	- SIMM Equity Additional Initial Margin (54, 55)
	- SIMM Equity Additional Initial Margin - Add-on Fixed (56, 57)
	- SIMM Equity Additional Initial Margin - Credit Multiplicative Scale (58, 59)
	- SIMM Equity Additional Initial Margin - Equity Multiplicative Scale (60)


Samples:

IdeaDRIP:
  • Loading branch information
Lakshmik committed Jun 8, 2024
1 parent eab24a2 commit 6be4dcc
Show file tree
Hide file tree
Showing 9 changed files with 222 additions and 151 deletions.
49 changes: 49 additions & 0 deletions ReleaseNotes/12_13_2023.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

Features:

Bug Fixes/Re-organization:

- SIMM Equity EQ Settings Container 2.1 - Init (1, 2, 3)
- SIMM Equity EQ Settings Container 2.1 - Bucket Set (4)
- SIMM Equity EQ Settings Container 2.1 - Contains Bucket (5)
- SIMM Equity EQ Settings Container 2.1 - Bucket (6)
- SIMM Equity EQ Settings Container 2.1 - Cross Bucket Principal Covariance (7)
- SIMM Equity EQ Settings Container 2.4 (8, 9)
- SIMM Equity EQ Settings Container 2.4 - Cross Bucket Correlation (10, 11)
- SIMM Equity EQ Settings Container 2.4 - Bucket Map (12, 13)
- SIMM Equity EQ Settings Container 2.4 - Set Up Cross Bucket Correlation #1 (14, 15, 16)
- SIMM Equity EQ Settings Container 2.4 - Set Up Cross Bucket Correlation #2 (17, 18, 19)
- SIMM Equity EQ Settings Container 2.4 - Init #1 (20, 21, 22)
- SIMM Equity EQ Settings Container 2.4 - Init #2 (23, 24, 25)
- SIMM Equity EQ Settings Container 2.4 - Bucket Set (26)
- SIMM Equity EQ Settings Container 2.4 - Contains Bucket (27)
- SIMM Equity EQ Settings Container 2.4 - Bucket (28)
- SIMM Equity EQ Settings Container 2.4 - Cross Bucket Principal Covariance (29)
- SIMM Equity EQ Settings Container 2.0 (30, 31)
- SIMM Equity EQ Settings Container 2.0 - Historical Volatility Ratio (HVR) (32)
- SIMM Equity EQ Settings Container 2.0 - Residual Bucket Correlation (33)
- SIMM Equity EQ Settings Container 2.1 (34, 35)
- SIMM Equity EQ Settings Container 2.1 - Historical Volatility Ratio (HVR) (36)
- SIMM Equity EQ Settings Container 2.1 - Residual Bucket Correlation (37)
- SIMM Equity EQ Settings Container 2.4 (38, 39)
- SIMM Equity EQ Settings Container 2.4 - Historical Volatility Ratio (HVR) (40)
- SIMM Equity EQ Settings Container 2.4 - Residual Bucket Correlation (41)
- SIMM Equity Market Capitalization Systemics (42, 43)
- SIMM Equity Market Capitalization Systemics - The "Large" (44)
- SIMM Equity Market Capitalization Systemics - The "Small" (45)
- SIMM Equity Market Capitalization Systemics - The "All" (46)
- SIMM Equity Market Capitalization Systemics - Cutoff for the Large (47)
- SIMM Equity Region Systemics (48, 49)
- SIMM Equity Region Systemics - The "Emerging Markets" (50)
- SIMM Equity Region Systemics - The "Developed Markets" (51)
- SIMM Equity Region Systemics - The "All" Region (52)
- SIMM Equity Region Systemics - Array of Developed Countries (53)
- SIMM Equity Additional Initial Margin (54, 55)
- SIMM Equity Additional Initial Margin - Add-on Fixed (56, 57)
- SIMM Equity Additional Initial Margin - Credit Multiplicative Scale (58, 59)
- SIMM Equity Additional Initial Margin - Equity Multiplicative Scale (60)


Samples:

IdeaDRIP:
Binary file modified ScheduleSheet.xlsx
Binary file not shown.
111 changes: 43 additions & 68 deletions src/main/java/org/drip/simm/equity/EQSettingsContainer24.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
*/

/*!
* Copyright (C) 2025 Lakshmi Krishnamurthy
* Copyright (C) 2024 Lakshmi Krishnamurthy
* Copyright (C) 2023 Lakshmi Krishnamurthy
* Copyright (C) 2022 Lakshmi Krishnamurthy
*
* This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics,
Expand Down Expand Up @@ -85,7 +88,7 @@

/**
* <i>EQSettingsContainer24</i> holds the ISDA SIMM 2.4 Equity Buckets and their Correlations. The References
* are:
* are:
*
* <br><br>
* <ul>
Expand All @@ -112,15 +115,27 @@
* https://www.isda.org/a/CeggE/ISDA-SIMM-v2.4-PUBLIC.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/equity/README.md">Equity Risk Factor Calibration Settings</a></li>
* <li>Initialize the Equity Settings Container</li>
* <li>Retrieve the Set of Bucket Indexes available</li>
* <li>Indicate if the Bucket denoted by the Number is available</li>
* <li>Retrieve the Bucket denoted by the Number</li>
* <li>Retrieve the Cross Bucket Correlation</li>
* <li>Retrieve the Bucket Map</li>
* <li>Retrieve the Cross Bucket Co-variance Matrix</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/equity/README.md">Equity Risk Factor Calibration Settings</a></td></tr>
* </table>
* <br>
*
* @author Lakshmi Krishnamurthy
*/
Expand All @@ -135,60 +150,34 @@ private static final boolean SetUpCrossBucketCorrelation()
{
List<String> bucketList = new ArrayList<String>();

bucketList.add (
"1"
);
bucketList.add ("1");

bucketList.add (
"2"
);
bucketList.add ("2");

bucketList.add (
"3"
);
bucketList.add ("3");

bucketList.add (
"4"
);
bucketList.add ("4");

bucketList.add (
"5"
);
bucketList.add ("5");

bucketList.add (
"6"
);
bucketList.add ("6");

bucketList.add (
"7"
);
bucketList.add ("7");

bucketList.add (
"8"
);
bucketList.add ("8");

bucketList.add (
"9"
);
bucketList.add ("9");

bucketList.add (
"10"
);
bucketList.add ("10");

bucketList.add (
"11"
);
bucketList.add ("11");

bucketList.add (
"12"
);
bucketList.add ("12");

try
{
try {
s_CrossBucketCorrelation = new LabelCorrelation (
bucketList,
new double[][]
{
new double[][] {
{1.00, 0.20, 0.20, 0.21, 0.15, 0.19, 0.19, 0.19, 0.18, 0.14, 0.24, 0.24}, // #01
{0.20, 1.00, 0.25, 0.24, 0.16, 0.21, 0.22, 0.21, 0.21, 0.16, 0.27, 0.27}, // #02
{0.21, 0.25, 1.00, 0.26, 0.17, 0.22, 0.24, 0.22, 0.23, 0.17, 0.28, 0.28}, // #03
Expand All @@ -205,9 +194,7 @@ private static final boolean SetUpCrossBucketCorrelation()
);

return true;
}
catch (Exception e)
{
} catch (Exception e) {
e.printStackTrace();
}

Expand All @@ -222,8 +209,7 @@ private static final boolean SetUpCrossBucketCorrelation()

public static final boolean Init()
{
try
{
try {
s_BucketMap.put (
-1,
new EQBucket (
Expand Down Expand Up @@ -392,9 +378,7 @@ public static final boolean Init()
0.98
)
);
}
catch (Exception e)
{
} catch (Exception e) {
e.printStackTrace();

return false;
Expand Down Expand Up @@ -425,9 +409,7 @@ public static final Set<Integer> BucketSet()
public static final boolean ContainsBucket (
final int bucketNumber)
{
return s_BucketMap.containsKey (
bucketNumber
);
return s_BucketMap.containsKey (bucketNumber);
}

/**
Expand All @@ -441,11 +423,7 @@ public static final boolean ContainsBucket (
public static final EQBucket Bucket (
final int bucketNumber)
{
return ContainsBucket (
bucketNumber
) ? s_BucketMap.get (
bucketNumber
) : null;
return ContainsBucket (bucketNumber) ? s_BucketMap.get (bucketNumber) : null;
}

/**
Expand Down Expand Up @@ -478,9 +456,6 @@ public static final Map<Integer, EQBucket> BucketMap()

public static final RiskGroupPrincipalCovariance CrossBucketPrincipalCovariance()
{
return RiskGroupPrincipalCovariance.Standard (
s_CrossBucketCorrelation.matrix(),
1.
);
return RiskGroupPrincipalCovariance.Standard (s_CrossBucketCorrelation.matrix(), 1.);
}
}
26 changes: 18 additions & 8 deletions src/main/java/org/drip/simm/equity/EQSystemics20.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

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

/**
* <i>EQSystemics20</i> contains the SIMM 2.0 Systemic Settings common to all Equity Risk Factors. The
* References are:
* References are:
*
* <br><br>
* <ul>
Expand All @@ -106,15 +109,22 @@
* 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/equity/README.md">Equity Risk Factor Calibration Settings</a></li>
* <li>Historical Volatility Ratio (HVR)</li>
* <li>Residual Bucket Correlation</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/equity/README.md">Equity Risk Factor Calibration Settings</a></td></tr>
* </table>
* <br>
*
* @author Lakshmi Krishnamurthy
*/
Expand Down
26 changes: 18 additions & 8 deletions src/main/java/org/drip/simm/equity/EQSystemics21.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

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

/**
* <i>EQSystemics21</i> contains the SIMM 2.1 Systemic Settings common to all Equity Risk Factors. The
* References are:
* References are:
*
* <br><br>
* <ul>
Expand All @@ -106,15 +109,22 @@
* 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/equity/README.md">Equity Risk Factor Calibration Settings</a></li>
* <li>Historical Volatility Ratio (HVR)</li>
* <li>Residual Bucket Correlation</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/equity/README.md">Equity Risk Factor Calibration Settings</a></td></tr>
* </table>
* <br>
*
* @author Lakshmi Krishnamurthy
*/
Expand Down
26 changes: 18 additions & 8 deletions src/main/java/org/drip/simm/equity/EQSystemics24.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

/*!
* Copyright (C) 2025 Lakshmi Krishnamurthy
* Copyright (C) 2024 Lakshmi Krishnamurthy
* Copyright (C) 2023 Lakshmi Krishnamurthy
* Copyright (C) 2022 Lakshmi Krishnamurthy
*
* This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics,
Expand Down Expand Up @@ -75,7 +78,7 @@

/**
* <i>EQSystemics24</i> contains the SIMM 2.4 Systemic Settings common to all Equity Risk Factors. The
* References are:
* References are:
*
* <br><br>
* <ul>
Expand All @@ -102,15 +105,22 @@
* https://www.isda.org/a/CeggE/ISDA-SIMM-v2.4-PUBLIC.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/equity/README.md">Equity Risk Factor Calibration Settings</a></li>
* <li>Historical Volatility Ratio (HVR)</li>
* <li>Residual Bucket Correlation</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/equity/README.md">Equity Risk Factor Calibration Settings</a></td></tr>
* </table>
* <br>
*
* @author Lakshmi Krishnamurthy
*/
Expand Down
Loading

0 comments on commit 6be4dcc

Please sign in to comment.