Skip to content

Commit

Permalink
Features:
Browse files Browse the repository at this point in the history
	- Low Volatility Risk Weights Fix (1, 2)
	- ISDA SIMM2.0 Market Parameter Fixings (24)
	- SIMM 2.0 IR Parameter Settings (25)
	- SIMM 2.0 Issuer Bucket Shell (26, 27)
	- SIMM Credit Qualifying Bucket Number (28)
	- SIMM Credit Qualifying Bucket Quality (29)
	- SIMM Credit Qualifying Bucket Sectors (30)
	- Credit Qualifying Bucket Risk Weight (31)
	- Credit Qualifying Bucket - Constructor/Annotation (32, 33, 34)
	- SIMM Credit Qualifying Systemics - Shell (35)
	- SIMM Credit Qualifying Systemics - IG (36)
	- SIMM Credit Qualifying Systemics - HY (37)
	- SIMM Credit Qualifying Systemics - NR (38)
	- Credit Qualifying Systemics - Sovereign Sector (39)
	- Credit Qualifying Systemics - Financial Sector (40)
	- Credit Qualifying Systemics - Materials Sector (41)
	- Credit Qualifying Systemics - Consumer Sector (42)
	- Credit Qualifying Systemics - Technology Sector (43)
	- Credit Qualifying Systemics - Health Sector (44)
	- Credit Qualifying Bucket - Sector Array (45)
	- Credit Qualifying Systemics - Investment Grade (46)
	- Credit Qualifying Systemics - High Yield (47)
	- SIMM 2.0 Credit Qualifying Settings Shell (48)
	- Credit Qualifying Settings Bucket Map (49)
	- Credit Qualifying Settings Bucket Containment (50)
	- Credit Qualifying Settings Bucket Retrieval (51)
	- Credit Qualifying Settings Initialization Shell (52)
	- Credit Qualifying Settings Bucket #1 (53)
	- Credit Qualifying Settings Bucket #2 (54)
	- Credit Qualifying Settings Bucket #3 (55)
	- Credit Qualifying Settings Bucket #4 (56)
	- Credit Qualifying Settings Bucket #5 (57)
	- Credit Qualifying Settings Bucket #6 (58)
	- Credit Qualifying Settings Bucket #7 (59)
	- Credit Qualifying Settings Bucket #8 (60)


Bug Fixes/Clean-up:

Samples:

	- High Volatility Risk Weights Fix (3, 4)
	- Single Currency Tenor Correlation #1 (5, 6)
	- Single Currency Tenor Correlation #2 (7, 8)
	- Single Currency Tenor Correlation #3 (9, 10)
	- Single Currency Tenor Correlation #4 (11, 12)
	- Single Currency Inflation Risk Weight (13)
	- Single Currency Basis Risk Weight (14)
	- Single Currency Vega Risk Weight (15)
	- Single Currency Cross Curve Correlation (16)
	- Single Currency Curve Inflation Correlation (17, 18)
	- Single Currency Curve Basis Correlation (19)
	- Single Currency Inflation Basis Correlation (20)
	- Cross Currency Tenor Indifference Correlation (21)
	- Systematic Risk Factor Weights Correlations (22, 23)
  • Loading branch information
lakshmiDRIP committed Jul 3, 2018
1 parent 01fa487 commit 4a336f4
Show file tree
Hide file tree
Showing 18 changed files with 846 additions and 749 deletions.
58 changes: 58 additions & 0 deletions ReleaseNotes/06_20_2018.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

Features:

- Low Volatility Risk Weights Fix (1, 2)
- ISDA SIMM2.0 Market Parameter Fixings (24)
- SIMM 2.0 IR Parameter Settings (25)
- SIMM 2.0 Issuer Bucket Shell (26, 27)
- SIMM Credit Qualifying Bucket Number (28)
- SIMM Credit Qualifying Bucket Quality (29)
- SIMM Credit Qualifying Bucket Sectors (30)
- Credit Qualifying Bucket Risk Weight (31)
- Credit Qualifying Bucket - Constructor/Annotation (32, 33, 34)
- SIMM Credit Qualifying Systemics - Shell (35)
- SIMM Credit Qualifying Systemics - IG (36)
- SIMM Credit Qualifying Systemics - HY (37)
- SIMM Credit Qualifying Systemics - NR (38)
- Credit Qualifying Systemics - Sovereign Sector (39)
- Credit Qualifying Systemics - Financial Sector (40)
- Credit Qualifying Systemics - Materials Sector (41)
- Credit Qualifying Systemics - Consumer Sector (42)
- Credit Qualifying Systemics - Technology Sector (43)
- Credit Qualifying Systemics - Health Sector (44)
- Credit Qualifying Bucket - Sector Array (45)
- Credit Qualifying Systemics - Investment Grade (46)
- Credit Qualifying Systemics - High Yield (47)
- SIMM 2.0 Credit Qualifying Settings Shell (48)
- Credit Qualifying Settings Bucket Map (49)
- Credit Qualifying Settings Bucket Containment (50)
- Credit Qualifying Settings Bucket Retrieval (51)
- Credit Qualifying Settings Initialization Shell (52)
- Credit Qualifying Settings Bucket #1 (53)
- Credit Qualifying Settings Bucket #2 (54)
- Credit Qualifying Settings Bucket #3 (55)
- Credit Qualifying Settings Bucket #4 (56)
- Credit Qualifying Settings Bucket #5 (57)
- Credit Qualifying Settings Bucket #6 (58)
- Credit Qualifying Settings Bucket #7 (59)
- Credit Qualifying Settings Bucket #8 (60)


