AdiabatMarketParams.java

  1. package org.drip.xva.topology;

  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>AdiabatMarketParams</i> contains the Market Parameters that correspond to a given Adiabat. The
  77.  * References are:
  78.  *
  79.  *  <br><br>
  80.  *  <ul>
  81.  *      <li>
  82.  *          Albanese, C., L. Andersen, and, S. Iabichino (2015): The FVA Puzzle: Accounting, Risk Management,
  83.  *              and Collateral Trading https://papers.ssrn.com/sol3/paper.cfm?abstract_id_2517301
  84.  *              <b>eSSRN</b>
  85.  *      </li>
  86.  *      <li>
  87.  *          Burgard, C., and M. Kjaer (2014): PDE Representations of Derivatives with Bilateral Counter-party
  88.  *              Risk and Funding Costs <i>Journal of Credit Risk</i> <b>7 (3)</b> 1-19
  89.  *      </li>
  90.  *      <li>
  91.  *          Burgard, C., and M. Kjaer (2014): In the Balance <i>Risk</i> <b>24 (11)</b> 72-75
  92.  *      </li>
  93.  *      <li>
  94.  *          Gregory, J. (2009): Being Two-faced over Counter-party Credit Risk <i>Risk</i> <b>20 (2)</b>
  95.  *              86-90
  96.  *      </li>
  97.  *      <li>
  98.  *          Piterbarg, V. (2010): Funding Beyond Discounting: Collateral Agreements and Derivatives Pricing
  99.  *              <i>Risk</i> <b>21 (2)</b> 97-102
  100.  *      </li>
  101.  *  </ul>
  102.  *
  103.  *  <br><br>
  104.  *  <ul>
  105.  *      <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/PortfolioCore.md">Portfolio Core Module</a></li>
  106.  *      <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/XVAAnalyticsLibrary.md">XVA Analytics Library</a></li>
  107.  *      <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/xva/README.md">Valuation Adjustments that account for Collateral, CC Credit/Debt and Funding Overhead</a></li>
  108.  *      <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/xva/topology/README.md">Collateral, Credit/Debt, Funding Topologies</a></li>
  109.  *  </ul>
  110.  * <br><br>
  111.  *
  112.  * @author Lakshmi Krishnamurthy
  113.  */

  114. public class AdiabatMarketParams
  115. {
  116.     private java.util.Map<java.lang.String, org.drip.state.identifier.CSALabel> _csaLabelMap = null;
  117.     private java.util.Map<java.lang.String, org.drip.state.identifier.OvernightLabel> _overnightLabelMap =
  118.         null;
  119.     private java.util.Map<java.lang.String, org.drip.state.identifier.EntityHazardLabel>
  120.         _clientHazardLabelMap = null;
  121.     private java.util.Map<java.lang.String, org.drip.state.identifier.EntityHazardLabel>
  122.         _dealerHazardLabelMap = null;
  123.     private java.util.Map<java.lang.String, org.drip.state.identifier.EntityRecoveryLabel>
  124.         _clientRecoveryLabelMap = null;
  125.     private java.util.Map<java.lang.String, org.drip.state.identifier.EntityRecoveryLabel>
  126.         _dealerSeniorRecoveryLabelMap = null;
  127.     private java.util.Map<java.lang.String, org.drip.state.identifier.EntityFundingLabel>
  128.         _clientFundingLabelMap = null;
  129.     private java.util.Map<java.lang.String, org.drip.state.identifier.EntityRecoveryLabel>
  130.         _dealerSubordinateRecoveryLabelMap = null;
  131.     private java.util.Map<java.lang.String, org.drip.state.identifier.EntityFundingLabel>
  132.         _dealerSeniorFundingLabelMap = null;
  133.     private java.util.Map<java.lang.String, org.drip.state.identifier.EntityFundingLabel>
  134.         _dealerSubordinateFundingLabelMap = null;

  135.     /**
  136.      * AdiabatMarketParams Constructor
  137.      *
  138.      * @param overnightLabelMap Map of Overnight Labels
  139.      * @param csaLabelMap Map of CSA Labels
  140.      * @param dealerHazardLabelMap Map of Dealer Hazard Labels
  141.      * @param clientHazardLabelMap Map of Client Hazard Labels
  142.      * @param dealerSeniorRecoveryLabelMap Map of Dealer Senior Recovery Labels
  143.      * @param clientRecoveryLabelMap Map of Client Recovery Labels
  144.      * @param dealerSubordinateRecoveryLabelMap Map of Dealer Subordinate Recovery Labels
  145.      * @param dealerSeniorFundingLabelMap Map of Dealer Senior Funding Labels
  146.      * @param clientFundingLabelMap Map of Client Funding Labels
  147.      * @param dealerSubordinateFundingLabelMap Map of Dealer Subordinate Funding Labels
  148.      *
  149.      * @throws java.lang.Exception Thrown if the Inputs are Invalid
  150.      */

  151.     public AdiabatMarketParams (
  152.         final java.util.Map<java.lang.String, org.drip.state.identifier.OvernightLabel> overnightLabelMap,
  153.         final java.util.Map<java.lang.String, org.drip.state.identifier.CSALabel> csaLabelMap,
  154.         final java.util.Map<java.lang.String, org.drip.state.identifier.EntityHazardLabel>
  155.             dealerHazardLabelMap,
  156.         final java.util.Map<java.lang.String, org.drip.state.identifier.EntityHazardLabel>
  157.             clientHazardLabelMap,
  158.         final java.util.Map<java.lang.String, org.drip.state.identifier.EntityRecoveryLabel>
  159.             dealerSeniorRecoveryLabelMap,
  160.         final java.util.Map<java.lang.String, org.drip.state.identifier.EntityRecoveryLabel>
  161.             clientRecoveryLabelMap,
  162.         final java.util.Map<java.lang.String, org.drip.state.identifier.EntityRecoveryLabel>
  163.             dealerSubordinateRecoveryLabelMap,
  164.         final java.util.Map<java.lang.String, org.drip.state.identifier.EntityFundingLabel>
  165.             dealerSeniorFundingLabelMap,
  166.         final java.util.Map<java.lang.String, org.drip.state.identifier.EntityFundingLabel>
  167.             clientFundingLabelMap,
  168.         final java.util.Map<java.lang.String, org.drip.state.identifier.EntityFundingLabel>
  169.             dealerSubordinateFundingLabelMap)
  170.         throws java.lang.Exception
  171.     {
  172.         if (null == (_overnightLabelMap = overnightLabelMap) || 0 == _overnightLabelMap.size() ||
  173.             null == (_csaLabelMap = csaLabelMap) || 0 == _csaLabelMap.size() ||
  174.             null == (_dealerHazardLabelMap = dealerHazardLabelMap) || 0 == _dealerHazardLabelMap.size() ||
  175.             null == (_clientHazardLabelMap = clientHazardLabelMap) || 0 == _clientHazardLabelMap.size() ||
  176.             null == (_dealerSeniorRecoveryLabelMap = dealerSeniorRecoveryLabelMap) || 0 ==
  177.                 _dealerSeniorRecoveryLabelMap.size() ||
  178.             null == (_clientRecoveryLabelMap = clientRecoveryLabelMap) || 0 == _clientRecoveryLabelMap.size()
  179.                 ||
  180.             null == (_dealerSeniorFundingLabelMap = dealerSeniorFundingLabelMap) || 0 ==
  181.                 _dealerSeniorFundingLabelMap.size() ||
  182.             null == (_clientFundingLabelMap = clientFundingLabelMap) || 0 == _clientFundingLabelMap.size())
  183.         {
  184.             throw new java.lang.Exception ("AdiabatMarketParams Constructor => Invalid Inputs");
  185.         }

  186.         _dealerSubordinateFundingLabelMap = dealerSubordinateFundingLabelMap;
  187.         _dealerSubordinateRecoveryLabelMap = dealerSubordinateRecoveryLabelMap;
  188.     }

  189.     /**
  190.      * Retrieve the Map of Overnight Labels
  191.      *
  192.      * @return The Map of Overnight Labels
  193.      */

  194.     public java.util.Map<java.lang.String, org.drip.state.identifier.OvernightLabel> overnightLabelMap()
  195.     {
  196.         return _overnightLabelMap;
  197.     }

  198.     /**
  199.      * Retrieve the Map of CSA Labels
  200.      *
  201.      * @return The Map of CSA Labels
  202.      */

  203.     public java.util.Map<java.lang.String, org.drip.state.identifier.CSALabel> csaLabelMap()
  204.     {
  205.         return _csaLabelMap;
  206.     }

  207.     /**
  208.      * Retrieve the Map of Dealer Hazard Labels
  209.      *
  210.      * @return The Map of Dealer Hazard Labels
  211.      */

  212.     public java.util.Map<java.lang.String, org.drip.state.identifier.EntityHazardLabel>
  213.         dealerHazardLabelMap()
  214.     {
  215.         return _dealerHazardLabelMap;
  216.     }

  217.     /**
  218.      * Retrieve the Map of Client Hazard Labels
  219.      *
  220.      * @return The Map of Client Hazard Labels
  221.      */

  222.     public java.util.Map<java.lang.String, org.drip.state.identifier.EntityHazardLabel>
  223.         clientHazardLabelMap()
  224.     {
  225.         return _clientHazardLabelMap;
  226.     }

  227.     /**
  228.      * Retrieve the Map of Dealer Senior Recovery Labels
  229.      *
  230.      * @return The Map of Dealer Senior Recovery Labels
  231.      */

  232.     public java.util.Map<java.lang.String, org.drip.state.identifier.EntityRecoveryLabel>
  233.         dealerSeniorRecoveryLabelMap()
  234.     {
  235.         return _dealerSeniorRecoveryLabelMap;
  236.     }

  237.     /**
  238.      * Retrieve the Map of Client Recovery Labels
  239.      *
  240.      * @return The Map of Client Recovery Labels
  241.      */

  242.     public java.util.Map<java.lang.String, org.drip.state.identifier.EntityRecoveryLabel>
  243.         clientRecoveryLabelMap()
  244.     {
  245.         return _clientRecoveryLabelMap;
  246.     }

  247.     /**
  248.      * Retrieve the Map of Dealer Subordinate Recovery Labels
  249.      *
  250.      * @return The Map of Dealer Subordinate Recovery Labels
  251.      */

  252.     public java.util.Map<java.lang.String, org.drip.state.identifier.EntityRecoveryLabel>
  253.         dealerSubordinateRecoveryLabelMap()
  254.     {
  255.         return _dealerSubordinateRecoveryLabelMap;
  256.     }

  257.     /**
  258.      * Retrieve the Map of Dealer Senior Funding Labels
  259.      *
  260.      * @return The Map of Dealer Senior Funding Labels
  261.      */

  262.     public java.util.Map<java.lang.String, org.drip.state.identifier.EntityFundingLabel>
  263.         dealerSeniorFundingLabelMap()
  264.     {
  265.         return _dealerSeniorFundingLabelMap;
  266.     }

  267.     /**
  268.      * Retrieve the Map of Client Funding Labels
  269.      *
  270.      * @return The Map of Client Funding Labels
  271.      */

  272.     public java.util.Map<java.lang.String, org.drip.state.identifier.EntityFundingLabel>
  273.         clientFundingLabelMap()
  274.     {
  275.         return _clientFundingLabelMap;
  276.     }

  277.     /**
  278.      * Retrieve the Map of Dealer Subordinate Funding Labels
  279.      *
  280.      * @return The Map of Dealer Subordinate Funding Labels
  281.      */

  282.     public java.util.Map<java.lang.String, org.drip.state.identifier.EntityFundingLabel>
  283.         dealerSubordinateFundingLabelMap()
  284.     {
  285.         return _dealerSubordinateFundingLabelMap;
  286.     }
  287. }