JurisdictionVenueOptionDetails.java

  1. package org.drip.sample.forwardratefutures;

  2. import org.drip.market.exchange.*;
  3. import org.drip.service.env.EnvManager;

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

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

  70. /**
  71.  * <i>JurisdictionVenueOptionDetails</i> demonstrates the Functionality to retrieve the Futures Options
  72.  * Definitions for the various Jurisdictions and Venues.
  73.  *  
  74.  * <br><br>
  75.  *  <ul>
  76.  *      <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/AnalyticsCore.md">Analytics Core Module</a></li>
  77.  *      <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics Library</a></li>
  78.  *      <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/sample/README.md">Sample</a></li>
  79.  *      <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/sample/forwardratefutures/README.md">Forward Rate Futures Analytics</a></li>
  80.  *  </ul>
  81.  * <br><br>
  82.  *
  83.  * @author Lakshmi Krishnamurthy
  84.  */

  85. public class JurisdictionVenueOptionDetails {
  86.     private static final void DisplayExchangeInfo (
  87.         final String strFullyQualifiedName,
  88.         final String strTradingMode)
  89.     {
  90.         FuturesOptions fo = FuturesOptionsContainer.ExchangeInfo (
  91.             strFullyQualifiedName,
  92.             strTradingMode
  93.         );

  94.         String strExchangeLTDS = "";

  95.         for (String strExchange : fo.exchanges()) {
  96.             strExchangeLTDS += "\n\t[" + strExchange + "=>";

  97.             for (int i = 0; i < fo.ltdsArray (strExchange).length; ++i) {
  98.                 if (0 != i) strExchangeLTDS += "; ";

  99.                 strExchangeLTDS += fo.ltdsArray (strExchange)[i];
  100.             }

  101.             strExchangeLTDS += "]";
  102.         }

  103.         System.out.println (
  104.             fo.fullyQualifiedName() + " | " +
  105.             fo.tradingMode() +
  106.             strExchangeLTDS
  107.         );
  108.     }

  109.     public static final void main (
  110.         final String[] args)
  111.     {
  112.         EnvManager.InitEnv ("");

  113.         System.out.println ("\n\t---------------\n\t---------------\n");

  114.         DisplayExchangeInfo (
  115.             "CHF-LIBOR-3M",
  116.             "MARGIN"
  117.         );

  118.         DisplayExchangeInfo (
  119.             "GBP-LIBOR-3M",
  120.             "MARGIN"
  121.         );

  122.         DisplayExchangeInfo (
  123.             "EUR-EURIBOR-3M",
  124.             "MARGIN"
  125.         );

  126.         DisplayExchangeInfo (
  127.             "JPY-LIBOR-3M",
  128.             "PREMIUM"
  129.         );

  130.         DisplayExchangeInfo (
  131.             "JPY-TIBOR-3M",
  132.             "PREMIUM"
  133.         );

  134.         DisplayExchangeInfo (
  135.             "JPY-LIBOR-3M",
  136.             "PREMIUM"
  137.         );

  138.         DisplayExchangeInfo (
  139.             "USD-LIBOR-1M",
  140.             "PREMIUM"
  141.         );

  142.         DisplayExchangeInfo (
  143.             "USD-LIBOR-3M",
  144.             "MARGIN"
  145.         );

  146.         DisplayExchangeInfo (
  147.             "USD-LIBOR-3M",
  148.             "PREMIUM"
  149.         );

  150.         EnvManager.TerminateEnv();
  151.     }
  152. }