BondBasket.java
package org.drip.product.credit;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/
/*!
* Copyright (C) 2020 Lakshmi Krishnamurthy
* Copyright (C) 2019 Lakshmi Krishnamurthy
* Copyright (C) 2018 Lakshmi Krishnamurthy
* Copyright (C) 2017 Lakshmi Krishnamurthy
* Copyright (C) 2016 Lakshmi Krishnamurthy
* Copyright (C) 2015 Lakshmi Krishnamurthy
* Copyright (C) 2014 Lakshmi Krishnamurthy
* Copyright (C) 2013 Lakshmi Krishnamurthy
* Copyright (C) 2012 Lakshmi Krishnamurthy
* Copyright (C) 2011 Lakshmi Krishnamurthy
*
* This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics,
* asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment
* analytics, and portfolio construction analytics within and across fixed income, credit, commodity,
* equity, FX, and structured products. It also includes auxiliary libraries for algorithm support,
* numerical analysis, numerical optimization, spline builder, model validation, statistical learning,
* and computational support.
*
* https://lakshmidrip.github.io/DROP/
*
* DROP is composed of three modules:
*
* - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/
* - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/
* - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/
*
* DROP Product Core implements libraries for the following:
* - Fixed Income Analytics
* - Loan Analytics
* - Transaction Cost Analytics
*
* DROP Portfolio Core implements libraries for the following:
* - Asset Allocation Analytics
* - Asset Liability Management Analytics
* - Capital Estimation Analytics
* - Exposure Analytics
* - Margin Analytics
* - XVA Analytics
*
* DROP Computational Core implements libraries for the following:
* - Algorithm Support
* - Computation Support
* - Function Analysis
* - Model Validation
* - Numerical Analysis
* - Numerical Optimizer
* - Spline Builder
* - Statistical Learning
*
* Documentation for DROP is Spread Over:
*
* - Main => https://lakshmidrip.github.io/DROP/
* - Wiki => https://github.com/lakshmiDRIP/DROP/wiki
* - GitHub => https://github.com/lakshmiDRIP/DROP
* - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md
* - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html
* - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal
* - Release Versions => https://lakshmidrip.github.io/DROP/version.html
* - Community Credits => https://lakshmidrip.github.io/DROP/credits.html
* - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues
* - JUnit => https://lakshmidrip.github.io/DROP/junit/index.html
* - Jacoco => https://lakshmidrip.github.io/DROP/jacoco/index.html
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* <i>BondBasket</i> implements the bond basket product contract details. Contains the basket name, basket
* notional, component bonds, and their weights.
*
* <br><br>
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></li>
* <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>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/product/credit/README.md">Credit Products - Components and Baskets</a></li>
* </ul>
* <br><br>
*
* @author Lakshmi Krishnamurthy
*/
public class BondBasket extends org.drip.product.definition.BasketProduct {
private java.lang.String _strName = "";
private double[] _adblNormWeights = null;
private org.drip.product.definition.Bond[] _aBond = null;
/**
* BondBasket constructor
*
* @param strName BondBasket Name
* @param aBond Component bonds
* @param adblWeights Component Bond weights
*
* @throws java.lang.Exception Thrown if inputs are invalid
*/
public BondBasket (
final java.lang.String strName,
final org.drip.product.definition.Bond[] aBond,
final double[] adblWeights)
throws java.lang.Exception
{
if (null == strName || strName.isEmpty() || null == aBond || 0 == aBond.length || null == adblWeights
|| 0 == adblWeights.length || aBond.length != adblWeights.length)
throw new java.lang.Exception ("BasketBond ctr: Invalid inputs");
_aBond = aBond;
_strName = strName;
double dblCumulativeWeight = 0.;
_adblNormWeights = new double[adblWeights.length];
for (int i = 0; i < adblWeights.length; ++i) {
if (!org.drip.numerical.common.NumberUtil.IsValid (adblWeights[i]))
throw new java.lang.Exception ("BasketBond ctr: Invalid weights");
dblCumulativeWeight += adblWeights[i];
}
if (0. == dblCumulativeWeight) throw new java.lang.Exception ("BasketBond ctr: Invalid weights");
for (int i = 0; i < adblWeights.length; ++i)
_adblNormWeights[i] = adblWeights[i] / dblCumulativeWeight;
}
@Override public java.lang.String name()
{
return _strName;
}
@Override public org.drip.product.definition.Component[] components()
{
return _aBond;
}
@Override public int measureAggregationType (
final java.lang.String strMeasureName)
{
if ("Accrued".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("Accrued01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("AssetSwapSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("ASW".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("BondBasis".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("CleanCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("CleanDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("CleanIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("CleanPrice".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("CleanPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("Convexity".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("CreditRisklessParPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("CreditRisklessPrincipalPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("CreditRiskyParPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("CreditRiskyPrincipalPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("CreditBasis".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("DiscountMargin".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("DefaultExposure".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("DefaultExposureNoRec".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("DirtyCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("DirtyDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("DirtyIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("DirtyPrice".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("DirtyPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("Duration".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("DV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("ExpectedRecovery".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairAccrued".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairAccrued01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairAssetSwapSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairASW".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairBondBasis".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairCleanCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairCleanDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairCleanIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairCleanPrice".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairCleanPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairConvexity".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairCreditBasis".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairCreditRisklessParPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairCreditRisklessPrincipalPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairCreditRiskyParPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairCreditRiskyPrincipalPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairDefaultExposure".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairDefaultExposureNoRec".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairDirtyCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairDirtyDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairDirtyIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairDirtyPrice".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairDirtyPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairDiscountMargin".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairDuration".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairExpectedRecovery".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairFirstIndexRate".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("FairGSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairISpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairLossOnInstantaneousDefault".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairMacaulayDuration".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairModifiedDuration".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairOAS".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairOASpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairOptionAdjustedSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairParPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairParSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairPECS".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairPrice".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairPrincipalPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRecoveryPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRisklessCleanCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRisklessCleanDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRisklessCleanIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRisklessCleanPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRisklessDirtyCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRisklessDirtyDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRisklessDirtyIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRisklessDirtyPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRiskyCleanCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRiskyCleanDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRiskyCleanIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRiskyCleanPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRiskyDirtyCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRiskyDirtyDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRiskyDirtyIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairRiskyDirtyPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("FairTSYSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairWorkoutDate".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("FairWorkoutFactor".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("FairWorkoutType".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("FairWorkoutYield".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("FairYield".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairYield01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairYieldBasis".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairYieldSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairZeroDiscountMargin".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FairZSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("FirstCouponRate".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("FirstIndexRate".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("GSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("ISpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("LossOnInstantaneousDefault".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MacaulayDuration".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("MarketAccrued".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketAccrued01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketCleanCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketCleanDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketCleanIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketCleanPrice".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("MarketCleanPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketCreditRisklessParPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketCreditRisklessPrincipalPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketCreditRiskyParPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketCreditRiskyPrincipalPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketDefaultExposure".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketDefaultExposureNoRec".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketDirtyCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketDirtyDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketDirtyIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketDirtyPrice".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("MarketDirtyPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketExpectedRecovery".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketFirstCouponRate".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("MarketFirstIndexRate".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("MarketInputType=CleanPrice".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("MarketInputType=CreditBasis".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("MarketInputType=DirtyPrice".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("MarketInputType=GSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("MarketInputType=ISpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("MarketInputType=PECS".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("MarketInputType=QuotedMargin".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("MarketInputType=TSYSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("MarketInputType=Yield".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("MarketInputType=ZSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("MarketLossOnInstantaneousDefault".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketParPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketPrincipalPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketRecoveryPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketRisklessDirtyCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketRisklessDirtyDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketRisklessDirtyIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketRisklessDirtyPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketRiskyDirtyCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketRiskyDirtyDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketRiskyDirtyIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("MarketRiskyDirtyPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("ModifiedDuration".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("OAS".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("OASpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("OptionAdjustedSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("ParEquivalentCDSSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("ParPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("ParSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("PECS".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("Price".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("PrincipalPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("PV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RecoveryPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RisklessCleanCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RisklessCleanDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RisklessCleanIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RisklessCleanPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RisklessDirtyCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RisklessDirtyDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RisklessDirtyIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RisklessDirtyPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RiskyCleanCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RiskyCleanDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RiskyCleanIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RiskyCleanPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RiskyDirtyCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RiskyDirtyDV01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RiskyDirtyIndexCouponPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("RiskyDirtyPV".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_CUMULATIVE;
if ("TSYSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("WorkoutDate".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("WorkoutFactor".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("WorkoutType".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("WorkoutYield".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_UNIT_ACCUMULATE;
if ("Yield".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("Yield01".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("YieldBasis".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("YieldSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("ZeroDiscountMargin".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
if ("ZSpread".equalsIgnoreCase (strMeasureName))
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_WEIGHTED_CUMULATIVE;
return org.drip.product.definition.BasketProduct.MEASURE_AGGREGATION_TYPE_IGNORE;
}
}