BucketVegaSettingsIR.java

  1. package org.drip.simm.parameters;

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

  5. /*!
  6.  * Copyright (C) 2020 Lakshmi Krishnamurthy
  7.  * Copyright (C) 2019 Lakshmi Krishnamurthy
  8.  * Copyright (C) 2018 Lakshmi Krishnamurthy
  9.  *
  10.  *  This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics,
  11.  *      asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment
  12.  *      analytics, and portfolio construction analytics within and across fixed income, credit, commodity,
  13.  *      equity, FX, and structured products. It also includes auxiliary libraries for algorithm support,
  14.  *      numerical analysis, numerical optimization, spline builder, model validation, statistical learning,
  15.  *      and computational support.
  16.  *  
  17.  *      https://lakshmidrip.github.io/DROP/
  18.  *  
  19.  *  DROP is composed of three modules:
  20.  *  
  21.  *  - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/
  22.  *  - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/
  23.  *  - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/
  24.  *
  25.  *  DROP Product Core implements libraries for the following:
  26.  *  - Fixed Income Analytics
  27.  *  - Loan Analytics
  28.  *  - Transaction Cost Analytics
  29.  *
  30.  *  DROP Portfolio Core implements libraries for the following:
  31.  *  - Asset Allocation Analytics
  32.  *  - Asset Liability Management Analytics
  33.  *  - Capital Estimation Analytics
  34.  *  - Exposure Analytics
  35.  *  - Margin Analytics
  36.  *  - XVA Analytics
  37.  *
  38.  *  DROP Computational Core implements libraries for the following:
  39.  *  - Algorithm Support
  40.  *  - Computation Support
  41.  *  - Function Analysis
  42.  *  - Model Validation
  43.  *  - Numerical Analysis
  44.  *  - Numerical Optimizer
  45.  *  - Spline Builder
  46.  *  - Statistical Learning
  47.  *
  48.  *  Documentation for DROP is Spread Over:
  49.  *
  50.  *  - Main                     => https://lakshmidrip.github.io/DROP/
  51.  *  - Wiki                     => https://github.com/lakshmiDRIP/DROP/wiki
  52.  *  - GitHub                   => https://github.com/lakshmiDRIP/DROP
  53.  *  - Repo Layout Taxonomy     => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md
  54.  *  - Javadoc                  => https://lakshmidrip.github.io/DROP/Javadoc/index.html
  55.  *  - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal
  56.  *  - Release Versions         => https://lakshmidrip.github.io/DROP/version.html
  57.  *  - Community Credits        => https://lakshmidrip.github.io/DROP/credits.html
  58.  *  - Issues Catalog           => https://github.com/lakshmiDRIP/DROP/issues
  59.  *  - JUnit                    => https://lakshmidrip.github.io/DROP/junit/index.html
  60.  *  - Jacoco                   => https://lakshmidrip.github.io/DROP/jacoco/index.html
  61.  *
  62.  *  Licensed under the Apache License, Version 2.0 (the "License");
  63.  *      you may not use this file except in compliance with the License.
  64.  *  
  65.  *  You may obtain a copy of the License at
  66.  *      http://www.apache.org/licenses/LICENSE-2.0
  67.  *  
  68.  *  Unless required by applicable law or agreed to in writing, software
  69.  *      distributed under the License is distributed on an "AS IS" BASIS,
  70.  *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  71.  *  
  72.  *  See the License for the specific language governing permissions and
  73.  *      limitations under the License.
  74.  */

  75. /**
  76.  * <i>BucketVegaSettingsIR</i> holds the Vega Risk Weights, Concentration Thresholds, and
  77.  * Cross-Tenor/Cross-Curve Correlations for each Currency Curve and its Tenor. The References are:
  78.  *
  79.  * <br><br>
  80.  *  <ul>
  81.  *      <li>
  82.  *          Andersen, L. B. G., M. Pykhtin, and A. Sokol (2017): Credit Exposure in the Presence of Initial
  83.  *              Margin https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2806156 <b>eSSRN</b>
  84.  *      </li>
  85.  *      <li>
  86.  *          Albanese, C., S. Caenazzo, and O. Frankel (2017): Regression Sensitivities for Initial Margin
  87.  *              Calculations https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2763488 <b>eSSRN</b>
  88.  *      </li>
  89.  *      <li>
  90.  *          Anfuso, F., D. Aziz, P. Giltinan, and K. Loukopoulus (2017): A Sound Modeling and Back-testing
  91.  *              Framework for Forecasting Initial Margin Requirements
  92.  *                  https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2716279 <b>eSSRN</b>
  93.  *      </li>
  94.  *      <li>
  95.  *          Caspers, P., P. Giltinan, R. Lichters, and N. Nowaczyk (2017): Forecasting Initial Margin
  96.  *              Requirements - A Model Evaluation https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2911167
  97.  *                  <b>eSSRN</b>
  98.  *      </li>
  99.  *      <li>
  100.  *          International Swaps and Derivatives Association (2017): SIMM v2.0 Methodology
  101.  *              https://www.isda.org/a/oFiDE/isda-simm-v2.pdf
  102.  *      </li>
  103.  *  </ul>
  104.  *
  105.  * <br><br>
  106.  *  <ul>
  107.  *      <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/PortfolioCore.md">Portfolio Core Module</a></li>
  108.  *      <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/MarginAnalyticsLibrary.md">Initial and Variation Margin Analytics</a></li>
  109.  *      <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>
  110.  *      <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/simm/parameters/README.md">ISDA SIMM Risk Factor Parameters</a></li>
  111.  *  </ul>
  112.  * <br><br>
  113.  *
  114.  * @author Lakshmi Krishnamurthy
  115.  */

  116. public class BucketVegaSettingsIR extends org.drip.simm.parameters.BucketSensitivitySettingsIR
  117. {
  118.     private double _vegaScaler = java.lang.Double.NaN;
  119.     private double _historicalVolatilityRatio = java.lang.Double.NaN;
  120.     private java.util.Map<java.lang.String, java.lang.Double> _oisTenorDeltaRiskWeight = null;
  121.     private java.util.Map<java.lang.String, java.lang.Double> _primeTenorDeltaRiskWeight = null;
  122.     private java.util.Map<java.lang.String, java.lang.Double> _libor1MTenorDeltaRiskWeight = null;
  123.     private java.util.Map<java.lang.String, java.lang.Double> _libor3MTenorDeltaRiskWeight = null;
  124.     private java.util.Map<java.lang.String, java.lang.Double> _libor6MTenorDeltaRiskWeight = null;
  125.     private java.util.Map<java.lang.String, java.lang.Double> _libor12MTenorDeltaRiskWeight = null;
  126.     private java.util.Map<java.lang.String, java.lang.Double> _municipalTenorDeltaRiskWeight = null;

  127.     /**
  128.      * Construct the ISDA 2.0 Standard IR Vega Sensitivity Settings for the Currency
  129.      *
  130.      * @param currency Currency
  131.      *
  132.      * @return The ISDA 2.0 Standard IR Vega Sensitivity Settings for the Currency
  133.      */

  134.     public static BucketVegaSettingsIR ISDA_20 (
  135.         final java.lang.String currency)
  136.     {
  137.         org.drip.simm.rates.IRThreshold irThreshold = org.drip.simm.rates.IRThresholdContainer20.Threshold
  138.             (currency);

  139.         org.drip.simm.rates.IRWeight oisRiskWeight = org.drip.simm.rates.IRSettingsContainer20.RiskWeight (
  140.             currency,
  141.             org.drip.simm.rates.IRSystemics.SUB_CURVE_OIS
  142.         );

  143.         org.drip.simm.rates.IRWeight libor1MRiskWeight =
  144.             org.drip.simm.rates.IRSettingsContainer20.RiskWeight (
  145.                 currency,
  146.                 org.drip.simm.rates.IRSystemics.SUB_CURVE_LIBOR_1M
  147.             );

  148.         org.drip.simm.rates.IRWeight libor3MRiskWeight =
  149.             org.drip.simm.rates.IRSettingsContainer20.RiskWeight (
  150.                 currency,
  151.                 org.drip.simm.rates.IRSystemics.SUB_CURVE_LIBOR_3M
  152.             );

  153.         org.drip.simm.rates.IRWeight libor6MRiskWeight =
  154.             org.drip.simm.rates.IRSettingsContainer20.RiskWeight (
  155.                 currency,
  156.                 org.drip.simm.rates.IRSystemics.SUB_CURVE_LIBOR_6M
  157.             );

  158.         org.drip.simm.rates.IRWeight libor12MRiskWeight =
  159.             org.drip.simm.rates.IRSettingsContainer20.RiskWeight (
  160.                 currency,
  161.                 org.drip.simm.rates.IRSystemics.SUB_CURVE_LIBOR_12M
  162.             );

  163.         org.drip.simm.rates.IRWeight primeRiskWeight =
  164.             org.drip.simm.rates.IRSettingsContainer20.RiskWeight (
  165.                 currency,
  166.                 org.drip.simm.rates.IRSystemics.SUB_CURVE_PRIME
  167.             );

  168.         org.drip.simm.rates.IRWeight municipalRiskWeight =
  169.             org.drip.simm.rates.IRSettingsContainer20.RiskWeight (
  170.                 currency,
  171.                 org.drip.simm.rates.IRSystemics.SUB_CURVE_MUNICIPAL
  172.             );

  173.         BucketSensitivitySettingsIR bucketSensitivitySettingsIR =
  174.             org.drip.simm.parameters.BucketSensitivitySettingsIR.ISDA_DELTA_20 (currency);

  175.         try
  176.         {
  177.             return null == irThreshold ||
  178.                 null == libor1MRiskWeight ||
  179.                 null == libor1MRiskWeight ||
  180.                 null == libor3MRiskWeight ||
  181.                 null == libor6MRiskWeight ||
  182.                 null == libor12MRiskWeight ||
  183.                 null == primeRiskWeight ||
  184.                 null == municipalRiskWeight ||
  185.                 null == bucketSensitivitySettingsIR ? null : new BucketVegaSettingsIR (
  186.                     oisRiskWeight.tenorVega(),
  187.                     libor1MRiskWeight.tenorVega(),
  188.                     libor3MRiskWeight.tenorVega(),
  189.                     libor6MRiskWeight.tenorVega(),
  190.                     libor12MRiskWeight.tenorVega(),
  191.                     primeRiskWeight.tenorVega(),
  192.                     municipalRiskWeight.tenorVega(),
  193.                     org.drip.simm.rates.IRSettingsContainer20.SingleCurveTenorCorrelation(),
  194.                     org.drip.simm.rates.IRSystemics20.SINGLE_CURRENCY_CROSS_CURVE_CORRELATION,
  195.                     irThreshold.deltaVega().vega(),
  196.                     java.lang.Math.sqrt (365. / 14.) /
  197.                         org.drip.measure.gaussian.NormalQuadrature.InverseCDF (0.99),
  198.                     1.,
  199.                     bucketSensitivitySettingsIR.oisTenorRiskWeight(),
  200.                     bucketSensitivitySettingsIR.libor1MTenorRiskWeight(),
  201.                     bucketSensitivitySettingsIR.libor3MTenorRiskWeight(),
  202.                     bucketSensitivitySettingsIR.libor6MTenorRiskWeight(),
  203.                     bucketSensitivitySettingsIR.libor12MTenorRiskWeight(),
  204.                     bucketSensitivitySettingsIR.primeTenorRiskWeight(),
  205.                     bucketSensitivitySettingsIR.municipalTenorRiskWeight()
  206.                 );
  207.         }
  208.         catch (java.lang.Exception e)
  209.         {
  210.             e.printStackTrace();
  211.         }

  212.         return null;
  213.     }

  214.     /**
  215.      * Construct the ISDA 2.1 Standard IR Vega Sensitivity Settings for the Currency
  216.      *
  217.      * @param currency Currency
  218.      *
  219.      * @return The ISDA 2.1 Standard IR Vega Sensitivity Settings for the Currency
  220.      */

  221.     public static BucketVegaSettingsIR ISDA_21 (
  222.         final java.lang.String currency)
  223.     {
  224.         org.drip.simm.rates.IRThreshold irThreshold = org.drip.simm.rates.IRThresholdContainer21.Threshold
  225.             (currency);

  226.         org.drip.simm.rates.IRWeight oisRiskWeight = org.drip.simm.rates.IRSettingsContainer21.RiskWeight (
  227.             currency,
  228.             org.drip.simm.rates.IRSystemics.SUB_CURVE_OIS
  229.         );

  230.         org.drip.simm.rates.IRWeight libor1MRiskWeight =
  231.             org.drip.simm.rates.IRSettingsContainer21.RiskWeight (
  232.                 currency,
  233.                 org.drip.simm.rates.IRSystemics.SUB_CURVE_LIBOR_1M
  234.             );

  235.         org.drip.simm.rates.IRWeight libor3MRiskWeight =
  236.             org.drip.simm.rates.IRSettingsContainer21.RiskWeight (
  237.                 currency,
  238.                 org.drip.simm.rates.IRSystemics.SUB_CURVE_LIBOR_3M
  239.             );

  240.         org.drip.simm.rates.IRWeight libor6MRiskWeight =
  241.             org.drip.simm.rates.IRSettingsContainer21.RiskWeight (
  242.                 currency,
  243.                 org.drip.simm.rates.IRSystemics.SUB_CURVE_LIBOR_6M
  244.             );

  245.         org.drip.simm.rates.IRWeight libor12MRiskWeight =
  246.             org.drip.simm.rates.IRSettingsContainer21.RiskWeight (
  247.                 currency,
  248.                 org.drip.simm.rates.IRSystemics.SUB_CURVE_LIBOR_12M
  249.             );

  250.         org.drip.simm.rates.IRWeight primeRiskWeight =
  251.             org.drip.simm.rates.IRSettingsContainer21.RiskWeight (
  252.                 currency,
  253.                 org.drip.simm.rates.IRSystemics.SUB_CURVE_PRIME
  254.             );

  255.         org.drip.simm.rates.IRWeight municipalRiskWeight =
  256.             org.drip.simm.rates.IRSettingsContainer21.RiskWeight (
  257.                 currency,
  258.                 org.drip.simm.rates.IRSystemics.SUB_CURVE_MUNICIPAL
  259.             );

  260.         BucketSensitivitySettingsIR bucketSensitivitySettingsIR =
  261.             org.drip.simm.parameters.BucketSensitivitySettingsIR.ISDA_DELTA_21 (currency);

  262.         try
  263.         {
  264.             return null == irThreshold ||
  265.                 null == libor1MRiskWeight ||
  266.                 null == libor1MRiskWeight ||
  267.                 null == libor3MRiskWeight ||
  268.                 null == libor6MRiskWeight ||
  269.                 null == libor12MRiskWeight ||
  270.                 null == primeRiskWeight ||
  271.                 null == municipalRiskWeight ||
  272.                 null == bucketSensitivitySettingsIR ? null : new BucketVegaSettingsIR (
  273.                     oisRiskWeight.tenorVega(),
  274.                     libor1MRiskWeight.tenorVega(),
  275.                     libor3MRiskWeight.tenorVega(),
  276.                     libor6MRiskWeight.tenorVega(),
  277.                     libor12MRiskWeight.tenorVega(),
  278.                     primeRiskWeight.tenorVega(),
  279.                     municipalRiskWeight.tenorVega(),
  280.                     org.drip.simm.rates.IRSettingsContainer20.SingleCurveTenorCorrelation(),
  281.                     org.drip.simm.rates.IRSystemics21.SINGLE_CURRENCY_CROSS_CURVE_CORRELATION,
  282.                     irThreshold.deltaVega().vega(),
  283.                     java.lang.Math.sqrt (365. / 14.) /
  284.                         org.drip.measure.gaussian.NormalQuadrature.InverseCDF (0.99),
  285.                     1.,
  286.                     bucketSensitivitySettingsIR.oisTenorRiskWeight(),
  287.                     bucketSensitivitySettingsIR.libor1MTenorRiskWeight(),
  288.                     bucketSensitivitySettingsIR.libor3MTenorRiskWeight(),
  289.                     bucketSensitivitySettingsIR.libor6MTenorRiskWeight(),
  290.                     bucketSensitivitySettingsIR.libor12MTenorRiskWeight(),
  291.                     bucketSensitivitySettingsIR.primeTenorRiskWeight(),
  292.                     bucketSensitivitySettingsIR.municipalTenorRiskWeight()
  293.                 );
  294.         }
  295.         catch (java.lang.Exception e)
  296.         {
  297.             e.printStackTrace();
  298.         }

  299.         return null;
  300.     }

  301.     /**
  302.      * BucketVegaSettingsIR Constructor
  303.      *
  304.      * @param oisTenorVegaRiskWeight The OIS Tenor Vega Risk Weight
  305.      * @param libor1MTenorVegaRiskWeight The LIBOR 1M Tenor Vega Risk Weight
  306.      * @param libor3MTenorVegaRiskWeight The LIBOR 3M Tenor Vega Risk Weight
  307.      * @param libor6MTenorVegaRiskWeight The LIBOR 6M Tenor Vega Risk Weight
  308.      * @param libor12MTenorVegaRiskWeight The LIBOR 12M Tenor Vega Risk Weight
  309.      * @param primeTenorVegaRiskWeight The PRIME Tenor Vega Risk Weight
  310.      * @param municipalTenorVegaRiskWeight The MUNICIPAL Tenor Vega Risk Weight
  311.      * @param crossTenorCorrelation Single Curve Cross-Tenor Correlation
  312.      * @param crossCurveCorrelation Cross Curve Correlation
  313.      * @param concentrationThreshold The Concentration Threshold
  314.      * @param vegaScaler The Vega Scaler
  315.      * @param historicalVolatilityRatio The Historical Volatility Ratio
  316.      * @param oisTenorDeltaRiskWeight The OIS Tenor Delta Risk Weight
  317.      * @param libor1MTenorDeltaRiskWeight The LIBOR 1M Tenor Delta Risk Weight
  318.      * @param libor3MTenorDeltaRiskWeight The LIBOR 3M Tenor Delta Risk Weight
  319.      * @param libor6MTenorDeltaRiskWeight The LIBOR 6M Tenor Delta Risk Weight
  320.      * @param libor12MTenorDeltaRiskWeight The LIBOR 12M Tenor Delta Risk Weight
  321.      * @param primeTenorDeltaRiskWeight The PRIME Tenor Delta Risk Weight
  322.      * @param municipalTenorDeltaRiskWeight The MUNICIPAL Tenor Delta Risk Weight
  323.      *
  324.      * @throws java.lang.Exception Thrown if the Inputs are Invalid
  325.      */

  326.     public BucketVegaSettingsIR (
  327.         final java.util.Map<java.lang.String, java.lang.Double> oisTenorVegaRiskWeight,
  328.         final java.util.Map<java.lang.String, java.lang.Double> libor1MTenorVegaRiskWeight,
  329.         final java.util.Map<java.lang.String, java.lang.Double> libor3MTenorVegaRiskWeight,
  330.         final java.util.Map<java.lang.String, java.lang.Double> libor6MTenorVegaRiskWeight,
  331.         final java.util.Map<java.lang.String, java.lang.Double> libor12MTenorVegaRiskWeight,
  332.         final java.util.Map<java.lang.String, java.lang.Double> primeTenorVegaRiskWeight,
  333.         final java.util.Map<java.lang.String, java.lang.Double> municipalTenorVegaRiskWeight,
  334.         final org.drip.measure.stochastic.LabelCorrelation crossTenorCorrelation,
  335.         final double crossCurveCorrelation,
  336.         final double concentrationThreshold,
  337.         final double vegaScaler,
  338.         final double historicalVolatilityRatio,
  339.         final java.util.Map<java.lang.String, java.lang.Double> oisTenorDeltaRiskWeight,
  340.         final java.util.Map<java.lang.String, java.lang.Double> libor1MTenorDeltaRiskWeight,
  341.         final java.util.Map<java.lang.String, java.lang.Double> libor3MTenorDeltaRiskWeight,
  342.         final java.util.Map<java.lang.String, java.lang.Double> libor6MTenorDeltaRiskWeight,
  343.         final java.util.Map<java.lang.String, java.lang.Double> libor12MTenorDeltaRiskWeight,
  344.         final java.util.Map<java.lang.String, java.lang.Double> primeTenorDeltaRiskWeight,
  345.         final java.util.Map<java.lang.String, java.lang.Double> municipalTenorDeltaRiskWeight)
  346.         throws java.lang.Exception
  347.     {
  348.         super (
  349.             oisTenorVegaRiskWeight,
  350.             libor1MTenorVegaRiskWeight,
  351.             libor3MTenorVegaRiskWeight,
  352.             libor6MTenorVegaRiskWeight,
  353.             libor12MTenorVegaRiskWeight,
  354.             primeTenorVegaRiskWeight,
  355.             municipalTenorVegaRiskWeight,
  356.             crossTenorCorrelation,
  357.             crossCurveCorrelation,
  358.             concentrationThreshold
  359.         );

  360.         if (!org.drip.numerical.common.NumberUtil.IsValid (_vegaScaler = vegaScaler) ||
  361.             !org.drip.numerical.common.NumberUtil.IsValid (_historicalVolatilityRatio =
  362.                 historicalVolatilityRatio) ||
  363.             null == (_oisTenorDeltaRiskWeight = oisTenorDeltaRiskWeight) ||
  364.             null == (_libor1MTenorDeltaRiskWeight = libor1MTenorDeltaRiskWeight) ||
  365.             null == (_libor3MTenorDeltaRiskWeight = libor3MTenorDeltaRiskWeight) ||
  366.             null == (_libor6MTenorDeltaRiskWeight = libor6MTenorDeltaRiskWeight) ||
  367.             null == (_libor12MTenorDeltaRiskWeight = libor12MTenorDeltaRiskWeight) ||
  368.             null == (_primeTenorDeltaRiskWeight = primeTenorDeltaRiskWeight) ||
  369.             null == (_municipalTenorDeltaRiskWeight = municipalTenorDeltaRiskWeight))
  370.         {
  371.             throw new java.lang.Exception ("BucketVegaSettingsIR Constructor => Invalid Inputs");
  372.         }
  373.     }

  374.     /**
  375.      * Retrieve the Vega Scaler
  376.      *
  377.      * @return The Vega Scaler
  378.      */

  379.     public double vegaScaler()
  380.     {
  381.         return _vegaScaler;
  382.     }

  383.     /**
  384.      * Retrieve the Historical Volatility Ratio
  385.      *
  386.      * @return The Historical Volatility Ratio
  387.      */

  388.     public double historicalVolatilityRatio()
  389.     {
  390.         return _historicalVolatilityRatio;
  391.     }

  392.     /**
  393.      * Retrieve the OIS Tenor Delta Risk Weight
  394.      *
  395.      * @return The OIS Tenor Delta Risk Weight
  396.      */

  397.     public java.util.Map<java.lang.String, java.lang.Double> oisTenorDeltaRiskWeight()
  398.     {
  399.         return _oisTenorDeltaRiskWeight;
  400.     }

  401.     /**
  402.      * Retrieve the OIS Tenor Vega Risk Weight
  403.      *
  404.      * @return The OIS Tenor Vega Risk Weight
  405.      */

  406.     public java.util.Map<java.lang.String, java.lang.Double> oisTenorVegaRiskWeight()
  407.     {
  408.         return super.oisTenorRiskWeight();
  409.     }

  410.     /**
  411.      * Retrieve the LIBOR 1M Tenor Delta Risk Weight
  412.      *
  413.      * @return The LIBOR 1M Tenor Delta Risk Weight
  414.      */

  415.     public java.util.Map<java.lang.String, java.lang.Double> libor1MTenorDeltaRiskWeight()
  416.     {
  417.         return _libor1MTenorDeltaRiskWeight;
  418.     }

  419.     /**
  420.      * Retrieve the LIBOR1M Tenor Vega Risk Weight
  421.      *
  422.      * @return The LIBOR1M Tenor Vega Risk Weight
  423.      */

  424.     public java.util.Map<java.lang.String, java.lang.Double> libor1MTenorVegaRiskWeight()
  425.     {
  426.         return super.libor1MTenorRiskWeight();
  427.     }

  428.     /**
  429.      * Retrieve the LIBOR 3M Tenor Delta Risk Weight
  430.      *
  431.      * @return The LIBOR 3M Tenor Delta Risk Weight
  432.      */

  433.     public java.util.Map<java.lang.String, java.lang.Double> libor3MTenorDeltaRiskWeight()
  434.     {
  435.         return _libor3MTenorDeltaRiskWeight;
  436.     }

  437.     /**
  438.      * Retrieve the LIBOR3M Tenor Vega Risk Weight
  439.      *
  440.      * @return The LIBOR3M Tenor Vega Risk Weight
  441.      */

  442.     public java.util.Map<java.lang.String, java.lang.Double> libor3MTenorVegaRiskWeight()
  443.     {
  444.         return super.libor3MTenorRiskWeight();
  445.     }

  446.     /**
  447.      * Retrieve the LIBOR 6M Tenor Delta Risk Weight
  448.      *
  449.      * @return The LIBOR 6M Tenor Delta Risk Weight
  450.      */

  451.     public java.util.Map<java.lang.String, java.lang.Double> libor6MTenorDeltaRiskWeight()
  452.     {
  453.         return _libor6MTenorDeltaRiskWeight;
  454.     }

  455.     /**
  456.      * Retrieve the LIBOR6M Tenor Vega Risk Weight
  457.      *
  458.      * @return The LIBOR6M Tenor Vega Risk Weight
  459.      */

  460.     public java.util.Map<java.lang.String, java.lang.Double> libor6MTenorVegaRiskWeight()
  461.     {
  462.         return super.libor6MTenorRiskWeight();
  463.     }

  464.     /**
  465.      * Retrieve the LIBOR 12M Tenor Delta Risk Weight
  466.      *
  467.      * @return The LIBOR 12M Tenor Delta Risk Weight
  468.      */

  469.     public java.util.Map<java.lang.String, java.lang.Double> libor12MTenorDeltaRiskWeight()
  470.     {
  471.         return _libor12MTenorDeltaRiskWeight;
  472.     }

  473.     /**
  474.      * Retrieve the LIBOR 12M Tenor Vega Risk Weight
  475.      *
  476.      * @return The LIBOR 12M Tenor Vega Risk Weight
  477.      */

  478.     public java.util.Map<java.lang.String, java.lang.Double> libor12MTenorVegaRiskWeight()
  479.     {
  480.         return super.libor12MTenorRiskWeight();
  481.     }

  482.     /**
  483.      * Retrieve the PRIME Tenor Delta Risk Weight
  484.      *
  485.      * @return The PRIME Tenor Delta Risk Weight
  486.      */

  487.     public java.util.Map<java.lang.String, java.lang.Double> primeTenorDeltaRiskWeight()
  488.     {
  489.         return _primeTenorDeltaRiskWeight;
  490.     }

  491.     /**
  492.      * Retrieve the PRIME Tenor Vega Risk Weight
  493.      *
  494.      * @return The PRIME Tenor Vega Risk Weight
  495.      */

  496.     public java.util.Map<java.lang.String, java.lang.Double> primeTenorVegaRiskWeight()
  497.     {
  498.         return super.primeTenorRiskWeight();
  499.     }

  500.     /**
  501.      * Retrieve the MUNICIPAL Tenor Delta Risk Weight
  502.      *
  503.      * @return The MUNICIPAL Tenor Delta Risk Weight
  504.      */

  505.     public java.util.Map<java.lang.String, java.lang.Double> municipalTenorDeltaRiskWeight()
  506.     {
  507.         return _municipalTenorDeltaRiskWeight;
  508.     }

  509.     /**
  510.      * Retrieve the MUNICIPAL Tenor Vega Risk Weight
  511.      *
  512.      * @return The MUNICIPAL Tenor Vega Risk Weight
  513.      */

  514.     public java.util.Map<java.lang.String, java.lang.Double> municipalTenorVegaRiskWeight()
  515.     {
  516.         return super.municipalTenorRiskWeight();
  517.     }

  518.     @Override public java.util.Map<java.lang.String, java.lang.Double> oisTenorRiskWeight()
  519.     {
  520.         java.util.Map<java.lang.String, java.lang.Double> oisTenorVegaRiskWeight = oisTenorVegaRiskWeight();

  521.         java.util.Map<java.lang.String, java.lang.Double> oisTenorRiskWeight = new
  522.             java.util.HashMap<java.lang.String, java.lang.Double>();

  523.         for (java.util.Map.Entry<java.lang.String, java.lang.Double> oisTenorVegaRiskWeightEntry :
  524.             oisTenorVegaRiskWeight.entrySet())
  525.         {
  526.             java.lang.String tenor = oisTenorVegaRiskWeightEntry.getKey();

  527.             if (!_oisTenorDeltaRiskWeight.containsKey (tenor))
  528.             {
  529.                 return null;
  530.             }

  531.             oisTenorRiskWeight.put (
  532.                 tenor,
  533.                 oisTenorVegaRiskWeightEntry.getValue() * _oisTenorDeltaRiskWeight.get (tenor) * _vegaScaler *
  534.                     _historicalVolatilityRatio
  535.             );
  536.         }

  537.         return oisTenorRiskWeight;
  538.     }

  539.     @Override public java.util.Map<java.lang.String, java.lang.Double> libor1MTenorRiskWeight()
  540.     {
  541.         java.util.Map<java.lang.String, java.lang.Double> libor1MTenorVegaRiskWeight =
  542.             libor1MTenorVegaRiskWeight();

  543.         java.util.Map<java.lang.String, java.lang.Double> libor1MTenorRiskWeight = new
  544.             java.util.HashMap<java.lang.String, java.lang.Double>();

  545.         for (java.util.Map.Entry<java.lang.String, java.lang.Double> libor1MTenorVegaRiskWeightEntry :
  546.             libor1MTenorVegaRiskWeight.entrySet())
  547.         {
  548.             java.lang.String tenor = libor1MTenorVegaRiskWeightEntry.getKey();

  549.             if (!_libor1MTenorDeltaRiskWeight.containsKey (tenor))
  550.             {
  551.                 return null;
  552.             }

  553.             libor1MTenorRiskWeight.put (
  554.                 tenor,
  555.                 libor1MTenorVegaRiskWeightEntry.getValue() * _libor1MTenorDeltaRiskWeight.get (tenor) *
  556.                     _vegaScaler * _historicalVolatilityRatio
  557.             );
  558.         }

  559.         return libor1MTenorRiskWeight;
  560.     }

  561.     @Override public java.util.Map<java.lang.String, java.lang.Double> libor3MTenorRiskWeight()
  562.     {
  563.         java.util.Map<java.lang.String, java.lang.Double> libor3MTenorVegaRiskWeight =
  564.             libor3MTenorVegaRiskWeight();

  565.         java.util.Map<java.lang.String, java.lang.Double> libor3MTenorRiskWeight = new
  566.             java.util.HashMap<java.lang.String, java.lang.Double>();

  567.         for (java.util.Map.Entry<java.lang.String, java.lang.Double> libor3MTenorVegaRiskWeightEntry :
  568.             libor3MTenorVegaRiskWeight.entrySet())
  569.         {
  570.             java.lang.String tenor = libor3MTenorVegaRiskWeightEntry.getKey();

  571.             if (!_libor3MTenorDeltaRiskWeight.containsKey (tenor))
  572.             {
  573.                 return null;
  574.             }

  575.             libor3MTenorRiskWeight.put (
  576.                 tenor,
  577.                 libor3MTenorVegaRiskWeightEntry.getValue() * _libor3MTenorDeltaRiskWeight.get (tenor) *
  578.                     _vegaScaler * _historicalVolatilityRatio
  579.             );
  580.         }

  581.         return libor3MTenorRiskWeight;
  582.     }

  583.     @Override public java.util.Map<java.lang.String, java.lang.Double> libor6MTenorRiskWeight()
  584.     {
  585.         java.util.Map<java.lang.String, java.lang.Double> libor6MTenorVegaRiskWeight =
  586.             libor6MTenorVegaRiskWeight();

  587.         java.util.Map<java.lang.String, java.lang.Double> libor6MTenorRiskWeight = new
  588.             java.util.HashMap<java.lang.String, java.lang.Double>();

  589.         for (java.util.Map.Entry<java.lang.String, java.lang.Double> libor6MTenorVegaRiskWeightEntry :
  590.             libor6MTenorVegaRiskWeight.entrySet())
  591.         {
  592.             java.lang.String tenor = libor6MTenorVegaRiskWeightEntry.getKey();

  593.             if (!_libor6MTenorDeltaRiskWeight.containsKey (tenor))
  594.             {
  595.                 return null;
  596.             }

  597.             libor6MTenorRiskWeight.put (
  598.                 tenor,
  599.                 libor6MTenorVegaRiskWeightEntry.getValue() * _libor6MTenorDeltaRiskWeight.get (tenor) *
  600.                     _vegaScaler *_historicalVolatilityRatio
  601.             );
  602.         }

  603.         return libor6MTenorRiskWeight;
  604.     }

  605.     @Override public java.util.Map<java.lang.String, java.lang.Double> libor12MTenorRiskWeight()
  606.     {
  607.         java.util.Map<java.lang.String, java.lang.Double> libor12MTenorVegaRiskWeight =
  608.             libor12MTenorVegaRiskWeight();

  609.         java.util.Map<java.lang.String, java.lang.Double> libor12MTenorRiskWeight = new
  610.             java.util.HashMap<java.lang.String, java.lang.Double>();

  611.         for (java.util.Map.Entry<java.lang.String, java.lang.Double> libor12MTenorVegaRiskWeightEntry :
  612.             libor12MTenorVegaRiskWeight.entrySet())
  613.         {
  614.             java.lang.String tenor = libor12MTenorVegaRiskWeightEntry.getKey();

  615.             if (!_libor12MTenorDeltaRiskWeight.containsKey (tenor))
  616.             {
  617.                 return null;
  618.             }

  619.             libor12MTenorRiskWeight.put (
  620.                 tenor,
  621.                 libor12MTenorVegaRiskWeightEntry.getValue() * _libor12MTenorDeltaRiskWeight.get (tenor) *
  622.                     _vegaScaler *_historicalVolatilityRatio
  623.             );
  624.         }

  625.         return libor12MTenorRiskWeight;
  626.     }

  627.     @Override public java.util.Map<java.lang.String, java.lang.Double> primeTenorRiskWeight()
  628.     {
  629.         java.util.Map<java.lang.String, java.lang.Double> primeTenorVegaRiskWeight =
  630.             primeTenorVegaRiskWeight();

  631.         java.util.Map<java.lang.String, java.lang.Double> primeTenorRiskWeight = new
  632.             java.util.HashMap<java.lang.String, java.lang.Double>();

  633.         for (java.util.Map.Entry<java.lang.String, java.lang.Double> primeTenorVegaRiskWeightEntry :
  634.             primeTenorVegaRiskWeight.entrySet())
  635.         {
  636.             java.lang.String tenor = primeTenorVegaRiskWeightEntry.getKey();

  637.             if (!_primeTenorDeltaRiskWeight.containsKey (tenor))
  638.             {
  639.                 return null;
  640.             }

  641.             primeTenorRiskWeight.put (
  642.                 tenor,
  643.                 primeTenorVegaRiskWeightEntry.getValue() * _primeTenorDeltaRiskWeight.get (tenor) *
  644.                     _vegaScaler *_historicalVolatilityRatio
  645.             );
  646.         }

  647.         return primeTenorRiskWeight;
  648.     }

  649.     @Override public java.util.Map<java.lang.String, java.lang.Double> municipalTenorRiskWeight()
  650.     {
  651.         java.util.Map<java.lang.String, java.lang.Double> municipalTenorVegaRiskWeight =
  652.             super.municipalTenorRiskWeight();

  653.         java.util.Map<java.lang.String, java.lang.Double> municipalTenorRiskWeight = new
  654.             java.util.HashMap<java.lang.String, java.lang.Double>();

  655.         for (java.util.Map.Entry<java.lang.String, java.lang.Double> municipalTenorVegaRiskWeightEntry :
  656.             municipalTenorVegaRiskWeight.entrySet())
  657.         {
  658.             java.lang.String tenor = municipalTenorVegaRiskWeightEntry.getKey();

  659.             if (!_municipalTenorDeltaRiskWeight.containsKey (tenor))
  660.             {
  661.                 return null;
  662.             }

  663.             municipalTenorRiskWeight.put (
  664.                 tenor,
  665.                 municipalTenorVegaRiskWeightEntry.getValue() * _municipalTenorDeltaRiskWeight.get (tenor) *
  666.                     _vegaScaler *_historicalVolatilityRatio
  667.             );
  668.         }

  669.         return municipalTenorRiskWeight;
  670.     }
  671. }