EntityFundingLabel.java

  1. package org.drip.state.identifier;

  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>EntityFundingLabel</i> contains the Identifier Parameters referencing the Latent State of the Entity
  77.  * Funding Curve.
  78.  *
  79.  *  <br><br>
  80.  *  <ul>
  81.  *      <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></li>
  82.  *      <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></li>
  83.  *      <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/state/README.md">Latent State Inference and Creation Utilities</a></li>
  84.  *      <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/state/identifier/README.md">Latent State Identifier Labels</a></li>
  85.  *  </ul>
  86.  * <br><br>
  87.  *  
  88.  * @author Lakshmi Krishnamurthy
  89.  */

  90. public class EntityFundingLabel extends org.drip.state.identifier.EntityCreditLabel
  91. {

  92.     /**
  93.      * Make a Standard SENIOR Entity Funding Label from the Reference Entity
  94.      *
  95.      * @param referenceEntity The Reference Entity
  96.      * @param currency The Currency
  97.      *
  98.      * @return The SENIOR Funding Label
  99.      */

  100.     public static final EntityFundingLabel Senior (
  101.         final java.lang.String referenceEntity,
  102.         final java.lang.String currency)
  103.     {
  104.         try
  105.         {
  106.             return new EntityFundingLabel (
  107.                 referenceEntity,
  108.                 currency,
  109.                 org.drip.state.identifier.EntityCreditLabel.SENIORITY_SENIOR
  110.             );
  111.         }
  112.         catch (java.lang.Exception e)
  113.         {
  114.             e.printStackTrace();
  115.         }

  116.         return null;
  117.     }

  118.     /**
  119.      * Make a Standard SUBORDINATE Entity Funding Label from the Reference Entity
  120.      *
  121.      * @param referenceEntity The Reference Entity
  122.      * @param currency The Currency
  123.      *
  124.      * @return The SUBORDINATE Funding Label
  125.      */

  126.     public static final EntityFundingLabel Subordinate (
  127.         final java.lang.String referenceEntity,
  128.         final java.lang.String currency)
  129.     {
  130.         try
  131.         {
  132.             return new EntityFundingLabel (
  133.                 referenceEntity,
  134.                 currency,
  135.                 org.drip.state.identifier.EntityCreditLabel.SENIORITY_SUBORDINATE
  136.             );
  137.         }
  138.         catch (java.lang.Exception e)
  139.         {
  140.             e.printStackTrace();
  141.         }

  142.         return null;
  143.     }

  144.     /**
  145.      * EntityFundingLabel constructor
  146.      *
  147.      * @param referenceEntity The Reference Entity
  148.      * @param currency The Currency
  149.      * @param seniority The Obligation Seniority
  150.      *
  151.      * @throws java.lang.Exception Thrown if the inputs are invalid
  152.      */

  153.     public EntityFundingLabel (
  154.         final java.lang.String referenceEntity,
  155.         final java.lang.String currency,
  156.         final java.lang.String seniority)
  157.         throws java.lang.Exception
  158.     {
  159.         super (
  160.             referenceEntity,
  161.             currency,
  162.             seniority
  163.         );
  164.     }

  165.     @Override public boolean match (
  166.         final org.drip.state.identifier.LatentStateLabel lslOther)
  167.     {
  168.         return null == lslOther || !(lslOther instanceof org.drip.state.identifier.EntityFundingLabel) ?
  169.             false : super.match (lslOther);
  170.     }
  171. }