IBORFixedFloatContainer.java

  1. package org.drip.market.otc;

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

  78. /**
  79.  * <i>IBORFixedFloatContainer</i> holds the settings of the standard OTC IBOR fix-float swap contract
  80.  * conventions.
  81.  *
  82.  *  <br><br>
  83.  *  <ul>
  84.  *      <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></li>
  85.  *      <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics Library</a></li>
  86.  *      <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/market">Static Market Fields - the Definitions, the OTC/Exchange Traded Products, and Treasury Settings</a></li>
  87.  *      <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/market/otc">OTC Dual Stream Option Container</a></li>
  88.  *  </ul>
  89.  *
  90.  * @author Lakshmi Krishnamurthy
  91.  */

  92. public class IBORFixedFloatContainer {
  93.     private static java.util.Map<java.lang.String, org.drip.market.otc.FixedFloatSwapConvention>
  94.         _mapConvention = null;

  95.     private static final java.lang.String TenorSubKey (
  96.         final java.lang.String strCurrency,
  97.         final java.lang.String strMaturityTenor)
  98.     {
  99.         if (null == strCurrency) return null;

  100.         try {
  101.             if ("AUD".equalsIgnoreCase (strCurrency))
  102.                 return 36 >= org.drip.analytics.support.Helper.TenorToMonths (strMaturityTenor) ? "36M" :
  103.                     "MAX";

  104.             if ("CAD".equalsIgnoreCase (strCurrency) || "CHF".equalsIgnoreCase (strCurrency) ||
  105.                 "EUR".equalsIgnoreCase (strCurrency) || "GBP".equalsIgnoreCase (strCurrency) ||
  106.                     "INR".equalsIgnoreCase (strCurrency))
  107.                 return 12 >= org.drip.analytics.support.Helper.TenorToMonths (strMaturityTenor) ? "12M" :
  108.                     "MAX";
  109.         } catch (java.lang.Exception e) {
  110.             e.printStackTrace();

  111.             return null;
  112.         }

  113.         return "MAX";
  114.     }

  115.     /**
  116.      * Initialize the Fix-Float Conventions Container with the pre-set Fix-Float Contracts
  117.      *
  118.      * @return TRUE - The Fix-Float Conventions Container successfully initialized with the pre-set
  119.      *  Fix-Float Contracts
  120.      */

  121.     public static final boolean Init()
  122.     {
  123.         if (null != _mapConvention) return true;

  124.         _mapConvention = new java.util.TreeMap<java.lang.String,
  125.             org.drip.market.otc.FixedFloatSwapConvention>();

  126.         try {
  127.             _mapConvention.put ("AUD|ALL|36M|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  128.                 org.drip.market.otc.FixedStreamConvention ("AUD", "Act/365", "AUD", "3M", "3M",
  129.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  130.                         new org.drip.market.otc.FloatStreamConvention (
  131.                             org.drip.state.identifier.ForwardLabel.Create (
  132.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("AUD"),
  133.                                     "3M"), "3M"), 1));

  134.             _mapConvention.put ("AUD|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  135.                 org.drip.market.otc.FixedStreamConvention ("AUD", "Act/365", "AUD", "6M", "6M",
  136.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  137.                         new org.drip.market.otc.FloatStreamConvention (
  138.                             org.drip.state.identifier.ForwardLabel.Create (
  139.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("AUD"),
  140.                                     "6M"), "6M"), 1));

  141.             _mapConvention.put ("BRL|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  142.                 org.drip.market.otc.FixedStreamConvention ("BRL", "Bus/252", "BRL", "1W", "1W",
  143.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  144.                         new org.drip.market.otc.FloatStreamConvention (
  145.                             org.drip.state.identifier.ForwardLabel.Create (
  146.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("BRL"),
  147.                                     "1D"), "1D"), 0));

  148.             _mapConvention.put ("CAD|ALL|12M|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  149.                 org.drip.market.otc.FixedStreamConvention ("CAD", "Act/365", "CAD", "1Y", "1Y",
  150.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  151.                         new org.drip.market.otc.FloatStreamConvention (
  152.                             org.drip.state.identifier.ForwardLabel.Create (
  153.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("CAD"),
  154.                                     "3M"), "1Y"), 0));

  155.             _mapConvention.put ("CAD|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  156.                 org.drip.market.otc.FixedStreamConvention ("CAD", "Act/365", "CAD", "6M", "6M",
  157.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  158.                         new org.drip.market.otc.FloatStreamConvention (
  159.                             org.drip.state.identifier.ForwardLabel.Create (
  160.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("CAD"),
  161.                                     "3M"), "6M"), 0));

  162.             _mapConvention.put ("CHF|ALL|12M|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  163.                 org.drip.market.otc.FixedStreamConvention ("CHF", "30/360", "CHF", "1Y", "1Y",
  164.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  165.                         new org.drip.market.otc.FloatStreamConvention (
  166.                             org.drip.state.identifier.ForwardLabel.Create (
  167.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("CHF"),
  168.                                     "3M"), "3M"), 2));

  169.             _mapConvention.put ("CHF|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  170.                 org.drip.market.otc.FixedStreamConvention ("CHF", "30/360", "CHF", "1Y", "1Y",
  171.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  172.                         new org.drip.market.otc.FloatStreamConvention (
  173.                             org.drip.state.identifier.ForwardLabel.Create (
  174.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("CHF"),
  175.                                     "6M"), "6M"), 2));

  176.             _mapConvention.put ("CNY|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  177.                 org.drip.market.otc.FixedStreamConvention ("CNY", "Act/365", "CNY", "3M", "3M",
  178.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  179.                         new org.drip.market.otc.FloatStreamConvention (
  180.                             org.drip.state.identifier.ForwardLabel.Create (
  181.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("CNY"),
  182.                                     "1W"), "3M"), 2));

  183.             _mapConvention.put ("CZK|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  184.                 org.drip.market.otc.FixedStreamConvention ("CZK", "30/360", "CZK", "1Y", "1Y",
  185.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  186.                         new org.drip.market.otc.FloatStreamConvention (
  187.                             org.drip.state.identifier.ForwardLabel.Create (
  188.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("CZK"),
  189.                                     "6M"), "6M"), 2));

  190.             _mapConvention.put ("DKK|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  191.                 org.drip.market.otc.FixedStreamConvention ("DKK", "30/360", "DKK", "1Y", "1Y",
  192.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  193.                         new org.drip.market.otc.FloatStreamConvention (
  194.                             org.drip.state.identifier.ForwardLabel.Create (
  195.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("DKK"),
  196.                                     "6M"), "6M"), 2));

  197.             _mapConvention.put ("EUR|ALL|12M|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  198.                 org.drip.market.otc.FixedStreamConvention ("EUR", "30/360", "EUR", "1Y", "1Y",
  199.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  200.                         new org.drip.market.otc.FloatStreamConvention (
  201.                             org.drip.state.identifier.ForwardLabel.Create (
  202.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("EUR"),
  203.                                     "3M"), "3M"), 2));

  204.             _mapConvention.put ("EUR|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  205.                 org.drip.market.otc.FixedStreamConvention ("EUR", "30/360", "EUR", "1Y", "1Y",
  206.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  207.                         new org.drip.market.otc.FloatStreamConvention (
  208.                             org.drip.state.identifier.ForwardLabel.Create (
  209.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("EUR"),
  210.                                     "6M"), "6M"), 2));

  211.             _mapConvention.put ("GBP|ALL|12M|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  212.                 org.drip.market.otc.FixedStreamConvention ("GBP", "Act/365", "GBP", "1Y", "1Y",
  213.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  214.                         new org.drip.market.otc.FloatStreamConvention (
  215.                             org.drip.state.identifier.ForwardLabel.Create (
  216.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("GBP"),
  217.                                     "3M"), "3M"), 0));

  218.             _mapConvention.put ("GBP|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  219.                 org.drip.market.otc.FixedStreamConvention ("GBP", "Act/365", "GBP", "6M", "6M",
  220.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  221.                         new org.drip.market.otc.FloatStreamConvention (
  222.                             org.drip.state.identifier.ForwardLabel.Create (
  223.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("GBP"),
  224.                                     "6M"), "6M"), 0));

  225.             _mapConvention.put ("HKD|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  226.                 org.drip.market.otc.FixedStreamConvention ("HKD", "Act/365", "HKD", "3M", "3M",
  227.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  228.                         new org.drip.market.otc.FloatStreamConvention (
  229.                             org.drip.state.identifier.ForwardLabel.Create (
  230.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("HKD"),
  231.                                     "3M"), "3M"), 0));

  232.             _mapConvention.put ("HUF|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  233.                 org.drip.market.otc.FixedStreamConvention ("HUF", "30/360", "HUF", "1Y", "1Y",
  234.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  235.                         new org.drip.market.otc.FloatStreamConvention (
  236.                             org.drip.state.identifier.ForwardLabel.Create (
  237.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("HUF"),
  238.                                     "6M"), "6M"), 2));

  239.             _mapConvention.put ("ILS|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  240.                 org.drip.market.otc.FixedStreamConvention ("ILS", "30/360", "ILS", "1Y", "1Y",
  241.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  242.                         new org.drip.market.otc.FloatStreamConvention (
  243.                             org.drip.state.identifier.ForwardLabel.Create (
  244.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("ILS"),
  245.                                     "6M"), "6M"), 2));

  246.             _mapConvention.put ("INR|ALL|12M|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  247.                 org.drip.market.otc.FixedStreamConvention ("INR", "Act/365", "INR", "1Y", "1Y",
  248.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  249.                         new org.drip.market.otc.FloatStreamConvention (
  250.                             org.drip.state.identifier.ForwardLabel.Create (
  251.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("INR"),
  252.                                     "3M"), "3M"), 2));

  253.             _mapConvention.put ("INR|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  254.                 org.drip.market.otc.FixedStreamConvention ("INR", "Act/365", "INR", "6M", "6M",
  255.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  256.                         new org.drip.market.otc.FloatStreamConvention (
  257.                             org.drip.state.identifier.ForwardLabel.Create (
  258.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("INR"),
  259.                                     "6M"), "6M"), 2));

  260.             _mapConvention.put ("JPY|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  261.                 org.drip.market.otc.FixedStreamConvention ("JPY", "Act/365", "JPY", "6M", "6M",
  262.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  263.                         new org.drip.market.otc.FloatStreamConvention (
  264.                             org.drip.state.identifier.ForwardLabel.Create (
  265.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("JPY"),
  266.                                     "6M"), "6M"), 2));

  267.             _mapConvention.put ("JPY|ALL|MAX|TIBOR", new org.drip.market.otc.FixedFloatSwapConvention (new
  268.                 org.drip.market.otc.FixedStreamConvention ("JPY", "Act/365", "JPY", "6M", "6M",
  269.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  270.                         new org.drip.market.otc.FloatStreamConvention (
  271.                             org.drip.state.identifier.ForwardLabel.Create (
  272.                                 org.drip.market.definition.IBORIndexContainer.IndexFromName ("JPY-TIBOR"),
  273.                                     "3M"), "3M"), 2));

  274.             _mapConvention.put ("KRW|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  275.                 org.drip.market.otc.FixedStreamConvention ("KRW", "Act/365", "KRW", "3M", "3M",
  276.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  277.                         new org.drip.market.otc.FloatStreamConvention (
  278.                             org.drip.state.identifier.ForwardLabel.Create (
  279.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("KRW"),
  280.                                     "3M"), "3M"), 1));

  281.             _mapConvention.put ("MXN|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  282.                 org.drip.market.otc.FixedStreamConvention ("MXN", "28/360", "MXN", "3M", "3M",
  283.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  284.                         new org.drip.market.otc.FloatStreamConvention (
  285.                             org.drip.state.identifier.ForwardLabel.Create (
  286.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("MXN"),
  287.                                     "3M"), "3M"), 2));

  288.             _mapConvention.put ("MYR|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  289.                 org.drip.market.otc.FixedStreamConvention ("MYR", "Act/365", "MYR", "3M", "3M",
  290.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  291.                         new org.drip.market.otc.FloatStreamConvention (
  292.                             org.drip.state.identifier.ForwardLabel.Create (
  293.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("MYR"),
  294.                                     "3M"), "3M"), 0));

  295.             _mapConvention.put ("NOK|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  296.                 org.drip.market.otc.FixedStreamConvention ("NOK", "30/360", "NOK", "1Y", "1Y",
  297.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  298.                         new org.drip.market.otc.FloatStreamConvention (
  299.                             org.drip.state.identifier.ForwardLabel.Create (
  300.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("NOK"),
  301.                                     "6M"), "6M"), 2));

  302.             _mapConvention.put ("NZD|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  303.                 org.drip.market.otc.FixedStreamConvention ("NZD", "Act/365", "NZD", "6M", "6M",
  304.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  305.                         new org.drip.market.otc.FloatStreamConvention (
  306.                             org.drip.state.identifier.ForwardLabel.Create (
  307.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("NZD"),
  308.                                     "3M"), "3M"), 0));

  309.             _mapConvention.put ("PLN|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  310.                 org.drip.market.otc.FixedStreamConvention ("PLN", "Act/Act ISDA", "PLN", "1Y", "1Y",
  311.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  312.                         new org.drip.market.otc.FloatStreamConvention (
  313.                             org.drip.state.identifier.ForwardLabel.Create (
  314.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("PLN"),
  315.                                     "6M"), "6M"), 2));

  316.             _mapConvention.put ("SEK|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  317.                 org.drip.market.otc.FixedStreamConvention ("SEK", "30/360", "SEK", "1Y", "1Y",
  318.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  319.                         new org.drip.market.otc.FloatStreamConvention (
  320.                             org.drip.state.identifier.ForwardLabel.Create (
  321.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("SEK"),
  322.                                     "6M"), "6M"), 2));

  323.             _mapConvention.put ("SGD|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  324.                 org.drip.market.otc.FixedStreamConvention ("SGD", "Act/365", "SGD", "6M", "6M",
  325.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  326.                         new org.drip.market.otc.FloatStreamConvention (
  327.                             org.drip.state.identifier.ForwardLabel.Create (
  328.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("SGD"),
  329.                                     "6M"), "6M"), 2));

  330.             _mapConvention.put ("THB|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  331.                 org.drip.market.otc.FixedStreamConvention ("THB", "Act/365", "THB", "6M", "6M",
  332.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  333.                         new org.drip.market.otc.FloatStreamConvention (
  334.                             org.drip.state.identifier.ForwardLabel.Create (
  335.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("THB"),
  336.                                     "6M"), "6M"), 2));

  337.             _mapConvention.put ("TRY|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  338.                 org.drip.market.otc.FixedStreamConvention ("TRY", "30/360", "TRY", "1Y", "1Y",
  339.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  340.                         new org.drip.market.otc.FloatStreamConvention (
  341.                             org.drip.state.identifier.ForwardLabel.Create (
  342.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("TRY"),
  343.                                     "6M"), "6M"), 2));

  344.             _mapConvention.put ("TWD|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  345.                 org.drip.market.otc.FixedStreamConvention ("TWD", "Act/365", "TWD", "3M", "3M",
  346.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  347.                         new org.drip.market.otc.FloatStreamConvention (
  348.                             org.drip.state.identifier.ForwardLabel.Create (
  349.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("TWD"),
  350.                                     "3M"), "3M"), 2));

  351.             _mapConvention.put ("USD|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  352.                 org.drip.market.otc.FixedStreamConvention ("USD", "30/360", "USD", "6M", "6M",
  353.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  354.                         new org.drip.market.otc.FloatStreamConvention (
  355.                             org.drip.state.identifier.ForwardLabel.Create (
  356.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("USD"),
  357.                                     "3M"), "3M"), 2));

  358.             _mapConvention.put ("USD|LON|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  359.                 org.drip.market.otc.FixedStreamConvention ("USD", "Act/360", "USD", "1Y", "1Y",
  360.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  361.                         new org.drip.market.otc.FloatStreamConvention (
  362.                             org.drip.state.identifier.ForwardLabel.Create (
  363.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("USD"),
  364.                                     "3M"), "3M"), 2));

  365.             _mapConvention.put ("USD|NYC|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  366.                 org.drip.market.otc.FixedStreamConvention ("USD", "30/360", "USD", "6M", "6M",
  367.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  368.                         new org.drip.market.otc.FloatStreamConvention (
  369.                             org.drip.state.identifier.ForwardLabel.Create (
  370.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("USD"),
  371.                                     "3M"), "3M"), 2));

  372.             _mapConvention.put ("ZAR|ALL|MAX|MAIN", new org.drip.market.otc.FixedFloatSwapConvention (new
  373.                 org.drip.market.otc.FixedStreamConvention ("ZAR", "Act/365", "ZAR", "3M", "3M",
  374.                     org.drip.analytics.support.CompositePeriodBuilder.ACCRUAL_COMPOUNDING_RULE_GEOMETRIC),
  375.                         new org.drip.market.otc.FloatStreamConvention (
  376.                             org.drip.state.identifier.ForwardLabel.Create (
  377.                                 org.drip.market.definition.IBORIndexContainer.IndexFromJurisdiction ("ZAR"),
  378.                                     "3M"), "3M"), 0));
  379.         } catch (java.lang.Exception e) {
  380.             e.printStackTrace();

  381.             return false;
  382.         }

  383.         return true;
  384.     }

  385.     /**
  386.      * Retrieve the Fix-Float Convention for the specified Jurisdiction
  387.      *
  388.      * @param strJurisdictionName The Jurisdiction Name
  389.      *
  390.      * @return The Fix-Float Convention
  391.      */

  392.     public static final org.drip.market.otc.FixedFloatSwapConvention ConventionFromJurisdiction (
  393.         final java.lang.String strJurisdictionName)
  394.     {
  395.         if (null == strJurisdictionName) return null;

  396.         java.lang.String strKey = strJurisdictionName + "|ALL|MAX|MAIN";

  397.         return _mapConvention.containsKey (strKey) ? _mapConvention.get (strKey) : null;
  398.     }

  399.     /**
  400.      * Retrieve the Fix-Float Convention for the specified Jurisdiction for the specified Maturity Tenor
  401.      *
  402.      * @param strJurisdictionName The Jurisdiction Name
  403.      * @param strMaturityTenor The Maturity Tenor
  404.      *
  405.      * @return The Fix-Float Convention
  406.      */

  407.     public static final org.drip.market.otc.FixedFloatSwapConvention ConventionFromJurisdictionMaturity (
  408.         final java.lang.String strJurisdictionName,
  409.         final java.lang.String strMaturityTenor)
  410.     {
  411.         if (null == strJurisdictionName || null == strMaturityTenor) return null;

  412.         java.lang.String strKey = strJurisdictionName + "|ALL|" + TenorSubKey (strJurisdictionName,
  413.             strMaturityTenor) + "|MAIN";

  414.         return _mapConvention.containsKey (strKey) ? _mapConvention.get (strKey) : null;
  415.     }

  416.     /**
  417.      * Retrieve the Fix-Float Convention for the specified Jurisdiction for the specified Location
  418.      *
  419.      * @param strJurisdictionName The Jurisdiction Name
  420.      * @param strLocation The Location
  421.      *
  422.      * @return The Fix-Float Convention
  423.      */

  424.     public static final org.drip.market.otc.FixedFloatSwapConvention ConventionFromJurisdictionLocation (
  425.         final java.lang.String strJurisdictionName,
  426.         final java.lang.String strLocation)
  427.     {
  428.         if (null == strJurisdictionName || null == strLocation) return null;

  429.         java.lang.String strKey = strJurisdictionName + "|" + strLocation + "|MAX|MAIN";

  430.         return _mapConvention.containsKey (strKey) ? _mapConvention.get (strKey) : null;
  431.     }

  432.     /**
  433.      * Retrieve the Fix-Float Convention for the specified Jurisdiction for the specified Index
  434.      *
  435.      * @param strJurisdictionName The Jurisdiction Name
  436.      * @param strIndexName The Index Name
  437.      *
  438.      * @return The Fix-Float Convention
  439.      */

  440.     public static final org.drip.market.otc.FixedFloatSwapConvention ConventionFromJurisdictionIndex (
  441.         final java.lang.String strJurisdictionName,
  442.         final java.lang.String strIndexName)
  443.     {
  444.         if (null == strJurisdictionName || null == strIndexName) return null;

  445.         java.lang.String strKey = strJurisdictionName + "|ALL|MAX|" + strIndexName;

  446.         return _mapConvention.containsKey (strKey) ? _mapConvention.get (strKey) : null;
  447.     }

  448.     /**
  449.      * Retrieve the Fix-Float Convention for the specified Jurisdiction for the specified Index, Location,
  450.      *  and Maturity Tenor
  451.      *
  452.      * @param strJurisdictionName The Jurisdiction Name
  453.      * @param strLocation The Location
  454.      * @param strMaturityTenor Maturity Tenor
  455.      * @param strIndexName The Index Name
  456.      *
  457.      * @return The Fix-Float Convention
  458.      */

  459.     public static final org.drip.market.otc.FixedFloatSwapConvention ConventionFromJurisdiction (
  460.         final java.lang.String strJurisdictionName,
  461.         final java.lang.String strLocation,
  462.         final java.lang.String strMaturityTenor,
  463.         final java.lang.String strIndexName)
  464.     {
  465.         if (null == strJurisdictionName || null == strLocation || null == strMaturityTenor || null ==
  466.             strIndexName)
  467.             return null;

  468.         java.lang.String strKey = strJurisdictionName + "|" + strLocation + "|" + TenorSubKey
  469.             (strJurisdictionName, strMaturityTenor) + "|" + strIndexName;

  470.         return _mapConvention.containsKey (strKey) ? _mapConvention.get (strKey) : null;
  471.     }
  472. }