Bug Fixes/Clean-up:

Samples:

- High Volatility Risk Weights Fix (3, 4)
- Single Currency Tenor Correlation #1 (5, 6)
- Single Currency Tenor Correlation #2 (7, 8)
- Single Currency Tenor Correlation #3 (9, 10)
- Single Currency Tenor Correlation #4 (11, 12)
- Single Currency Inflation Risk Weight (13)
- Single Currency Basis Risk Weight (14)
- Single Currency Vega Risk Weight (15)
- Single Currency Cross Curve Correlation (16)
- Single Currency Curve Inflation Correlation (17, 18)
- Single Currency Curve Basis Correlation (19)
- Single Currency Inflation Basis Correlation (20)
- Cross Currency Tenor Indifference Correlation (21)
- Systematic Risk Factor Weights Correlations (22, 23)
220 changes: 217 additions & 3 deletions src/main/java/org/drip/sample/simm20/InterestRateRiskWeights.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@

package org.drip.sample.simm20;

import java.util.List;
import java.util.Map;

import org.drip.quant.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.simm20.parameters.InterestRateSettings;
import org.drip.simm20.risk.InterestRateTenorCorrelation;
import org.drip.simm20.risk.InterestRateWeight;
import org.drip.simm20.risk.InterestRateWeightSpecification;

/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
Expand Down Expand Up @@ -90,15 +92,15 @@ private static final void RegularVolatility()

System.out.println (
"\t|| Currency Set => " +
InterestRateWeightSpecification.RegularVolatilityCurrencySet() + " ||"
InterestRateSettings.RegularVolatilityCurrencySet() + " ||"
);

System.out.println ("\t||-----------------------------------------------------------------------------------||");

System.out.println
("\t||------------------------------------------------------------------------------------------------------------------------------------------------------||");

InterestRateWeight usdRiskWeight = InterestRateWeightSpecification.RiskWeight ("USD");
InterestRateWeight usdRiskWeight = InterestRateSettings.RiskWeight ("USD");

String tenorWeightSequence = "\t|| ";

Expand All @@ -112,6 +114,210 @@ private static final void RegularVolatility()

System.out.println
("\t||------------------------------------------------------------------------------------------------------------------------------------------------------||");

System.out.println();
}

private static final void LowVolatility()
throws Exception
{
System.out.println ("\t||-----------------------------------------------------------------------------------||");

System.out.println ("\t|| LOW VOLATILITY CURRENCY SET and RISK WEIGHTS ||");

System.out.println ("\t||-----------------------------------------------------------------------------------||");

System.out.println (
"\t|| Currency Set => " +
InterestRateSettings.LowVolatilityCurrencySet()
);

System.out.println ("\t||-----------------------------------------------------------------------------------||");

System.out.println
("\t||----------------------------------------------------------------------------------------------------------------------------------------------------||");

InterestRateWeight jpyRiskWeight = InterestRateSettings.RiskWeight ("JPY");

String tenorWeightSequence = "\t|| ";

for (Map.Entry<String, Double> tenorWeightEntry : jpyRiskWeight.tenorWeightMap().entrySet())
{
tenorWeightSequence = tenorWeightSequence + " " + tenorWeightEntry.getKey() + " => " +
FormatUtil.FormatDouble (tenorWeightEntry.getValue(), 1, 0, 1.) + " |";
}

System.out.println (tenorWeightSequence + "|");

System.out.println
("\t||----------------------------------------------------------------------------------------------------------------------------------------------------||");

System.out.println();
}

private static final void HighVolatility()
throws Exception
{
System.out.println ("\t||-----------------------------------------------------------------------------------||");

System.out.println ("\t|| HIGH VOLATILITY CURRENCY SET and RISK WEIGHTS ||");

System.out.println ("\t||-----------------------------------------------------------------------------------||");

System.out.println (
"\t|| Currency Set => " +
InterestRateSettings.HighVolatilityCurrencySet()
);

System.out.println ("\t||-----------------------------------------------------------------------------------||");

System.out.println
("\t||-----------------------------------------------------------------------------------------------------------------------------------------------------------||");

InterestRateWeight inrRiskWeight = InterestRateSettings.RiskWeight ("INR");

String tenorWeightSequence = "\t|| ";

for (Map.Entry<String, Double> tenorWeightEntry : inrRiskWeight.tenorWeightMap().entrySet())
{
tenorWeightSequence = tenorWeightSequence + " " + tenorWeightEntry.getKey() + " => " +
FormatUtil.FormatDouble (tenorWeightEntry.getValue(), 1, 0, 1.) + " |";
}

System.out.println (tenorWeightSequence + "|");

System.out.println
("\t||-----------------------------------------------------------------------------------------------------------------------------------------------------------||");

System.out.println();
}

