FixFloatComponent.java

  1. package org.drip.product.rates;

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

  80. /**
  81.  * <i>FixFloatComponent</i> contains the implementation of the Fix-Float Index Basis Swap product
  82.  * contract/valuation details. It is made off one Reference Fixed stream and one Derived floating stream. It
  83.  * exports the following functionality:
  84.  *
  85.  * <br><br>
  86.  *  <ul>
  87.  *      <li>
  88.  *          Standard/Custom Constructor for the FixFloatComponent
  89.  *      </li>
  90.  *      <li>
  91.  *          Dates: Effective, Maturity, Coupon dates and Product settlement Parameters
  92.  *      </li>
  93.  *      <li>
  94.  *          Coupon/Notional Outstanding as well as schedules
  95.  *      </li>
  96.  *      <li>
  97.  *          Retrieve the constituent floating streams
  98.  *      </li>
  99.  *      <li>
  100.  *          Market Parameters: Discount, Forward, Credit, Treasury Curves
  101.  *      </li>
  102.  *      <li>
  103.  *          Cash Flow Periods: Coupon flows and (Optionally) Loss Flows
  104.  *      </li>
  105.  *      <li>
  106.  *          Valuation: Named Measure Generation
  107.  *      </li>
  108.  *      <li>
  109.  *          Calibration: The codes and constraints generation
  110.  *      </li>
  111.  *      <li>
  112.  *          Jacobians: Quote/DF and PV/DF micro-Jacobian generation
  113.  *      </li>
  114.  *      <li>
  115.  *          Serialization into and de-serialization out of byte arrays
  116.  *      </li>
  117.  *  </ul>
  118.  *
  119.  * <br><br>
  120.  *  <ul>
  121.  *      <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></li>
  122.  *      <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></li>
  123.  *      <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/product/README.md">Product Components/Baskets for Credit, FRA, FX, Govvie, Rates, and Option AssetClasses</a></li>
  124.  *      <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/product/rates/README.md">Fixed Income Multi-Stream Components</a></li>
  125.  *  </ul>
  126.  * <br><br>
  127.  *
  128.  * @author Lakshmi Krishnamurthy
  129.  */

  130. public class FixFloatComponent extends org.drip.product.rates.DualStreamComponent
  131. {
  132.     private java.lang.String _strCode = "";
  133.     private org.drip.product.rates.Stream _fixReference = null;
  134.     private org.drip.product.rates.Stream _floatDerived = null;
  135.     private org.drip.param.valuation.CashSettleParams _csp = null;

  136.     /**
  137.      * Construct the FixFloatComponent from the Reference Fixed and the Derived Floating Streams.
  138.      *
  139.      * @param fixReference The Reference Fixed Stream
  140.      * @param floatDerived The Derived Floating Stream
  141.      * @param csp Cash Settle Parameters Instance
  142.      *
  143.      * @throws java.lang.Exception Thrown if the inputs are invalid
  144.      */

  145.     public FixFloatComponent (
  146.         final org.drip.product.rates.Stream fixReference,
  147.         final org.drip.product.rates.Stream floatDerived,
  148.         final org.drip.param.valuation.CashSettleParams csp)
  149.         throws java.lang.Exception
  150.     {
  151.         if (null == (_fixReference = fixReference) || null == (_floatDerived = floatDerived))
  152.             throw new java.lang.Exception ("FixFloatComponent ctr: Invalid Inputs");

  153.         _csp = csp;
  154.     }

  155.     @Override public void setPrimaryCode (
  156.         final java.lang.String strCode)
  157.     {
  158.         _strCode = strCode;
  159.     }

  160.     @Override public java.lang.String primaryCode()
  161.     {
  162.         return _strCode;
  163.     }

  164.     @Override public java.lang.String name()
  165.     {
  166.         return _strCode;
  167.     }

  168.     @Override public org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.String> couponCurrency()
  169.     {
  170.         org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.String> mapCouponCurrency = new
  171.             org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.String>();

  172.         mapCouponCurrency.put ("DERIVED", _floatDerived.couponCurrency());

  173.         mapCouponCurrency.put ("REFERENCE", _fixReference.couponCurrency());

  174.         return mapCouponCurrency;
  175.     }

  176.     @Override public java.lang.String payCurrency()
  177.     {
  178.         return _fixReference.payCurrency();
  179.     }

  180.     @Override public java.lang.String principalCurrency()
  181.     {
  182.         return null;
  183.     }

  184.     @Override public double initialNotional()
  185.         throws java.lang.Exception
  186.     {
  187.         return _fixReference.initialNotional();
  188.     }

  189.     @Override public double notional (
  190.         final int iDate)
  191.         throws java.lang.Exception
  192.     {
  193.         return _fixReference.notional (iDate);
  194.     }

  195.     @Override public double notional (
  196.         final int iDate1,
  197.         final int iDate2)
  198.         throws java.lang.Exception
  199.     {
  200.         return _fixReference.notional (iDate1, iDate2);
  201.     }

  202.     @Override public org.drip.analytics.output.CompositePeriodCouponMetrics couponMetrics (
  203.         final int iAccrualEndDate,
  204.         final org.drip.param.valuation.ValuationParams valParams,
  205.         final org.drip.param.market.CurveSurfaceQuoteContainer csqs)
  206.     {
  207.         return null;
  208.     }

  209.     @Override public int freq()
  210.     {
  211.         return _fixReference.freq();
  212.     }

  213.     @Override public org.drip.state.identifier.EntityCDSLabel creditLabel()
  214.     {
  215.         return _fixReference.creditLabel();
  216.     }

  217.     @Override public
  218.         org.drip.analytics.support.CaseInsensitiveTreeMap<org.drip.state.identifier.ForwardLabel>
  219.             forwardLabel()
  220.     {
  221.         org.drip.analytics.support.CaseInsensitiveTreeMap<org.drip.state.identifier.ForwardLabel>
  222.             mapForwardLabel = new
  223.                 org.drip.analytics.support.CaseInsensitiveTreeMap<org.drip.state.identifier.ForwardLabel>();

  224.         mapForwardLabel.put ("DERIVED", _floatDerived.forwardLabel());

  225.         return mapForwardLabel;
  226.     }

  227.     @Override public
  228.         org.drip.analytics.support.CaseInsensitiveTreeMap<org.drip.state.identifier.OTCFixFloatLabel>
  229.             otcFixFloatLabel()
  230.     {
  231.         return null;
  232.     }

  233.     @Override public org.drip.state.identifier.FundingLabel fundingLabel()
  234.     {
  235.         return _fixReference.fundingLabel();
  236.     }

  237.     @Override public org.drip.state.identifier.GovvieLabel govvieLabel()
  238.     {
  239.         return org.drip.state.identifier.GovvieLabel.Standard (payCurrency());
  240.     }

  241.     @Override public org.drip.analytics.support.CaseInsensitiveTreeMap<org.drip.state.identifier.FXLabel>
  242.         fxLabel()
  243.     {
  244.         org.drip.state.identifier.FXLabel fxLabelReference = _fixReference.fxLabel();

  245.         org.drip.state.identifier.FXLabel fxLabelDerived = _floatDerived.fxLabel();

  246.         if (null != fxLabelReference && null != fxLabelDerived) return null;

  247.         org.drip.analytics.support.CaseInsensitiveTreeMap<org.drip.state.identifier.FXLabel> mapFXLabel = new
  248.             org.drip.analytics.support.CaseInsensitiveTreeMap<org.drip.state.identifier.FXLabel>();

  249.         if (null != fxLabelReference) mapFXLabel.put ("REFERENCE", fxLabelReference);

  250.         if (null != fxLabelDerived) mapFXLabel.put ("DERIVED", fxLabelDerived);

  251.         return mapFXLabel;
  252.     }

  253.     @Override public
  254.         org.drip.analytics.support.CaseInsensitiveTreeMap<org.drip.state.identifier.VolatilityLabel>
  255.             volatilityLabel()
  256.     {
  257.         return null;
  258.     }

  259.     @Override public org.drip.product.rates.Stream referenceStream()
  260.     {
  261.         return _fixReference;
  262.     }

  263.     @Override public org.drip.product.rates.Stream derivedStream()
  264.     {
  265.         return _floatDerived;
  266.     }

  267.     @Override public org.drip.analytics.date.JulianDate effectiveDate()
  268.     {
  269.         org.drip.analytics.date.JulianDate dtFloatReferenceEffective = _fixReference.effective();

  270.         org.drip.analytics.date.JulianDate dtFloatDerivedEffective = _floatDerived.effective();

  271.         return dtFloatReferenceEffective.julian() < dtFloatDerivedEffective.julian() ?
  272.             dtFloatReferenceEffective : dtFloatDerivedEffective;
  273.     }

  274.     @Override public org.drip.analytics.date.JulianDate maturityDate()
  275.     {
  276.         org.drip.analytics.date.JulianDate dtFixReferenceMaturity = _fixReference.maturity();

  277.         org.drip.analytics.date.JulianDate dtFloatDerivedMaturity = _floatDerived.maturity();

  278.         return dtFixReferenceMaturity.julian() > dtFloatDerivedMaturity.julian() ?
  279.             dtFixReferenceMaturity : dtFloatDerivedMaturity;
  280.     }

  281.     @Override public org.drip.analytics.date.JulianDate firstCouponDate()
  282.     {
  283.         org.drip.analytics.date.JulianDate dtFloatReferenceFirstCoupon = _fixReference.firstCouponDate();

  284.         org.drip.analytics.date.JulianDate dtFloatDerivedFirstCoupon = _floatDerived.firstCouponDate();

  285.         return dtFloatReferenceFirstCoupon.julian() < dtFloatDerivedFirstCoupon.julian() ?
  286.             dtFloatReferenceFirstCoupon : dtFloatDerivedFirstCoupon;
  287.     }

  288.     @Override public java.util.List<org.drip.analytics.cashflow.CompositePeriod> couponPeriods()
  289.     {
  290.         java.util.List<org.drip.analytics.cashflow.CompositePeriod> lsCP = new
  291.             java.util.ArrayList<org.drip.analytics.cashflow.CompositePeriod>();

  292.         lsCP.addAll (_fixReference.cashFlowPeriod());

  293.         lsCP.addAll (_floatDerived.cashFlowPeriod());

  294.         return lsCP;
  295.     }

  296.     @Override public org.drip.param.valuation.CashSettleParams cashSettleParams()
  297.     {
  298.         return _csp;
  299.     }

  300.     @Override public org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> value (
  301.         final org.drip.param.valuation.ValuationParams valParams,
  302.         final org.drip.param.pricer.CreditPricerParams pricerParams,
  303.         final org.drip.param.market.CurveSurfaceQuoteContainer csqs,
  304.         final org.drip.param.valuation.ValuationCustomizationParams quotingParams)
  305.     {
  306.         long lStart = System.nanoTime();

  307.         int iValueDate = valParams.valueDate();

  308.         org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> mapFixedReferenceStreamResult =
  309.             _fixReference.value (valParams, pricerParams, csqs, quotingParams);

  310.         org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> mapFloatDerivedStreamResult =
  311.             _floatDerived.value (valParams, pricerParams, csqs, quotingParams);

  312.         if (null == mapFixedReferenceStreamResult || 0 == mapFixedReferenceStreamResult.size() || null ==
  313.             mapFloatDerivedStreamResult || 0 == mapFloatDerivedStreamResult.size())
  314.             return null;

  315.         org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> mapResult = new
  316.             org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double>();

  317.         if (!org.drip.analytics.support.Helper.AccumulateMeasures (mapResult, _fixReference.name(),
  318.             mapFixedReferenceStreamResult))
  319.             return null;

  320.         if (!org.drip.analytics.support.Helper.AccumulateMeasures (mapResult, _floatDerived.name(),
  321.             mapFloatDerivedStreamResult))
  322.             return null;

  323.         double dblDerivedAccrued = mapFloatDerivedStreamResult.get ("Accrued");

  324.         double dblDerivedAccrued01 = mapFloatDerivedStreamResult.get ("Accrued01");

  325.         double dblDerivedCleanDV01 = mapFloatDerivedStreamResult.get ("CleanDV01");

  326.         double dblDerivedCleanPV = mapFloatDerivedStreamResult.get ("CleanPV");

  327.         double dblDerivedDirtyDV01 = mapFloatDerivedStreamResult.get ("DirtyDV01");

  328.         double dblDerivedDirtyPV = mapFloatDerivedStreamResult.get ("DirtyPV");

  329.         double dblDerivedPV = mapFloatDerivedStreamResult.get ("PV");

  330.         double dblDerivedCumulativeConvexityAdjustmentPremium = mapFloatDerivedStreamResult.get
  331.             ("CumulativeConvexityAdjustmentPremiumUpfront");

  332.         double dblDerivedCumulativeCouponAmount = mapFloatDerivedStreamResult.get ("CumulativeCouponAmount");

  333.         double dblDerivedCumulativeCouponDCF = mapFloatDerivedStreamResult.get ("CumulativeCouponDCF");

  334.         double dblFixing01 = mapFloatDerivedStreamResult.get ("Fixing01");

  335.         double dblReferenceAccrued = mapFixedReferenceStreamResult.get ("Accrued");

  336.         double dblReferenceAccrued01 = mapFixedReferenceStreamResult.get ("Accrued01");

  337.         double dblReferenceCleanDV01 = mapFixedReferenceStreamResult.get ("CleanDV01");

  338.         double dblReferenceCleanPV = mapFixedReferenceStreamResult.get ("CleanPV");

  339.         double dblReferenceDirtyPV = mapFixedReferenceStreamResult.get ("DirtyPV");

  340.         double dblReferenceCumulativeConvexityAdjustmentPremium = mapFixedReferenceStreamResult.get
  341.             ("CumulativeConvexityAdjustmentPremium");

  342.         double dblReferenceCumulativeCouponAmount = mapFixedReferenceStreamResult.get
  343.             ("CumulativeCouponAmount");

  344.         double dblReferenceCumulativeCouponDCF = mapFixedReferenceStreamResult.get ("CumulativeCouponDCF");

  345.         double dblValueNotional = java.lang.Double.NaN;
  346.         double dblAccrued = dblDerivedAccrued + dblReferenceAccrued;
  347.         double dblCleanPV = dblReferenceCleanPV + dblDerivedCleanPV;
  348.         double dblParFixedCoupon = -0.0001 * dblDerivedCleanPV / dblReferenceCleanDV01;

  349.         mapResult.put ("Accrued", dblAccrued);

  350.         mapResult.put ("CleanFixedDV01", dblReferenceCleanDV01);

  351.         mapResult.put ("CleanFloatingDV01", dblDerivedCleanDV01);

  352.         mapResult.put ("CleanFloatingPV", dblDerivedCleanPV);

  353.         mapResult.put ("CleanPV", dblCleanPV);

  354.         mapResult.put ("CumulativeConvexityAdjustmentPremium", _fixReference.initialNotional() *
  355.             dblReferenceCumulativeConvexityAdjustmentPremium + _floatDerived.initialNotional() *
  356.                 dblDerivedCumulativeConvexityAdjustmentPremium);

  357.         mapResult.put ("CumulativeCouponAmount", dblDerivedCumulativeCouponAmount +
  358.             dblReferenceCumulativeCouponAmount);

  359.         mapResult.put ("CumulativeCouponDCF", dblDerivedCumulativeCouponDCF +
  360.             dblReferenceCumulativeCouponDCF);

  361.         mapResult.put ("DerivedAccrued", dblDerivedAccrued);

  362.         mapResult.put ("DerivedAccrued01", dblDerivedAccrued01);

  363.         mapResult.put ("DerivedCleanDV01", dblDerivedCleanDV01);

  364.         mapResult.put ("DerivedCleanPV", dblDerivedCleanPV);

  365.         mapResult.put ("DerivedDirtyDV01", dblDerivedDirtyDV01);

  366.         mapResult.put ("DerivedDirtyPV", dblDerivedDirtyPV);

  367.         mapResult.put ("DerivedDV01", dblDerivedCleanDV01);

  368.         mapResult.put ("DerivedFixing01", dblFixing01);

  369.         mapResult.put ("DerivedParBasisSpread", -1. * dblCleanPV / dblDerivedCleanDV01);

  370.         mapResult.put ("DerivedPV", dblDerivedPV);

  371.         mapResult.put ("DerivedCumulativeConvexityAdjustmentFactor", mapFloatDerivedStreamResult.get
  372.             ("CumulativeConvexityAdjustmentFactor"));

  373.         mapResult.put ("DerivedCumulativeConvexityAdjustmentPremium",
  374.             dblDerivedCumulativeConvexityAdjustmentPremium);

  375.         mapResult.put ("DerivedCumulativeCouponAmount", dblDerivedCumulativeCouponAmount);

  376.         mapResult.put ("DerivedCumulativeCouponDCF", dblDerivedCumulativeCouponDCF);

  377.         mapResult.put ("DerivedResetDate", mapFloatDerivedStreamResult.get ("ResetDate"));

  378.         mapResult.put ("DerivedResetRate", mapFloatDerivedStreamResult.get ("ResetRate"));

  379.         mapResult.put ("DirtyFixedDV01", mapFixedReferenceStreamResult.get ("DirtyDV01"));

  380.         mapResult.put ("DirtyFixedPV", dblReferenceDirtyPV);

  381.         mapResult.put ("DirtyFloatingDV01", dblDerivedDirtyDV01);

  382.         mapResult.put ("DirtyFloatingPV", dblDerivedDirtyPV);

  383.         mapResult.put ("DirtyPV", dblDerivedDirtyPV + dblReferenceDirtyPV);

  384.         mapResult.put ("FairPremium", dblParFixedCoupon);

  385.         mapResult.put ("FixedAccrued", dblReferenceAccrued);

  386.         mapResult.put ("FixedAccrued01", dblReferenceAccrued01);

  387.         mapResult.put ("FixedDV01", dblReferenceCleanDV01);

  388.         mapResult.put ("FloatAccrued", dblDerivedAccrued);

  389.         mapResult.put ("FloatAccrued01", dblDerivedAccrued01);

  390.         mapResult.put ("FloatDV01", dblDerivedCleanDV01);

  391.         mapResult.put ("Fixing01", dblFixing01);

  392.         mapResult.put ("ParFixedCoupon", dblParFixedCoupon);

  393.         mapResult.put ("ParRate", dblParFixedCoupon);

  394.         mapResult.put ("ParSwapRate", dblParFixedCoupon);

  395.         mapResult.put ("PV", dblCleanPV);

  396.         mapResult.put ("Rate", dblParFixedCoupon);

  397.         mapResult.put ("ReferenceAccrued", dblReferenceAccrued);

  398.         mapResult.put ("ReferenceAccrued01", dblReferenceAccrued01);

  399.         mapResult.put ("ReferenceCleanDV01", dblReferenceCleanDV01);

  400.         mapResult.put ("ReferenceCleanPV", dblReferenceCleanPV);

  401.         mapResult.put ("ReferenceCumulativeCouponAmount", dblReferenceCumulativeCouponAmount);

  402.         mapResult.put ("ReferenceCumulativeCouponDCF", dblReferenceCumulativeCouponDCF);

  403.         mapResult.put ("ReferenceDirtyDV01", mapFixedReferenceStreamResult.get ("DirtyDV01"));

  404.         mapResult.put ("ReferenceDirtyPV", dblReferenceDirtyPV);

  405.         mapResult.put ("ReferenceDV01", dblReferenceCleanDV01);

  406.         mapResult.put ("ReferenceParBasisSpread", -1. * dblCleanPV / dblReferenceCleanDV01);

  407.         mapResult.put ("ReferencePV", dblReferenceCleanPV);

  408.         mapResult.put ("ReferenceCumulativeConvexityAdjustmentFactor", mapFixedReferenceStreamResult.get
  409.             ("CumulativeConvexityAdjustmentFactor"));

  410.         mapResult.put ("ReferenceCumulativeConvexityAdjustmentPremium",
  411.             dblReferenceCumulativeConvexityAdjustmentPremium);

  412.         mapResult.put ("ResetDate", mapFloatDerivedStreamResult.get ("ResetDate"));

  413.         mapResult.put ("ResetRate", mapFloatDerivedStreamResult.get ("ResetRate"));

  414.         mapResult.put ("SwapRate", dblParFixedCoupon);

  415.         mapResult.put ("Upfront", mapFixedReferenceStreamResult.get ("Upfront") +
  416.             mapFloatDerivedStreamResult.get ("Upfront"));

  417.         try {
  418.             dblValueNotional = notional (iValueDate);

  419.             mapResult.put ("InitialNotional", initialNotional());
  420.         } catch (java.lang.Exception e) {
  421.             e.printStackTrace();
  422.         }

  423.         try {
  424.             if (org.drip.numerical.common.NumberUtil.IsValid (dblValueNotional)) {
  425.                 double dblCleanPrice = 100. * (1. + (dblCleanPV / initialNotional() / dblValueNotional));

  426.                 org.drip.state.discount.MergedDiscountForwardCurve dcFunding = csqs.fundingState (fundingLabel());

  427.                 if (null == dcFunding) return null;

  428.                 int iStartDate = effectiveDate().julian();

  429.                 double dblTelescopedFloatingPV = dcFunding.df (iStartDate > iValueDate ? iStartDate :
  430.                     iValueDate) - dcFunding.df (maturityDate());

  431.                 mapResult.put ("CalibFloatingPV", dblTelescopedFloatingPV);

  432.                 mapResult.put ("CalibSwapRate", java.lang.Math.abs (0.0001 * dblTelescopedFloatingPV /
  433.                     dblReferenceCleanDV01 * notional (iValueDate)));

  434.                 mapResult.put ("CleanPrice", dblCleanPrice);

  435.                 mapResult.put ("DirtyPrice", dblCleanPrice + dblAccrued);

  436.                 mapResult.put ("Price", dblCleanPrice);
  437.             }
  438.         } catch (java.lang.Exception e) {
  439.             e.printStackTrace();

  440.             return null;
  441.         }

  442.         mapResult.put ("CalcTime", (System.nanoTime() - lStart) * 1.e-09);

  443.         return mapResult;
  444.     }

  445.     @Override public java.util.Set<java.lang.String> measureNames()
  446.     {
  447.         java.util.Set<java.lang.String> setstrMeasureNames = new java.util.TreeSet<java.lang.String>();

  448.         setstrMeasureNames.add ("Accrued");

  449.         setstrMeasureNames.add ("CalcTime");

  450.         setstrMeasureNames.add ("CalibFloatingPV");

  451.         setstrMeasureNames.add ("CalibSwapRate");

  452.         setstrMeasureNames.add ("CleanFixedDV01");

  453.         setstrMeasureNames.add ("CleanFloatingDV01");

  454.         setstrMeasureNames.add ("CleanFloatingPV");

  455.         setstrMeasureNames.add ("CleanPrice");

  456.         setstrMeasureNames.add ("CleanPV");

  457.         setstrMeasureNames.add ("CumulativeCouponAmount");

  458.         setstrMeasureNames.add ("CumulativeCouponDCF");

  459.         setstrMeasureNames.add ("DerivedAccrued01");

  460.         setstrMeasureNames.add ("DerivedAccrued");

  461.         setstrMeasureNames.add ("DerivedCleanDV01");

  462.         setstrMeasureNames.add ("DerivedCleanPV");

  463.         setstrMeasureNames.add ("DerivedCumulativeCouponAmount");

  464.         setstrMeasureNames.add ("DerivedCumulativeCouponDCF");

  465.         setstrMeasureNames.add ("DerivedDirtyDV01");

  466.         setstrMeasureNames.add ("DerivedDirtyPV");

  467.         setstrMeasureNames.add ("DerivedDV01");

  468.         setstrMeasureNames.add ("DerivedFixing01");

  469.         setstrMeasureNames.add ("DerivedParBasisSpread");

  470.         setstrMeasureNames.add ("DerivedPV");

  471.         setstrMeasureNames.add ("DerivedCumulativeConvexityAdjustmentFactor");

  472.         setstrMeasureNames.add ("DerivedCumulativeConvexityAdjustmentPremium");

  473.         setstrMeasureNames.add ("DerivedResetDate");

  474.         setstrMeasureNames.add ("DerivedResetRate");

  475.         setstrMeasureNames.add ("DirtyFixedDV01");

  476.         setstrMeasureNames.add ("DirtyFixedPV");

  477.         setstrMeasureNames.add ("DirtyFloatingDV01");

  478.         setstrMeasureNames.add ("DirtyFloatingPV");

  479.         setstrMeasureNames.add ("DirtyPrice");

  480.         setstrMeasureNames.add ("DirtyPV");

  481.         setstrMeasureNames.add ("FairPremium");

  482.         setstrMeasureNames.add ("FixedAccrued");

  483.         setstrMeasureNames.add ("FixedAccrued01");

  484.         setstrMeasureNames.add ("FixedDV01");

  485.         setstrMeasureNames.add ("FloatAccrued");

  486.         setstrMeasureNames.add ("FloatAccrued01");

  487.         setstrMeasureNames.add ("FloatDV01");

  488.         setstrMeasureNames.add ("Fixing01");

  489.         setstrMeasureNames.add ("InitialNotional");

  490.         setstrMeasureNames.add ("ParFixedCoupon");

  491.         setstrMeasureNames.add ("ParRate");

  492.         setstrMeasureNames.add ("ParSwapRate");

  493.         setstrMeasureNames.add ("Price");

  494.         setstrMeasureNames.add ("PV");

  495.         setstrMeasureNames.add ("CumulativeConvexityAdjustmentPremium");

  496.         setstrMeasureNames.add ("Rate");

  497.         setstrMeasureNames.add ("ReferenceAccrued");

  498.         setstrMeasureNames.add ("ReferenceAccrued01");

  499.         setstrMeasureNames.add ("ReferenceCleanDV01");

  500.         setstrMeasureNames.add ("ReferenceCleanPV");

  501.         setstrMeasureNames.add ("ReferenceCumulativeCouponAmount");

  502.         setstrMeasureNames.add ("ReferenceCumulativeCouponDCF");

  503.         setstrMeasureNames.add ("ReferenceDirtyDV01");

  504.         setstrMeasureNames.add ("ReferenceDirtyPV");

  505.         setstrMeasureNames.add ("ReferenceDV01");

  506.         setstrMeasureNames.add ("ReferenceParBasisSpread");

  507.         setstrMeasureNames.add ("ReferencePV");

  508.         setstrMeasureNames.add ("ReferenceCumulativeConvexityAdjustmentFactor");

  509.         setstrMeasureNames.add ("ReferenceCumulativeConvexityAdjustmentPremium");

  510.         setstrMeasureNames.add ("ResetDate");

  511.         setstrMeasureNames.add ("ResetRate");

  512.         setstrMeasureNames.add ("SwapRate");

  513.         setstrMeasureNames.add ("Upfront");

  514.         return setstrMeasureNames;
  515.     }

  516.     @Override public double pv (
  517.         final org.drip.param.valuation.ValuationParams valParams,
  518.         final org.drip.param.pricer.CreditPricerParams pricerParams,
  519.         final org.drip.param.market.CurveSurfaceQuoteContainer csqs,
  520.         final org.drip.param.valuation.ValuationCustomizationParams quotingParams)
  521.         throws java.lang.Exception
  522.     {
  523.         org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> mapFixedReferenceStreamResult =
  524.             _fixReference.value (valParams, pricerParams, csqs, quotingParams);

  525.         org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> mapFloatDerivedStreamResult =
  526.             _floatDerived.value (valParams, pricerParams, csqs, quotingParams);

  527.         if (null == mapFixedReferenceStreamResult || !mapFixedReferenceStreamResult.containsKey ("DirtyPV")
  528.             || null == mapFloatDerivedStreamResult || !mapFloatDerivedStreamResult.containsKey ("DirtyPV"))
  529.             throw new java.lang.Exception
  530.                 ("FixFloatComponent::pv => Cannot Compute Constituent Stream Value Metrics");

  531.         return mapFixedReferenceStreamResult.get ("DirtyPV") + mapFloatDerivedStreamResult.get ("DirtyPV");
  532.     }

  533.     @Override public org.drip.numerical.differentiation.WengertJacobian jackDDirtyPVDManifestMeasure (
  534.         final org.drip.param.valuation.ValuationParams valParams,
  535.         final org.drip.param.pricer.CreditPricerParams pricerParams,
  536.         final org.drip.param.market.CurveSurfaceQuoteContainer csqs,
  537.         final org.drip.param.valuation.ValuationCustomizationParams quotingParams)
  538.     {
  539.         org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> mapMeasures = value (valParams,
  540.             pricerParams, csqs, quotingParams);

  541.         if (null == mapMeasures || !mapMeasures.containsKey ("SwapRate")) return null;

  542.         double dblParSwapRate = mapMeasures.get ("SwapRate");

  543.         org.drip.numerical.differentiation.WengertJacobian jackDDirtyPVDManifestMeasureFloating =
  544.             _floatDerived.jackDDirtyPVDManifestMeasure (valParams, pricerParams, csqs, quotingParams);

  545.         if (null == jackDDirtyPVDManifestMeasureFloating) return null;

  546.         int iNumQuote = jackDDirtyPVDManifestMeasureFloating.numParameters();

  547.         if (0 == iNumQuote) return null;

  548.         org.drip.numerical.differentiation.WengertJacobian jackDDirtyPVDManifestMeasureFixed =
  549.             _fixReference.jackDDirtyPVDManifestMeasure (valParams, pricerParams, csqs, quotingParams);

  550.         if (null == jackDDirtyPVDManifestMeasureFixed || iNumQuote !=
  551.             jackDDirtyPVDManifestMeasureFixed.numParameters())
  552.             return null;

  553.         double dblNotionalScaleDown = java.lang.Double.NaN;
  554.         org.drip.numerical.differentiation.WengertJacobian jackDDirtyPVDManifestMeasureIRS = null;

  555.         if (null == jackDDirtyPVDManifestMeasureIRS) {
  556.             try {
  557.                 dblNotionalScaleDown = 1. / initialNotional();

  558.                 jackDDirtyPVDManifestMeasureIRS = new org.drip.numerical.differentiation.WengertJacobian (1, iNumQuote);
  559.             } catch (java.lang.Exception e) {
  560.                 e.printStackTrace();

  561.                 return null;
  562.             }
  563.         }

  564.         for (int i = 0; i < iNumQuote; ++i) {
  565.             if (!jackDDirtyPVDManifestMeasureIRS.accumulatePartialFirstDerivative (0, i, dblNotionalScaleDown
  566.                 * (dblParSwapRate * jackDDirtyPVDManifestMeasureFixed.firstDerivative (0, i) +
  567.                     jackDDirtyPVDManifestMeasureFloating.firstDerivative (0, i))))
  568.                 return null;
  569.         }

  570.         return jackDDirtyPVDManifestMeasureIRS;
  571.     }

  572.     @Override public org.drip.numerical.differentiation.WengertJacobian manifestMeasureDFMicroJack (
  573.         final java.lang.String strManifestMeasure,
  574.         final org.drip.param.valuation.ValuationParams valParams,
  575.         final org.drip.param.pricer.CreditPricerParams pricerParams,
  576.         final org.drip.param.market.CurveSurfaceQuoteContainer csqs,
  577.         final org.drip.param.valuation.ValuationCustomizationParams quotingParams)
  578.     {
  579.         if (null == valParams || valParams.valueDate() >= maturityDate().julian() || null ==
  580.             strManifestMeasure || null == csqs)
  581.             return null;

  582.         if ("Rate".equalsIgnoreCase (strManifestMeasure) || "SwapRate".equalsIgnoreCase (strManifestMeasure))
  583.         {
  584.             org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> mapMeasures = value
  585.                 (valParams, pricerParams, csqs, quotingParams);

  586.             if (null == mapMeasures) return null;

  587.             double dblDirtyDV01 = mapMeasures.get ("DirtyDV01");

  588.             double dblParSwapRate = mapMeasures.get ("SwapRate");

  589.             try {
  590.                 org.drip.numerical.differentiation.WengertJacobian wjSwapRateDFMicroJack = null;

  591.                 org.drip.state.discount.MergedDiscountForwardCurve dcFunding = csqs.fundingState (fundingLabel());

  592.                 if (null == dcFunding) return null;

  593.                 for (org.drip.analytics.cashflow.CompositePeriod p : couponPeriods()) {
  594.                     int iPeriodPayDate = p.payDate();

  595.                     if (iPeriodPayDate < valParams.valueDate()) continue;

  596.                     org.drip.numerical.differentiation.WengertJacobian wjPeriodFwdRateDF =
  597.                         dcFunding.jackDForwardDManifestMeasure (p.startDate(), p.endDate(), "Rate",
  598.                             p.couponDCF());

  599.                     org.drip.numerical.differentiation.WengertJacobian wjPeriodPayDFDF =
  600.                         dcFunding.jackDDFDManifestMeasure (iPeriodPayDate, "Rate");

  601.                     if (null == wjPeriodFwdRateDF || null == wjPeriodPayDFDF) continue;

  602.                     double dblForwardRate = dcFunding.libor (p.startDate(), p.endDate());

  603.                     double dblPeriodPayDF = dcFunding.df (iPeriodPayDate);

  604.                     if (null == wjSwapRateDFMicroJack)
  605.                         wjSwapRateDFMicroJack = new org.drip.numerical.differentiation.WengertJacobian (1,
  606.                             wjPeriodFwdRateDF.numParameters());

  607.                     double dblPeriodNotional = notional (p.startDate(), p.endDate());

  608.                     double dblPeriodDCF = p.couponDCF();

  609.                     for (int k = 0; k < wjPeriodFwdRateDF.numParameters(); ++k) {
  610.                         double dblPeriodMicroJack = (dblForwardRate - dblParSwapRate) *
  611.                             wjPeriodPayDFDF.firstDerivative (0, k) + dblPeriodPayDF *
  612.                                 wjPeriodFwdRateDF.firstDerivative (0, k);

  613.                         if (!wjSwapRateDFMicroJack.accumulatePartialFirstDerivative (0, k, dblPeriodNotional
  614.                             * dblPeriodDCF * dblPeriodMicroJack / dblDirtyDV01))
  615.                             return null;
  616.                     }
  617.                 }

  618.                 return wjSwapRateDFMicroJack;
  619.             } catch (java.lang.Exception e) {
  620.                 e.printStackTrace();
  621.             }
  622.         }

  623.         return null;
  624.     }

  625.     @Override public org.drip.product.calib.ProductQuoteSet calibQuoteSet (
  626.         final org.drip.state.representation.LatentStateSpecification[] aLSS)
  627.     {
  628.         try {
  629.             return new org.drip.product.calib.FixFloatQuoteSet (aLSS);
  630.         } catch (java.lang.Exception e) {
  631.             e.printStackTrace();
  632.         }

  633.         return null;
  634.     }

  635.     @Override public org.drip.state.estimator.PredictorResponseWeightConstraint fundingPRWC (
  636.         final org.drip.param.valuation.ValuationParams valParams,
  637.         final org.drip.param.pricer.CreditPricerParams pricerParams,
  638.         final org.drip.param.market.CurveSurfaceQuoteContainer csqs,
  639.         final org.drip.param.valuation.ValuationCustomizationParams quotingParams,
  640.         final org.drip.product.calib.ProductQuoteSet pqs)
  641.     {
  642.         if (null == valParams || valParams.valueDate() >= maturityDate().julian() || null == pqs || !(pqs
  643.             instanceof org.drip.product.calib.FixFloatQuoteSet))
  644.             return null;

  645.         double dblPV = 0.;
  646.         org.drip.product.calib.FixedStreamQuoteSet fsqsReference = null;
  647.         org.drip.product.calib.FloatingStreamQuoteSet fsqsDerived = null;
  648.         org.drip.product.calib.FixFloatQuoteSet ffqs = (org.drip.product.calib.FixFloatQuoteSet) pqs;

  649.         if (!ffqs.containsPV() && !ffqs.containsSwapRate() && !ffqs.containsDerivedParBasisSpread() &&
  650.             !ffqs.containsReferenceParBasisSpread())
  651.             return null;

  652.         org.drip.state.representation.LatentStateSpecification[] aLSS = pqs.lss();

  653.         try {
  654.             fsqsDerived = new org.drip.product.calib.FloatingStreamQuoteSet (aLSS);

  655.             fsqsReference = new org.drip.product.calib.FixedStreamQuoteSet (aLSS);

  656.             if (ffqs.containsPV()) dblPV = ffqs.pv();

  657.             if (ffqs.containsSwapRate())
  658.                 fsqsReference.setCoupon (ffqs.swapRate());
  659.             else if (ffqs.containsRate())
  660.                 fsqsReference.setCoupon (ffqs.rate());

  661.             if (ffqs.containsDerivedParBasisSpread()) fsqsDerived.setSpread (ffqs.derivedParBasisSpread());

  662.             if (ffqs.containsReferenceParBasisSpread())
  663.                 fsqsReference.setCouponBasis (ffqs.referenceParBasisSpread());
  664.         } catch (java.lang.Exception e) {
  665.             e.printStackTrace();

  666.             return null;
  667.         }

  668.         org.drip.state.estimator.PredictorResponseWeightConstraint prwcDerived = _floatDerived.fundingPRWC
  669.             (valParams, pricerParams, csqs, quotingParams, fsqsDerived);

  670.         org.drip.state.estimator.PredictorResponseWeightConstraint prwcReference = _fixReference.fundingPRWC
  671.             (valParams, pricerParams, csqs, quotingParams, fsqsReference);

  672.         if (null == prwcDerived && null == prwcReference) return null;

  673.         org.drip.state.estimator.PredictorResponseWeightConstraint prwc = new
  674.             org.drip.state.estimator.PredictorResponseWeightConstraint();

  675.         if (!prwc.absorb (prwcDerived)) return null;

  676.         if (!prwc.absorb (prwcReference)) return null;

  677.         return !prwc.updateValue (dblPV) ? null : prwc;
  678.     }

  679.     @Override public org.drip.state.estimator.PredictorResponseWeightConstraint forwardPRWC (
  680.         final org.drip.param.valuation.ValuationParams valParams,
  681.         final org.drip.param.pricer.CreditPricerParams pricerParams,
  682.         final org.drip.param.market.CurveSurfaceQuoteContainer csqs,
  683.         final org.drip.param.valuation.ValuationCustomizationParams quotingParams,
  684.         final org.drip.product.calib.ProductQuoteSet pqs)
  685.     {
  686.         if (null == valParams || valParams.valueDate() >= maturityDate().julian() || null == pqs || !(pqs
  687.             instanceof org.drip.product.calib.FixFloatQuoteSet))
  688.             return null;

  689.         double dblPV = 0.;
  690.         org.drip.product.calib.FixedStreamQuoteSet fsqsReference = null;
  691.         org.drip.product.calib.FloatingStreamQuoteSet fsqsDerived = null;
  692.         org.drip.product.calib.FixFloatQuoteSet ffqs = (org.drip.product.calib.FixFloatQuoteSet) pqs;

  693.         if (!ffqs.containsPV() && !ffqs.containsSwapRate() && !ffqs.containsDerivedParBasisSpread() &&
  694.             !ffqs.containsReferenceParBasisSpread())
  695.             return null;

  696.         org.drip.state.representation.LatentStateSpecification[] aLSS = pqs.lss();

  697.         try {
  698.             fsqsDerived = new org.drip.product.calib.FloatingStreamQuoteSet (aLSS);

  699.             fsqsReference = new org.drip.product.calib.FixedStreamQuoteSet (aLSS);

  700.             if (ffqs.containsPV()) dblPV = ffqs.pv();

  701.             if (ffqs.containsSwapRate()) fsqsReference.setCoupon (ffqs.swapRate());

  702.             if (ffqs.containsDerivedParBasisSpread()) fsqsDerived.setSpread (ffqs.derivedParBasisSpread());

  703.             if (ffqs.containsReferenceParBasisSpread())
  704.                 fsqsReference.setCouponBasis (ffqs.referenceParBasisSpread());
  705.         } catch (java.lang.Exception e) {
  706.             e.printStackTrace();

  707.             return null;
  708.         }

  709.         org.drip.state.estimator.PredictorResponseWeightConstraint prwcDerived = _floatDerived.forwardPRWC
  710.             (valParams, pricerParams, csqs, quotingParams, fsqsDerived);

  711.         org.drip.state.estimator.PredictorResponseWeightConstraint prwcReference = _fixReference.forwardPRWC
  712.             (valParams, pricerParams, csqs, quotingParams, fsqsReference);

  713.         if (null == prwcDerived && null == prwcReference) return null;

  714.         org.drip.state.estimator.PredictorResponseWeightConstraint prwc = new
  715.             org.drip.state.estimator.PredictorResponseWeightConstraint();

  716.         if (!prwc.absorb (prwcDerived)) return null;

  717.         if (!prwc.absorb (prwcReference)) return null;

  718.         return !prwc.updateValue (dblPV) ? null : prwc;
  719.     }

  720.     @Override public org.drip.state.estimator.PredictorResponseWeightConstraint fundingForwardPRWC (
  721.         final org.drip.param.valuation.ValuationParams valParams,
  722.         final org.drip.param.pricer.CreditPricerParams pricerParams,
  723.         final org.drip.param.market.CurveSurfaceQuoteContainer csqs,
  724.         final org.drip.param.valuation.ValuationCustomizationParams quotingParams,
  725.         final org.drip.product.calib.ProductQuoteSet pqs)
  726.     {
  727.         if (null == valParams || valParams.valueDate() >= maturityDate().julian() || null == pqs || !(pqs
  728.             instanceof org.drip.product.calib.FixFloatQuoteSet))
  729.             return null;

  730.         double dblPV = 0.;
  731.         org.drip.product.calib.FixedStreamQuoteSet fsqsReference = null;
  732.         org.drip.product.calib.FloatingStreamQuoteSet fsqsDerived = null;
  733.         org.drip.product.calib.FixFloatQuoteSet ffqs = (org.drip.product.calib.FixFloatQuoteSet) pqs;

  734.         if (!ffqs.containsPV() && !ffqs.containsSwapRate() && !ffqs.containsDerivedParBasisSpread() &&
  735.             !ffqs.containsReferenceParBasisSpread())
  736.             return null;

  737.         org.drip.state.representation.LatentStateSpecification[] aLSS = pqs.lss();

  738.         try {
  739.             fsqsDerived = new org.drip.product.calib.FloatingStreamQuoteSet (aLSS);

  740.             fsqsReference = new org.drip.product.calib.FixedStreamQuoteSet (aLSS);

  741.             if (ffqs.containsPV()) dblPV = ffqs.pv();

  742.             if (ffqs.containsSwapRate())
  743.                 fsqsReference.setCoupon (ffqs.swapRate());
  744.             else if (ffqs.containsRate())
  745.                 fsqsReference.setCoupon (ffqs.rate());

  746.             if (ffqs.containsDerivedParBasisSpread()) fsqsDerived.setSpread (ffqs.derivedParBasisSpread());

  747.             if (ffqs.containsReferenceParBasisSpread())
  748.                 fsqsReference.setCouponBasis (ffqs.referenceParBasisSpread());
  749.         } catch (java.lang.Exception e) {
  750.             e.printStackTrace();

  751.             return null;
  752.         }

  753.         org.drip.state.estimator.PredictorResponseWeightConstraint prwcDerived =
  754.             _floatDerived.fundingForwardPRWC (valParams, pricerParams, csqs, quotingParams, fsqsDerived);

  755.         org.drip.state.estimator.PredictorResponseWeightConstraint prwcReference =
  756.             _fixReference.fundingForwardPRWC (valParams, pricerParams, csqs, quotingParams, fsqsReference);

  757.         if (null == prwcDerived && null == prwcReference) return null;

  758.         org.drip.state.estimator.PredictorResponseWeightConstraint prwc = new
  759.             org.drip.state.estimator.PredictorResponseWeightConstraint();

  760.         if (!prwc.absorb (prwcDerived)) return null;

  761.         if (!prwc.absorb (prwcReference)) return null;

  762.         return !prwc.updateValue (dblPV) ? null : prwc;
  763.     }

  764.     @Override public org.drip.state.estimator.PredictorResponseWeightConstraint fxPRWC (
  765.         final org.drip.param.valuation.ValuationParams valParams,
  766.         final org.drip.param.pricer.CreditPricerParams pricerParams,
  767.         final org.drip.param.market.CurveSurfaceQuoteContainer csqs,
  768.         final org.drip.param.valuation.ValuationCustomizationParams vcp,
  769.         final org.drip.product.calib.ProductQuoteSet pqs)
  770.     {
  771.         return null;
  772.     }

  773.     @Override public org.drip.state.estimator.PredictorResponseWeightConstraint govviePRWC (
  774.         final org.drip.param.valuation.ValuationParams valParams,
  775.         final org.drip.param.pricer.CreditPricerParams pricerParams,
  776.         final org.drip.param.market.CurveSurfaceQuoteContainer csqs,
  777.         final org.drip.param.valuation.ValuationCustomizationParams vcp,
  778.         final org.drip.product.calib.ProductQuoteSet pqs)
  779.     {
  780.         return null;
  781.     }

  782.     @Override public org.drip.state.estimator.PredictorResponseWeightConstraint volatilityPRWC (
  783.         final org.drip.param.valuation.ValuationParams valParams,
  784.         final org.drip.param.pricer.CreditPricerParams pricerParams,
  785.         final org.drip.param.market.CurveSurfaceQuoteContainer csqs,
  786.         final org.drip.param.valuation.ValuationCustomizationParams quotingParams,
  787.         final org.drip.product.calib.ProductQuoteSet pqs)
  788.     {
  789.         return null;
  790.     }

  791.     @Override public org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> calibMeasures (
  792.         final org.drip.param.valuation.ValuationParams valParams,
  793.         final org.drip.param.pricer.CreditPricerParams pricerParams,
  794.         final org.drip.param.market.CurveSurfaceQuoteContainer csqs,
  795.         final org.drip.param.valuation.ValuationCustomizationParams quotingParams)
  796.     {
  797.         return null;
  798.     }
  799. }