EUR3M6MUSD3M6M.java

  1. package org.drip.sample.dual;

  2. import org.drip.analytics.date.*;
  3. import org.drip.function.r1tor1.QuadraticRationalShapeControl;
  4. import org.drip.sample.forward.*;
  5. import org.drip.service.env.EnvManager;
  6. import org.drip.spline.basis.PolynomialFunctionSetParams;
  7. import org.drip.spline.params.*;
  8. import org.drip.spline.stretch.*;
  9. import org.drip.state.discount.*;
  10. import org.drip.state.forward.ForwardCurve;
  11. import org.drip.state.identifier.ForwardLabel;

  12. /*
  13.  * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  14.  */

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

  89. /**
  90.  * <i>EUR3M6MUSD3M6M</i> demonstrates the setup and construction of the USD 3M Forward Curve from
  91.  * EUR3M6MUSD3M6M CCBS, EUR 3M, EUR 6M, and USD 6M Quotes.
  92.  *
  93.  * <br><br>
  94.  *  <ul>
  95.  *      <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></li>
  96.  *      <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></li>
  97.  *      <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/sample/README.md">DROP API Construction and Usage</a></li>
  98.  *      <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/sample/cross/README.md">G7 Standard Cross Currency Swap</a></li>
  99.  *  </ul>
  100.  * <br><br>
  101.  *
  102.  * @author Lakshmi Krishnamurthy
  103.  */

  104. public class EUR3M6MUSD3M6M {
  105.     private static final double _dblFXEURUSD = 1.3593;

  106.     private static final int[] s_aiUSDOISDepositMaturityDays = new int[] {
  107.         1,
  108.         2,
  109.         3
  110.     };

  111.     private static final double[] s_adblUSDOISDepositQuote = new double[] {
  112.         0.0004, // 1D
  113.         0.0004, // 2D
  114.         0.0004  // 3D
  115.     };

  116.     private static final String[] s_astrUSDShortEndOISMaturityTenor = new String[] {
  117.         "1W",
  118.         "2W",
  119.         "3W",
  120.         "1M"
  121.     };

  122.     private static final double[] s_adblUSDShortEndOISQuote = new double[] {
  123.         0.00070,    //   1W
  124.         0.00069,    //   2W
  125.         0.00078,    //   3W
  126.         0.00074     //   1M
  127.     };

  128.     private static final String[] s_astrUSDOISFutureTenor = new String[] {
  129.         "1M",
  130.         "1M",
  131.         "1M",
  132.         "1M",
  133.         "1M"
  134.     };

  135.     private static final String[] s_astrUSDOISFutureMaturityTenor = new String[] {
  136.         "1M",
  137.         "2M",
  138.         "3M",
  139.         "4M",
  140.         "5M"
  141.     };

  142.     private static final double[] s_adblUSDOISFutureQuote = new double[] {
  143.          0.00046,    //   1M x 1M
  144.          0.00016,    //   2M x 1M
  145.         -0.00007,    //   3M x 1M
  146.         -0.00013,    //   4M x 1M
  147.         -0.00014     //   5M x 1M
  148.     };

  149.     private static final String[] s_astrUSDLongEndOISMaturityTenor = new String[] {
  150.         "15M",
  151.         "18M",
  152.         "21M",
  153.         "2Y",
  154.         "3Y",
  155.         "4Y",
  156.         "5Y",
  157.         "6Y",
  158.         "7Y",
  159.         "8Y",
  160.         "9Y",
  161.         "10Y",
  162.         "11Y",
  163.         "12Y",
  164.         "15Y",
  165.         "20Y",
  166.         "25Y",
  167.         "30Y"
  168.     };

  169.     private static final double[] s_adblUSDLongEndOISQuote = new double[] {
  170.         0.00002,    //  15M
  171.         0.00008,    //  18M
  172.         0.00021,    //  21M
  173.         0.00036,    //   2Y
  174.         0.00127,    //   3Y
  175.         0.00274,    //   4Y
  176.         0.00456,    //   5Y
  177.         0.00647,    //   6Y
  178.         0.00827,    //   7Y
  179.         0.00996,    //   8Y
  180.         0.01147,    //   9Y
  181.         0.01280,    //  10Y
  182.         0.01404,    //  11Y
  183.         0.01516,    //  12Y
  184.         0.01764,    //  15Y
  185.         0.01939,    //  20Y
  186.         0.02003,    //  25Y
  187.         0.02038     //  30Y
  188.     };

  189.     private static final int[] s_aiEONIADepositMaturityDays = new int[] {
  190.         1,
  191.         2,
  192.         3
  193.     };

  194.     private static final double[] s_adblEONIADepositQuote = new double[] {
  195.         0.0004, // 1D
  196.         0.0004, // 2D
  197.         0.0004  // 3D
  198.     };

  199.     private static final String[] s_astrEURShortEndOISMaturityTenor = new String[] {
  200.         "1W",
  201.         "2W",
  202.         "3W",
  203.         "1M"
  204.     };

  205.     private static final double[] s_adblEURShortEndOISQuote = new double[] {
  206.         0.00070,    //   1W
  207.         0.00069,    //   2W
  208.         0.00078,    //   3W
  209.         0.00074     //   1M
  210.     };

  211.     private static final String[] s_astrEUROISFutureTenor = new String[] {
  212.         "1M",
  213.         "1M",
  214.         "1M",
  215.         "1M",
  216.         "1M"
  217.     };

  218.     private static final String[] s_astrEUROISFutureMaturityTenor = new String[] {
  219.         "1M",
  220.         "2M",
  221.         "3M",
  222.         "4M",
  223.         "5M"
  224.     };

  225.     private static final double[] s_adblEUROISFutureQuote = new double[] {
  226.          0.00046,    //   1M x 1M
  227.          0.00016,    //   2M x 1M
  228.         -0.00007,    //   3M x 1M
  229.         -0.00013,    //   4M x 1M
  230.         -0.00014     //   5M x 1M
  231.     };

  232.     private static final String[] s_astrEURLongEndOISMaturityTenor = new String[] {
  233.         "15M",
  234.         "18M",
  235.         "21M",
  236.         "2Y",
  237.         "3Y",
  238.         "4Y",
  239.         "5Y",
  240.         "6Y",
  241.         "7Y",
  242.         "8Y",
  243.         "9Y",
  244.         "10Y",
  245.         "11Y",
  246.         "12Y",
  247.         "15Y",
  248.         "20Y",
  249.         "25Y",
  250.         "30Y"
  251.     };

  252.     private static final double[] s_adblEURLongEndOISQuote = new double[] {
  253.         0.00002,    //  15M
  254.         0.00008,    //  18M
  255.         0.00021,    //  21M
  256.         0.00036,    //   2Y
  257.         0.00127,    //   3Y
  258.         0.00274,    //   4Y
  259.         0.00456,    //   5Y
  260.         0.00647,    //   6Y
  261.         0.00827,    //   7Y
  262.         0.00996,    //   8Y
  263.         0.01147,    //   9Y
  264.         0.01280,    //  10Y
  265.         0.01404,    //  11Y
  266.         0.01516,    //  12Y
  267.         0.01764,    //  15Y
  268.         0.01939,    //  20Y
  269.         0.02003,    //  25Y
  270.         0.02038     //  30Y
  271.     };

  272.     private static final String[] s_astrUSD6MDepositTenor = new String[] {
  273.         "1D",
  274.         "1W",
  275.         "2W",
  276.         "3W",
  277.         "1M",
  278.         "2M",
  279.         "3M",
  280.         "4M",
  281.         "5M"
  282.     };

  283.     private static final double[] s_adblUSD6MDepositQuote = new double[] {
  284.         0.003565,   // 1D
  285.         0.003858,   // 1W
  286.         0.003840,   // 2W
  287.         0.003922,   // 3W
  288.         0.003869,   // 1M
  289.         0.003698,   // 2M
  290.         0.003527,   // 3M
  291.         0.003342,   // 4M
  292.         0.003225    // 5M
  293.     };

  294.     private static final String[] s_astrUSD6MFRATenor = new String[] {
  295.          "0D",
  296.          "1M",
  297.          "2M",
  298.          "3M",
  299.          "4M",
  300.          "5M",
  301.          "6M",
  302.          "7M",
  303.          "8M",
  304.          "9M",
  305.         "10M",
  306.         "11M",
  307.         "12M",
  308.         "13M",
  309.         "14M",
  310.         "15M",
  311.         "16M",
  312.         "17M",
  313.         "18M"
  314.     };

  315.     private static final double[] s_adblUSD6MFRAQuote = new double[] {
  316.         0.003120,   //  0D
  317.         0.002930,   //  1M
  318.         0.002720,   //  2M
  319.         0.002600,   //  3M
  320.         0.002560,   //  4M
  321.         0.002520,   //  5M
  322.         0.002480,   //  6M
  323.         0.002540,   //  7M
  324.         0.002610,   //  8M
  325.         0.002670,   //  9M
  326.         0.002790,   // 10M
  327.         0.002910,   // 11M
  328.         0.003030,   // 12M
  329.         0.003180,   // 13M
  330.         0.003350,   // 14M
  331.         0.003520,   // 15M
  332.         0.003710,   // 16M
  333.         0.003890,   // 17M
  334.         0.004090    // 18M
  335.     };

  336.     private static final String[] s_astrUSD6MFixFloatTenor = new String[] {
  337.          "3Y",
  338.          "4Y",
  339.          "5Y",
  340.          "6Y",
  341.          "7Y",
  342.          "8Y",
  343.          "9Y",
  344.         "10Y",
  345.         "12Y",
  346.         "15Y",
  347.         "20Y",
  348.         "25Y",
  349.         "30Y",
  350.         "35Y",
  351.         "40Y",
  352.         "50Y",
  353.         "60Y"
  354.     };

  355.     private static final double[] s_adblUSD6MFixFloatQuote = new double[] {
  356.         0.004240,   //  3Y
  357.         0.005760,   //  4Y          
  358.         0.007620,   //  5Y
  359.         0.009540,   //  6Y
  360.         0.011350,   //  7Y
  361.         0.013030,   //  8Y
  362.         0.014520,   //  9Y
  363.         0.015840,   // 10Y
  364.         0.018090,   // 12Y
  365.         0.020370,   // 15Y
  366.         0.021870,   // 20Y
  367.         0.022340,   // 25Y
  368.         0.022560,   // 30Y
  369.         0.022950,   // 35Y
  370.         0.023480,   // 40Y
  371.         0.024210,   // 50Y
  372.         0.024630    // 60Y
  373.     };

  374.     private static final String[] s_astrUSD3MDepositTenor = new String[] {
  375.         "2W",
  376.         "3W",
  377.         "1M",
  378.         "2M"
  379.     };

  380.     private static final double[] s_adblUSD3MDepositQuote = new double[] {
  381.         0.001865,
  382.         0.001969,
  383.         0.001951,
  384.         0.001874
  385.     };

  386.     private static final String[] s_astrUSD3MFRATenor = new String[] {
  387.          "0D",
  388.          "1M",
  389.          "3M",
  390.          "6M",
  391.          "9M",
  392.         "12M",
  393.         "15M",
  394.         "18M",
  395.         "21M"
  396.     };

  397.     private static final double[] s_adblUSD3MFRAQuote = new double[] {
  398.         0.001790,
  399.         0.001775,
  400.         0.001274,
  401.         0.001222,
  402.         0.001269,
  403.         0.001565,
  404.         0.001961,
  405.         0.002556,
  406.         0.003101
  407.     };

  408.     private static final String[] s_astrUSD3MFixFloatTenor = new String[] {
  409.          "3Y",
  410.          "4Y",
  411.          "5Y",
  412.          "6Y",
  413.          "7Y",
  414.          "8Y",
  415.          "9Y",
  416.         "10Y",
  417.         "12Y",
  418.         "15Y",
  419.         "20Y",
  420.         "25Y",
  421.         "30Y"
  422.     };

  423.     private static final double[] s_adblUSD3MFixFloatQuote = new double[] {
  424.         0.002850,   //  3Y
  425.         0.004370,   //  4Y
  426.         0.006230,   //  5Y
  427.         0.008170,   //  6Y
  428.         0.010000,   //  7Y
  429.         0.011710,   //  8Y
  430.         0.013240,   //  9Y
  431.         0.014590,   // 10Y
  432.         0.016920,   // 12Y
  433.         0.019330,   // 15Y
  434.         0.020990,   // 20Y
  435.         0.021560,   // 25Y
  436.         0.021860    // 30Y
  437.     };

  438.     private static final String[] s_astrUSD3MSyntheticFloatFloatTenor = new String[] {
  439.         "35Y",
  440.         "40Y",
  441.         "50Y",
  442.         "60Y"
  443.     };

  444.     private static final double[] s_adblUSD3MSyntheticFloatFloatQuote = new double[] {
  445.         0.00065,
  446.         0.00060,
  447.         0.00054,
  448.         0.00050
  449.     };

  450.     private static final String[] s_astrEUR6MDepositTenor = new String[] {
  451.         "1D",
  452.         "1W",
  453.         "2W",
  454.         "3W",
  455.         "1M",
  456.         "2M",
  457.         "3M",
  458.         "4M",
  459.         "5M"
  460.     };

  461.     private static final double[] s_adblEUR6MDepositQuote = new double[] {
  462.         0.003565,   // 1D
  463.         0.003858,   // 1W
  464.         0.003840,   // 2W
  465.         0.003922,   // 3W
  466.         0.003869,   // 1M
  467.         0.003698,   // 2M
  468.         0.003527,   // 3M
  469.         0.003342,   // 4M
  470.         0.003225    // 5M
  471.     };

  472.     private static final String[] s_astrEUR6MFRATenor = new String[] {
  473.          "0D",
  474.          "1M",
  475.          "2M",
  476.          "3M",
  477.          "4M",
  478.          "5M",
  479.          "6M",
  480.          "7M",
  481.          "8M",
  482.          "9M",
  483.         "10M",
  484.         "11M",
  485.         "12M",
  486.         "13M",
  487.         "14M",
  488.         "15M",
  489.         "16M",
  490.         "17M",
  491.         "18M"
  492.     };

  493.     private static final double[] s_adblEUR6MFRAQuote = new double[] {
  494.         0.003120,   //  0D
  495.         0.002930,   //  1M
  496.         0.002720,   //  2M
  497.         0.002600,   //  3M
  498.         0.002560,   //  4M
  499.         0.002520,   //  5M
  500.         0.002480,   //  6M
  501.         0.002540,   //  7M
  502.         0.002610,   //  8M
  503.         0.002670,   //  9M
  504.         0.002790,   // 10M
  505.         0.002910,   // 11M
  506.         0.003030,   // 12M
  507.         0.003180,   // 13M
  508.         0.003350,   // 14M
  509.         0.003520,   // 15M
  510.         0.003710,   // 16M
  511.         0.003890,   // 17M
  512.         0.004090    // 18M
  513.     };

  514.     private static final String[] s_astrEUR6MFixFloatTenor = new String[] {
  515.          "3Y",
  516.          "4Y",
  517.          "5Y",
  518.          "6Y",
  519.          "7Y",
  520.          "8Y",
  521.          "9Y",
  522.         "10Y",
  523.         "12Y",
  524.         "15Y",
  525.         "20Y",
  526.         "25Y",
  527.         "30Y",
  528.         "35Y",
  529.         "40Y",
  530.         "50Y",
  531.         "60Y"
  532.     };

  533.     private static final double[] s_adblEUR6MFixFloatQuote = new double[] {
  534.         0.004240,   //  3Y
  535.         0.005760,   //  4Y          
  536.         0.007620,   //  5Y
  537.         0.009540,   //  6Y
  538.         0.011350,   //  7Y
  539.         0.013030,   //  8Y
  540.         0.014520,   //  9Y
  541.         0.015840,   // 10Y
  542.         0.018090,   // 12Y
  543.         0.020370,   // 15Y
  544.         0.021870,   // 20Y
  545.         0.022340,   // 25Y
  546.         0.022560,   // 30Y
  547.         0.022950,   // 35Y
  548.         0.023480,   // 40Y
  549.         0.024210,   // 50Y
  550.         0.024630    // 60Y
  551.     };

  552.     private static final String[] s_astrCCBSTenor = new String[] {
  553.         "1Y",
  554.         "2Y",
  555.         "3Y",
  556.         "4Y",
  557.         "5Y",
  558.         "7Y",
  559.         "10Y",
  560.         "15Y",
  561.         "20Y",
  562.         "30Y"
  563.     };

  564.     private static final double[] s_adblCCBSQuote = new double[] {
  565.         0.0002125, //  1Y
  566.         0.0002000, //  2Y
  567.         0.0002000, //  3Y
  568.         0.0002000, //  4Y
  569.         0.0001750, //  5Y
  570.         0.0001750, //  7Y
  571.         0.0001750, // 10Y
  572.         0.0002125, // 15Y
  573.         0.0002125, // 20Y
  574.         0.0002125  // 30Y
  575.     };

  576.     private static final double[] s_adblIRSQuote = new double[] {
  577.         0.01750, //  1Y
  578.         0.01750, //  2Y
  579.         0.01750, //  3Y
  580.         0.02000, //  4Y
  581.         0.02000, //  5Y
  582.         0.02000, //  7Y
  583.         0.02125, // 10Y
  584.         0.02125, // 15Y
  585.         0.02125, // 20Y
  586.         0.02125  // 30Y
  587.     };

  588.     public static final void main (
  589.         final String[] astrArgs)
  590.         throws Exception
  591.     {
  592.         /*
  593.          * Initialize the Credit Analytics Library
  594.          */

  595.         EnvManager.InitEnv ("");

  596.         JulianDate dtValue = DateUtil.CreateFromYMD (
  597.             2012,
  598.             DateUtil.DECEMBER,
  599.             11
  600.         );

  601.         String strReferenceCurrency = "USD";
  602.         String strDerivedCurrency = "EUR";

  603.         SegmentCustomBuilderControl scbcCubic = new SegmentCustomBuilderControl (
  604.             MultiSegmentSequenceBuilder.BASIS_SPLINE_POLYNOMIAL,
  605.             new PolynomialFunctionSetParams (4),
  606.             SegmentInelasticDesignControl.Create (
  607.                 2,
  608.                 2
  609.             ),
  610.             new ResponseScalingShapeControl (
  611.                 true,
  612.                 new QuadraticRationalShapeControl (0.)
  613.             ),
  614.             null
  615.         );

  616.         MergedDiscountForwardCurve dcReference = OvernightIndexCurve.MakeDC (
  617.             strReferenceCurrency,
  618.             dtValue,
  619.             s_aiUSDOISDepositMaturityDays,
  620.             s_adblUSDOISDepositQuote,
  621.             s_astrUSDShortEndOISMaturityTenor,
  622.             s_adblUSDShortEndOISQuote,
  623.             s_astrUSDOISFutureTenor,
  624.             s_astrUSDOISFutureMaturityTenor,
  625.             s_adblUSDOISFutureQuote,
  626.             s_astrUSDLongEndOISMaturityTenor,
  627.             s_adblUSDLongEndOISQuote,
  628.             scbcCubic,
  629.             null
  630.         );

  631.         ForwardCurve fc6MReference = IBORCurve.CustomIBORBuilderSample (
  632.             dcReference,
  633.             null,
  634.             ForwardLabel.Create (
  635.                 strReferenceCurrency,
  636.                 "6M"
  637.             ),
  638.             scbcCubic,
  639.             s_astrUSD6MDepositTenor,
  640.             s_adblUSD6MDepositQuote,
  641.             "ForwardRate",
  642.             s_astrUSD6MFRATenor,
  643.             s_adblUSD6MFRAQuote,
  644.             "ParForwardRate",
  645.             s_astrUSD6MFixFloatTenor,
  646.             s_adblUSD6MFixFloatQuote,
  647.             "SwapRate",
  648.             null,
  649.             null,
  650.             "DerivedParBasisSpread",
  651.             null,
  652.             null,
  653.             "DerivedParBasisSpread",
  654.             "---- USD LIBOR 6M VANILLA CUBIC POLYNOMIAL FORWARD CURVE ---",
  655.             false
  656.         );

  657.         ForwardCurve fc3MReference = IBORCurve.CustomIBORBuilderSample (
  658.             dcReference,
  659.             fc6MReference,
  660.             ForwardLabel.Create (
  661.                 strReferenceCurrency,
  662.                 "3M"
  663.             ),
  664.             scbcCubic,
  665.             s_astrUSD3MDepositTenor,
  666.             s_adblUSD3MDepositQuote,
  667.             "ForwardRate",
  668.             s_astrUSD3MFRATenor,
  669.             s_adblUSD3MFRAQuote,
  670.             "ParForwardRate",
  671.             s_astrUSD3MFixFloatTenor,
  672.             s_adblUSD3MFixFloatQuote,
  673.             "SwapRate",
  674.             null,
  675.             null,
  676.             "DerivedParBasisSpread",
  677.             s_astrUSD3MSyntheticFloatFloatTenor,
  678.             s_adblUSD3MSyntheticFloatFloatQuote,
  679.             "DerivedParBasisSpread",
  680.             "---- VANILLA CUBIC POLYNOMIAL FORWARD CURVE ---",
  681.             false
  682.         );

  683.         MergedDiscountForwardCurve dcDerived = OvernightIndexCurve.MakeDC (
  684.             strDerivedCurrency,
  685.             dtValue,
  686.             s_aiEONIADepositMaturityDays,
  687.             s_adblEONIADepositQuote,
  688.             s_astrEURShortEndOISMaturityTenor,
  689.             s_adblEURShortEndOISQuote,
  690.             s_astrEUROISFutureTenor,
  691.             s_astrEUROISFutureMaturityTenor,
  692.             s_adblEUROISFutureQuote,
  693.             s_astrEURLongEndOISMaturityTenor,
  694.             s_adblEURLongEndOISQuote,
  695.             scbcCubic,
  696.             null
  697.         );

  698.         ForwardCurve fc6MDerived = IBORCurve.CustomIBORBuilderSample (
  699.             dcDerived,
  700.             null,
  701.             ForwardLabel.Create (
  702.                 strDerivedCurrency,
  703.                 "6M"
  704.             ),
  705.             scbcCubic,
  706.             s_astrEUR6MDepositTenor,
  707.             s_adblEUR6MDepositQuote,
  708.             "ForwardRate",
  709.             s_astrEUR6MFRATenor,
  710.             s_adblEUR6MFRAQuote,
  711.             "ParForwardRate",
  712.             s_astrEUR6MFixFloatTenor,
  713.             s_adblEUR6MFixFloatQuote,
  714.             "SwapRate",
  715.             null,
  716.             null,
  717.             "DerivedParBasisSpread",
  718.             null,
  719.             null,
  720.             "DerivedParBasisSpread",
  721.             "---- EURIBOR 6M VANILLA CUBIC POLYNOMIAL FORWARD CURVE ---",
  722.             false
  723.         );

  724.         CCBSForwardCurve.ForwardCurveReferenceComponentBasis (
  725.             strReferenceCurrency,
  726.             strDerivedCurrency,
  727.             dtValue,
  728.             dcReference,
  729.             fc6MReference,
  730.             fc3MReference,
  731.             dcDerived,
  732.             fc6MDerived,
  733.             _dblFXEURUSD,
  734.             scbcCubic,
  735.             s_astrCCBSTenor,
  736.             s_adblCCBSQuote,
  737.             true
  738.         );

  739.         CCBSForwardCurve.ForwardCurveReferenceComponentBasis (
  740.             strReferenceCurrency,
  741.             strDerivedCurrency,
  742.             dtValue,
  743.             dcReference,
  744.             fc6MReference,
  745.             fc3MReference,
  746.             dcDerived,
  747.             fc6MDerived,
  748.             _dblFXEURUSD,
  749.             scbcCubic,
  750.             s_astrCCBSTenor,
  751.             s_adblCCBSQuote,
  752.             false
  753.         );

  754.         CCBSDiscountCurve.MakeDiscountCurve (
  755.             strReferenceCurrency,
  756.             strDerivedCurrency,
  757.             dtValue,
  758.             dcReference,
  759.             fc6MReference,
  760.             fc3MReference,
  761.             _dblFXEURUSD,
  762.             scbcCubic,
  763.             s_astrCCBSTenor,
  764.             s_adblCCBSQuote,
  765.             s_adblIRSQuote,
  766.             true
  767.         );

  768.         CCBSDiscountCurve.MakeDiscountCurve (
  769.             strReferenceCurrency,
  770.             strDerivedCurrency,
  771.             dtValue,
  772.             dcReference,
  773.             fc6MReference,
  774.             fc3MReference,
  775.             _dblFXEURUSD,
  776.             scbcCubic,
  777.             s_astrCCBSTenor,
  778.             s_adblCCBSQuote,
  779.             s_adblIRSQuote,
  780.             false
  781.         );

  782.         EnvManager.TerminateEnv();
  783.     }
  784. }