DerivedForwardStateShifted.java

  1. package org.drip.template.statebump;

  2. import java.util.Map;

  3. import org.drip.analytics.date.*;
  4. import org.drip.numerical.common.FormatUtil;
  5. import org.drip.param.market.CurveSurfaceQuoteContainer;
  6. import org.drip.param.valuation.ValuationParams;
  7. import org.drip.product.definition.Component;
  8. import org.drip.service.env.EnvManager;
  9. import org.drip.service.template.*;
  10. import org.drip.state.discount.*;
  11. import org.drip.state.forward.ForwardCurve;
  12. import org.drip.state.identifier.ForwardLabel;

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

  16. /*!
  17.  * Copyright (C) 2020 Lakshmi Krishnamurthy
  18.  * Copyright (C) 2019 Lakshmi Krishnamurthy
  19.  * Copyright (C) 2018 Lakshmi Krishnamurthy
  20.  * Copyright (C) 2017 Lakshmi Krishnamurthy
  21.  * Copyright (C) 2016 Lakshmi Krishnamurthy
  22.  * Copyright (C) 2015 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>DerivedForwardStateShifted</i> demonstrates the Generation of Tenor-bumped Derived Forward State.
  91.  *
  92.  *  <br><br>
  93.  *  <ul>
  94.  *      <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></li>
  95.  *      <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></li>
  96.  *      <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/template/README.md">Pricing/Risk Templates for Fixed Income Component Products</a></li>
  97.  *      <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/template/statebump/README.md">Shifted Latent State Construction Template</a></li>
  98.  *  </ul>
  99.  * <br><br>
  100.  *
  101.  * @author Lakshmi Krishnamurthy
  102.  */

  103. public class DerivedForwardStateShifted {

  104.     private static final MergedDiscountForwardCurve OvernightCurve (
  105.         final JulianDate dtSpot,
  106.         final String strCurrency)
  107.         throws Exception
  108.     {
  109.         String[] astrDepositMaturityTenor = new String[] {
  110.             "1D",
  111.             // "2D",
  112.             "3D"
  113.         };

  114.         double[] adblDepositQuote = new double[] {
  115.             0.0004,     // 1D
  116.             // 0.0004,      // 2D
  117.             0.0004      // 3D
  118.         };

  119.         String[] astrShortEndOISMaturityTenor = new String[] {
  120.             "1W",
  121.             "2W",
  122.             "3W",
  123.             "1M"
  124.         };

  125.         double[] adblShortEndOISQuote = new double[] {
  126.             0.00070,    //   1W
  127.             0.00069,    //   2W
  128.             0.00078,    //   3W
  129.             0.00074     //   1M
  130.         };

  131.         String[] astrOISFuturesEffectiveTenor = new String[] {
  132.             "1M",
  133.             "2M",
  134.             "3M",
  135.             "4M",
  136.             "5M"
  137.         };

  138.         String[] astrOISFuturesMaturityTenor = new String[] {
  139.             "1M",
  140.             "1M",
  141.             "1M",
  142.             "1M",
  143.             "1M"
  144.         };

  145.         double[] adblOISFuturesQuote = new double[] {
  146.              0.00046,    //   1M x 1M
  147.              0.00016,    //   2M x 1M
  148.             -0.00007,    //   3M x 1M
  149.             -0.00013,    //   4M x 1M
  150.             -0.00014     //   5M x 1M
  151.         };

  152.         String[] astrLongEndOISMaturityTenor = new String[] {
  153.             "15M",
  154.             "18M",
  155.             "21M",
  156.             "02Y",
  157.             "03Y",
  158.             "04Y",
  159.             "05Y",
  160.             "06Y",
  161.             "07Y",
  162.             "08Y",
  163.             "09Y",
  164.             "10Y",
  165.             "11Y",
  166.             "12Y",
  167.             "15Y",
  168.             "20Y",
  169.             "25Y",
  170.             "30Y"
  171.         };

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

  192.         return LatentMarketStateBuilder.SmoothOvernightCurve (
  193.             dtSpot,
  194.             strCurrency,
  195.             astrDepositMaturityTenor,
  196.             adblDepositQuote,
  197.             "Rate",
  198.             astrShortEndOISMaturityTenor,
  199.             adblShortEndOISQuote,
  200.             "SwapRate",
  201.             astrOISFuturesEffectiveTenor,
  202.             astrOISFuturesMaturityTenor,
  203.             adblOISFuturesQuote,
  204.             "SwapRate",
  205.             astrLongEndOISMaturityTenor,
  206.             adblLongEndOISQuote,
  207.             "SwapRate"
  208.         );
  209.     }

  210.     private static final ForwardCurve Reference (
  211.         final JulianDate dtSpot,
  212.         final MergedDiscountForwardCurve dcOvernight,
  213.         final String strReferenceForwardTenor)
  214.         throws Exception
  215.     {
  216.         ForwardLabel forwardLabel = ForwardLabel.Create (
  217.             dcOvernight.currency(),
  218.             strReferenceForwardTenor
  219.         );

  220.         String[] astrDepositMaturityTenor = new String[] {
  221.             "1D",
  222.             "1W",
  223.             "2W",
  224.             "3W",
  225.             "1M",
  226.             "2M",
  227.             "3M",
  228.             "4M",
  229.             "5M"
  230.         };

  231.         double[] adblDepositQuote = new double[] {
  232.             0.003565,   // 1D
  233.             0.003858,   // 1W
  234.             0.003840,   // 2W
  235.             0.003922,   // 3W
  236.             0.003869,   // 1M
  237.             0.003698,   // 2M
  238.             0.003527,   // 3M
  239.             0.003342,   // 4M
  240.             0.003225    // 5M
  241.         };

  242.         String[] astrFRAMaturityTenor = new String[] {
  243.             "00D",
  244.             "01M",
  245.             "02M",
  246.             "03M",
  247.             "04M",
  248.             "05M",
  249.             "06M",
  250.             "07M",
  251.             "08M",
  252.             "09M",
  253.             "10M",
  254.             "11M",
  255.             "12M",
  256.             "13M",
  257.             "14M",
  258.             "15M",
  259.             "16M",
  260.             "17M",
  261.             "18M"
  262.         };

  263.         double[] adblFRAQuote = new double[] {
  264.             0.003120,   //  0D
  265.             0.002930,   //  1M
  266.             0.002720,   //  2M
  267.             0.002600,   //  3M
  268.             0.002560,   //  4M
  269.             0.002520,   //  5M
  270.             0.002480,   //  6M
  271.             0.002540,   //  7M
  272.             0.002610,   //  8M
  273.             0.002670,   //  9M
  274.             0.002790,   // 10M
  275.             0.002910,   // 11M
  276.             0.003030,   // 12M
  277.             0.003180,   // 13M
  278.             0.003350,   // 14M
  279.             0.003520,   // 15M
  280.             0.003710,   // 16M
  281.             0.003890,   // 17M
  282.             0.004090    // 18M
  283.         };

  284.         String[] astrFixFloatMaturityTenor = new String[] {
  285.             "03Y",
  286.             "04Y",
  287.             "05Y",
  288.             "06Y",
  289.             "07Y",
  290.             "08Y",
  291.             "09Y",
  292.             "10Y",
  293.             "12Y",
  294.             "15Y",
  295.             "20Y",
  296.             "25Y",
  297.             "30Y",
  298.             "35Y",
  299.             "40Y",
  300.             "50Y",
  301.             "60Y"
  302.         };

  303.         double[] adblFixFloatQuote = new double[] {
  304.             0.004240,   //  3Y
  305.             0.005760,   //  4Y          
  306.             0.007620,   //  5Y
  307.             0.009540,   //  6Y
  308.             0.011350,   //  7Y
  309.             0.013030,   //  8Y
  310.             0.014520,   //  9Y
  311.             0.015840,   // 10Y
  312.             0.018090,   // 12Y
  313.             0.020370,   // 15Y
  314.             0.021870,   // 20Y
  315.             0.022340,   // 25Y
  316.             0.022560,   // 30Y
  317.             0.022950,   // 35Y
  318.             0.023480,   // 40Y
  319.             0.024210,   // 50Y
  320.             0.024630    // 60Y
  321.         };

  322.         return LatentMarketStateBuilder.SmoothForwardCurve (
  323.             dtSpot,
  324.             forwardLabel,
  325.             astrDepositMaturityTenor,
  326.             adblDepositQuote,
  327.             "ForwardRate",
  328.             astrFRAMaturityTenor,
  329.             adblFRAQuote,
  330.             "ParForwardRate",
  331.             astrFixFloatMaturityTenor,
  332.             adblFixFloatQuote,
  333.             "SwapRate",
  334.             null,
  335.             null,
  336.             "DerivedParBasisSpread",
  337.             null,
  338.             null,
  339.             "DerivedParBasisSpread",
  340.             dcOvernight,
  341.             null
  342.         );
  343.     }

  344.     public static final void main (
  345.         final String[] astrArgs)
  346.         throws Exception
  347.     {
  348.         /*
  349.          * Initialize the Credit Analytics Library
  350.          */

  351.         EnvManager.InitEnv ("");

  352.         String strCurrency = "GBP";
  353.         String strDerivedForwardTenor = "3M";
  354.         String strReferenceForwardTenor = "6M";
  355.         double dblBump = 0.0001;
  356.         boolean bIsProportional = false;

  357.         JulianDate dtSpot = DateUtil.CreateFromYMD (
  358.             2017,
  359.             DateUtil.DECEMBER,
  360.             21
  361.         );

  362.         MergedDiscountForwardCurve dcOvernight = OvernightCurve (
  363.             dtSpot,
  364.             strCurrency
  365.         );

  366.         ForwardCurve fcReference = Reference (
  367.             dtSpot,
  368.             dcOvernight,
  369.             strReferenceForwardTenor
  370.         );

  371.         ForwardLabel forwardLabel = ForwardLabel.Create (
  372.             strCurrency,
  373.             strDerivedForwardTenor
  374.         );

  375.         String[] astrDepositMaturityTenor = new String[] {
  376.             "2W",
  377.             "3W",
  378.             "1M",
  379.             "2M"
  380.         };

  381.         double[] adblDepositQuote = new double[] {
  382.             0.001865,   // 2W
  383.             0.001969,   // 3W
  384.             0.001951,   // 1M
  385.             0.001874    // 2M
  386.         };

  387.         String[] astrFRAMaturityTenor = new String[] {
  388.             "00D",
  389.             "01M",
  390.             "03M",
  391.             "06M",
  392.             "09M",
  393.             "12M",
  394.             "15M",
  395.             "18M",
  396.             "21M"
  397.         };

  398.         double[] adblFRAQuote = new double[] {
  399.             0.001790,   //  0D
  400.             0.001775,   //  1M
  401.             0.001274,   //  3M
  402.             0.001222,   //  6M
  403.             0.001269,   //  9M
  404.             0.001565,   // 12M
  405.             0.001961,   // 15M
  406.             0.002556,   // 18M
  407.             0.003101    // 21M
  408.         };

  409.         String[] astrFixFloatMaturityTenor = new String[] {
  410.             "03Y",
  411.             "04Y",
  412.             "05Y",
  413.             "06Y",
  414.             "07Y",
  415.             "08Y",
  416.             "09Y",
  417.             "10Y",
  418.             "12Y",
  419.             "15Y",
  420.             "20Y",
  421.             "25Y",
  422.             "30Y"
  423.         };

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

  439.         String[] astrSyntheticFloatFloatMaturityTenor = new String[] {
  440.             "35Y",
  441.             "40Y",
  442.             "50Y",
  443.             "60Y"
  444.         };

  445.         double[] adblSyntheticFloatFloatQuote = new double[] {
  446.             0.00065,    // 35Y
  447.             0.00060,    // 40Y
  448.             0.00054,    // 50Y
  449.             0.00050     // 60Y
  450.         };

  451.         Map<String, ForwardCurve> mapDerivedForwardCurve = LatentMarketStateBuilder.BumpedForwardCurve (
  452.             dtSpot,
  453.             forwardLabel,
  454.             astrDepositMaturityTenor,
  455.             adblDepositQuote,
  456.             "ForwardRate",
  457.             astrFRAMaturityTenor,
  458.             adblFRAQuote,
  459.             "ParForwardRate",
  460.             astrFixFloatMaturityTenor,
  461.             adblFixFloatQuote,
  462.             "SwapRate",
  463.             null,
  464.             null,
  465.             "DerivedParBasisSpread",
  466.             astrSyntheticFloatFloatMaturityTenor,
  467.             adblSyntheticFloatFloatQuote,
  468.             "DerivedParBasisSpread",
  469.             dcOvernight,
  470.             fcReference,
  471.             LatentMarketStateBuilder.SMOOTH,
  472.             dblBump,
  473.             bIsProportional
  474.         );

  475.         Component[] aDepositComp = OTCInstrumentBuilder.ForwardRateDeposit (
  476.             dtSpot,
  477.             astrDepositMaturityTenor,
  478.             forwardLabel
  479.         );

  480.         Component[] aFRAComp = OTCInstrumentBuilder.FRAStandard (
  481.             dtSpot,
  482.             forwardLabel,
  483.             astrFRAMaturityTenor,
  484.             adblFRAQuote
  485.         );

  486.         Component[] aFixFloatComp = OTCInstrumentBuilder.FixFloatCustom (
  487.             dtSpot,
  488.             forwardLabel,
  489.             astrFixFloatMaturityTenor
  490.         );

  491.         Component[] aSyntheticFloatFloatComp = OTCInstrumentBuilder.FloatFloat (
  492.             dtSpot,
  493.             strCurrency,
  494.             strDerivedForwardTenor,
  495.             astrSyntheticFloatFloatMaturityTenor,
  496.             0.
  497.         );

  498.         ValuationParams valParams = ValuationParams.Spot (dtSpot.julian());

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

  500.         for (Map.Entry<String, ForwardCurve> meForward : mapDerivedForwardCurve.entrySet()) {
  501.             String strKey = meForward.getKey();

  502.             if (!strKey.startsWith ("deposit")) continue;

  503.             CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();

  504.             csqc.setFundingState (dcOvernight);

  505.             csqc.setForwardState (fcReference);

  506.             csqc.setForwardState (meForward.getValue());

  507.             System.out.print ("\t|  [" + meForward.getKey() + "] => ");

  508.             for (Component comp : aDepositComp)
  509.                 System.out.print (FormatUtil.FormatDouble (
  510.                     comp.measureValue (
  511.                         valParams,
  512.                         null,
  513.                         csqc,
  514.                         null,
  515.                         "ForwardRate"
  516.                     ), 1, 6, 1.) + " |"
  517.                 );

  518.             System.out.print ("|\n");
  519.         }

  520.         System.out.println ("\t|--------------------------------------------------------------||");

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

  522.         for (Map.Entry<String, ForwardCurve> meForward : mapDerivedForwardCurve.entrySet()) {
  523.             String strKey = meForward.getKey();

  524.             if (!strKey.startsWith ("fra")) continue;

  525.             CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();

  526.             csqc.setFundingState (dcOvernight);

  527.             csqc.setForwardState (fcReference);

  528.             csqc.setForwardState (meForward.getValue());

  529.             System.out.print ("\t|  [" + meForward.getKey() + "] => ");

  530.             for (Component comp : aFRAComp)
  531.                 System.out.print (FormatUtil.FormatDouble (
  532.                     comp.measureValue (
  533.                         valParams,
  534.                         null,
  535.                         csqc,
  536.                         null,
  537.                         "ParForwardRate"
  538.                     ), 1, 4, 1.) + " |"
  539.                 );

  540.             System.out.print ("|\n");
  541.         }

  542.         System.out.println ("\t|---------------------------------------------------------------------------------------||");

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

  544.         for (Map.Entry<String, ForwardCurve> meForward : mapDerivedForwardCurve.entrySet()) {
  545.             String strKey = meForward.getKey();

  546.             if (!strKey.startsWith ("fixfloat")) continue;

  547.             CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();

  548.             csqc.setFundingState (dcOvernight);

  549.             csqc.setForwardState (fcReference);

  550.             csqc.setForwardState (meForward.getValue());

  551.             System.out.print ("\t|  [" + meForward.getKey() + "] => ");

  552.             for (Component comp : aFixFloatComp)
  553.                 System.out.print (FormatUtil.FormatDouble (
  554.                     comp.measureValue (
  555.                         valParams,
  556.                         null,
  557.                         csqc,
  558.                         null,
  559.                         "SwapRate"
  560.                     ), 1, 4, 1.) + " |"
  561.                 );

  562.             System.out.print ("|\n");
  563.         }

  564.         System.out.println ("\t|----------------------------------------------------------------------------------------------------------------------------||");

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

  566.         for (Map.Entry<String, ForwardCurve> meForward : mapDerivedForwardCurve.entrySet()) {
  567.             String strKey = meForward.getKey();

  568.             if (!strKey.startsWith ("syntheticfloatfloat")) continue;

  569.             CurveSurfaceQuoteContainer csqc = new CurveSurfaceQuoteContainer();

  570.             csqc.setFundingState (dcOvernight);

  571.             csqc.setForwardState (fcReference);

  572.             csqc.setForwardState (meForward.getValue());

  573.             System.out.print ("\t|  [" + meForward.getKey() + "] => ");

  574.             for (Component comp : aSyntheticFloatFloatComp)
  575.                 System.out.print (FormatUtil.FormatDouble (
  576.                     comp.measureValue (
  577.                         valParams,
  578.                         null,
  579.                         csqc,
  580.                         null,
  581.                         "DerivedParBasisSpread"
  582.                     ), 1, 4, 1.) + " |"
  583.                 );

  584.             System.out.print ("|\n");
  585.         }

  586.         System.out.println ("\t|-----------------------------------------------------------||");

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

  588.         CurveSurfaceQuoteContainer csqcBase = new CurveSurfaceQuoteContainer();

  589.         csqcBase.setFundingState (dcOvernight);

  590.         csqcBase.setForwardState (fcReference);

  591.         csqcBase.setForwardState (mapDerivedForwardCurve.get ("Base"));

  592.         CurveSurfaceQuoteContainer csqcBump = new CurveSurfaceQuoteContainer();

  593.         csqcBump.setFundingState (dcOvernight);

  594.         csqcBump.setForwardState (fcReference);

  595.         csqcBump.setForwardState (mapDerivedForwardCurve.get ("Bump"));

  596.         for (Component comp : aDepositComp)
  597.             System.out.println (
  598.                 "\t| FORWARD RATE  => " +
  599.                 comp.maturityDate() + " | " +
  600.                 FormatUtil.FormatDouble (comp.measureValue (
  601.                     valParams,
  602.                     null,
  603.                     csqcBase,
  604.                     null,
  605.                     "ForwardRate"
  606.                 ), 1, 6, 1.) + " | " +
  607.                 FormatUtil.FormatDouble (comp.measureValue (
  608.                     valParams,
  609.                     null,
  610.                     csqcBump,
  611.                     null,
  612.                     "ForwardRate"
  613.                 ), 1, 6, 1.) + " ||"
  614.             );

  615.         for (Component comp : aFRAComp)
  616.             System.out.println (
  617.                 "\t| FORWARD RATE  => " +
  618.                 comp.maturityDate() + " | " +
  619.                 FormatUtil.FormatDouble (comp.measureValue (
  620.                     valParams,
  621.                     null,
  622.                     csqcBase,
  623.                     null,
  624.                     "ParForwardRate"
  625.                 ), 1, 6, 1.) + " | " +
  626.                 FormatUtil.FormatDouble (comp.measureValue (
  627.                     valParams,
  628.                     null,
  629.                     csqcBase,
  630.                     null,
  631.                     "ParForwardRate"
  632.                 ), 1, 6, 1.) + " ||"
  633.             );

  634.         for (Component comp : aFixFloatComp)
  635.             System.out.println (
  636.                 "\t|  SWAP   RATE  => " +
  637.                 comp.maturityDate() + " | " +
  638.                 FormatUtil.FormatDouble (comp.measureValue (
  639.                     valParams,
  640.                     null,
  641.                     csqcBase,
  642.                     null,
  643.                     "SwapRate"
  644.                 ), 1, 6, 1.) + " | " +
  645.                 FormatUtil.FormatDouble (comp.measureValue (
  646.                     valParams,
  647.                     null,
  648.                     csqcBump,
  649.                     null,
  650.                     "SwapRate"
  651.                 ), 1, 6, 1.) + " ||"
  652.             );

  653.         for (Component comp : aSyntheticFloatFloatComp)
  654.             System.out.println (
  655.                 "\t| DERIVED BASIS => " +
  656.                 comp.maturityDate() + " | " +
  657.                 FormatUtil.FormatDouble (comp.measureValue (
  658.                     valParams,
  659.                     null,
  660.                     csqcBase,
  661.                     null,
  662.                     "DerivedParBasisSpread"
  663.                 ), 1, 6, 1.) + " | " +
  664.                 FormatUtil.FormatDouble (comp.measureValue (
  665.                     valParams,
  666.                     null,
  667.                     csqcBump,
  668.                     null,
  669.                     "DerivedParBasisSpread"
  670.                 ), 1, 6, 1.) + " ||"
  671.             );

  672.         System.out.println ("\t|-----------------------------------------------------||");
  673.     }
  674. }