private static final void SingleCurrencyTenorCorrelation()
throws Exception
{
InterestRateTenorCorrelation singleCurveTenorCorrelation =
InterestRateSettings.SingleCurveTenorCorrelation();

List<String> tenorList = singleCurveTenorCorrelation.tenorList();

System.out.println
("\t||------------------------------------------------------------------------------------------||");

System.out.println
("\t|| INTEREST RATE CROSS TENOR CORRELATION ||");

System.out.println
("\t||------------------------------------------------------------------------------------------||");

String rowDump = "\t|| ";

for (String tenor : tenorList)
{
rowDump = rowDump + " " + tenor + " ";
}

System.out.println (rowDump + "||");

System.out.println
("\t||------------------------------------------------------------------------------------------||");

for (String innerTenor : tenorList)
{
rowDump = "\t|| " + innerTenor + " ";

for (String outerTenor : tenorList)
{
rowDump = rowDump + " " +
FormatUtil.FormatDouble (
singleCurveTenorCorrelation.entry (
innerTenor,
outerTenor
),
3, 0, 100.) + "% ";
}

System.out.println (rowDump + " ||");
}

System.out.println
("\t||------------------------------------------------------------------------------------------||");

System.out.println();
}

private static final void StaticParametersDump()
throws Exception
{
System.out.println ("\t||-------------------------------------------------------------------------------||");

System.out.println ("\t|| SYSTEMATIC FACTOR RISK WEIGHTS AND CORRELATIONS ||");

System.out.println ("\t||-------------------------------------------------------------------------------||");

System.out.println (
"\t|| Single Currency Inflation Risk Weight => " +
FormatUtil.FormatDouble (
InterestRateSettings.SINGLE_CURRENCY_CURVE_INFLATION_RISK_WEIGHT, 2, 2, 1.
) + " ||"
);

System.out.println (
"\t|| Single Currency Basis Swap Spread Risk Weight => " +
FormatUtil.FormatDouble (
InterestRateSettings.SINGLE_CURRENCY_CURVE_BASIS_SWAP_SPREAD_RISK_WEIGHT, 2, 2, 1.
) + " ||"
);

System.out.println (
"\t|| Single Currency Vega Risk Weight => " +
FormatUtil.FormatDouble (
InterestRateSettings.VEGA_RISK_WEIGHT, 2, 2, 1.
) + " ||"
);

System.out.println (
"\t|| Single Currency Cross Curve Correlation => " +
FormatUtil.FormatDouble (
InterestRateSettings.SINGLE_CURRENCY_CROSS_CURVE_CORRELATION, 2, 2, 1.
) + " ||"
);

System.out.println (
"\t|| Single Currency Curve Inflation Correlation => " +
FormatUtil.FormatDouble (
InterestRateSettings.SINGLE_CURRENCY_CURVE_INFLATION_CORRELATION, 2, 2, 1.
) + " ||"
);

System.out.println (
"\t|| Single Currency Curve Volatility Inflation Volatility Correlation => " +
FormatUtil.FormatDouble (
InterestRateSettings.SINGLE_CURRENCY_CURVE_VOLATILITY_INFLATION_VOLATILITY_CORRELATION, 2, 2, 1.
) + " ||"
);

System.out.println (
"\t|| Single Currency Curve Basis Swap Spread Correlation => " +
FormatUtil.FormatDouble (
InterestRateSettings.SINGLE_CURRENCY_CURVE_BASIS_SWAP_SPREAD_CORRELATION, 2, 2, 1.
) + " ||"
);

System.out.println (
"\t|| Single Currency Basis Swap Spread Inflation Correlation => " +
FormatUtil.FormatDouble (
InterestRateSettings.SINGLE_CURRENCY_BASIS_SWAP_SPREAD_INFLATION_CORRELATION, 2, 2, 1.
) + " ||"
);

System.out.println (
"\t|| Cross Currency Correlation => " +
FormatUtil.FormatDouble (
InterestRateSettings.CROSS_CURRENCY_CORRELATION, 2, 2, 1.
) + " ||"
);

System.out.println ("\t||-------------------------------------------------------------------------------||");
}

public final static void main (
Expand All @@ -122,6 +328,14 @@ public final static void main (

RegularVolatility();

LowVolatility();

HighVolatility();

SingleCurrencyTenorCorrelation();

StaticParametersDump();

EnvManager.TerminateEnv();
}
}
2 changes: 1 addition & 1 deletion src/main/java/org/drip/service/env/EnvManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public static final java.sql.Statement InitEnv (
return null;
}

if (!org.drip.simm20.risk.InterestRateWeightSpecification.Init()) {
if (!org.drip.simm20.parameters.InterestRateSettings.Init()) {
System.out.println
("EnvManager::InitEnv => Cannot Initialize SIMM 2.0 Interest Rate Weights Specification!");

Expand Down
Loading

0 comments on commit 4a336f4

Please sign in to comment.