CHF3M6MUSD3M6M.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>CHF3M6MUSD3M6M</i> demonstrates the setup and construction of the USD 3M Forward Curve from
  91.  * CHF3M6MUSD3M6M CCBS, CHF 3M, CHF 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 CHF3M6MUSD3M6M {
  105.     private static final double _dblFXCHFUSD = 1.1121;

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

  111.     private static final int[] s_aiCHFOISDepositMaturityDays = new int[] {
  112.         1,
  113.         2,
  114.         3
  115.     };

  116.     private static final double[] s_adblUSDOISDepositQuote = new double[] {
  117.         0.0004, // 1D
  118.         0.0004, // 2D
  119.         0.0004  // 3D
  120.     };

  121.     private static final double[] s_adblCHFOISDepositQuote = new double[] {
  122.         0.0004, // 1D
  123.         0.0004, // 2D
  124.         0.0004  // 3D
  125.     };

  126.     private static final String[] s_astrUSDShortEndOISMaturityTenor = new String[] {
  127.         "1W",
  128.         "2W",
  129.         "3W",
  130.         "1M"
  131.     };

  132.     private static final String[] s_astrCHFShortEndOISMaturityTenor = new String[] {
  133.         "1W",
  134.         "2W",
  135.         "3W",
  136.         "1M"
  137.     };

  138.     private static final double[] s_adblUSDShortEndOISQuote = new double[] {
  139.         0.00070,    //   1W
  140.         0.00069,    //   2W
  141.         0.00078,    //   3W
  142.         0.00074     //   1M
  143.     };

  144.     private static final double[] s_adblCHFShortEndOISQuote = new double[] {
  145.         0.00070,    //   1W
  146.         0.00069,    //   2W
  147.         0.00078,    //   3W
  148.         0.00074     //   1M
  149.     };

  150.     private static final String[] s_astrUSDOISFutureTenor = new String[] {
  151.         "1M",
  152.         "1M",
  153.         "1M",
  154.         "1M",
  155.         "1M"
  156.     };

  157.     private static final String[] s_astrCHFOISFutureTenor = new String[] {
  158.         "1M",
  159.         "1M",
  160.         "1M",
  161.         "1M",
  162.         "1M"
  163.     };

  164.     private static final String[] s_astrUSDOISFutureMaturityTenor = new String[] {
  165.         "1M",
  166.         "2M",
  167.         "3M",
  168.         "4M",
  169.         "5M"
  170.     };

  171.     private static final String[] s_astrCHFOISFutureMaturityTenor = new String[] {
  172.         "1M",
  173.         "2M",
  174.         "3M",
  175.         "4M",
  176.         "5M"
  177.     };

  178.     private static final double[] s_adblUSDOISFutureQuote = new double[] {
  179.          0.00046,    //   1M x 1M
  180.          0.00016,    //   2M x 1M
  181.         -0.00007,    //   3M x 1M
  182.         -0.00013,    //   4M x 1M
  183.         -0.00014     //   5M x 1M
  184.     };

  185.     private static final double[] s_adblCHFOISFutureQuote = new double[] {
  186.          0.00046,    //   1M x 1M
  187.          0.00016,    //   2M x 1M
  188.         -0.00007,    //   3M x 1M
  189.         -0.00013,    //   4M x 1M
  190.         -0.00014     //   5M x 1M
  191.     };

  192.     private static final String[] s_astrUSDLongEndOISMaturityTenor = new String[] {
  193.         "15M",
  194.         "18M",
  195.         "21M",
  196.         "2Y",
  197.         "3Y",
  198.         "4Y",
  199.         "5Y",
  200.         "6Y",
  201.         "7Y",
  202.         "8Y",
  203.         "9Y",
  204.         "10Y",
  205.         "11Y",
  206.         "12Y",
  207.         "15Y",
  208.         "20Y",
  209.         "25Y",
  210.         "30Y"
  211.     };

  212.     private static final String[] s_astrCHFLongEndOISMaturityTenor = new String[] {
  213.         "15M",
  214.         "18M",
  215.         "21M",
  216.         "2Y",
  217.         "3Y",
  218.         "4Y",
  219.         "5Y",
  220.         "6Y",
  221.         "7Y",
  222.         "8Y",
  223.         "9Y",
  224.         "10Y",
  225.         "11Y",
  226.         "12Y",
  227.         "15Y",
  228.         "20Y",
  229.         "25Y",
  230.         "30Y"
  231.     };

  232.     private static final double[] s_adblUSDLongEndOISQuote = new double[] {
  233.         0.00002,    //  15M
  234.         0.00008,    //  18M
  235.         0.00021,    //  21M
  236.         0.00036,    //   2Y
  237.         0.00127,    //   3Y
  238.         0.00274,    //   4Y
  239.         0.00456,    //   5Y
  240.         0.00647,    //   6Y
  241.         0.00827,    //   7Y
  242.         0.00996,    //   8Y
  243.         0.01147,    //   9Y
  244.         0.01280,    //  10Y
  245.         0.01404,    //  11Y
  246.         0.01516,    //  12Y
  247.         0.01764,    //  15Y
  248.         0.01939,    //  20Y
  249.         0.02003,    //  25Y
  250.         0.02038     //  30Y
  251.     };

  252.     private static final double[] s_adblCHFLongEndOISQuote = 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 String[] s_astrCHF6MDepositTenor = new String[] {
  284.         "1D",
  285.         "1W",
  286.         "2W",
  287.         "3W",
  288.         "1M",
  289.         "2M",
  290.         "3M",
  291.         "4M",
  292.         "5M"
  293.     };

  294.     private static final double[] s_adblUSD6MDepositQuote = new double[] {
  295.         0.003565,   // 1D
  296.         0.003858,   // 1W
  297.         0.003840,   // 2W
  298.         0.003922,   // 3W
  299.         0.003869,   // 1M
  300.         0.003698,   // 2M
  301.         0.003527,   // 3M
  302.         0.003342,   // 4M
  303.         0.003225    // 5M
  304.     };

  305.     private static final double[] s_adblCHF6MDepositQuote = new double[] {
  306.         0.003565,   // 1D
  307.         0.003858,   // 1W
  308.         0.003840,   // 2W
  309.         0.003922,   // 3W
  310.         0.003869,   // 1M
  311.         0.003698,   // 2M
  312.         0.003527,   // 3M
  313.         0.003342,   // 4M
  314.         0.003225    // 5M
  315.     };

  316.     private static final String[] s_astrUSD6MFRATenor = new String[] {
  317.          "0D",
  318.          "1M",
  319.          "2M",
  320.          "3M",
  321.          "4M",
  322.          "5M",
  323.          "6M",
  324.          "7M",
  325.          "8M",
  326.          "9M",
  327.         "10M",
  328.         "11M",
  329.         "12M",
  330.         "13M",
  331.         "14M",
  332.         "15M",
  333.         "16M",
  334.         "17M",
  335.         "18M"
  336.     };

  337.     private static final String[] s_astrCHF6MFRATenor = new String[] {
  338.          "0D",
  339.          "1M",
  340.          "2M",
  341.          "3M",
  342.          "4M",
  343.          "5M",
  344.          "6M",
  345.          "7M",
  346.          "8M",
  347.          "9M",
  348.         "10M",
  349.         "11M",
  350.         "12M",
  351.         "13M",
  352.         "14M",
  353.         "15M",
  354.         "16M",
  355.         "17M",
  356.         "18M"
  357.     };

  358.     private static final double[] s_adblUSD6MFRAQuote = new double[] {
  359.         0.003120,   //  0D
  360.         0.002930,   //  1M
  361.         0.002720,   //  2M
  362.         0.002600,   //  3M
  363.         0.002560,   //  4M
  364.         0.002520,   //  5M
  365.         0.002480,   //  6M
  366.         0.002540,   //  7M
  367.         0.002610,   //  8M
  368.         0.002670,   //  9M
  369.         0.002790,   // 10M
  370.         0.002910,   // 11M
  371.         0.003030,   // 12M
  372.         0.003180,   // 13M
  373.         0.003350,   // 14M
  374.         0.003520,   // 15M
  375.         0.003710,   // 16M
  376.         0.003890,   // 17M
  377.         0.004090    // 18M
  378.     };

  379.     private static final double[] s_adblCHF6MFRAQuote = new double[] {
  380.         0.003120,   //  0D
  381.         0.002930,   //  1M
  382.         0.002720,   //  2M
  383.         0.002600,   //  3M
  384.         0.002560,   //  4M
  385.         0.002520,   //  5M
  386.         0.002480,   //  6M
  387.         0.002540,   //  7M
  388.         0.002610,   //  8M
  389.         0.002670,   //  9M
  390.         0.002790,   // 10M
  391.         0.002910,   // 11M
  392.         0.003030,   // 12M
  393.         0.003180,   // 13M
  394.         0.003350,   // 14M
  395.         0.003520,   // 15M
  396.         0.003710,   // 16M
  397.         0.003890,   // 17M
  398.         0.004090    // 18M
  399.     };

  400.     private static final String[] s_astrUSD6MFixFloatTenor = new String[] {
  401.          "3Y",
  402.          "4Y",
  403.          "5Y",
  404.          "6Y",
  405.          "7Y",
  406.          "8Y",
  407.          "9Y",
  408.         "10Y",
  409.         "12Y",
  410.         "15Y",
  411.         "20Y",
  412.         "25Y",
  413.         "30Y",
  414.         "35Y",
  415.         "40Y",
  416.         "50Y",
  417.         "60Y"
  418.     };

  419.     private static final String[] s_astrCHF6MFixFloatTenor = new String[] {
  420.          "3Y",
  421.          "4Y",
  422.          "5Y",
  423.          "6Y",
  424.          "7Y",
  425.          "8Y",
  426.          "9Y",
  427.         "10Y",
  428.         "12Y",
  429.         "15Y",
  430.         "20Y",
  431.         "25Y",
  432.         "30Y",
  433.         "35Y",
  434.         "40Y",
  435.         "50Y",
  436.         "60Y"
  437.     };

  438.     private static final double[] s_adblUSD6MFixFloatQuote = new double[] {
  439.         0.004240,   //  3Y
  440.         0.005760,   //  4Y          
  441.         0.007620,   //  5Y
  442.         0.009540,   //  6Y
  443.         0.011350,   //  7Y
  444.         0.013030,   //  8Y
  445.         0.014520,   //  9Y
  446.         0.015840,   // 10Y
  447.         0.018090,   // 12Y
  448.         0.020370,   // 15Y
  449.         0.021870,   // 20Y
  450.         0.022340,   // 25Y
  451.         0.022560,   // 30Y
  452.         0.022950,   // 35Y
  453.         0.023480,   // 40Y
  454.         0.024210,   // 50Y
  455.         0.024630    // 60Y
  456.     };

  457.     private static final double[] s_adblCHF6MFixFloatQuote = new double[] {
  458.         0.004240,   //  3Y
  459.         0.005760,   //  4Y          
  460.         0.007620,   //  5Y
  461.         0.009540,   //  6Y
  462.         0.011350,   //  7Y
  463.         0.013030,   //  8Y
  464.         0.014520,   //  9Y
  465.         0.015840,   // 10Y
  466.         0.018090,   // 12Y
  467.         0.020370,   // 15Y
  468.         0.021870,   // 20Y
  469.         0.022340,   // 25Y
  470.         0.022560,   // 30Y
  471.         0.022950,   // 35Y
  472.         0.023480,   // 40Y
  473.         0.024210,   // 50Y
  474.         0.024630    // 60Y
  475.     };

  476.     private static final String[] s_astrUSD3MDepositTenor = new String[] {
  477.         "2W",
  478.         "3W",
  479.         "1M",
  480.         "2M"
  481.     };

  482.     private static final double[] s_adblUSD3MDepositQuote = new double[] {
  483.         0.001865,
  484.         0.001969,
  485.         0.001951,
  486.         0.001874
  487.     };

  488.     private static final String[] s_astrUSD3MFRATenor = new String[] {
  489.          "0D",
  490.          "1M",
  491.          "3M",
  492.          "6M",
  493.          "9M",
  494.         "12M",
  495.         "15M",
  496.         "18M",
  497.         "21M"
  498.     };

  499.     private static final double[] s_adblUSD3MFRAQuote = new double[] {
  500.         0.001790,
  501.         0.001775,
  502.         0.001274,
  503.         0.001222,
  504.         0.001269,
  505.         0.001565,
  506.         0.001961,
  507.         0.002556,
  508.         0.003101
  509.     };

  510.     private static final String[] s_astrUSD3MFixFloatTenor = new String[] {
  511.          "3Y",
  512.          "4Y",
  513.          "5Y",
  514.          "6Y",
  515.          "7Y",
  516.          "8Y",
  517.          "9Y",
  518.         "10Y",
  519.         "12Y",
  520.         "15Y",
  521.         "20Y",
  522.         "25Y",
  523.         "30Y"
  524.     };

  525.     private static final double[] s_adblUSD3MFixFloatQuote = new double[] {
  526.         0.002850,   //  3Y
  527.         0.004370,   //  4Y
  528.         0.006230,   //  5Y
  529.         0.008170,   //  6Y
  530.         0.010000,   //  7Y
  531.         0.011710,   //  8Y
  532.         0.013240,   //  9Y
  533.         0.014590,   // 10Y
  534.         0.016920,   // 12Y
  535.         0.019330,   // 15Y
  536.         0.020990,   // 20Y
  537.         0.021560,   // 25Y
  538.         0.021860    // 30Y
  539.     };

  540.     private static final String[] s_astrUSD3MSyntheticFloatFloatTenor = new String[] {
  541.         "35Y",
  542.         "40Y",
  543.         "50Y",
  544.         "60Y"
  545.     };

  546.     private static final double[] s_adblUSD3MSyntheticFloatFloatQuote = new double[] {
  547.         0.00065,
  548.         0.00060,
  549.         0.00054,
  550.         0.00050
  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.     };

  563.     private static final double[] s_adblCCBSQuote = new double[] {
  564.         -0.0000000, //  1Y
  565.         -0.0000500, //  2Y
  566.         -0.0001375, //  3Y
  567.         -0.0002250, //  4Y
  568.         -0.0002750, //  5Y
  569.         -0.0003000, //  7Y
  570.         -0.0003000, // 10Y
  571.         -0.0002750, // 15Y
  572.         -0.0002250  // 20Y
  573.     };

  574.     private static final double[] s_adblIRSQuote = new double[] {
  575.         0.00500, //  1Y
  576.         0.00500, //  2Y
  577.         0.01375, //  3Y
  578.         0.02250, //  4Y
  579.         0.02750, //  5Y
  580.         0.03000, //  7Y
  581.         0.03000, // 10Y
  582.         0.02750, // 15Y
  583.         0.02250  // 20Y
  584.     };

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

  592.         EnvManager.InitEnv ("");

  593.         JulianDate dtValue = DateUtil.CreateFromYMD (
  594.             2012,
  595.             DateUtil.DECEMBER,
  596.             11
  597.         );

  598.         String strReferenceCurrency = "USD";
  599.         String strDerivedCurrency = "CHF";

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

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

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

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

  680.         MergedDiscountForwardCurve dcDerived = OvernightIndexCurve.MakeDC (
  681.             strDerivedCurrency,
  682.             dtValue,
  683.             s_aiCHFOISDepositMaturityDays,
  684.             s_adblCHFOISDepositQuote,
  685.             s_astrCHFShortEndOISMaturityTenor,
  686.             s_adblCHFShortEndOISQuote,
  687.             s_astrCHFOISFutureTenor,
  688.             s_astrCHFOISFutureMaturityTenor,
  689.             s_adblCHFOISFutureQuote,
  690.             s_astrCHFLongEndOISMaturityTenor,
  691.             s_adblCHFLongEndOISQuote,
  692.             scbcCubic,
  693.             null
  694.         );

  695.         ForwardCurve fc6MDerived = IBORCurve.CustomIBORBuilderSample (
  696.             dcDerived,
  697.             null,
  698.             ForwardLabel.Create (
  699.                 strDerivedCurrency,
  700.                 "6M"
  701.             ),
  702.             scbcCubic,
  703.             s_astrCHF6MDepositTenor,
  704.             s_adblCHF6MDepositQuote,
  705.             "ForwardRate",
  706.             s_astrCHF6MFRATenor,
  707.             s_adblCHF6MFRAQuote,
  708.             "ParForwardRate",
  709.             s_astrCHF6MFixFloatTenor,
  710.             s_adblCHF6MFixFloatQuote,
  711.             "SwapRate",
  712.             null,
  713.             null,
  714.             "DerivedParBasisSpread",
  715.             null,
  716.             null,
  717.             "DerivedParBasisSpread",
  718.             "---- CHF LIBOR 6M VANILLA CUBIC POLYNOMIAL FORWARD CURVE ---",
  719.             false
  720.         );

  721.         CCBSForwardCurve.ForwardCurveReferenceComponentBasis (
  722.             strReferenceCurrency,
  723.             strDerivedCurrency,
  724.             dtValue,
  725.             dcReference,
  726.             fc6MReference,
  727.             fc3MReference,
  728.             dcDerived,
  729.             fc6MDerived,
  730.             _dblFXCHFUSD,
  731.             scbcCubic,
  732.             s_astrCCBSTenor,
  733.             s_adblCCBSQuote,
  734.             true
  735.         );

  736.         CCBSForwardCurve.ForwardCurveReferenceComponentBasis (
  737.             strReferenceCurrency,
  738.             strDerivedCurrency,
  739.             dtValue,
  740.             dcReference,
  741.             fc6MReference,
  742.             fc3MReference,
  743.             dcDerived,
  744.             fc6MDerived,
  745.             _dblFXCHFUSD,
  746.             scbcCubic,
  747.             s_astrCCBSTenor,
  748.             s_adblCCBSQuote,
  749.             false
  750.         );

  751.         CCBSDiscountCurve.MakeDiscountCurve (
  752.             strReferenceCurrency,
  753.             strDerivedCurrency,
  754.             dtValue,
  755.             dcReference,
  756.             fc6MReference,
  757.             fc3MReference,
  758.             _dblFXCHFUSD,
  759.             scbcCubic,
  760.             s_astrCCBSTenor,
  761.             s_adblCCBSQuote,
  762.             s_adblIRSQuote,
  763.             true
  764.         );

  765.         CCBSDiscountCurve.MakeDiscountCurve (
  766.             strReferenceCurrency,
  767.             strDerivedCurrency,
  768.             dtValue,
  769.             dcReference,
  770.             fc6MReference,
  771.             fc3MReference,
  772.             _dblFXCHFUSD,
  773.             scbcCubic,
  774.             s_astrCCBSTenor,
  775.             s_adblCCBSQuote,
  776.             s_adblIRSQuote,
  777.             false
  778.         );

  779.         EnvManager.TerminateEnv();
  780.     }
  781. }