diff --git a/ReleaseNotes/04_02_2018.txt b/ReleaseNotes/04_02_2018.txt new file mode 100644 index 000000000000..cbbb3e2888b5 --- /dev/null +++ b/ReleaseNotes/04_02_2018.txt @@ -0,0 +1,20 @@ + +Features: + + - Position Group Path Market Vertexes (1) + - Position Group Path Sweep #1 (2, 3) + - Position Group Path Sweep #2 (4, 5) + - Position Group Path Sweep #3 (6, 7) + - Position Group Path Sweep #4 (8, 9) + - Position Group Path Sweep #5 (10, 11) + - Position Group Path Sweep #6 (12, 13) + - Position Group Path Sweep #7 (14, 15) + + +Bug Fixes/Clean-up: + +Samples: + + - Collateralized Collateral/Funding/Netting (16, 17, 18) + - Uncollateralized Collateral/Funding/Netting (19, 20, 21) + - Zero Threshold Collateral/Funding/Netting (22, 23, 24) diff --git a/src/main/java/org/drip/coverage/analytics/CashFlow.java b/src/main/java/org/drip/coverage/analytics/CashFlow.java new file mode 100644 index 000000000000..75723e7c3a22 --- /dev/null +++ b/src/main/java/org/drip/coverage/analytics/CashFlow.java @@ -0,0 +1,111 @@ + +package org.drip.coverage.analytics; + +import org.drip.sample.cashflow.AmortizingBondPeriods; +import org.drip.sample.cashflow.DepositPeriods; +import org.drip.sample.cashflow.EOSBondPeriods; +import org.drip.sample.cashflow.FRAMarketPeriods; +import org.drip.sample.cashflow.FRAStandardPeriods; +import org.drip.sample.cashflow.FixFloatInAdvanceIMMPeriods; +import org.drip.sample.cashflow.FixFloatInAdvancePeriods; +import org.drip.sample.cashflow.FixFloatInArrearsIMMPeriods; +import org.drip.sample.cashflow.FixFloatInArrearsPeriods; +import org.drip.sample.cashflow.FixedCouponBondPeriods; +import org.drip.sample.cashflow.FloatingCouponBondPeriods; +import org.drip.sample.cashflow.ForwardRateFuturePeriods; +import org.drip.sample.cashflow.InAdvanceLongTenorPeriods; +import org.drip.sample.cashflow.InAdvanceShortTenorPeriods; +import org.drip.sample.cashflow.InArrearsLongTenorPeriods; +import org.drip.sample.cashflow.InArrearsShortTenorPeriods; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * CashFlow holds the JUnit Code Coverage Tests for the Cash Flow Analytics Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class CashFlow +{ + @Test public void codeCoverageTest() throws Exception + { + AmortizingBondPeriods.main (null); + + DepositPeriods.main (null); + + EOSBondPeriods.main (null); + + FixedCouponBondPeriods.main (null); + + FixFloatInAdvanceIMMPeriods.main (null); + + FixFloatInAdvancePeriods.main (null); + + FixFloatInArrearsIMMPeriods.main (null); + + FixFloatInArrearsPeriods.main (null); + + FloatingCouponBondPeriods.main (null); + + ForwardRateFuturePeriods.main (null); + + FRAMarketPeriods.main (null); + + FRAStandardPeriods.main (null); + + InAdvanceLongTenorPeriods.main (null); + + InAdvanceShortTenorPeriods.main (null); + + InArrearsLongTenorPeriods.main (null); + + InArrearsShortTenorPeriods.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/analytics/Date.java b/src/main/java/org/drip/coverage/analytics/Date.java new file mode 100644 index 000000000000..b1294b4a8961 --- /dev/null +++ b/src/main/java/org/drip/coverage/analytics/Date.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.analytics; + +import org.drip.sample.date.CalendarAPI; +import org.drip.sample.date.DateRollAPI; +import org.drip.sample.date.DayCountAPI; +import org.drip.sample.date.FliegelvanFlandernJulian; +import org.drip.sample.date.IMMRollAPI; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Date holds the JUnit Code Coverage Tests for the Date Analytics Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Date +{ + @Test public void codeCoverageTest() throws Exception + { + CalendarAPI.main (null); + + DateRollAPI.main (null); + + DayCountAPI.main (null); + + FliegelvanFlandernJulian.main (null); + + IMMRollAPI.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/analytics/package-info.java b/src/main/java/org/drip/coverage/analytics/package-info.java new file mode 100644 index 000000000000..0b60031a8e6e --- /dev/null +++ b/src/main/java/org/drip/coverage/analytics/package-info.java @@ -0,0 +1,8 @@ + +/** + * Analytics Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.analytics; diff --git a/src/main/java/org/drip/coverage/dynamics/HJM.java b/src/main/java/org/drip/coverage/dynamics/HJM.java new file mode 100644 index 000000000000..f756bcc4c7c8 --- /dev/null +++ b/src/main/java/org/drip/coverage/dynamics/HJM.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.dynamics; + +import org.drip.sample.hjm.G2PlusPlusDynamics; +import org.drip.sample.hjm.MultiFactorDynamics; +import org.drip.sample.hjm.MultiFactorQMDynamics; +import org.drip.sample.hjm.PrincipalComponentDynamics; +import org.drip.sample.hjm.PrincipalComponentQMDynamics; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * HJM holds the JUnit Code Coverage Tests for the HJM Dynamics Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class HJM +{ + @Test public void codeCoverageTest() throws Exception + { + G2PlusPlusDynamics.main (null); + + MultiFactorDynamics.main (null); + + MultiFactorQMDynamics.main (null); + + PrincipalComponentDynamics.main (null); + + PrincipalComponentQMDynamics.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/dynamics/HullWhite.java b/src/main/java/org/drip/coverage/dynamics/HullWhite.java new file mode 100644 index 000000000000..b7fb591bec83 --- /dev/null +++ b/src/main/java/org/drip/coverage/dynamics/HullWhite.java @@ -0,0 +1,75 @@ + +package org.drip.coverage.dynamics; + +import org.drip.sample.hullwhite.EvolutionMetrics; +import org.drip.sample.hullwhite.ShortRateDynamics; +import org.drip.sample.hullwhite.TrinomialTreeCalibration; +import org.drip.sample.hullwhite.TrinomialTreeEvolution; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * HullWhite holds the JUnit Code Coverage Tests for the Hull White Dynamics Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class HullWhite +{ + @Test public void codeCoverageTest() throws Exception + { + EvolutionMetrics.main (null); + + ShortRateDynamics.main (null); + + TrinomialTreeCalibration.main (null); + + TrinomialTreeEvolution.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/dynamics/LMM.java b/src/main/java/org/drip/coverage/dynamics/LMM.java new file mode 100644 index 000000000000..777013203b9f --- /dev/null +++ b/src/main/java/org/drip/coverage/dynamics/LMM.java @@ -0,0 +1,87 @@ + +package org.drip.coverage.dynamics; + +import org.drip.sample.lmm.ContinuousForwardRateVolatility; +// import org.drip.sample.lmm.FixFloatMonteCarloEvolver; +import org.drip.sample.lmm.MultiFactorCurveDynamics; +import org.drip.sample.lmm.MultiFactorLIBORCurveEvolver; +// import org.drip.sample.lmm.MultiFactorLIBORMonteCarlo; +import org.drip.sample.lmm.PointAncillaryMetricsDynamics; +import org.drip.sample.lmm.PointCoreMetricsDynamics; +import org.drip.sample.lmm.TwoFactorLIBORVolatility; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * LMM holds the JUnit Code Coverage Tests for the LMM Dynamics Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class LMM +{ + @Test public void codeCoverageTest() throws Exception + { + ContinuousForwardRateVolatility.main (null); + + // FixFloatMonteCarloEvolver.main (null); + + MultiFactorCurveDynamics.main (null); + + MultiFactorLIBORCurveEvolver.main (null); + + // MultiFactorLIBORMonteCarlo.main (null); + + PointAncillaryMetricsDynamics.main (null); + + PointCoreMetricsDynamics.main (null); + + TwoFactorLIBORVolatility.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/dynamics/SABR.java b/src/main/java/org/drip/coverage/dynamics/SABR.java new file mode 100644 index 000000000000..f3ccc7bb4738 --- /dev/null +++ b/src/main/java/org/drip/coverage/dynamics/SABR.java @@ -0,0 +1,69 @@ + +package org.drip.coverage.dynamics; + +import org.drip.sample.sabr.BlackVolatility; +import org.drip.sample.sabr.ForwardRateEvolution; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * SABR holds the JUnit Code Coverage Tests for the SABR Dynamics Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class SABR +{ + @Test public void codeCoverageTest() throws Exception + { + BlackVolatility.main (null); + + ForwardRateEvolution.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/dynamics/package-info.java b/src/main/java/org/drip/coverage/dynamics/package-info.java new file mode 100644 index 000000000000..1bb1971beae4 --- /dev/null +++ b/src/main/java/org/drip/coverage/dynamics/package-info.java @@ -0,0 +1,8 @@ + +/** + * Dynamics Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.dynamics; diff --git a/src/main/java/org/drip/coverage/execution/ATHL.java b/src/main/java/org/drip/coverage/execution/ATHL.java new file mode 100644 index 000000000000..cd9beadf4b4a --- /dev/null +++ b/src/main/java/org/drip/coverage/execution/ATHL.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.execution; + +import org.drip.sample.athl.EquityMarketImpactDRI; +import org.drip.sample.athl.EquityMarketImpactIBM; +import org.drip.sample.athl.OptimalTrajectoryDRI; +import org.drip.sample.athl.OptimalTrajectoryIBM; +import org.drip.sample.athl.OptimalTrajectoryTradeAnalysis; +import org.drip.sample.athl.OptimalTrajectoryVolatilityAnalysis; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * ATHL holds the JUnit Code Coverage Tests for the ATHL Execution Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class ATHL +{ + @Test public void codeCoverageTest() throws Exception + { + EquityMarketImpactDRI.main (null); + + EquityMarketImpactIBM.main (null); + + OptimalTrajectoryDRI.main (null); + + OptimalTrajectoryIBM.main (null); + + OptimalTrajectoryTradeAnalysis.main (null); + + OptimalTrajectoryVolatilityAnalysis.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/execution/Almgren2003.java b/src/main/java/org/drip/coverage/execution/Almgren2003.java new file mode 100644 index 000000000000..b8efcf0643ce --- /dev/null +++ b/src/main/java/org/drip/coverage/execution/Almgren2003.java @@ -0,0 +1,84 @@ + +package org.drip.coverage.execution; + +import org.drip.sample.almgren2003.ConstantLiquidityVolatility; +import org.drip.sample.almgren2003.ConstantTradingEnhancedVolatility; +import org.drip.sample.almgren2003.ContinuousTrajectoryConcaveImpact; +import org.drip.sample.almgren2003.ContinuousTrajectoryConvexImpact; +import org.drip.sample.almgren2003.ContinuousTrajectoryLinearImpact; +import org.drip.sample.almgren2003.LinearLiquidityVolatility; +import org.drip.sample.almgren2003.PowerLawOptimalTrajectory; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Almgren2003 holds the JUnit Code Coverage Tests for the Almgren2003 Execution Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Almgren2003 +{ + @Test public void codeCoverageTest() throws Exception + { + ConstantLiquidityVolatility.main (null); + + ConstantTradingEnhancedVolatility.main (null); + + ContinuousTrajectoryConcaveImpact.main (null); + + ContinuousTrajectoryConvexImpact.main (null); + + ContinuousTrajectoryLinearImpact.main (null); + + LinearLiquidityVolatility.main (null); + + PowerLawOptimalTrajectory.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/execution/Almgren2009.java b/src/main/java/org/drip/coverage/execution/Almgren2009.java new file mode 100644 index 000000000000..8808eed5cf00 --- /dev/null +++ b/src/main/java/org/drip/coverage/execution/Almgren2009.java @@ -0,0 +1,90 @@ + +package org.drip.coverage.execution; + +import org.drip.sample.almgren2009.AdaptiveOptimalCostTrajectory; +import org.drip.sample.almgren2009.AdaptiveOptimalHJBTrajectory; +import org.drip.sample.almgren2009.AdaptiveOptimalRollingHorizonTrajectory; +import org.drip.sample.almgren2009.AdaptiveOptimalStaticTrajectory; +import org.drip.sample.almgren2009.CoordinatedMarketStateTrajectory; +import org.drip.sample.almgren2009.EnhancedEulerScheme; +import org.drip.sample.almgren2009.HighUrgencyTrajectoryComparison; +import org.drip.sample.almgren2009.LowUrgencyTrajectoryComparison; +import org.drip.sample.almgren2009.StaticContinuousOptimalTrajectory; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Almgren2009 holds the JUnit Code Coverage Tests for the Almgren2009 Execution Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Almgren2009 +{ + @Test public void codeCoverageTest() throws Exception + { + AdaptiveOptimalCostTrajectory.main (null); + + AdaptiveOptimalHJBTrajectory.main (null); + + AdaptiveOptimalRollingHorizonTrajectory.main (null); + + AdaptiveOptimalStaticTrajectory.main (null); + + CoordinatedMarketStateTrajectory.main (null); + + HighUrgencyTrajectoryComparison.main (null); + + LowUrgencyTrajectoryComparison.main (null); + + EnhancedEulerScheme.main (null); + + StaticContinuousOptimalTrajectory.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/execution/Almgren2012.java b/src/main/java/org/drip/coverage/execution/Almgren2012.java new file mode 100644 index 000000000000..b240973fb188 --- /dev/null +++ b/src/main/java/org/drip/coverage/execution/Almgren2012.java @@ -0,0 +1,87 @@ + +package org.drip.coverage.execution; + +import org.drip.sample.almgren2012.AdaptiveStaticInitialHoldings; +import org.drip.sample.almgren2012.AdaptiveStaticInitialTradeRate; +import org.drip.sample.almgren2012.AdaptiveZeroInitialHoldings; +import org.drip.sample.almgren2012.AdaptiveZeroInitialTradeRate; +import org.drip.sample.almgren2012.RollingHorizonOptimalHoldings; +import org.drip.sample.almgren2012.RollingHorizonOptimalTradeRate; +import org.drip.sample.almgren2012.StaticOptimalTrajectoryHoldings; +import org.drip.sample.almgren2012.StaticOptimalTrajectoryTradeRate; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Almgren2012 holds the JUnit Code Coverage Tests for the Almgren2012 Execution Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Almgren2012 +{ + @Test public void codeCoverageTest() throws Exception + { + AdaptiveStaticInitialHoldings.main (null); + + AdaptiveStaticInitialTradeRate.main (null); + + AdaptiveZeroInitialHoldings.main (null); + + AdaptiveZeroInitialTradeRate.main (null); + + RollingHorizonOptimalHoldings.main (null); + + RollingHorizonOptimalTradeRate.main (null); + + StaticOptimalTrajectoryHoldings.main (null); + + StaticOptimalTrajectoryTradeRate.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/execution/AlmgrenChriss.java b/src/main/java/org/drip/coverage/execution/AlmgrenChriss.java new file mode 100644 index 000000000000..39d3e28a0ca0 --- /dev/null +++ b/src/main/java/org/drip/coverage/execution/AlmgrenChriss.java @@ -0,0 +1,84 @@ + +package org.drip.coverage.execution; + +import org.drip.sample.almgrenchriss.EfficientFrontierNoDrift; +import org.drip.sample.almgrenchriss.EfficientFrontierWithDrift; +import org.drip.sample.almgrenchriss.OptimalSerialCorrelationImpact; +import org.drip.sample.almgrenchriss.OptimalTrajectoryNoDrift; +import org.drip.sample.almgrenchriss.OptimalTrajectoryWithDrift; +import org.drip.sample.almgrenchriss.TrajectoryComparisonNoDrift; +import org.drip.sample.almgrenchriss.TrajectoryComparisonWithDrift; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * AlmgrenChriss holds the JUnit Code Coverage Tests for the Almgren Chriss Execution Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class AlmgrenChriss +{ + @Test public void codeCoverageTest() throws Exception + { + EfficientFrontierNoDrift.main (null); + + EfficientFrontierWithDrift.main (null); + + OptimalSerialCorrelationImpact.main (null); + + OptimalTrajectoryNoDrift.main (null); + + OptimalTrajectoryWithDrift.main (null); + + TrajectoryComparisonNoDrift.main (null); + + TrajectoryComparisonWithDrift.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/execution/Execution.java b/src/main/java/org/drip/coverage/execution/Execution.java new file mode 100644 index 000000000000..292d5be26ed1 --- /dev/null +++ b/src/main/java/org/drip/coverage/execution/Execution.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.execution; + +import org.drip.sample.execution.AlmgrenConstantTradingEnhanced; +import org.drip.sample.execution.AlmgrenLinearTradingEnhanced; +import org.drip.sample.execution.ConcaveImpactNoDrift; +import org.drip.sample.execution.LinearImpactNoDrift; +import org.drip.sample.execution.LinearImpactWithDrift; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Execution holds the JUnit Code Coverage Tests for the Almgren Chriss (2000) Execution Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Execution +{ + @Test public void codeCoverageTest() throws Exception + { + AlmgrenConstantTradingEnhanced.main (null); + + AlmgrenLinearTradingEnhanced.main (null); + + ConcaveImpactNoDrift.main (null); + + LinearImpactNoDrift.main (null); + + LinearImpactWithDrift.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/execution/LVaR.java b/src/main/java/org/drip/coverage/execution/LVaR.java new file mode 100644 index 000000000000..033200cf7d8e --- /dev/null +++ b/src/main/java/org/drip/coverage/execution/LVaR.java @@ -0,0 +1,69 @@ + +package org.drip.coverage.execution; + +import org.drip.sample.lvar.OptimalTrajectoryNoDrift; +import org.drip.sample.lvar.OptimalTrajectoryWithDrift; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * LVaR holds the JUnit Code Coverage Tests for the LVaR Execution Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class LVaR +{ + @Test public void codeCoverageTest() throws Exception + { + OptimalTrajectoryNoDrift.main (null); + + OptimalTrajectoryWithDrift.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/execution/Principal.java b/src/main/java/org/drip/coverage/execution/Principal.java new file mode 100644 index 000000000000..1f18910218ee --- /dev/null +++ b/src/main/java/org/drip/coverage/execution/Principal.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.execution; + +import org.drip.sample.principal.ImpactExponentAnalysis; +import org.drip.sample.principal.InformationRatioAnalysis; +import org.drip.sample.principal.OptimalMeasuresConstantExponent; +import org.drip.sample.principal.OptimalMeasuresDiscountDependence; +import org.drip.sample.principal.OptimalMeasuresReconciler; +import org.drip.sample.principal.OptimalTrajectoryMeasures; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Principal holds the JUnit Code Coverage Tests for the Principal Execution Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Principal +{ + @Test public void codeCoverageTest() throws Exception + { + ImpactExponentAnalysis.main (null); + + InformationRatioAnalysis.main (null); + + OptimalMeasuresConstantExponent.main (null); + + OptimalMeasuresDiscountDependence.main (null); + + OptimalMeasuresReconciler.main (null); + + OptimalTrajectoryMeasures.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/execution/Trend.java b/src/main/java/org/drip/coverage/execution/Trend.java new file mode 100644 index 000000000000..716a35ae0a34 --- /dev/null +++ b/src/main/java/org/drip/coverage/execution/Trend.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.execution; + +import org.drip.sample.trend.BayesianDriftTrajectoryDependence; +import org.drip.sample.trend.BayesianDriftTransactionDependence; +import org.drip.sample.trend.BayesianGain; +import org.drip.sample.trend.BayesianPriceProcess; +import org.drip.sample.trend.FixedDriftTrajectoryComparator; +import org.drip.sample.trend.VariableDriftTrajectoryComparator; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Trend holds the JUnit Code Coverage Tests for the Bayesian Trend Execution Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Trend +{ + @Test public void codeCoverageTest() throws Exception + { + BayesianDriftTrajectoryDependence.main (null); + + BayesianDriftTransactionDependence.main (null); + + BayesianGain.main (null); + + BayesianPriceProcess.main (null); + + FixedDriftTrajectoryComparator.main (null); + + VariableDriftTrajectoryComparator.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/execution/package-info.java b/src/main/java/org/drip/coverage/execution/package-info.java new file mode 100644 index 000000000000..3db85c42e7fd --- /dev/null +++ b/src/main/java/org/drip/coverage/execution/package-info.java @@ -0,0 +1,8 @@ + +/** + * Execution Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.execution; diff --git a/src/main/java/org/drip/coverage/function/RdToR1.java b/src/main/java/org/drip/coverage/function/RdToR1.java new file mode 100644 index 000000000000..d0fbee908e2b --- /dev/null +++ b/src/main/java/org/drip/coverage/function/RdToR1.java @@ -0,0 +1,69 @@ + +package org.drip.coverage.function; + +import org.drip.sample.rdtor1.ConstrainedCovarianceEllipsoid; +import org.drip.sample.rdtor1.UnconstrainedCovarianceEllipsoid; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * RdToR1 holds the JUnit Code Coverage Tests for the R^d - R^1 Function Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class RdToR1 +{ + @Test public void codeCoverageTest() throws Exception + { + ConstrainedCovarianceEllipsoid.main (null); + + UnconstrainedCovarianceEllipsoid.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/function/SemiDefinite.java b/src/main/java/org/drip/coverage/function/SemiDefinite.java new file mode 100644 index 000000000000..b91ffa71882c --- /dev/null +++ b/src/main/java/org/drip/coverage/function/SemiDefinite.java @@ -0,0 +1,72 @@ + +package org.drip.coverage.function; + +import org.drip.sample.semidefinite.DualConstrainedEllipsoidVariance; +import org.drip.sample.semidefinite.TwoVariateConstrainedVariance; +import org.drip.sample.semidefinite.WeightConstrainedEllipsoidVariance; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * SemiDefinite holds the JUnit Code Coverage Tests for the Semi-Definite Function Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class SemiDefinite +{ + @Test public void codeCoverageTest() throws Exception + { + DualConstrainedEllipsoidVariance.main (null); + + TwoVariateConstrainedVariance.main (null); + + WeightConstrainedEllipsoidVariance.main (null);; + } +} diff --git a/src/main/java/org/drip/coverage/function/package-info.java b/src/main/java/org/drip/coverage/function/package-info.java new file mode 100644 index 000000000000..c1fead2ada2f --- /dev/null +++ b/src/main/java/org/drip/coverage/function/package-info.java @@ -0,0 +1,8 @@ + +/** + * Function Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.function; diff --git a/src/main/java/org/drip/coverage/json/JSON.java b/src/main/java/org/drip/coverage/json/JSON.java new file mode 100644 index 000000000000..d5b134ffdce7 --- /dev/null +++ b/src/main/java/org/drip/coverage/json/JSON.java @@ -0,0 +1,66 @@ + +package org.drip.coverage.json; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * JSON holds the JUnit Code Coverage Tests for the JSON Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class JSON +{ + @Test public void codeCoverageTest() throws Exception + { + org.drip.sample.json.Test.main (null); + + org.drip.sample.json.YylexTest.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/json/package-info.java b/src/main/java/org/drip/coverage/json/package-info.java new file mode 100644 index 000000000000..edbeb004c22c --- /dev/null +++ b/src/main/java/org/drip/coverage/json/package-info.java @@ -0,0 +1,8 @@ + +/** + * JSON Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.json; diff --git a/src/main/java/org/drip/coverage/learning/Classifier.java b/src/main/java/org/drip/coverage/learning/Classifier.java new file mode 100644 index 000000000000..8ebfcd7861c0 --- /dev/null +++ b/src/main/java/org/drip/coverage/learning/Classifier.java @@ -0,0 +1,66 @@ + +package org.drip.coverage.learning; + +// import org.drip.sample.classifier.BinaryClassifierSupremumBound; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Classifier holds the JUnit Code Coverage Tests for the Classifier Statistical Learning Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Classifier +{ + @Test public void codeCoverageTest() throws Exception + { + // BinaryClassifierSupremumBound.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/learning/CoveringNumber.java b/src/main/java/org/drip/coverage/learning/CoveringNumber.java new file mode 100644 index 000000000000..cece0b69f21f --- /dev/null +++ b/src/main/java/org/drip/coverage/learning/CoveringNumber.java @@ -0,0 +1,68 @@ + +package org.drip.coverage.learning; + +import org.drip.sample.coveringnumber.BoundedFunction; +import org.drip.sample.coveringnumber.ScaleSensitiveFunction; +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * CoveringNumber holds the JUnit Code Coverage Tests for the Covering Number Statistical Learning Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class CoveringNumber +{ + @Test public void codeCoverageTest() throws Exception + { + BoundedFunction.main (null); + + ScaleSensitiveFunction.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/learning/package-info.java b/src/main/java/org/drip/coverage/learning/package-info.java new file mode 100644 index 000000000000..da3d7f636291 --- /dev/null +++ b/src/main/java/org/drip/coverage/learning/package-info.java @@ -0,0 +1,8 @@ + +/** + * Statistical Learning Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.learning; diff --git a/src/main/java/org/drip/coverage/measure/GovvieMC.java b/src/main/java/org/drip/coverage/measure/GovvieMC.java new file mode 100644 index 000000000000..16d4a09d5ae5 --- /dev/null +++ b/src/main/java/org/drip/coverage/measure/GovvieMC.java @@ -0,0 +1,96 @@ + +package org.drip.coverage.measure; + +import org.drip.sample.govviemc.PathDateForwardCurves; +import org.drip.sample.govviemc.PathExerciseIndicator; +import org.drip.sample.govviemc.PathForwardPrice; +import org.drip.sample.govviemc.PathForwardRealization; +import org.drip.sample.govviemc.PathVertexExerciseIndicator; +import org.drip.sample.govviemc.PathVertexExerciseMetrics; +import org.drip.sample.govviemc.PathVertexExerciseOptimal; +import org.drip.sample.govviemc.PathVertexForwardCurves; +import org.drip.sample.govviemc.PathVertexForwardPrice; +import org.drip.sample.govviemc.PathVertexForwardRealization; +import org.drip.sample.govviemc.PathVertexForwardState; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * GovvieMC holds the JUnit Code Coverage Tests for the GovvieMC Measure Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class GovvieMC +{ + @Test public void codeCoverageTest() throws Exception + { + PathDateForwardCurves.main (null); + + PathExerciseIndicator.main (null); + + PathForwardPrice.main (null); + + PathForwardRealization.main (null); + + PathVertexExerciseIndicator.main (null); + + PathVertexExerciseMetrics.main (null); + + PathVertexExerciseOptimal.main (null); + + PathVertexForwardCurves.main (null); + + PathVertexForwardPrice.main (null); + + PathVertexForwardRealization.main (null); + + PathVertexForwardState.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/measure/Measure.java b/src/main/java/org/drip/coverage/measure/Measure.java new file mode 100644 index 000000000000..8c5344286596 --- /dev/null +++ b/src/main/java/org/drip/coverage/measure/Measure.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.measure; + +import org.drip.sample.measure.BrownianBridgeConcave; +import org.drip.sample.measure.BrownianBridgeConvex; +import org.drip.sample.measure.BrownianBridgeLinear; +import org.drip.sample.measure.GaussianSequence; +import org.drip.sample.measure.PiecewiseDisplacedLebesgue; +import org.drip.sample.measure.PiecewiseLinearLebesgue; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Measure holds the JUnit Code Coverage Tests for the Measure Measure Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Measure +{ + @Test public void codeCoverageTest() throws Exception + { + BrownianBridgeConcave.main (null); + + BrownianBridgeConvex.main (null); + + BrownianBridgeLinear.main (null); + + GaussianSequence.main (null); + + PiecewiseDisplacedLebesgue.main (null); + + PiecewiseLinearLebesgue.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/measure/Numeraire.java b/src/main/java/org/drip/coverage/measure/Numeraire.java new file mode 100644 index 000000000000..72bfc54abc76 --- /dev/null +++ b/src/main/java/org/drip/coverage/measure/Numeraire.java @@ -0,0 +1,72 @@ + +package org.drip.coverage.measure; + +import org.drip.sample.numeraire.R1JointDiffusion; +import org.drip.sample.numeraire.R1JointJumpDiffusion; +import org.drip.sample.numeraire.R1Jump; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Numeraire holds the JUnit Code Coverage Tests for the Numeraire Measure Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Numeraire +{ + @Test public void codeCoverageTest() throws Exception + { + R1JointDiffusion.main (null); + + R1JointJumpDiffusion.main (null); + + R1Jump.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/measure/RNG.java b/src/main/java/org/drip/coverage/measure/RNG.java new file mode 100644 index 000000000000..3a0b1d8068ea --- /dev/null +++ b/src/main/java/org/drip/coverage/measure/RNG.java @@ -0,0 +1,90 @@ + +package org.drip.coverage.measure; + +import org.drip.sample.rng.LCGNumericalRecipesDouble; +import org.drip.sample.rng.LCGNumericalRecipesLong; +import org.drip.sample.rng.MRG32k3a; +import org.drip.sample.rng.RdMultiPath; +import org.drip.sample.rng.RdMultiPathAntithetic; +import org.drip.sample.rng.RdMultiPathQR; +import org.drip.sample.rng.RdMultiPathQRUnbiased; +import org.drip.sample.rng.ShiftRegisterDouble; +import org.drip.sample.rng.ShiftRegisterLong; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * RNG holds the JUnit Code Coverage Tests for the Random Number Generator Measure Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class RNG +{ + @Test public void codeCoverageTest() throws Exception + { + LCGNumericalRecipesDouble.main (null); + + LCGNumericalRecipesLong.main (null); + + MRG32k3a.main (null); + + RdMultiPath.main (null); + + RdMultiPathAntithetic.main (null); + + RdMultiPathQR.main (null); + + RdMultiPathQRUnbiased.main (null); + + ShiftRegisterDouble.main (null); + + ShiftRegisterLong.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/measure/package-info.java b/src/main/java/org/drip/coverage/measure/package-info.java new file mode 100644 index 000000000000..572afc72608a --- /dev/null +++ b/src/main/java/org/drip/coverage/measure/package-info.java @@ -0,0 +1,8 @@ + +/** + * Measure Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.measure; diff --git a/src/main/java/org/drip/coverage/optimization/DescentVerifier.java b/src/main/java/org/drip/coverage/optimization/DescentVerifier.java new file mode 100644 index 000000000000..e8ac6e37f3c4 --- /dev/null +++ b/src/main/java/org/drip/coverage/optimization/DescentVerifier.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.optimization; + +import org.drip.sample.descentverifier.ArmijoEvolutionMetrics; +import org.drip.sample.descentverifier.StrongCurvatureEvolutionMetrics; +import org.drip.sample.descentverifier.StrongWolfeEvolutionMetrics; +import org.drip.sample.descentverifier.WeakCurvatureEvolutionMetrics; +import org.drip.sample.descentverifier.WeakWolfeEvolutionMetrics; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * DescentVerifier holds the JUnit Code Coverage Tests for the Descent Verifier Optimization Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class DescentVerifier +{ + @Test public void codeCoverageTest() throws Exception + { + ArmijoEvolutionMetrics.main (null); + + StrongCurvatureEvolutionMetrics.main (null); + + StrongWolfeEvolutionMetrics.main (null); + + WeakCurvatureEvolutionMetrics.main (null); + + WeakWolfeEvolutionMetrics.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/optimization/Optimizer.java b/src/main/java/org/drip/coverage/optimization/Optimizer.java new file mode 100644 index 000000000000..764f0393c432 --- /dev/null +++ b/src/main/java/org/drip/coverage/optimization/Optimizer.java @@ -0,0 +1,75 @@ + +package org.drip.coverage.optimization; + +import org.drip.sample.optimizer.KKTNecessarySufficientConditions; +import org.drip.sample.optimizer.KKTRegularityConditions; +import org.drip.sample.optimizer.NSphereSurfaceExtremization; +import org.drip.sample.optimizer.VariateSumExtremization; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Optimizer holds the JUnit Code Coverage Tests for the Optimizer Optimization Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Optimizer +{ + @Test public void codeCoverageTest() throws Exception + { + KKTNecessarySufficientConditions.main (null); + + KKTRegularityConditions.main (null); + + NSphereSurfaceExtremization.main (null); + + VariateSumExtremization.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/optimization/package-info.java b/src/main/java/org/drip/coverage/optimization/package-info.java new file mode 100644 index 000000000000..a8d53d1af152 --- /dev/null +++ b/src/main/java/org/drip/coverage/optimization/package-info.java @@ -0,0 +1,8 @@ + +/** + * Optimization Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.optimization; diff --git a/src/main/java/org/drip/coverage/portfolioconstruction/ALM.java b/src/main/java/org/drip/coverage/portfolioconstruction/ALM.java new file mode 100644 index 000000000000..19453b4b9671 --- /dev/null +++ b/src/main/java/org/drip/coverage/portfolioconstruction/ALM.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.portfolioconstruction; + +import org.drip.sample.alm.NetLiabilityCliffDependence; +import org.drip.sample.alm.NetLiabilityConsumptionDependence; +import org.drip.sample.alm.NetLiabilityDiscountDependence; +import org.drip.sample.alm.NetLiabilityStreamEstimator; +import org.drip.sample.alm.NetLiabilityTaxYieldDependence; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * ALM holds the JUnit Code Coverage Tests for the ALM Portfolio Construction Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class ALM +{ + @Test public void codeCoverageTest() throws Exception + { + NetLiabilityCliffDependence.main (null); + + NetLiabilityConsumptionDependence.main (null); + + NetLiabilityDiscountDependence.main (null); + + NetLiabilityStreamEstimator.main (null); + + NetLiabilityTaxYieldDependence.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/portfolioconstruction/AssetAllocation.java b/src/main/java/org/drip/coverage/portfolioconstruction/AssetAllocation.java new file mode 100644 index 000000000000..826b02aa5ac1 --- /dev/null +++ b/src/main/java/org/drip/coverage/portfolioconstruction/AssetAllocation.java @@ -0,0 +1,79 @@ + +package org.drip.coverage.portfolioconstruction; + +// import org.drip.sample.assetallocation.BudgetConstrainedVarianceMinimizer; +import org.drip.sample.assetallocation.DualConstrainedVariateConvergence; +// import org.drip.sample.assetallocation.ReturnsConstrainedVarianceMinimizer; +// import org.drip.sample.assetallocation.RiskTolerantVarianceMinimizer; +// import org.drip.sample.assetallocation.VanillaVarianceMinimizer; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * AssetAllocation holds the JUnit Code Coverage Tests for the Asset Allocation Portfolio Construction + * Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class AssetAllocation +{ + @Test public void codeCoverageTest() throws Exception + { + // BudgetConstrainedVarianceMinimizer.main (null); + + DualConstrainedVariateConvergence.main (null); + + // ReturnsConstrainedVarianceMinimizer.main (null); + + // RiskTolerantVarianceMinimizer.main (null); + + // VanillaVarianceMinimizer.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/portfolioconstruction/AssetAllocationExcel.java b/src/main/java/org/drip/coverage/portfolioconstruction/AssetAllocationExcel.java new file mode 100644 index 000000000000..879aa0bea0a2 --- /dev/null +++ b/src/main/java/org/drip/coverage/portfolioconstruction/AssetAllocationExcel.java @@ -0,0 +1,117 @@ + +package org.drip.coverage.portfolioconstruction; + +import org.drip.sample.assetallocationexcel.CMVMonthlyReconciler01; +import org.drip.sample.assetallocationexcel.CMVMonthlyReconciler02; +import org.drip.sample.assetallocationexcel.CMVMonthlyReconciler03; +import org.drip.sample.assetallocationexcel.CMVMonthlyReconciler04; +import org.drip.sample.assetallocationexcel.CMVMonthlyReconciler05; +import org.drip.sample.assetallocationexcel.CMVMonthlyReconciler06; +import org.drip.sample.assetallocationexcel.CMVMonthlyReconciler07; +import org.drip.sample.assetallocationexcel.CMVMonthlyReconciler08; +import org.drip.sample.assetallocationexcel.CMVMonthlyReconciler09; +import org.drip.sample.assetallocationexcel.CMVMonthlyReconciler10; +import org.drip.sample.assetallocationexcel.CMVReconciler1; +import org.drip.sample.assetallocationexcel.CMVReconciler3; +import org.drip.sample.assetallocationexcel.CMVReconciler4; +import org.drip.sample.assetallocationexcel.CMVReconciler5; +import org.drip.sample.assetallocationexcel.CMVReconciler6; +import org.drip.sample.assetallocationexcel.CMVReconciler7; +import org.drip.sample.assetallocationexcel.CMVReconciler8; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * AssetAllocationExcel holds the JUnit Code Coverage Tests for Excel Comparisons of Asset Allocation + * Portfolio Construction Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class AssetAllocationExcel +{ + @Test public void codeCoverageTest() throws Exception + { + CMVMonthlyReconciler01.main (null); + + CMVMonthlyReconciler02.main (null); + + CMVMonthlyReconciler03.main (null); + + CMVMonthlyReconciler04.main (null); + + CMVMonthlyReconciler05.main (null); + + CMVMonthlyReconciler06.main (null); + + CMVMonthlyReconciler07.main (null); + + CMVMonthlyReconciler08.main (null); + + CMVMonthlyReconciler09.main (null); + + CMVMonthlyReconciler10.main (null); + + CMVReconciler1.main (null); + + // CMVReconciler2.main (null); + + CMVReconciler3.main (null); + + CMVReconciler4.main (null); + + CMVReconciler5.main (null); + + CMVReconciler6.main (null); + + CMVReconciler7.main (null); + + CMVReconciler8.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/portfolioconstruction/BlackLitterman.java b/src/main/java/org/drip/coverage/portfolioconstruction/BlackLitterman.java new file mode 100644 index 000000000000..41b8385a9f7f --- /dev/null +++ b/src/main/java/org/drip/coverage/portfolioconstruction/BlackLitterman.java @@ -0,0 +1,90 @@ + +package org.drip.coverage.portfolioconstruction; + +import org.drip.sample.blacklitterman.DaJagannathan2005a; +import org.drip.sample.blacklitterman.DaJagannathan2005b; +import org.drip.sample.blacklitterman.DaJagannathan2005c; +import org.drip.sample.blacklitterman.DaJagannathan2005d; +import org.drip.sample.blacklitterman.DaJagannathan2005e; +import org.drip.sample.blacklitterman.IdzorekAndrogue2003; +import org.drip.sample.blacklitterman.OToole2013; +import org.drip.sample.blacklitterman.Soontornkit2010; +import org.drip.sample.blacklitterman.Yamabe2016; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * BlackLitterman holds the JUnit Code Coverage Tests for the Black Litterman Portfolio Construction Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class BlackLitterman +{ + @Test public void codeCoverageTest() throws Exception + { + DaJagannathan2005a.main (null); + + DaJagannathan2005b.main (null); + + DaJagannathan2005c.main (null); + + DaJagannathan2005d.main (null); + + DaJagannathan2005e.main (null); + + IdzorekAndrogue2003.main (null); + + OToole2013.main (null); + + Soontornkit2010.main (null); + + Yamabe2016.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/portfolioconstruction/EfficientFrontier.java b/src/main/java/org/drip/coverage/portfolioconstruction/EfficientFrontier.java new file mode 100644 index 000000000000..c758e119c48c --- /dev/null +++ b/src/main/java/org/drip/coverage/portfolioconstruction/EfficientFrontier.java @@ -0,0 +1,76 @@ + +package org.drip.coverage.portfolioconstruction; + +import org.drip.sample.efficientfrontier.BoundedMarkovitzBullet; +import org.drip.sample.efficientfrontier.LongOnlyMarkovitzBullet; +// import org.drip.sample.efficientfrontier.UnboundedMarkovitzBullet; +// import org.drip.sample.efficientfrontier.UnboundedMarkovitzBulletExplicit; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * EfficientFrontier holds the JUnit Code Coverage Tests for the Efficient Frontier Portfolio Construction + * Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class EfficientFrontier +{ + @Test public void codeCoverageTest() throws Exception + { + BoundedMarkovitzBullet.main (null); + + LongOnlyMarkovitzBullet.main (null); + + // UnboundedMarkovitzBullet.main (null); + + // UnboundedMarkovitzBulletExplicit.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/portfolioconstruction/HeLitterman.java b/src/main/java/org/drip/coverage/portfolioconstruction/HeLitterman.java new file mode 100644 index 000000000000..367eabe95771 --- /dev/null +++ b/src/main/java/org/drip/coverage/portfolioconstruction/HeLitterman.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.portfolioconstruction; + +import org.drip.sample.helitterman.Table4DetailedBlowout; +import org.drip.sample.helitterman.Table4Reconciler; +import org.drip.sample.helitterman.Table5Reconciler; +import org.drip.sample.helitterman.Table6Reconciler; +import org.drip.sample.helitterman.Table7Reconciler; +import org.drip.sample.helitterman.Table8Reconciler; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * HeLitterman holds the JUnit Code Coverage Tests for the He Litterman Portfolio Construction Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class HeLitterman +{ + @Test public void codeCoverageTest() throws Exception + { + Table4DetailedBlowout.main (null); + + Table4Reconciler.main (null); + + Table5Reconciler.main (null); + + Table6Reconciler.main (null); + + Table7Reconciler.main (null); + + Table8Reconciler.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/portfolioconstruction/Idzorek.java b/src/main/java/org/drip/coverage/portfolioconstruction/Idzorek.java new file mode 100644 index 000000000000..a1c9c3b90f28 --- /dev/null +++ b/src/main/java/org/drip/coverage/portfolioconstruction/Idzorek.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.portfolioconstruction; + +import org.drip.sample.idzorek.ExpectedExcessReturnsWeights; +import org.drip.sample.idzorek.PortfolioAndBenchmarkMetrics; +import org.drip.sample.idzorek.PriorPosteriorMetricsComparison; +import org.drip.sample.idzorek.ProjectionImpliedConfidenceLevel; +import org.drip.sample.idzorek.ProjectionImpliedConfidenceTilt; +import org.drip.sample.idzorek.UserConfidenceProjectionCalibration; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Idzorek holds the JUnit Code Coverage Tests for the Idzorek Portfolio Construction Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Idzorek +{ + @Test public void codeCoverageTest() throws Exception + { + ExpectedExcessReturnsWeights.main (null); + + PortfolioAndBenchmarkMetrics.main (null); + + PriorPosteriorMetricsComparison.main (null); + + ProjectionImpliedConfidenceLevel.main (null); + + ProjectionImpliedConfidenceTilt.main (null); + + UserConfidenceProjectionCalibration.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/portfolioconstruction/package-info.java b/src/main/java/org/drip/coverage/portfolioconstruction/package-info.java new file mode 100644 index 000000000000..3c0c3506321e --- /dev/null +++ b/src/main/java/org/drip/coverage/portfolioconstruction/package-info.java @@ -0,0 +1,8 @@ + +/** + * Portfolio Construction Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.portfolioconstruction; diff --git a/src/main/java/org/drip/coverage/product/Agency.java b/src/main/java/org/drip/coverage/product/Agency.java new file mode 100644 index 000000000000..3621e02fd352 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/Agency.java @@ -0,0 +1,69 @@ + +package org.drip.coverage.product; + +import org.drip.sample.agency.FixedBullet1; +import org.drip.sample.agency.FixedBullet2; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Agency holds the JUnit Code Coverage Tests for the Agency Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Agency +{ + @Test public void codeCoverageTest() throws Exception + { + FixedBullet1.main (null); + + FixedBullet2.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/AssetBacked.java b/src/main/java/org/drip/coverage/product/AssetBacked.java new file mode 100644 index 000000000000..1ac058075189 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/AssetBacked.java @@ -0,0 +1,69 @@ + +package org.drip.coverage.product; + +import org.drip.sample.assetbacked.ConstantPaymentBond; +import org.drip.sample.assetbacked.PrepayableConstantPaymentBond; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * AssetBacked holds the JUnit Code Coverage Tests for the Asset Backed Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class AssetBacked +{ + @Test public void codeCoverageTest() throws Exception + { + ConstantPaymentBond.main (null); + + PrepayableConstantPaymentBond.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/Bloomberg.java b/src/main/java/org/drip/coverage/product/Bloomberg.java new file mode 100644 index 000000000000..8ab0f50760d5 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/Bloomberg.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.product; + +import org.drip.sample.bloomberg.CDSO; +import org.drip.sample.bloomberg.CDSW; +import org.drip.sample.bloomberg.SWPM; +import org.drip.sample.bloomberg.SWPMOIS; +import org.drip.sample.bloomberg.SWPM_NEW; +import org.drip.sample.bloomberg.YAS; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Bloomberg holds the JUnit Code Coverage Tests for the Bloomberg Pricing Commands for the Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Bloomberg +{ + @Test public void codeCoverageTest() throws Exception + { + CDSO.main (null); + + CDSW.main (null); + + SWPM_NEW.main (null); + + SWPM.main (null); + + SWPMOIS.main (null); + + YAS.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/Bond.java b/src/main/java/org/drip/coverage/product/Bond.java new file mode 100644 index 000000000000..2ec7e2cdc648 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/Bond.java @@ -0,0 +1,84 @@ + +package org.drip.coverage.product; + +import org.drip.sample.bond.BasketAggregateMeasuresGeneration; +import org.drip.sample.bond.CoreCashFlowMeasures; +import org.drip.sample.bond.CorporateIssueMetrics; +import org.drip.sample.bond.MultiCallExerciseMetrics; +import org.drip.sample.bond.MultiCallMonteCarlo; +import org.drip.sample.bond.RegressionSplineCashCurve; +import org.drip.sample.bond.RelativeValueMeasuresGeneration; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Bond holds the JUnit Code Coverage Tests for the Bond Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Bond +{ + @Test public void codeCoverageTest() throws Exception + { + BasketAggregateMeasuresGeneration.main (null); + + CoreCashFlowMeasures.main (null); + + CorporateIssueMetrics.main (null); + + MultiCallExerciseMetrics.main (null); + + MultiCallMonteCarlo.main (null); + + RegressionSplineCashCurve.main (null); + + RelativeValueMeasuresGeneration.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/BondAPI.java b/src/main/java/org/drip/coverage/product/BondAPI.java new file mode 100644 index 000000000000..81ca1da85629 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/BondAPI.java @@ -0,0 +1,72 @@ + +package org.drip.coverage.product; + +import org.drip.sample.bondapi.FixedCoupon; +import org.drip.sample.bondapi.FixedCouponKeyRateDuration; +import org.drip.sample.bondapi.FixedCouponRVMeasures; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * BondAPI holds the JUnit Code Coverage Tests for the Bond Product API Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class BondAPI +{ + @Test public void codeCoverageTest() throws Exception + { + FixedCoupon.main (null); + + FixedCouponKeyRateDuration.main (null); + + FixedCouponRVMeasures.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/BondEOS.java b/src/main/java/org/drip/coverage/product/BondEOS.java new file mode 100644 index 000000000000..dbf9154e5e6f --- /dev/null +++ b/src/main/java/org/drip/coverage/product/BondEOS.java @@ -0,0 +1,534 @@ + +package org.drip.coverage.product; + +import org.drip.sample.bondeos.*; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * BondEOS holds the JUnit Code Coverage Tests for the Bond EOS Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class BondEOS +{ + @Test public void codeCoverageTest() throws Exception + { + Agra.main (null); + + Aksu.main (null); + + Allahabad.main (null); + + Altay.main (null); + + Amritsar.main (null); + + Anqing.main (null); + + Anshan.main (null); + + Anyang.main (null); + + Aurangabad.main (null); + + Baoding.main (null); + + Baoji.main (null); + + Baotou.main (null); + + Bazhong.main (null); + + Beihai.main (null); + + Beijing.main (null); + + Bengbu.main (null); + + Benxi.main (null); + + Bhopal.main (null); + + Binzhou.main (null); + + Bozhou.main (null); + + Canhzhou.main (null); + + Chandigarh.main (null); + + Changchun.main (null); + + Changde.main (null); + + Changsha.main (null); + + Changshu.main (null); + + Changzhou.main (null); + + Chaozhou.main (null); + + Chengdu.main (null); + + Chifeng.main (null); + + Chongqing.main (null); + + Chuzhou.main (null); + + Cixi.main (null); + + Dalian.main (null); + + Dandong.main (null); + + Danyang.main (null); + + Daqing.main (null); + + Datong.main (null); + + Dengzhou.main (null); + + Dezhou.main (null); + + Dhanbad.main (null); + + Dingzhou.main (null); + + Dongguan.main (null); + + Dongying.main (null); + + Ezhou.main (null); + + Faridabad.main (null); + + Feicheng.main (null); + + Foshan.main (null); + + Fuqing.main (null); + + Fushun.main (null); + + Fuxin.main (null); + + Fuyang.main (null); + + Fuzhou.main (null); + + Ganzhou.main (null); + + Ghaziabad.main (null); + + Giulin.main (null); + + Guangzhou.main (null); + + Guigang.main (null); + + Guiyang.main (null); + + Guwahati.main (null); + + Gwalior.main (null); + + Haicheng.main (null); + + Haikou.main (null); + + Haimen.main (null); + + Handan.main (null); + + Harbin.main (null); + + Hefei.main (null); + + Hegang.main (null); + + Hengyang.main (null); + + Heze.main (null); + + Hezhou.main (null); + + Hohhot.main (null); + + Hongzhou.main (null); + + Howrah.main (null); + + Huaian.main (null); + + Huaibei.main (null); + + Huainan.main (null); + + Huangshi.main (null); + + Huazhou.main (null); + + Huizhou.main (null); + + Huludao.main (null); + + Indore.main (null); + + Jabalpur.main (null); + + Jamshedpur.main (null); + + Jiamusi.main (null); + + Jiangmen.main (null); + + Jiangyin.main (null); + + Jiaozuo.main (null); + + Jiaxing.main (null); + + Jilin.main (null); + + Jinan.main (null); + + Jingjiang.main (null); + + Jingzhou.main (null); + + Jinhua.main (null); + + Jining.main (null); + + Jinzhou.main (null); + + Jiujiang.main (null); + + KalyanDombivli.main (null); + + Kanpur.main (null); + + Karamay.main (null); + + Kashgar.main (null); + + Keifeng.main (null); + + Kota.main (null); + + Kunming.main (null); + + Laiwu.main (null); + + Langfeng.main (null); + + Lanzhou.main (null); + + Lhasa.main (null); + + Lianyungang.main (null); + + Liaocheng.main (null); + + Liaoyang.main (null); + + Lijiang.main (null); + + Linfen.main (null); + + Linhai.main (null); + + Linyi.main (null); + + Lishui.main (null); + + Liuzhou.main (null); + + Luan.main (null); + + Luoyang.main (null); + + Maanshan.main (null); + + Maoming.main (null); + + Mianyang.main (null); + + Mudanjiang.main (null); + + Nanchang.main (null); + + Nanchong.main (null); + + Nanjing.main (null); + + Nanning.main (null); + + Nanping.main (null); + + Nantong.main (null); + + Nanyang.main (null); + + Nashik.main (null); + + NaviMumbai.main (null); + + Neijiang.main (null); + + Ningbo.main (null); + + Panjin.main (null); + + Panzhihua.main (null); + + Patna.main (null); + + PimpriChinchwad.main (null); + + Pingdingshan.main (null); + + Pizhou.main (null); + + Putian.main (null); + + Puyang.main (null); + + Qidong.main (null); + + Qingdao.main (null); + + Qinghuangdao.main (null); + + Qiqihar.main (null); + + Quanzhou.main (null); + + Qujing.main (null); + + Raipur.main (null); + + Ranchi.main (null); + + Rizhao.main (null); + + Rugao.main (null); + + Shanghai.main (null); + + Shantou.main (null); + + Shaoxing.main (null); + + Shaoyang.main (null); + + Shenyang.main (null); + + Shenzhen.main (null); + + ShijiaZhuang.main (null); + + Shouguang.main (null); + + Solapur.main (null); + + Srinagar.main (null); + + Suihua.main (null); + + Surat.main (null); + + Suzhou.main (null); + + Taian.main (null); + + Taixing.main (null); + + Taiyuan.main (null); + + Taizhou.main (null); + + Tangshan.main (null); + + Tanjin.main (null); + + Tengzhou.main (null); + + Tianshui.main (null); + + Tieling.main (null); + + Urumqi.main (null); + + Vadodra.main (null); + + Varanasi.main (null); + + VasaiVirar.main (null); + + Vijayawada.main (null); + + Visakhapatnam.main (null); + + Weifang.main (null); + + Weihai.main (null); + + Wenling.main (null); + + Wenzhou.main (null); + + Wuchuan.main (null); + + Wuhan.main (null); + + Wuhu.main (null); + + Wuwei.main (null); + + Wuxi.main (null); + + Xiamen.main (null); + + Xian.main (null); + + Xiangcheng.main (null); + + Xiangtan.main (null); + + Xiangyang.main (null); + + Xianyang.main (null); + + Xingtai.main (null); + + Xining.main (null); + + Xinxiang.main (null); + + Xinyang.main (null); + + Xinyi.main (null); + + Xuchang.main (null); + + Xuzhou.main (null); + + Yancheng.main (null); + + Yangjiang.main (null); + + Yangzhou.main (null); + + Yantai.main (null); + + Yibin.main (null); + + Yichang.main (null); + + Yinchuan.main (null); + + Yingkou.main (null); + + Yiwu.main (null); + + Yixing.main (null); + + Yueyang.main (null); + + Yulin.main (null); + + Yuzhou.main (null); + + Zaoyang.main (null); + + Zaozhuang.main (null); + + Zhangjiagang.main (null); + + Zhangqiu.main (null); + + Zhangzhou.main (null); + + Zhanjiang.main (null); + + Zhaoqing.main (null); + + Zhengzhou.main (null); + + Zhenjiang.main (null); + + Zhongshan.main (null); + + Zhoukou.main (null); + + Zhoushan.main (null); + + Zhucheng.main (null); + + Zhuhai.main (null); + + Zhuji.main (null); + + Zhuzhou.main (null); + + Zibo.main (null); + + Zigong.main (null); + + Zoucheng.main (null); + + Zunyi.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/BondFixed.java b/src/main/java/org/drip/coverage/product/BondFixed.java new file mode 100644 index 000000000000..016966088c98 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/BondFixed.java @@ -0,0 +1,102 @@ + +package org.drip.coverage.product; + +import org.drip.sample.bondfixed.Bareilly; +import org.drip.sample.bondfixed.BulletAgency; +import org.drip.sample.bondfixed.BulletCorporate1; +import org.drip.sample.bondfixed.BulletCorporate2; +import org.drip.sample.bondfixed.BulletCorporate3; +import org.drip.sample.bondfixed.BulletCorporate4; +import org.drip.sample.bondfixed.BulletCorporate5; +import org.drip.sample.bondfixed.BulletCorporate6; +import org.drip.sample.bondfixed.HubbaliDharwad; +import org.drip.sample.bondfixed.Moradabad; +import org.drip.sample.bondfixed.Mysore; +import org.drip.sample.bondfixed.Tiruchirapalli; +import org.drip.sample.bondfixed.Tiruppur; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * BondFixed holds the JUnit Code Coverage Tests for the Fixed Bond Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class BondFixed +{ + @Test public void codeCoverageTest() throws Exception + { + Bareilly.main (null); + + BulletAgency.main (null); + + BulletCorporate1.main (null); + + BulletCorporate2.main (null); + + BulletCorporate3.main (null); + + BulletCorporate4.main (null); + + BulletCorporate5.main (null); + + BulletCorporate6.main (null); + + HubbaliDharwad.main (null); + + Moradabad.main (null); + + Mysore.main (null); + + Tiruchirapalli.main (null); + + Tiruppur.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/BondFloat.java b/src/main/java/org/drip/coverage/product/BondFloat.java new file mode 100644 index 000000000000..52192cccf964 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/BondFloat.java @@ -0,0 +1,66 @@ + +package org.drip.coverage.product; + +import org.drip.sample.bondfloat.BulletLIBORCorporate; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * BondFloat holds the JUnit Code Coverage Tests for the Floater Bond Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class BondFloat +{ + @Test public void codeCoverageTest() throws Exception + { + BulletLIBORCorporate.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/BondMetrics.java b/src/main/java/org/drip/coverage/product/BondMetrics.java new file mode 100644 index 000000000000..186116d27672 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/BondMetrics.java @@ -0,0 +1,269 @@ + +package org.drip.coverage.product; + +import org.drip.sample.bondmetrics.Agartala; +import org.drip.sample.bondmetrics.Ahmedabad; +import org.drip.sample.bondmetrics.Ajmer; +import org.drip.sample.bondmetrics.Akola; +import org.drip.sample.bondmetrics.Ambattur; +import org.drip.sample.bondmetrics.Asansol; +import org.drip.sample.bondmetrics.Belgaum; +import org.drip.sample.bondmetrics.Bellary; +import org.drip.sample.bondmetrics.Bengaluru; +import org.drip.sample.bondmetrics.Bhagalpur; +import org.drip.sample.bondmetrics.Bhatpara; +import org.drip.sample.bondmetrics.Bhilai; +import org.drip.sample.bondmetrics.Bokaro; +import org.drip.sample.bondmetrics.Parbhani; +import org.drip.sample.bondmetrics.Chennai; +import org.drip.sample.bondmetrics.Coimbatore; +import org.drip.sample.bondmetrics.Delhi; +import org.drip.sample.bondmetrics.Dumdum; +import org.drip.sample.bondmetrics.Durgapur; +import org.drip.sample.bondmetrics.Erode; +import org.drip.sample.bondmetrics.Tumkur; +import org.drip.sample.bondmetrics.Gaya; +import org.drip.sample.bondmetrics.Goa; +import org.drip.sample.bondmetrics.Gopalpur; +import org.drip.sample.bondmetrics.Gulbarga; +import org.drip.sample.bondmetrics.Hyderabad; +import org.drip.sample.bondmetrics.Jaipur; +import org.drip.sample.bondmetrics.Jalgaon; +import org.drip.sample.bondmetrics.Jammu; +import org.drip.sample.bondmetrics.Jamnagar; +import org.drip.sample.bondmetrics.Jhansi; +import org.drip.sample.bondmetrics.Jullundar; +import org.drip.sample.bondmetrics.Kochi; +import org.drip.sample.bondmetrics.Kolhapur; +import org.drip.sample.bondmetrics.Kolkata; +import org.drip.sample.bondmetrics.Kottayam; +import org.drip.sample.bondmetrics.Latur; +import org.drip.sample.bondmetrics.Loni; +import org.drip.sample.bondmetrics.Lucknow; +import org.drip.sample.bondmetrics.Ludhiana; +import org.drip.sample.bondmetrics.Madurai; +import org.drip.sample.bondmetrics.Malegaon; +import org.drip.sample.bondmetrics.Mangalore; +import org.drip.sample.bondmetrics.Mumbai; +import org.drip.sample.bondmetrics.Muzaffarnagar; +import org.drip.sample.bondmetrics.Muzaffarpur; +import org.drip.sample.bondmetrics.Nanded; +import org.drip.sample.bondmetrics.Noida; +import org.drip.sample.bondmetrics.Panihati; +import org.drip.sample.bondmetrics.Patiala; +import org.drip.sample.bondmetrics.Puducherry; +import org.drip.sample.bondmetrics.Pune; +import org.drip.sample.bondmetrics.Rajahmundry; +import org.drip.sample.bondmetrics.Rajkot; +import org.drip.sample.bondmetrics.RajpurSonarpur; +// import org.drip.sample.bondmetrics.Reconciler_Call; +// import org.drip.sample.bondmetrics.Reconciler_Fixed; +// import org.drip.sample.bondmetrics.Reconciler_Float; +// import org.drip.sample.bondmetrics.Reconciler_Sink; +import org.drip.sample.bondmetrics.Rourkela; +import org.drip.sample.bondmetrics.SangliMirajKhupwad; +import org.drip.sample.bondmetrics.Siliguri; +import org.drip.sample.bondmetrics.Thane; +import org.drip.sample.bondmetrics.Thiruvananthapuram; +import org.drip.sample.bondmetrics.Tirunelveli; +import org.drip.sample.bondmetrics.Udaipur; +import org.drip.sample.bondmetrics.Ujjain; +import org.drip.sample.bondmetrics.Ulhasnagar; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * BondMetrics holds the JUnit Code Coverage Tests for the Bond Metrics for the Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class BondMetrics +{ + @Test public void codeCoverageTest() throws Exception + { + Agartala.main (null); + + Ahmedabad.main (null); + + Ajmer.main (null); + + Akola.main (null); + + Ambattur.main (null); + + Asansol.main (null); + + Ahmedabad.main (null); + + Belgaum.main (null); + + Bellary.main (null); + + Bengaluru.main (null); + + Bhagalpur.main (null); + + Bhatpara.main (null); + + Bhilai.main (null); + + Bokaro.main (null); + + Parbhani.main (null); + + Chennai.main (null); + + Coimbatore.main (null); + + Delhi.main (null); + + Dumdum.main (null); + + Durgapur.main (null); + + Erode.main (null); + + Tumkur.main (null); + + Gaya.main (null); + + Goa.main (null); + + Gopalpur.main (null); + + Gulbarga.main (null); + + Hyderabad.main (null); + + Jaipur.main (null); + + Jalgaon.main (null); + + Jammu.main (null); + + Jamnagar.main (null); + + Jhansi.main (null); + + Jullundar.main (null); + + Kochi.main (null); + + Kolhapur.main (null); + + Kolkata.main (null); + + Kottayam.main (null); + + Latur.main (null); + + Loni.main (null); + + Lucknow.main (null); + + Ludhiana.main (null); + + Madurai.main (null); + + Malegaon.main (null); + + Mangalore.main (null); + + Mumbai.main (null); + + Muzaffarnagar.main (null); + + Muzaffarpur.main (null); + + Nanded.main (null); + + Noida.main (null); + + Panihati.main (null); + + Patiala.main (null); + + Puducherry.main (null); + + Pune.main (null); + + Rajahmundry.main (null); + + Rajkot.main (null); + + RajpurSonarpur.main (null); + + // Reconciler_Call.main (null); + + // Reconciler_Fixed.main (null); + + // Reconciler_Float.main (null); + + // Reconciler_Sink.main (null); + + Rourkela.main (null); + + SangliMirajKhupwad.main (null); + + Siliguri.main (null); + + Thane.main (null); + + Thiruvananthapuram.main (null); + + Tirunelveli.main (null); + + Udaipur.main (null); + + Ujjain.main (null); + + Ulhasnagar.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/BondSink.java b/src/main/java/org/drip/coverage/product/BondSink.java new file mode 100644 index 000000000000..7233b830ef64 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/BondSink.java @@ -0,0 +1,114 @@ + +package org.drip.coverage.product; + +import org.drip.sample.bondsink.Aligarh; +import org.drip.sample.bondsink.Amaravati; +import org.drip.sample.bondsink.Bhavnagar; +import org.drip.sample.bondsink.Bhiwandi; +import org.drip.sample.bondsink.Bhubaneswar; +import org.drip.sample.bondsink.Bikaner; +import org.drip.sample.bondsink.Cuttack; +import org.drip.sample.bondsink.Dehradun; +import org.drip.sample.bondsink.Firozabad; +import org.drip.sample.bondsink.Gorakhpur; +import org.drip.sample.bondsink.Guntur; +import org.drip.sample.bondsink.Ichalkaranji; +import org.drip.sample.bondsink.MiraBhayander; +import org.drip.sample.bondsink.Nellore; +import org.drip.sample.bondsink.Saharanpur; +import org.drip.sample.bondsink.Salem; +import org.drip.sample.bondsink.Warangal; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * BondSink holds the JUnit Code Coverage Tests for the Sinker Bond Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class BondSink +{ + @Test public void codeCoverageTest() throws Exception + { + Aligarh.main (null); + + Amaravati.main (null); + + Bhavnagar.main (null); + + Bhiwandi.main (null); + + Bhubaneswar.main (null); + + Bikaner.main (null); + + Cuttack.main (null); + + Dehradun.main (null); + + Firozabad.main (null); + + Gorakhpur.main (null); + + Guntur.main (null); + + Ichalkaranji.main (null); + + MiraBhayander.main (null); + + Nellore.main (null); + + Saharanpur.main (null); + + Salem.main (null); + + Warangal.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/BondSwap.java b/src/main/java/org/drip/coverage/product/BondSwap.java new file mode 100644 index 000000000000..515e0ec96559 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/BondSwap.java @@ -0,0 +1,71 @@ + +package org.drip.coverage.product; + +import org.drip.sample.bondswap.BiharSharif; +import org.drip.sample.bondswap.Khammam; +import org.drip.sample.bondswap.Ozhukarai; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * BondSwap holds the JUnit Code Coverage Tests for the Swap Rate Floater Bond Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class BondSwap +{ + @Test public void codeCoverageTest() throws Exception + { + BiharSharif.main (null); + + Khammam.main (null); + + Ozhukarai.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/CMA.java b/src/main/java/org/drip/coverage/product/CMA.java new file mode 100644 index 000000000000..48978ea4c0e0 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/CMA.java @@ -0,0 +1,69 @@ + +package org.drip.coverage.product; + +import org.drip.sample.cma.LatamCorp; +import org.drip.sample.cma.Maheshtala; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * CMA holds the JUnit Code Coverage Tests for the LATAM Sovereign and Corporate Bond Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class CMA +{ + @Test public void codeCoverageTest() throws Exception + { + LatamCorp.main (null); + + Maheshtala.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/CMS.java b/src/main/java/org/drip/coverage/product/CMS.java new file mode 100644 index 000000000000..6c3e89960775 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/CMS.java @@ -0,0 +1,75 @@ + +package org.drip.coverage.product; + +import org.drip.sample.cms.FixFloatMetricComparison; +import org.drip.sample.cms.FixFloatVarianceAnalysis; +import org.drip.sample.cms.FloatFloatMetricComparison; +import org.drip.sample.cms.FloatFloatVarianceAnalysis; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * CMS holds the JUnit Code Coverage Tests for the Constant Maturity Swap Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class CMS +{ + @Test public void codeCoverageTest() throws Exception + { + FixFloatMetricComparison.main (null); + + FixFloatVarianceAnalysis.main (null); + + FloatFloatMetricComparison.main (null); + + FloatFloatVarianceAnalysis.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/CapFloor.java b/src/main/java/org/drip/coverage/product/CapFloor.java new file mode 100644 index 000000000000..e6fd83f5eb7c --- /dev/null +++ b/src/main/java/org/drip/coverage/product/CapFloor.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.product; + +import org.drip.sample.capfloor.FRAStdCapFloor; +import org.drip.sample.capfloor.FRAStdCapFloorAnalysis; +import org.drip.sample.capfloor.FRAStdCapModels; +// import org.drip.sample.capfloor.FRAStdCapMonteCarlo; +import org.drip.sample.capfloor.FRAStdCapSequence; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * CapFloor holds the JUnit Code Coverage Tests for the IR Volatility Product Service Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class CapFloor +{ + @Test public void codeCoverageTest() throws Exception + { + FRAStdCapFloor.main (null); + + FRAStdCapFloorAnalysis.main (null); + + FRAStdCapModels.main (null); + + // FRAStdCapMonteCarlo.main (null); + + FRAStdCapSequence.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/Corporate.java b/src/main/java/org/drip/coverage/product/Corporate.java new file mode 100644 index 000000000000..c90590121a36 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/Corporate.java @@ -0,0 +1,90 @@ + +package org.drip.coverage.product; + +import org.drip.sample.corporate.FixedBullet1; +import org.drip.sample.corporate.FixedBullet2; +import org.drip.sample.corporate.FixedBullet3; +import org.drip.sample.corporate.FixedBullet4; +import org.drip.sample.corporate.FixedBullet5; +import org.drip.sample.corporate.FixedBullet6; +import org.drip.sample.corporate.FixedBullet7; +import org.drip.sample.corporate.FixedBullet8; +import org.drip.sample.corporate.NonFixedBullet; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Corporate holds the JUnit Code Coverage Tests for the Corporate Bond Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Corporate +{ + @Test public void codeCoverageTest() throws Exception + { + FixedBullet1.main (null); + + FixedBullet2.main (null); + + FixedBullet3.main (null); + + FixedBullet4.main (null); + + FixedBullet5.main (null); + + FixedBullet6.main (null); + + FixedBullet7.main (null); + + FixedBullet8.main (null); + + NonFixedBullet.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/Credit.java b/src/main/java/org/drip/coverage/product/Credit.java new file mode 100644 index 000000000000..09b73d14da7f --- /dev/null +++ b/src/main/java/org/drip/coverage/product/Credit.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.product; + +import org.drip.sample.credit.BuiltInCDSPortfolioDefinitions; +import org.drip.sample.credit.CDSBasketMeasures; +import org.drip.sample.credit.CDSCashFlowMeasures; +import org.drip.sample.credit.CDSValuationMetrics; +import org.drip.sample.credit.CreditIndexDefinitions; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Credit holds the JUnit Code Coverage Tests for the Credit Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Credit +{ + @Test public void codeCoverageTest() throws Exception + { + BuiltInCDSPortfolioDefinitions.main (null); + + CDSBasketMeasures.main (null); + + CDSCashFlowMeasures.main (null); + + CDSValuationMetrics.main (null); + + CreditIndexDefinitions.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/CreditOption.java b/src/main/java/org/drip/coverage/product/CreditOption.java new file mode 100644 index 000000000000..ab7fa40a1f4e --- /dev/null +++ b/src/main/java/org/drip/coverage/product/CreditOption.java @@ -0,0 +1,69 @@ + +package org.drip.coverage.product; + +import org.drip.sample.creditoption.CDSPayerReceiver; +import org.drip.sample.creditoption.CDSPayerReceiverAnalysis; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * CreditOption holds the JUnit Code Coverage Tests for the Credit Option Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class CreditOption +{ + @Test public void codeCoverageTest() throws Exception + { + CDSPayerReceiver.main (null); + + CDSPayerReceiverAnalysis.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/Cross.java b/src/main/java/org/drip/coverage/product/Cross.java new file mode 100644 index 000000000000..93cfbc284f9d --- /dev/null +++ b/src/main/java/org/drip/coverage/product/Cross.java @@ -0,0 +1,87 @@ + +package org.drip.coverage.product; + +import org.drip.sample.cross.CrossFixedPlainFloat; +import org.drip.sample.cross.CrossFixedPlainFloatAnalysis; +import org.drip.sample.cross.CrossFloatCrossFloat; +import org.drip.sample.cross.CrossFloatCrossFloatAnalysis; +import org.drip.sample.cross.FixFloatFixFloat; +import org.drip.sample.cross.FixFloatFixFloatAnalysis; +import org.drip.sample.cross.FloatFloatFloatFloat; +import org.drip.sample.cross.FloatFloatFloatFloatAnalysis; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Cross holds the JUnit Code Coverage Tests for the Cross Currency Fix Float Component Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Cross +{ + @Test public void codeCoverageTest() throws Exception + { + CrossFixedPlainFloat.main (null); + + CrossFixedPlainFloatAnalysis.main (null); + + CrossFloatCrossFloat.main (null); + + CrossFloatCrossFloatAnalysis.main (null); + + FixFloatFixFloat.main (null); + + FixFloatFixFloatAnalysis.main (null); + + FloatFloatFloatFloat.main (null); + + FloatFloatFloatFloatAnalysis.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/Dual.java b/src/main/java/org/drip/coverage/product/Dual.java new file mode 100644 index 000000000000..0b584d1e80cc --- /dev/null +++ b/src/main/java/org/drip/coverage/product/Dual.java @@ -0,0 +1,90 @@ + +package org.drip.coverage.product; + +import org.drip.sample.dual.CAD3M6MUSD3M6M; +import org.drip.sample.dual.CHF3M6MUSD3M6M; +import org.drip.sample.dual.DKK3M6MUSD3M6M; +import org.drip.sample.dual.EUR3M6MUSD3M6M; +import org.drip.sample.dual.GBP3M6MUSD3M6M; +import org.drip.sample.dual.JPY3M6MUSD3M6M; +import org.drip.sample.dual.NOK3M6MUSD3M6M; +import org.drip.sample.dual.PLN3M6MUSD3M6M; +import org.drip.sample.dual.SEK3M6MUSD3M6M; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Dual holds the JUnit Code Coverage Tests for the Dual Cross Currency Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Dual +{ + @Test public void codeCoverageTest() throws Exception + { + CAD3M6MUSD3M6M.main (null); + + CHF3M6MUSD3M6M.main (null); + + DKK3M6MUSD3M6M.main (null); + + EUR3M6MUSD3M6M.main (null); + + GBP3M6MUSD3M6M.main (null); + + JPY3M6MUSD3M6M.main (null); + + NOK3M6MUSD3M6M.main (null); + + PLN3M6MUSD3M6M.main (null); + + SEK3M6MUSD3M6M.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/FRA.java b/src/main/java/org/drip/coverage/product/FRA.java new file mode 100644 index 000000000000..6d531e100d84 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/FRA.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.product; + +import org.drip.sample.fra.FRAStandardOption; +import org.drip.sample.fra.FRAStandardOptionAnalysis; +import org.drip.sample.fra.MultiCurveFRAMarket; +import org.drip.sample.fra.MultiCurveFRAMarketAnalysis; +import org.drip.sample.fra.MultiCurveFRAStandard; +import org.drip.sample.fra.MultiCurveFRAStandardAnalysis; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * FRA holds the JUnit Code Coverage Tests for the FRA Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class FRA +{ + @Test public void codeCoverageTest() throws Exception + { + FRAStandardOption.main (null); + + FRAStandardOptionAnalysis.main (null); + + MultiCurveFRAMarket.main (null); + + MultiCurveFRAMarketAnalysis.main (null); + + MultiCurveFRAStandard.main (null); + + MultiCurveFRAStandardAnalysis.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/FedFund.java b/src/main/java/org/drip/coverage/product/FedFund.java new file mode 100644 index 000000000000..56b331e8e466 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/FedFund.java @@ -0,0 +1,72 @@ + +package org.drip.coverage.product; + +import org.drip.sample.fedfund.CompositeFedFundLIBORSwap; +import org.drip.sample.fedfund.FedFundOvernightCompounding; +import org.drip.sample.fedfund.OvernightFedFundLIBORSwap; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * FedFund holds the JUnit Code Coverage Tests for the FedFund Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class FedFund +{ + @Test public void codeCoverageTest() throws Exception + { + CompositeFedFundLIBORSwap.main (null); + + FedFundOvernightCompounding.main (null); + + OvernightFedFundLIBORSwap.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/FixFloat.java b/src/main/java/org/drip/coverage/product/FixFloat.java new file mode 100644 index 000000000000..344b4b7b8303 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/FixFloat.java @@ -0,0 +1,96 @@ + +package org.drip.coverage.product; + +import org.drip.sample.fixfloat.AmortizingCapitalizingAccruingSwap; +import org.drip.sample.fixfloat.CustomFixFloatSwap; +import org.drip.sample.fixfloat.InAdvanceIMMSwap; +import org.drip.sample.fixfloat.InAdvanceSwap; +import org.drip.sample.fixfloat.InArrearsSwap; +import org.drip.sample.fixfloat.JurisdictionOTCIndexDefinitions; +import org.drip.sample.fixfloat.JurisdictionOTCIndexSwaps; +import org.drip.sample.fixfloat.LongTenorSwap; +import org.drip.sample.fixfloat.RollerCoasterSwap; +import org.drip.sample.fixfloat.ShortTenorSwap; +import org.drip.sample.fixfloat.StepUpStepDown; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * FixFloat holds the JUnit Code Coverage Tests for the FixFloat IRS Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class FixFloat +{ + @Test public void codeCoverageTest() throws Exception + { + AmortizingCapitalizingAccruingSwap.main (null); + + CustomFixFloatSwap.main (null); + + InAdvanceIMMSwap.main (null); + + InAdvanceSwap.main (null); + + InArrearsSwap.main (null); + + JurisdictionOTCIndexDefinitions.main (null); + + JurisdictionOTCIndexSwaps.main (null); + + LongTenorSwap.main (null); + + RollerCoasterSwap.main (null); + + ShortTenorSwap.main (null); + + StepUpStepDown.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/FixFloatOption.java b/src/main/java/org/drip/coverage/product/FixFloatOption.java new file mode 100644 index 000000000000..9928a700bd03 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/FixFloatOption.java @@ -0,0 +1,69 @@ + +package org.drip.coverage.product; + +import org.drip.sample.fixfloatoption.MultiCurvePayerReceiver; +import org.drip.sample.fixfloatoption.MultiCurvePayerReceiverAnalysis; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * FixFloatOption holds the JUnit Code Coverage Tests for the FixFloat IRS Option Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class FixFloatOption +{ + @Test public void codeCoverageTest() throws Exception + { + MultiCurvePayerReceiver.main (null); + + MultiCurvePayerReceiverAnalysis.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/FloatFloat.java b/src/main/java/org/drip/coverage/product/FloatFloat.java new file mode 100644 index 000000000000..481a75dc387e --- /dev/null +++ b/src/main/java/org/drip/coverage/product/FloatFloat.java @@ -0,0 +1,69 @@ + +package org.drip.coverage.product; + +import org.drip.sample.floatfloat.JurisdictionOTCIndexDefinitions; +import org.drip.sample.floatfloat.JurisdictionOTCIndexSwaps; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * FloatFloat holds the JUnit Code Coverage Tests for the FloatFloat Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class FloatFloat +{ + @Test public void codeCoverageTest() throws Exception + { + JurisdictionOTCIndexDefinitions.main (null); + + JurisdictionOTCIndexSwaps.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/ForwardRateFutures.java b/src/main/java/org/drip/coverage/product/ForwardRateFutures.java new file mode 100644 index 000000000000..ec48a63d26f7 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/ForwardRateFutures.java @@ -0,0 +1,87 @@ + +package org.drip.coverage.product; + +import org.drip.sample.forwardratefutures.DIFutures; +import org.drip.sample.forwardratefutures.EONIAFutures; +import org.drip.sample.forwardratefutures.FedFundFutures; +import org.drip.sample.forwardratefutures.JurisdictionIRSFuturesDefinition; +import org.drip.sample.forwardratefutures.JurisdictionIRSFuturesValuation; +import org.drip.sample.forwardratefutures.JurisdictionVenueOptionDetails; +import org.drip.sample.forwardratefutures.JurisdictionVenueOptionValuation; +import org.drip.sample.forwardratefutures.ShortTermFuturesDefinition; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * ForwardRateFutures holds the JUnit Code Coverage Tests for the Forward Rate Futures Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class ForwardRateFutures +{ + @Test public void codeCoverageTest() throws Exception + { + DIFutures.main (null); + + EONIAFutures.main (null); + + FedFundFutures.main (null); + + JurisdictionIRSFuturesDefinition.main (null); + + JurisdictionIRSFuturesValuation.main (null); + + JurisdictionVenueOptionDetails.main (null); + + JurisdictionVenueOptionValuation.main (null); + + ShortTermFuturesDefinition.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/Loan.java b/src/main/java/org/drip/coverage/product/Loan.java new file mode 100644 index 000000000000..7d39afd448e9 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/Loan.java @@ -0,0 +1,117 @@ + +package org.drip.coverage.product; + +import org.drip.sample.loan.Alwar; +import org.drip.sample.loan.Avadi; +import org.drip.sample.loan.Bardhaman; +import org.drip.sample.loan.Bijapur; +import org.drip.sample.loan.Bilaspur; +import org.drip.sample.loan.Chandrapur; +import org.drip.sample.loan.Junagadh; +import org.drip.sample.loan.Kadapa; +import org.drip.sample.loan.Kakinada; +import org.drip.sample.loan.Kollam; +import org.drip.sample.loan.Kulti; +import org.drip.sample.loan.Nizamabad; +import org.drip.sample.loan.Rampur; +import org.drip.sample.loan.Sambalpur; +// import org.drip.sample.loan.Satara; +import org.drip.sample.loan.Shahjahanpur; +import org.drip.sample.loan.Shivamogga; +import org.drip.sample.loan.Thrissur; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Loan holds the JUnit Code Coverage Tests for the Loan Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Loan +{ + @Test public void codeCoverageTest() throws Exception + { + Alwar.main (null); + + Avadi.main (null); + + Bardhaman.main (null); + + Bijapur.main (null); + + Bilaspur.main (null); + + Chandrapur.main (null); + + Junagadh.main (null); + + Kadapa.main (null); + + Kakinada.main (null); + + Kollam.main (null); + + Kulti.main (null); + + Nizamabad.main (null); + + Rampur.main (null); + + Sambalpur.main (null); + + // Satara.main (null); + + Shahjahanpur.main (null); + + Shivamogga.main (null); + + Thrissur.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/Municipal.java b/src/main/java/org/drip/coverage/product/Municipal.java new file mode 100644 index 000000000000..3be2c84bea9d --- /dev/null +++ b/src/main/java/org/drip/coverage/product/Municipal.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.product; + +import org.drip.sample.municipal.Davanagere; +import org.drip.sample.municipal.Kozhikode; +import org.drip.sample.municipal.Kurnool; +import org.drip.sample.municipal.MunicipalFixedBullet1; +import org.drip.sample.municipal.MunicipalFixedBullet2; +import org.drip.sample.municipal.MunicipalFixedBullet3; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Municipal holds the JUnit Code Coverage Tests for the Municipal Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Municipal +{ + @Test public void codeCoverageTest() throws Exception + { + Davanagere.main (null); + + Kozhikode.main (null); + + Kurnool.main (null); + + MunicipalFixedBullet1.main (null); + + MunicipalFixedBullet2.main (null); + + MunicipalFixedBullet3.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/OIS.java b/src/main/java/org/drip/coverage/product/OIS.java new file mode 100644 index 000000000000..ab0f1c76fe05 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/OIS.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.product; + +import org.drip.sample.ois.CrossOvernightFloatingStream; +import org.drip.sample.ois.IndexFundCurvesReconciliation; +import org.drip.sample.ois.JurisdictionOTCInstrumentDefinitions; +import org.drip.sample.ois.JurisdictionOTCInstrumentMeasures; +import org.drip.sample.ois.OvernightArithmeticCompoundingConvexity; +import org.drip.sample.ois.OvernightJurisdictionIndexDefinition; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * OIS holds the JUnit Code Coverage Tests for the OIS Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class OIS +{ + @Test public void codeCoverageTest() throws Exception + { + CrossOvernightFloatingStream.main (null); + + IndexFundCurvesReconciliation.main (null); + + JurisdictionOTCInstrumentDefinitions.main (null); + + JurisdictionOTCInstrumentMeasures.main (null); + + OvernightArithmeticCompoundingConvexity.main (null); + + OvernightJurisdictionIndexDefinition.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/OISAPI.java b/src/main/java/org/drip/coverage/product/OISAPI.java new file mode 100644 index 000000000000..8dca5ca0cfef --- /dev/null +++ b/src/main/java/org/drip/coverage/product/OISAPI.java @@ -0,0 +1,66 @@ + +package org.drip.coverage.product; + +import org.drip.sample.oisapi.CustomSwapMeasures; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * OISAPI holds the JUnit Code Coverage Tests for the OIS API Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class OISAPI +{ + @Test public void codeCoverageTest() throws Exception + { + CustomSwapMeasures.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/Option.java b/src/main/java/org/drip/coverage/product/Option.java new file mode 100644 index 000000000000..1cae33274aec --- /dev/null +++ b/src/main/java/org/drip/coverage/product/Option.java @@ -0,0 +1,93 @@ + +package org.drip.coverage.product; + +import org.drip.sample.option.ATMTermStructureSpline; +import org.drip.sample.option.BlackHestonForwardOption; +import org.drip.sample.option.BrokenDateVolSurface; +import org.drip.sample.option.CustomVolSurfaceBuilder; +import org.drip.sample.option.DeterministicVolBlackScholes; +import org.drip.sample.option.DeterministicVolTermStructure; +import org.drip.sample.option.LocalVolatilityTermStructure; +import org.drip.sample.option.MarketSurfaceTermStructure; +import org.drip.sample.option.VanillaBlackNormalPricing; +import org.drip.sample.option.VanillaBlackScholesPricing; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Option holds the JUnit Code Coverage Tests for the Option Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Option +{ + @Test public void codeCoverageTest() throws Exception + { + ATMTermStructureSpline.main (null); + + BlackHestonForwardOption.main (null); + + BrokenDateVolSurface.main (null); + + CustomVolSurfaceBuilder.main (null); + + DeterministicVolBlackScholes.main (null); + + DeterministicVolTermStructure.main (null); + + LocalVolatilityTermStructure.main (null); + + MarketSurfaceTermStructure.main (null); + + VanillaBlackNormalPricing.main (null); + + VanillaBlackScholesPricing.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/Preferred.java b/src/main/java/org/drip/coverage/product/Preferred.java new file mode 100644 index 000000000000..5322c72e5ad7 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/Preferred.java @@ -0,0 +1,66 @@ + +package org.drip.coverage.product; + +import org.drip.sample.preferred.PreferredFixedBullet; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Preferred holds the JUnit Code Coverage Tests for the Preferred Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Preferred +{ + @Test public void codeCoverageTest() throws Exception + { + PreferredFixedBullet.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/SecuritySuite.java b/src/main/java/org/drip/coverage/product/SecuritySuite.java new file mode 100644 index 000000000000..53bd8e040db6 --- /dev/null +++ b/src/main/java/org/drip/coverage/product/SecuritySuite.java @@ -0,0 +1,102 @@ + +package org.drip.coverage.product; + +import org.drip.sample.securitysuite.Ahmednagar; +import org.drip.sample.securitysuite.Berhampur; +import org.drip.sample.securitysuite.Bhilwara; +import org.drip.sample.securitysuite.CMEFixFloat; +import org.drip.sample.securitysuite.CreditDefaultSwapIndex; +import org.drip.sample.securitysuite.Dhule; +import org.drip.sample.securitysuite.FXSwap; +import org.drip.sample.securitysuite.Kamarhati; +import org.drip.sample.securitysuite.Korba; +import org.drip.sample.securitysuite.Mathura; +import org.drip.sample.securitysuite.Repo; +import org.drip.sample.securitysuite.Rohtak; +import org.drip.sample.securitysuite.Tirupati; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * SecuritySuite holds the JUnit Code Coverage Tests for the Security Suite Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class SecuritySuite +{ + @Test public void codeCoverageTest() throws Exception + { + Ahmednagar.main (null); + + Berhampur.main (null); + + Bhilwara.main (null); + + CMEFixFloat.main (null); + + CreditDefaultSwapIndex.main (null); + + Dhule.main (null); + + FXSwap.main (null); + + Kamarhati.main (null); + + Korba.main (null); + + Mathura.main (null); + + Repo.main (null); + + Rohtak.main (null); + + Tirupati.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/StochasticVolatility.java b/src/main/java/org/drip/coverage/product/StochasticVolatility.java new file mode 100644 index 000000000000..1e5481a4373b --- /dev/null +++ b/src/main/java/org/drip/coverage/product/StochasticVolatility.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.product; + +import org.drip.sample.stochasticvolatility.AlbrecherMayerSchoutensTistaert; +import org.drip.sample.stochasticvolatility.CallPriceSplineSurface; +import org.drip.sample.stochasticvolatility.CallVolSplineSurface; +import org.drip.sample.stochasticvolatility.HestonAMSTPayoffTransform; +import org.drip.sample.stochasticvolatility.StandardHestonPricingMeasures; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * StochasticVolatility holds the JUnit Code Coverage Tests for the StochasticVolatility Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class StochasticVolatility +{ + @Test public void codeCoverageTest() throws Exception + { + AlbrecherMayerSchoutensTistaert.main (null); + + CallPriceSplineSurface.main (null); + + CallVolSplineSurface.main (null); + + HestonAMSTPayoffTransform.main (null); + + StandardHestonPricingMeasures.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/XCCY.java b/src/main/java/org/drip/coverage/product/XCCY.java new file mode 100644 index 000000000000..8befb5fdeccb --- /dev/null +++ b/src/main/java/org/drip/coverage/product/XCCY.java @@ -0,0 +1,69 @@ + +package org.drip.coverage.product; + +import org.drip.sample.xccy.OTCCrossCurrencyDefinitions; +import org.drip.sample.xccy.OTCCrossCurrencySwaps; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * XCCY holds the JUnit Code Coverage Tests for the XCCY Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class XCCY +{ + @Test public void codeCoverageTest() throws Exception + { + OTCCrossCurrencyDefinitions.main (null); + + OTCCrossCurrencySwaps.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/product/package-info.java b/src/main/java/org/drip/coverage/product/package-info.java new file mode 100644 index 000000000000..e4e2299ccb0d --- /dev/null +++ b/src/main/java/org/drip/coverage/product/package-info.java @@ -0,0 +1,8 @@ + +/** + * Product Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.product; diff --git a/src/main/java/org/drip/coverage/quant/Matrix.java b/src/main/java/org/drip/coverage/quant/Matrix.java new file mode 100644 index 000000000000..ba4ee7a3da6f --- /dev/null +++ b/src/main/java/org/drip/coverage/quant/Matrix.java @@ -0,0 +1,84 @@ + +package org.drip.coverage.quant; + +import org.drip.sample.matrix.CholeskyFactorization; +import org.drip.sample.matrix.Eigenization; +import org.drip.sample.matrix.GrahamSchmidtProcess; +import org.drip.sample.matrix.LinearAlgebra; +import org.drip.sample.matrix.MultivariateRandom; +import org.drip.sample.matrix.PrincipalComponent; +import org.drip.sample.matrix.QRDecomposition; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Matrix holds the JUnit Code Coverage Tests for the Matrix Quant Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Matrix +{ + @Test public void codeCoverageTest() throws Exception + { + CholeskyFactorization.main (null); + + Eigenization.main (null); + + GrahamSchmidtProcess.main (null); + + LinearAlgebra.main (null); + + MultivariateRandom.main (null); + + PrincipalComponent.main (null); + + QRDecomposition.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/quant/Numerical.java b/src/main/java/org/drip/coverage/quant/Numerical.java new file mode 100644 index 000000000000..f4e4caef11c5 --- /dev/null +++ b/src/main/java/org/drip/coverage/quant/Numerical.java @@ -0,0 +1,72 @@ + +package org.drip.coverage.quant; + +import org.drip.sample.numerical.FixedPointSearch; +import org.drip.sample.numerical.IntegrandQuadrature; +import org.drip.sample.numerical.PhaseTrackerComparison; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Numerical holds the JUnit Code Coverage Tests for the Numerical Quant Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Numerical +{ + @Test public void codeCoverageTest() throws Exception + { + FixedPointSearch.main (null); + + IntegrandQuadrature.main (null); + + PhaseTrackerComparison.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/quant/package-info.java b/src/main/java/org/drip/coverage/quant/package-info.java new file mode 100644 index 000000000000..9d4828895fef --- /dev/null +++ b/src/main/java/org/drip/coverage/quant/package-info.java @@ -0,0 +1,8 @@ + +/** + * Quant Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.quant; diff --git a/src/main/java/org/drip/coverage/regression/Regression.java b/src/main/java/org/drip/coverage/regression/Regression.java new file mode 100644 index 000000000000..1eec2c147960 --- /dev/null +++ b/src/main/java/org/drip/coverage/regression/Regression.java @@ -0,0 +1,75 @@ + +package org.drip.coverage.regression; + +import org.drip.regression.curve.CreditAnalyticsRegressionEngine; +import org.drip.regression.curvejacobian.CurveJacobianRegressionEngine; +import org.drip.regression.fixedpointfinder.FixedPointFinderRegressionEngine; +import org.drip.regression.spline.BasisSplineRegressionEngine; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Regression holds the JUnit Code Coverage Tests for the Regression Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Regression +{ + @Test public void codeCoverageTest() throws Exception + { + CreditAnalyticsRegressionEngine.main (null); + + CurveJacobianRegressionEngine.main (null); + + FixedPointFinderRegressionEngine.main (null); + + BasisSplineRegressionEngine.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/regression/package-info.java b/src/main/java/org/drip/coverage/regression/package-info.java new file mode 100644 index 000000000000..7df592e10b8a --- /dev/null +++ b/src/main/java/org/drip/coverage/regression/package-info.java @@ -0,0 +1,8 @@ + +/** + * Regression Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.regression; diff --git a/src/main/java/org/drip/coverage/sequence/EfronStein.java b/src/main/java/org/drip/coverage/sequence/EfronStein.java new file mode 100644 index 000000000000..a3b38c1a6385 --- /dev/null +++ b/src/main/java/org/drip/coverage/sequence/EfronStein.java @@ -0,0 +1,87 @@ + +package org.drip.coverage.sequence; + +import org.drip.sample.efronstein.BinaryVariateSumBound; +import org.drip.sample.efronstein.BoundedVariateSumBound; +import org.drip.sample.efronstein.GlivenkoCantelliSupremumBound; +import org.drip.sample.efronstein.GlivenkoCantelliUniformBound; +import org.drip.sample.efronstein.KernelDensityL1Bound; +import org.drip.sample.efronstein.LongestCommonSubsequenceBound; +import org.drip.sample.efronstein.MinimumBinPackingBound; +import org.drip.sample.efronstein.OrientedPassageTimeBound; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * EfronStein holds the JUnit Code Coverage Tests for the Efron Stein Limit Sequence Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class EfronStein +{ + @Test public void codeCoverageTest() throws Exception + { + BinaryVariateSumBound.main (null); + + BoundedVariateSumBound.main (null); + + GlivenkoCantelliSupremumBound.main (null); + + GlivenkoCantelliUniformBound.main (null); + + KernelDensityL1Bound.main (null); + + LongestCommonSubsequenceBound.main (null); + + MinimumBinPackingBound.main (null); + + OrientedPassageTimeBound.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/sequence/Sequence.java b/src/main/java/org/drip/coverage/sequence/Sequence.java new file mode 100644 index 000000000000..c2ce9e78227c --- /dev/null +++ b/src/main/java/org/drip/coverage/sequence/Sequence.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.sequence; + +import org.drip.sample.sequence.DualRandomSequenceBound; +import org.drip.sample.sequence.IIDSequenceSumBound; +import org.drip.sample.sequence.IntegerRandomSequenceBound; +import org.drip.sample.sequence.PoissonRandomSequenceBound; +import org.drip.sample.sequence.SingleRandomSequenceBound; +import org.drip.sample.sequence.UnitRandomSequenceBound; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Sequence holds the JUnit Code Coverage Tests for the Sequence Limit Sequence Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Sequence +{ + @Test public void codeCoverageTest() throws Exception + { + DualRandomSequenceBound.main (null); + + IIDSequenceSumBound.main (null); + + IntegerRandomSequenceBound.main (null); + + PoissonRandomSequenceBound.main (null); + + SingleRandomSequenceBound.main (null); + + UnitRandomSequenceBound.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/sequence/Statistics.java b/src/main/java/org/drip/coverage/sequence/Statistics.java new file mode 100644 index 000000000000..8dcc3e710d51 --- /dev/null +++ b/src/main/java/org/drip/coverage/sequence/Statistics.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.sequence; + +import org.drip.sample.statistics.CorrelatedRdSequence; +import org.drip.sample.statistics.CorrelatedRdSequenceAntithetic; +import org.drip.sample.statistics.CorrelatedRdSequenceQR; +import org.drip.sample.statistics.CorrelatedRdSequenceQRUnbiased; +// import org.drip.sample.statistics.MultivariateSequence; +// import org.drip.sample.statistics.UnivariateSequence; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Statistics holds the JUnit Code Coverage Tests for the Statistics Sequence Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Statistics +{ + @Test public void codeCoverageTest() throws Exception + { + CorrelatedRdSequence.main (null); + + CorrelatedRdSequenceAntithetic.main (null); + + CorrelatedRdSequenceQR.main (null); + + CorrelatedRdSequenceQRUnbiased.main (null); + + // MultivariateSequence.main (null); + + // UnivariateSequence.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/sequence/package-info.java b/src/main/java/org/drip/coverage/sequence/package-info.java new file mode 100644 index 000000000000..3cf6718499fa --- /dev/null +++ b/src/main/java/org/drip/coverage/sequence/package-info.java @@ -0,0 +1,8 @@ + +/** + * Sequence Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.sequence; diff --git a/src/main/java/org/drip/coverage/service/Algo.java b/src/main/java/org/drip/coverage/service/Algo.java new file mode 100644 index 000000000000..2dca58e0062f --- /dev/null +++ b/src/main/java/org/drip/coverage/service/Algo.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.service; + +import org.drip.sample.algo.C1ArrayTranslateShuffle; +import org.drip.sample.algo.R1ArrayInSituSort; +import org.drip.sample.algo.R2ArrayPathwiseProcessing; +import org.drip.sample.algo.SubMatrixSetExtraction; +import org.drip.sample.algo.SubStringSetExtraction; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Algo holds the JUnit Code Coverage Tests for the Algo Service Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Algo +{ + @Test public void codeCoverageTest() throws Exception + { + C1ArrayTranslateShuffle.main (null); + + R1ArrayInSituSort.main (null); + + R2ArrayPathwiseProcessing.main (null); + + SubMatrixSetExtraction.main (null); + + SubStringSetExtraction.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/service/Env.java b/src/main/java/org/drip/coverage/service/Env.java new file mode 100644 index 000000000000..875536c3d394 --- /dev/null +++ b/src/main/java/org/drip/coverage/service/Env.java @@ -0,0 +1,66 @@ + +package org.drip.coverage.service; + +// import org.drip.sample.env.CacheManagerAPI; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Env holds the JUnit Code Coverage Tests for the Env Service Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Env +{ + @Test public void codeCoverageTest() throws Exception + { + // CacheManagerAPI.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/service/Service.java b/src/main/java/org/drip/coverage/service/Service.java new file mode 100644 index 000000000000..1f9df424fdeb --- /dev/null +++ b/src/main/java/org/drip/coverage/service/Service.java @@ -0,0 +1,111 @@ + +package org.drip.coverage.service; + +import org.drip.sample.service.BlackLittermanBayesianClient; +import org.drip.sample.service.BondClientCashFlow; +import org.drip.sample.service.BondClientCurve; +import org.drip.sample.service.BondClientSecular; +import org.drip.sample.service.BudgetConstrainedAllocationClient; +import org.drip.sample.service.CreditDefaultSwapClient; +import org.drip.sample.service.CreditStateClient; +import org.drip.sample.service.DateManipulationClient; +import org.drip.sample.service.DepositClient; +import org.drip.sample.service.FixFloatClient; +import org.drip.sample.service.FixedAssetBackedClient; +import org.drip.sample.service.ForwardRateFuturesClient; +import org.drip.sample.service.FundingStateClient; +import org.drip.sample.service.PrepayAssetBackedClient; +import org.drip.sample.service.ReturnsConstrainedAllocationClient; +import org.drip.sample.service.TreasuryBondClient; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Service holds the JUnit Code Coverage Tests for the Service Service Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Service +{ + @Test public void codeCoverageTest() throws Exception + { + BlackLittermanBayesianClient.main (null); + + BondClientCashFlow.main (null); + + BondClientCurve.main (null); + + BondClientSecular.main (null); + + BudgetConstrainedAllocationClient.main (null); + + CreditDefaultSwapClient.main (null); + + CreditStateClient.main (null); + + DateManipulationClient.main (null); + + DepositClient.main (null); + + FixedAssetBackedClient.main (null); + + FixFloatClient.main (null); + + ForwardRateFuturesClient.main (null); + + FundingStateClient.main (null); + + PrepayAssetBackedClient.main (null); + + ReturnsConstrainedAllocationClient.main (null); + + TreasuryBondClient.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/service/package-info.java b/src/main/java/org/drip/coverage/service/package-info.java new file mode 100644 index 000000000000..21033441f5a0 --- /dev/null +++ b/src/main/java/org/drip/coverage/service/package-info.java @@ -0,0 +1,8 @@ + +/** + * Service Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.service; diff --git a/src/main/java/org/drip/coverage/spline/Spline.java b/src/main/java/org/drip/coverage/spline/Spline.java new file mode 100644 index 000000000000..01b2d5c94f77 --- /dev/null +++ b/src/main/java/org/drip/coverage/spline/Spline.java @@ -0,0 +1,87 @@ + +package org.drip.coverage.spline; + +import org.drip.sample.spline.BSplineSequence; +import org.drip.sample.spline.BasisBSplineSet; +import org.drip.sample.spline.BasisMonicBSpline; +import org.drip.sample.spline.BasisMonicHatComparison; +import org.drip.sample.spline.BasisMulticBSpline; +import org.drip.sample.spline.BasisSplineSet; +import org.drip.sample.spline.BasisTensionSplineSet; +import org.drip.sample.spline.PolynomialBasisSpline; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Spline holds the JUnit Code Coverage Tests for the Segment Spline Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Spline +{ + @Test public void codeCoverageTest() throws Exception + { + BasisBSplineSet.main (null); + + BasisMonicBSpline.main (null); + + BasisMonicHatComparison.main (null); + + BasisMulticBSpline.main (null); + + BasisSplineSet.main (null); + + BasisTensionSplineSet.main (null); + + BSplineSequence.main (null); + + PolynomialBasisSpline.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/spline/Stretch.java b/src/main/java/org/drip/coverage/spline/Stretch.java new file mode 100644 index 000000000000..814d0c07c4e4 --- /dev/null +++ b/src/main/java/org/drip/coverage/spline/Stretch.java @@ -0,0 +1,90 @@ + +package org.drip.coverage.spline; + +import org.drip.sample.stretch.ATMTTESurface2D; +import org.drip.sample.stretch.CurvatureLengthRoughnessPenalty; +import org.drip.sample.stretch.CurvatureRoughnessPenaltyFit; +import org.drip.sample.stretch.CustomDiscountCurveBuilder; +import org.drip.sample.stretch.KnotInsertionPolynomialEstimator; +import org.drip.sample.stretch.KnotInsertionSequenceAdjuster; +import org.drip.sample.stretch.KnotInsertionTensionEstimator; +import org.drip.sample.stretch.KnottedRegressionSplineEstimator; +import org.drip.sample.stretch.MultiSpanAggregationEstimator; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Stretch holds the JUnit Code Coverage Tests for the Stretch Spline Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Stretch +{ + @Test public void codeCoverageTest() throws Exception + { + ATMTTESurface2D.main (null); + + CurvatureLengthRoughnessPenalty.main (null); + + CurvatureRoughnessPenaltyFit.main (null); + + CustomDiscountCurveBuilder.main (null); + + KnotInsertionPolynomialEstimator.main (null); + + KnotInsertionSequenceAdjuster.main (null); + + KnotInsertionTensionEstimator.main (null); + + KnottedRegressionSplineEstimator.main (null); + + MultiSpanAggregationEstimator.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/spline/package-info.java b/src/main/java/org/drip/coverage/spline/package-info.java new file mode 100644 index 000000000000..95ac7cb6cdbb --- /dev/null +++ b/src/main/java/org/drip/coverage/spline/package-info.java @@ -0,0 +1,8 @@ + +/** + * Spline Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.spline; diff --git a/src/main/java/org/drip/coverage/state/FX.java b/src/main/java/org/drip/coverage/state/FX.java new file mode 100644 index 000000000000..aab2cba2d95b --- /dev/null +++ b/src/main/java/org/drip/coverage/state/FX.java @@ -0,0 +1,69 @@ + +package org.drip.coverage.state; + +import org.drip.sample.fx.CustomFXCurveBuilder; +import org.drip.sample.fx.FXCurrencyPairConventions; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * FX holds the JUnit Code Coverage Tests for the FX State Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class FX +{ + @Test public void codeCoverageTest() throws Exception + { + CustomFXCurveBuilder.main (null); + + FXCurrencyPairConventions.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/state/Forward.java b/src/main/java/org/drip/coverage/state/Forward.java new file mode 100644 index 000000000000..958a587c5cb6 --- /dev/null +++ b/src/main/java/org/drip/coverage/state/Forward.java @@ -0,0 +1,99 @@ + +package org.drip.coverage.state; + +import org.drip.sample.forward.IBOR12MCubicKLKHyperbolic; +import org.drip.sample.forward.IBOR12MCubicPolyVanilla; +import org.drip.sample.forward.IBOR12MQuarticPolyVanilla; +import org.drip.sample.forward.IBOR1MCubicKLKHyperbolic; +import org.drip.sample.forward.IBOR1MCubicPolyVanilla; +import org.drip.sample.forward.IBOR1MQuarticPolyVanilla; +import org.drip.sample.forward.IBOR3MCubicKLKHyperbolic; +import org.drip.sample.forward.IBOR3MCubicPolyVanilla; +import org.drip.sample.forward.IBOR3MQuarticPolyVanilla; +import org.drip.sample.forward.IBOR6MCubicKLKHyperbolic; +import org.drip.sample.forward.IBOR6MCubicPolyVanilla; +import org.drip.sample.forward.IBOR6MQuarticPolyVanilla; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Forward holds the JUnit Code Coverage Tests for the Forward State Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Forward +{ + @Test public void codeCoverageTest() throws Exception + { + IBOR1MCubicKLKHyperbolic.main (null); + + IBOR1MCubicPolyVanilla.main (null); + + IBOR1MQuarticPolyVanilla.main (null); + + IBOR3MCubicKLKHyperbolic.main (null); + + IBOR3MCubicPolyVanilla.main (null); + + IBOR3MQuarticPolyVanilla.main (null); + + IBOR6MCubicKLKHyperbolic.main (null); + + IBOR6MCubicPolyVanilla.main (null); + + IBOR6MQuarticPolyVanilla.main (null); + + IBOR12MCubicKLKHyperbolic.main (null); + + IBOR12MCubicPolyVanilla.main (null); + + IBOR12MQuarticPolyVanilla.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/state/ForwardVolatility.java b/src/main/java/org/drip/coverage/state/ForwardVolatility.java new file mode 100644 index 000000000000..037988446a6b --- /dev/null +++ b/src/main/java/org/drip/coverage/state/ForwardVolatility.java @@ -0,0 +1,66 @@ + +package org.drip.coverage.state; + +import org.drip.sample.forwardvolatility.CustomFRAVolatilityCurve; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * ForwardVolatility holds the JUnit Code Coverage Tests for the Forward Volatility State Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class ForwardVolatility +{ + @Test public void codeCoverageTest() throws Exception + { + CustomFRAVolatilityCurve.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/state/Funding.java b/src/main/java/org/drip/coverage/state/Funding.java new file mode 100644 index 000000000000..53f9faed1a3d --- /dev/null +++ b/src/main/java/org/drip/coverage/state/Funding.java @@ -0,0 +1,87 @@ + +package org.drip.coverage.state; + +import org.drip.sample.funding.CustomFundingCurveBuilder; +import org.drip.sample.funding.CustomFundingCurveReconciler; +import org.drip.sample.funding.HaganWestForwardInterpolator; +import org.drip.sample.funding.MultiStreamSwapMeasures; +import org.drip.sample.funding.NonlinearCurveMeasures; +import org.drip.sample.funding.ShapePreservingZeroSmooth; +import org.drip.sample.funding.ShapeZeroLocalSmooth; +import org.drip.sample.funding.TemplatedFundingCurveBuilder; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Funding holds the JUnit Code Coverage Tests for the Funding State Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Funding +{ + @Test public void codeCoverageTest() throws Exception + { + CustomFundingCurveBuilder.main (null); + + CustomFundingCurveReconciler.main (null); + + HaganWestForwardInterpolator.main (null); + + MultiStreamSwapMeasures.main (null); + + NonlinearCurveMeasures.main (null); + + ShapePreservingZeroSmooth.main (null); + + ShapeZeroLocalSmooth.main (null); + + TemplatedFundingCurveBuilder.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/state/Govvie.java b/src/main/java/org/drip/coverage/state/Govvie.java new file mode 100644 index 000000000000..a7ea371e6577 --- /dev/null +++ b/src/main/java/org/drip/coverage/state/Govvie.java @@ -0,0 +1,69 @@ + +package org.drip.coverage.state; + +import org.drip.sample.govvie.NonlinearGovvieCurve; +import org.drip.sample.govvie.SplineGovvieCurve; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Govvie holds the JUnit Code Coverage Tests for the Govvie State Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Govvie +{ + @Test public void codeCoverageTest() throws Exception + { + NonlinearGovvieCurve.main (null); + + SplineGovvieCurve.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/state/IntexFeed.java b/src/main/java/org/drip/coverage/state/IntexFeed.java new file mode 100644 index 000000000000..b31cde83fbaa --- /dev/null +++ b/src/main/java/org/drip/coverage/state/IntexFeed.java @@ -0,0 +1,84 @@ + +package org.drip.coverage.state; + +import org.drip.sample.intexfeed.BrokenDateGovvieSpot; +import org.drip.sample.intexfeed.BrokenDateLIBORUSD; +import org.drip.sample.intexfeed.BrokenDateLIBORSpot; +import org.drip.sample.intexfeed.BrokenDateOISRate; +import org.drip.sample.intexfeed.BrokenDateSwapRate; +import org.drip.sample.intexfeed.ForwardGovvieYield; +import org.drip.sample.intexfeed.ForwardSwapRate; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * IntexFeed holds the JUnit Code Coverage Tests for the Intex Feed State Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class IntexFeed +{ + @Test public void codeCoverageTest() throws Exception + { + BrokenDateGovvieSpot.main (null); + + BrokenDateLIBORUSD.main (null); + + BrokenDateLIBORSpot.main (null); + + BrokenDateOISRate.main (null); + + BrokenDateSwapRate.main (null); + + ForwardGovvieYield.main (null); + + ForwardSwapRate.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/state/MultiCurve.java b/src/main/java/org/drip/coverage/state/MultiCurve.java new file mode 100644 index 000000000000..66e7caf37d72 --- /dev/null +++ b/src/main/java/org/drip/coverage/state/MultiCurve.java @@ -0,0 +1,87 @@ + +package org.drip.coverage.state; + +import org.drip.sample.multicurve.CustomBasisCurveBuilder; +import org.drip.sample.multicurve.FixFloatForwardCurve; +import org.drip.sample.multicurve.FixFloatSwap; +import org.drip.sample.multicurve.FixFloatSwapAnalysis; +import org.drip.sample.multicurve.FixFloatSwapIMM; +import org.drip.sample.multicurve.FloatFloatForwardCurve; +import org.drip.sample.multicurve.FundingNativeForwardReconciler; +import org.drip.sample.multicurve.OTCSwapOptionSettlements; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * MultiCurve holds the JUnit Code Coverage Tests for the Multi Curve State Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class MultiCurve +{ + @Test public void codeCoverageTest() throws Exception + { + CustomBasisCurveBuilder.main (null); + + FixFloatForwardCurve.main (null); + + FixFloatSwap.main (null); + + FixFloatSwapAnalysis.main (null); + + FixFloatSwapIMM.main (null); + + FloatFloatForwardCurve.main (null); + + FundingNativeForwardReconciler.main (null); + + OTCSwapOptionSettlements.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/state/Overnight.java b/src/main/java/org/drip/coverage/state/Overnight.java new file mode 100644 index 000000000000..542550435d79 --- /dev/null +++ b/src/main/java/org/drip/coverage/state/Overnight.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.state; + +import org.drip.sample.overnight.CustomOvernightCurveReconciler; +import org.drip.sample.overnight.MultiStretchCurveBuilder; +import org.drip.sample.overnight.ShapeOvernightZeroLocalSmooth; +import org.drip.sample.overnight.ShapePreservingOvernightZeroSmooth; +//import org.drip.sample.overnight.SingleStretchCurveBuilder; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Overnight holds the JUnit Code Coverage Tests for the Overnight State Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Overnight +{ + @Test public void codeCoverageTest() throws Exception + { + CustomOvernightCurveReconciler.main (null); + + MultiStretchCurveBuilder.main (null); + + ShapeOvernightZeroLocalSmooth.main (null); + + ShapePreservingOvernightZeroSmooth.main (null); + + // SingleStretchCurveBuilder.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/state/Sensitivity.java b/src/main/java/org/drip/coverage/state/Sensitivity.java new file mode 100644 index 000000000000..6c33348eec29 --- /dev/null +++ b/src/main/java/org/drip/coverage/state/Sensitivity.java @@ -0,0 +1,75 @@ + +package org.drip.coverage.state; + +import org.drip.sample.sensitivity.ForwardDerivedBasisSensitivity; +import org.drip.sample.sensitivity.ForwardReferenceBasisSensitivity; +// import org.drip.sample.sensitivity.FundingCurveQuoteSensitivity; +import org.drip.sample.sensitivity.OISCurveQuoteSensitivity; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Sensitivity holds the JUnit Code Coverage Tests for the State Sensitivity Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Sensitivity +{ + @Test public void codeCoverageTest() throws Exception + { + ForwardDerivedBasisSensitivity.main (null); + + ForwardReferenceBasisSensitivity.main (null); + + // FundingCurveQuoteSensitivity.main (null); + + OISCurveQuoteSensitivity.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/state/package-info.java b/src/main/java/org/drip/coverage/state/package-info.java new file mode 100644 index 000000000000..2bbbae5f4fc9 --- /dev/null +++ b/src/main/java/org/drip/coverage/state/package-info.java @@ -0,0 +1,8 @@ + +/** + * State Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.state; diff --git a/src/main/java/org/drip/coverage/template/ForwardRateFutures.java b/src/main/java/org/drip/coverage/template/ForwardRateFutures.java new file mode 100644 index 000000000000..47080bf074a9 --- /dev/null +++ b/src/main/java/org/drip/coverage/template/ForwardRateFutures.java @@ -0,0 +1,84 @@ + +package org.drip.coverage.template; + +import org.drip.template.forwardratefutures.AUDBBSW3M; +import org.drip.template.forwardratefutures.CADCDOR3M; +import org.drip.template.forwardratefutures.CHFLIBOR3M; +import org.drip.template.forwardratefutures.EURIBOR3M; +import org.drip.template.forwardratefutures.EuroDollar; +import org.drip.template.forwardratefutures.GBPLIBOR3M; +import org.drip.template.forwardratefutures.JPYLIBOR3M; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * ForwardRateFutures holds the JUnit Code Coverage Tests for the ForwardRateFutures Template Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class ForwardRateFutures +{ + @Test public void codeCoverageTest() throws Exception + { + AUDBBSW3M.main (null); + + CADCDOR3M.main (null); + + CHFLIBOR3M.main (null); + + EURIBOR3M.main (null); + + EuroDollar.main (null); + + GBPLIBOR3M.main (null); + + JPYLIBOR3M.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/template/IRS.java b/src/main/java/org/drip/coverage/template/IRS.java new file mode 100644 index 000000000000..5dc637f2100d --- /dev/null +++ b/src/main/java/org/drip/coverage/template/IRS.java @@ -0,0 +1,129 @@ + +package org.drip.coverage.template; + +import org.drip.template.irs.AUD; +import org.drip.template.irs.CAD; +import org.drip.template.irs.CHF; +import org.drip.template.irs.CNY; +import org.drip.template.irs.DKK; +import org.drip.template.irs.EUR; +import org.drip.template.irs.GBP; +import org.drip.template.irs.HKD; +import org.drip.template.irs.INR; +import org.drip.template.irs.JPYLIBOR; +import org.drip.template.irs.JPYTIBOR; +import org.drip.template.irs.KRW; +import org.drip.template.irs.MYR; +import org.drip.template.irs.NOK; +import org.drip.template.irs.NZD; +import org.drip.template.irs.PLN; +import org.drip.template.irs.SEK; +import org.drip.template.irs.SGD; +import org.drip.template.irs.THB; +import org.drip.template.irs.TWD; +import org.drip.template.irs.USD; +import org.drip.template.irs.ZAR; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * IRS holds the JUnit Code Coverage Tests for the IRS Template Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class IRS +{ + @Test public void codeCoverageTest() throws Exception + { + AUD.main (null); + + CAD.main (null); + + CHF.main (null); + + CNY.main (null); + + DKK.main (null); + + EUR.main (null); + + GBP.main (null); + + HKD.main (null); + + INR.main (null); + + JPYLIBOR.main (null); + + JPYTIBOR.main (null); + + KRW.main (null); + + MYR.main (null); + + NOK.main (null); + + NZD.main (null); + + PLN.main (null); + + SEK.main (null); + + SGD.main (null); + + THB.main (null); + + TWD.main (null); + + USD.main (null); + + ZAR.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/template/State.java b/src/main/java/org/drip/coverage/template/State.java new file mode 100644 index 000000000000..d5de2f465b24 --- /dev/null +++ b/src/main/java/org/drip/coverage/template/State.java @@ -0,0 +1,87 @@ + +package org.drip.coverage.template; + +import org.drip.template.state.DerivedForwardState; +import org.drip.template.state.FXState; +import org.drip.template.state.ForwardVolatilityState; +import org.drip.template.state.FundingState; +import org.drip.template.state.GovvieState; +import org.drip.template.state.OvernightState; +import org.drip.template.state.ReferenceForwardState; +import org.drip.template.state.SurvivalRecoveryState; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * State holds the JUnit Code Coverage Tests for the Latent State Template Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class State +{ + @Test public void codeCoverageTest() throws Exception + { + DerivedForwardState.main (null); + + ForwardVolatilityState.main (null); + + FundingState.main (null); + + FXState.main (null); + + GovvieState.main (null); + + OvernightState.main (null); + + ReferenceForwardState.main (null); + + SurvivalRecoveryState.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/template/StateBump.java b/src/main/java/org/drip/coverage/template/StateBump.java new file mode 100644 index 000000000000..b327e310d05f --- /dev/null +++ b/src/main/java/org/drip/coverage/template/StateBump.java @@ -0,0 +1,87 @@ + +package org.drip.coverage.template; + +import org.drip.template.statebump.DerivedForwardStateShifted; +import org.drip.template.statebump.FXStateShifted; +import org.drip.template.statebump.ForwardVolatilityStateShifted; +import org.drip.template.statebump.FundingStateShifted; +import org.drip.template.statebump.GovvieStateShifted; +import org.drip.template.statebump.OvernightStateShifted; +import org.drip.template.statebump.ReferenceForwardStateShifted; +import org.drip.template.statebump.SurvivalRecoveryStateShifted; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * StateBump holds the JUnit Code Coverage Tests for the Bumped Latent State Template Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class StateBump +{ + @Test public void codeCoverageTest() throws Exception + { + DerivedForwardStateShifted.main (null); + + ForwardVolatilityStateShifted.main (null); + + FundingStateShifted.main (null); + + FXStateShifted.main (null); + + GovvieStateShifted.main (null); + + OvernightStateShifted.main (null); + + ReferenceForwardStateShifted.main (null); + + SurvivalRecoveryStateShifted.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/template/UST.java b/src/main/java/org/drip/coverage/template/UST.java new file mode 100644 index 000000000000..4b32109d603f --- /dev/null +++ b/src/main/java/org/drip/coverage/template/UST.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.template; + +import org.drip.template.ust.FV1_05Y; +import org.drip.template.ust.TU1_02Y; +import org.drip.template.ust.TY1_10Y; +import org.drip.template.ust.US1_30Y; +import org.drip.template.ust.WN1_ULTRA; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * UST holds the JUnit Code Coverage Tests for the UST Template Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class UST +{ + @Test public void codeCoverageTest() throws Exception + { + FV1_05Y.main (null); + + TU1_02Y.main (null); + + TY1_10Y.main (null); + + US1_30Y.main (null); + + WN1_ULTRA.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/template/package-info.java b/src/main/java/org/drip/coverage/template/package-info.java new file mode 100644 index 000000000000..8b419ab0e7e6 --- /dev/null +++ b/src/main/java/org/drip/coverage/template/package-info.java @@ -0,0 +1,8 @@ + +/** + * Template Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.template; diff --git a/src/main/java/org/drip/coverage/treasury/Sovereign.java b/src/main/java/org/drip/coverage/treasury/Sovereign.java new file mode 100644 index 000000000000..c60c77b36d36 --- /dev/null +++ b/src/main/java/org/drip/coverage/treasury/Sovereign.java @@ -0,0 +1,75 @@ + +package org.drip.coverage.treasury; + +import org.drip.sample.sovereign.SovereignFixedBullet; +import org.drip.sample.sovereign.ZeroCouponBullet1; +import org.drip.sample.sovereign.ZeroCouponBullet2; +import org.drip.sample.sovereign.ZeroCouponBullet3; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Sovereign holds the JUnit Code Coverage Tests for the Sovereign Treasury Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Sovereign +{ + @Test public void codeCoverageTest() throws Exception + { + SovereignFixedBullet.main (null); + + ZeroCouponBullet1.main (null); + + ZeroCouponBullet2.main (null); + + ZeroCouponBullet3.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/treasury/Treasury.java b/src/main/java/org/drip/coverage/treasury/Treasury.java new file mode 100644 index 000000000000..a98a55832949 --- /dev/null +++ b/src/main/java/org/drip/coverage/treasury/Treasury.java @@ -0,0 +1,99 @@ + +package org.drip.coverage.treasury; + +import org.drip.sample.treasury.GovvieBondDefinitions; +import org.drip.sample.treasury.TreasuryFixedBullet; +import org.drip.sample.treasury.YAS_BTPS; +import org.drip.sample.treasury.YAS_CAN; +import org.drip.sample.treasury.YAS_DBR; +import org.drip.sample.treasury.YAS_FRTR; +import org.drip.sample.treasury.YAS_GGB; +import org.drip.sample.treasury.YAS_GILT; +import org.drip.sample.treasury.YAS_JGB; +import org.drip.sample.treasury.YAS_MBONO; +import org.drip.sample.treasury.YAS_SPGB; +import org.drip.sample.treasury.YAS_UST; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Treasury holds the JUnit Code Coverage Tests for the Treasury Product Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Treasury +{ + @Test public void codeCoverageTest() throws Exception + { + GovvieBondDefinitions.main (null); + + TreasuryFixedBullet.main (null); + + YAS_BTPS.main (null); + + YAS_CAN.main (null); + + YAS_DBR.main (null); + + YAS_FRTR.main (null); + + YAS_GGB.main (null); + + YAS_GILT.main (null); + + YAS_JGB.main (null); + + YAS_MBONO.main (null); + + YAS_SPGB.main (null); + + YAS_UST.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/treasury/TreasuryFutures.java b/src/main/java/org/drip/coverage/treasury/TreasuryFutures.java new file mode 100644 index 000000000000..a3636e2e37a7 --- /dev/null +++ b/src/main/java/org/drip/coverage/treasury/TreasuryFutures.java @@ -0,0 +1,90 @@ + +package org.drip.coverage.treasury; + +import org.drip.sample.treasuryfutures.ContractDefinitions; +import org.drip.sample.treasuryfutures.ContractEligibilitySettlementDefinitions; +import org.drip.sample.treasuryfutures.ExchangeTradedOptionDefinitions; +import org.drip.sample.treasuryfutures.ExpiryDeliveryTradingDates; +import org.drip.sample.treasuryfutures.UST02Y; +import org.drip.sample.treasuryfutures.UST05Y; +import org.drip.sample.treasuryfutures.UST10Y; +import org.drip.sample.treasuryfutures.UST30Y; +import org.drip.sample.treasuryfutures.USTULTRA; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * TreasuryFutures holds the JUnit Code Coverage Tests for the Futures Treasury Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class TreasuryFutures +{ + @Test public void codeCoverageTest() throws Exception + { + ContractDefinitions.main (null); + + ContractEligibilitySettlementDefinitions.main (null); + + ExchangeTradedOptionDefinitions.main (null); + + ExpiryDeliveryTradingDates.main (null); + + UST02Y.main (null); + + UST05Y.main (null); + + UST10Y.main (null); + + UST30Y.main (null); + + USTULTRA.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/treasury/TreasuryFuturesAPI.java b/src/main/java/org/drip/coverage/treasury/TreasuryFuturesAPI.java new file mode 100644 index 000000000000..9c64abd3a6c5 --- /dev/null +++ b/src/main/java/org/drip/coverage/treasury/TreasuryFuturesAPI.java @@ -0,0 +1,114 @@ + +package org.drip.coverage.treasury; + +import org.drip.sample.treasuryfuturesapi.CN1; +import org.drip.sample.treasuryfuturesapi.DU1; +import org.drip.sample.treasuryfuturesapi.FBB1; +import org.drip.sample.treasuryfuturesapi.FV1; +import org.drip.sample.treasuryfuturesapi.G1; +import org.drip.sample.treasuryfuturesapi.IK1; +import org.drip.sample.treasuryfuturesapi.JB1; +import org.drip.sample.treasuryfuturesapi.KeyRateDuration; +import org.drip.sample.treasuryfuturesapi.OAT1; +import org.drip.sample.treasuryfuturesapi.OE1; +import org.drip.sample.treasuryfuturesapi.RX1; +import org.drip.sample.treasuryfuturesapi.TU1; +import org.drip.sample.treasuryfuturesapi.TY1; +import org.drip.sample.treasuryfuturesapi.UB1; +import org.drip.sample.treasuryfuturesapi.ULTRA; +import org.drip.sample.treasuryfuturesapi.US1; +import org.drip.sample.treasuryfuturesapi.YM1; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * TreasuryFuturesAPI holds the JUnit Code Coverage Tests for the Treasury Futures API Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class TreasuryFuturesAPI +{ + @Test public void codeCoverageTest() throws Exception + { + CN1.main (null); + + DU1.main (null); + + FBB1.main (null); + + FV1.main (null); + + G1.main (null); + + IK1.main (null); + + JB1.main (null); + + KeyRateDuration.main (null); + + OAT1.main (null); + + OE1.main (null); + + RX1.main (null); + + TU1.main (null); + + TY1.main (null); + + UB1.main (null); + + ULTRA.main (null); + + US1.main (null); + + YM1.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/treasury/package-info.java b/src/main/java/org/drip/coverage/treasury/package-info.java new file mode 100644 index 000000000000..b29802a5cd1d --- /dev/null +++ b/src/main/java/org/drip/coverage/treasury/package-info.java @@ -0,0 +1,8 @@ + +/** + * Treasury Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.treasury; diff --git a/src/main/java/org/drip/coverage/xva/Burgard2011.java b/src/main/java/org/drip/coverage/xva/Burgard2011.java new file mode 100644 index 000000000000..48d3be53d62c --- /dev/null +++ b/src/main/java/org/drip/coverage/xva/Burgard2011.java @@ -0,0 +1,87 @@ + +package org.drip.coverage.xva; + +import org.drip.sample.burgard2011.CorrelatedNumeraireXVAAttribution; +import org.drip.sample.burgard2011.CorrelatedNumeraireXVAExplain; +import org.drip.sample.burgard2011.CorrelatedNumeraireXVAGreeks; +import org.drip.sample.burgard2011.CorrelatedNumeraireXVAReplicationPortfolio; +import org.drip.sample.burgard2011.XVAExplain; +import org.drip.sample.burgard2011.XVAGreeks; +import org.drip.sample.burgard2011.XVAMarketGeneration; +import org.drip.sample.burgard2011.XVAReplicationPortfolio; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Burgard2011 holds the JUnit Code Coverage Tests for the Burgard-Kjaer (2011) XVA Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Burgard2011 +{ + @Test public void codeCoverageTest() throws Exception + { + CorrelatedNumeraireXVAAttribution.main (null); + + CorrelatedNumeraireXVAExplain.main (null); + + CorrelatedNumeraireXVAGreeks.main (null); + + CorrelatedNumeraireXVAReplicationPortfolio.main (null); + + XVAExplain.main (null); + + XVAGreeks.main (null); + + XVAMarketGeneration.main (null); + + XVAReplicationPortfolio.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/xva/Burgard2012.java b/src/main/java/org/drip/coverage/xva/Burgard2012.java new file mode 100644 index 000000000000..a91706c99886 --- /dev/null +++ b/src/main/java/org/drip/coverage/xva/Burgard2012.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.xva; + +import org.drip.sample.burgard2012.CounterPartyHazardHigh; +import org.drip.sample.burgard2012.CounterPartyHazardLow; +import org.drip.sample.burgard2012.CounterPartyHazardMedium; +import org.drip.sample.burgard2012.EulerTrajectoryEvolutionScheme; +import org.drip.sample.burgard2012.FixFloatVABank; +import org.drip.sample.burgard2012.FixFloatVACounterParty; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Burgard2012 holds the JUnit Code Coverage Tests for the Burgard-Kjaer (2012) XVA Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Burgard2012 +{ + @Test public void codeCoverageTest() throws Exception + { + CounterPartyHazardHigh.main (null); + + CounterPartyHazardLow.main (null); + + CounterPartyHazardMedium.main (null); + + EulerTrajectoryEvolutionScheme.main (null); + + FixFloatVABank.main (null); + + FixFloatVACounterParty.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/xva/Burgard2013.java b/src/main/java/org/drip/coverage/xva/Burgard2013.java new file mode 100644 index 000000000000..f65703b0f585 --- /dev/null +++ b/src/main/java/org/drip/coverage/xva/Burgard2013.java @@ -0,0 +1,152 @@ + +package org.drip.coverage.xva; + +import org.drip.sample.burgard2013.BilateralCSACollateralizedFunding; +import org.drip.sample.burgard2013.BilateralCSACollateralizedFundingStochastic; +import org.drip.sample.burgard2013.BilateralCSAUncollateralizedFunding; +import org.drip.sample.burgard2013.BilateralCSAUncollateralizedFundingStochastic; +import org.drip.sample.burgard2013.BilateralCSAZeroThresholdFunding; +import org.drip.sample.burgard2013.BilateralCSAZeroThresholdFundingStochastic; +import org.drip.sample.burgard2013.PerfectReplicationCollateralizedFunding; +import org.drip.sample.burgard2013.PerfectReplicationCollateralizedFundingStochastic; +import org.drip.sample.burgard2013.PerfectReplicationUncollateralizedFunding; +import org.drip.sample.burgard2013.PerfectReplicationUncollateralizedFundingStochastic; +import org.drip.sample.burgard2013.PerfectReplicationZeroThresholdFunding; +import org.drip.sample.burgard2013.PerfectReplicationZeroThresholdFundingStochastic; +import org.drip.sample.burgard2013.SemiReplicationCollateralizedFunding; +import org.drip.sample.burgard2013.SemiReplicationCollateralizedFundingStochastic; +import org.drip.sample.burgard2013.SemiReplicationUncollateralizedFunding; +import org.drip.sample.burgard2013.SemiReplicationUncollateralizedFundingStochastic; +import org.drip.sample.burgard2013.SemiReplicationZeroThresholdFunding; +import org.drip.sample.burgard2013.SemiReplicationZeroThresholdFundingStochastic; +import org.drip.sample.burgard2013.SetOffCollateralizedFunding; +import org.drip.sample.burgard2013.SetOffCollateralizedFundingStochastic; +import org.drip.sample.burgard2013.SetOffUncollateralizedFunding; +import org.drip.sample.burgard2013.SetOffUncollateralizedFundingStochastic; +import org.drip.sample.burgard2013.SetOffZeroThresholdFunding; +import org.drip.sample.burgard2013.SetOffZeroThresholdFundingStochastic; +import org.drip.sample.burgard2013.UnilateralCSACollateralizedFunding; +import org.drip.sample.burgard2013.UnilateralCSACollateralizedFundingStochastic; +import org.drip.sample.burgard2013.UnilateralCSAUncollateralizedFunding; +import org.drip.sample.burgard2013.UnilateralCSAUncollateralizedFundingStochastic; +import org.drip.sample.burgard2013.UnilateralCSAZeroThresholdFunding; +import org.drip.sample.burgard2013.UnilateralCSAZeroThresholdFundingStochastic; +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Burgard2013 holds the JUnit Code Coverage Tests for the Burgard-Kjaer (2013) XVA Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Burgard2013 +{ + @Test public void codeCoverageTest() throws Exception + { + BilateralCSACollateralizedFunding.main (null); + + BilateralCSACollateralizedFundingStochastic.main (null); + + BilateralCSAUncollateralizedFunding.main (null); + + BilateralCSAUncollateralizedFundingStochastic.main (null); + + BilateralCSAZeroThresholdFunding.main (null); + + BilateralCSAZeroThresholdFundingStochastic.main (null); + + PerfectReplicationCollateralizedFunding.main (null); + + PerfectReplicationCollateralizedFundingStochastic.main (null); + + PerfectReplicationUncollateralizedFunding.main (null); + + PerfectReplicationUncollateralizedFundingStochastic.main (null); + + PerfectReplicationZeroThresholdFunding.main (null); + + PerfectReplicationZeroThresholdFundingStochastic.main (null); + + SemiReplicationCollateralizedFunding.main (null); + + SemiReplicationCollateralizedFundingStochastic.main (null); + + SemiReplicationUncollateralizedFunding.main (null); + + SemiReplicationUncollateralizedFundingStochastic.main (null); + + SemiReplicationZeroThresholdFunding.main (null); + + SemiReplicationZeroThresholdFundingStochastic.main (null); + + SetOffCollateralizedFunding.main (null); + + SetOffCollateralizedFundingStochastic.main (null); + + SetOffUncollateralizedFunding.main (null); + + SetOffUncollateralizedFundingStochastic.main (null); + + SetOffZeroThresholdFunding.main (null); + + SetOffZeroThresholdFundingStochastic.main (null); + + UnilateralCSACollateralizedFunding.main (null); + + UnilateralCSACollateralizedFundingStochastic.main (null); + + UnilateralCSAUncollateralizedFunding.main (null); + + UnilateralCSAUncollateralizedFundingStochastic.main (null); + + UnilateralCSAZeroThresholdFunding.main (null); + + UnilateralCSAZeroThresholdFundingStochastic.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/xva/Netting.java b/src/main/java/org/drip/coverage/xva/Netting.java new file mode 100644 index 000000000000..1cd1d3b4a3f3 --- /dev/null +++ b/src/main/java/org/drip/coverage/xva/Netting.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.xva; + +import org.drip.sample.netting.PortfolioGroupRun; +import org.drip.sample.netting.PortfolioGroupSimulation; +import org.drip.sample.netting.PortfolioPathAggregationCorrelated; +import org.drip.sample.netting.PortfolioPathAggregationDeterministic; +import org.drip.sample.netting.PortfolioPathAggregationUncorrelated; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Netting holds the JUnit Code Coverage Tests for the Netting XVA Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Netting +{ + @Test public void codeCoverageTest() throws Exception + { + PortfolioGroupRun.main (null); + + PortfolioGroupSimulation.main (null); + + PortfolioPathAggregationCorrelated.main (null); + + PortfolioPathAggregationDeterministic.main (null); + + PortfolioPathAggregationUncorrelated.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/xva/Piterbarg2010.java b/src/main/java/org/drip/coverage/xva/Piterbarg2010.java new file mode 100644 index 000000000000..948e6a089170 --- /dev/null +++ b/src/main/java/org/drip/coverage/xva/Piterbarg2010.java @@ -0,0 +1,78 @@ + +package org.drip.coverage.xva; + +import org.drip.sample.piterbarg2010.CSAFundingAbsoluteForward; +import org.drip.sample.piterbarg2010.CSAFundingRelativeForward; +import org.drip.sample.piterbarg2010.CSAImpliedMeasureDifference; +import org.drip.sample.piterbarg2010.ForwardContract; +import org.drip.sample.piterbarg2010.ZeroStrikeCallOption; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Piterbarg2010 holds the JUnit Code Coverage Tests for the Piterbarg (2010) XVA Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Piterbarg2010 +{ + @Test public void codeCoverageTest() throws Exception + { + CSAFundingAbsoluteForward.main (null); + + CSAFundingRelativeForward.main (null); + + CSAImpliedMeasureDifference.main (null); + + ForwardContract.main (null); + + ZeroStrikeCallOption.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/xva/Piterbarg2012.java b/src/main/java/org/drip/coverage/xva/Piterbarg2012.java new file mode 100644 index 000000000000..db6cec52b2b6 --- /dev/null +++ b/src/main/java/org/drip/coverage/xva/Piterbarg2012.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.xva; + +import org.drip.sample.piterbarg2012.DeterministicCollateralChoiceZeroCoupon; +import org.drip.sample.piterbarg2012.DomesticCollateralForeignForex; +import org.drip.sample.piterbarg2012.DomesticCollateralForeignForexAnalysis; +import org.drip.sample.piterbarg2012.ForeignCollateralDomesticForex; +import org.drip.sample.piterbarg2012.ForeignCollateralDomesticForexAnalysis; +import org.drip.sample.piterbarg2012.ForeignCollateralizedZeroCoupon; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * Piterbarg2012 holds the JUnit Code Coverage Tests for the Piterbarg (2012) XVA Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class Piterbarg2012 +{ + @Test public void codeCoverageTest() throws Exception + { + DeterministicCollateralChoiceZeroCoupon.main (null); + + DomesticCollateralForeignForex.main (null); + + DomesticCollateralForeignForexAnalysis.main (null); + + ForeignCollateralDomesticForex.main (null); + + ForeignCollateralDomesticForexAnalysis.main (null); + + ForeignCollateralizedZeroCoupon.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/xva/XVA.java b/src/main/java/org/drip/coverage/xva/XVA.java new file mode 100644 index 000000000000..72bb99dc97bc --- /dev/null +++ b/src/main/java/org/drip/coverage/xva/XVA.java @@ -0,0 +1,84 @@ + +package org.drip.coverage.xva; + +import org.drip.sample.xva.CollateralizedCollateralGroup; +import org.drip.sample.xva.CollateralizedCollateralGroupCorrelated; +import org.drip.sample.xva.PortfolioCollateralEstimate; +import org.drip.sample.xva.UncollateralizedCollateralGroup; +import org.drip.sample.xva.UncollateralizedCollateralGroupCorrelated; +import org.drip.sample.xva.ZeroThresholdCollateralGroup; +import org.drip.sample.xva.ZeroThresholdCollateralGroupCorrelated; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * XVA holds the JUnit Code Coverage Tests for the Core XVA Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class XVA +{ + @Test public void codeCoverageTest() throws Exception + { + CollateralizedCollateralGroup.main (null); + + CollateralizedCollateralGroupCorrelated.main (null); + + PortfolioCollateralEstimate.main (null); + + UncollateralizedCollateralGroup.main (null); + + UncollateralizedCollateralGroupCorrelated.main (null); + + ZeroThresholdCollateralGroup.main (null); + + ZeroThresholdCollateralGroupCorrelated.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/xva/XVABasel.java b/src/main/java/org/drip/coverage/xva/XVABasel.java new file mode 100644 index 000000000000..657198a9e422 --- /dev/null +++ b/src/main/java/org/drip/coverage/xva/XVABasel.java @@ -0,0 +1,225 @@ + +package org.drip.coverage.xva; + +import org.drip.sample.xvabasel.CollateralizedCollateralNeutral; +import org.drip.sample.xvabasel.CollateralizedCollateralNeutralStochastic; +import org.drip.sample.xvabasel.CollateralizedCollateralPayable; +import org.drip.sample.xvabasel.CollateralizedCollateralPayableStochastic; +import org.drip.sample.xvabasel.CollateralizedCollateralReceivable; +import org.drip.sample.xvabasel.CollateralizedCollateralReceivableStochastic; +import org.drip.sample.xvabasel.CollateralizedFundingNeutral; +import org.drip.sample.xvabasel.CollateralizedFundingNeutralStochastic; +import org.drip.sample.xvabasel.CollateralizedFundingPayable; +import org.drip.sample.xvabasel.CollateralizedFundingPayableStochastic; +import org.drip.sample.xvabasel.CollateralizedFundingReceivable; +import org.drip.sample.xvabasel.CollateralizedFundingReceivableStochastic; +import org.drip.sample.xvabasel.CollateralizedNettingNeutral; +import org.drip.sample.xvabasel.CollateralizedNettingNeutralStochastic; +import org.drip.sample.xvabasel.CollateralizedNettingPayable; +import org.drip.sample.xvabasel.CollateralizedNettingPayableStochastic; +import org.drip.sample.xvabasel.CollateralizedNettingReceivable; +import org.drip.sample.xvabasel.CollateralizedNettingReceivableStochastic; +import org.drip.sample.xvabasel.UncollateralizedCollateralNeutral; +import org.drip.sample.xvabasel.UncollateralizedCollateralNeutralStochastic; +import org.drip.sample.xvabasel.UncollateralizedCollateralPayable; +import org.drip.sample.xvabasel.UncollateralizedCollateralPayableStochastic; +import org.drip.sample.xvabasel.UncollateralizedCollateralReceivable; +import org.drip.sample.xvabasel.UncollateralizedCollateralReceivableStochastic; +import org.drip.sample.xvabasel.UncollateralizedFundingNeutral; +import org.drip.sample.xvabasel.UncollateralizedFundingNeutralStochastic; +import org.drip.sample.xvabasel.UncollateralizedFundingPayable; +import org.drip.sample.xvabasel.UncollateralizedFundingPayableStochastic; +import org.drip.sample.xvabasel.UncollateralizedFundingReceivable; +import org.drip.sample.xvabasel.UncollateralizedFundingReceivableStochastic; +import org.drip.sample.xvabasel.UncollateralizedNettingNeutral; +import org.drip.sample.xvabasel.UncollateralizedNettingNeutralStochastic; +import org.drip.sample.xvabasel.UncollateralizedNettingPayable; +import org.drip.sample.xvabasel.UncollateralizedNettingPayableStochastic; +import org.drip.sample.xvabasel.UncollateralizedNettingReceivable; +import org.drip.sample.xvabasel.UncollateralizedNettingReceivableStochastic; +import org.drip.sample.xvabasel.ZeroThresholdCollateralNeutral; +import org.drip.sample.xvabasel.ZeroThresholdCollateralNeutralStochastic; +import org.drip.sample.xvabasel.ZeroThresholdCollateralPayable; +import org.drip.sample.xvabasel.ZeroThresholdCollateralPayableStochastic; +import org.drip.sample.xvabasel.ZeroThresholdCollateralReceivable; +import org.drip.sample.xvabasel.ZeroThresholdCollateralReceivableStochastic; +import org.drip.sample.xvabasel.ZeroThresholdFundingNeutral; +import org.drip.sample.xvabasel.ZeroThresholdFundingNeutralStochastic; +import org.drip.sample.xvabasel.ZeroThresholdFundingPayable; +import org.drip.sample.xvabasel.ZeroThresholdFundingPayableStochastic; +import org.drip.sample.xvabasel.ZeroThresholdFundingReceivable; +import org.drip.sample.xvabasel.ZeroThresholdFundingReceivableStochastic; +import org.drip.sample.xvabasel.ZeroThresholdNettingNeutral; +import org.drip.sample.xvabasel.ZeroThresholdNettingNeutralStochastic; +import org.drip.sample.xvabasel.ZeroThresholdNettingPayable; +import org.drip.sample.xvabasel.ZeroThresholdNettingPayableStochastic; +import org.drip.sample.xvabasel.ZeroThresholdNettingReceivable; +import org.drip.sample.xvabasel.ZeroThresholdNettingReceivableStochastic; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * XVABasel holds the JUnit Code Coverage Tests for the Basel Accounting XVA Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class XVABasel +{ + @Test public void codeCoverageTest() throws Exception + { + CollateralizedCollateralNeutral.main (null); + + CollateralizedCollateralNeutralStochastic.main (null); + + CollateralizedCollateralPayable.main (null); + + CollateralizedCollateralPayableStochastic.main (null); + + CollateralizedCollateralReceivable.main (null); + + CollateralizedCollateralReceivableStochastic.main (null); + + CollateralizedFundingNeutral.main (null); + + CollateralizedFundingNeutralStochastic.main (null); + + CollateralizedFundingPayable.main (null); + + CollateralizedFundingPayableStochastic.main (null); + + CollateralizedFundingReceivable.main (null); + + CollateralizedFundingReceivableStochastic.main (null); + + CollateralizedNettingNeutral.main (null); + + CollateralizedNettingNeutralStochastic.main (null); + + CollateralizedNettingPayable.main (null); + + CollateralizedNettingPayableStochastic.main (null); + + CollateralizedNettingReceivable.main (null); + + CollateralizedNettingReceivableStochastic.main (null); + + UncollateralizedCollateralNeutral.main (null); + + UncollateralizedCollateralNeutralStochastic.main (null); + + UncollateralizedCollateralPayable.main (null); + + UncollateralizedCollateralPayableStochastic.main (null); + + UncollateralizedCollateralReceivable.main (null); + + UncollateralizedCollateralReceivableStochastic.main (null); + + UncollateralizedFundingNeutral.main (null); + + UncollateralizedFundingNeutralStochastic.main (null); + + UncollateralizedFundingPayable.main (null); + + UncollateralizedFundingPayableStochastic.main (null); + + UncollateralizedFundingReceivable.main (null); + + UncollateralizedFundingReceivableStochastic.main (null); + + UncollateralizedNettingNeutral.main (null); + + UncollateralizedNettingNeutralStochastic.main (null); + + UncollateralizedNettingPayable.main (null); + + UncollateralizedNettingPayableStochastic.main (null); + + UncollateralizedNettingReceivable.main (null); + + UncollateralizedNettingReceivableStochastic.main (null); + + ZeroThresholdCollateralNeutral.main (null); + + ZeroThresholdCollateralNeutralStochastic.main (null); + + ZeroThresholdCollateralPayable.main (null); + + ZeroThresholdCollateralPayableStochastic.main (null); + + ZeroThresholdCollateralReceivable.main (null); + + ZeroThresholdCollateralReceivableStochastic.main (null); + + ZeroThresholdFundingNeutral.main (null); + + ZeroThresholdFundingNeutralStochastic.main (null); + + ZeroThresholdFundingPayable.main (null); + + ZeroThresholdFundingPayableStochastic.main (null); + + ZeroThresholdFundingReceivable.main (null); + + ZeroThresholdFundingReceivableStochastic.main (null); + + ZeroThresholdNettingNeutral.main (null); + + ZeroThresholdNettingNeutralStochastic.main (null); + + ZeroThresholdNettingPayable.main (null); + + ZeroThresholdNettingPayableStochastic.main (null); + + ZeroThresholdNettingReceivable.main (null); + + ZeroThresholdNettingReceivableStochastic.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/xva/XVADigest.java b/src/main/java/org/drip/coverage/xva/XVADigest.java new file mode 100644 index 000000000000..32e93260a282 --- /dev/null +++ b/src/main/java/org/drip/coverage/xva/XVADigest.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.xva; + +import org.drip.sample.xvadigest.CPGACollateralized; +import org.drip.sample.xvadigest.CPGACollateralizedCorrelated; +import org.drip.sample.xvadigest.CPGAUncollateralized; +import org.drip.sample.xvadigest.CPGAUncollateralizedCorrelated; +import org.drip.sample.xvadigest.CPGAZeroThreshold; +import org.drip.sample.xvadigest.CPGAZeroThresholdCorrelated; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * XVADigest holds the JUnit Code Coverage Tests for the Metrics Digest for the XVA Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class XVADigest +{ + @Test public void codeCoverageTest() throws Exception + { + CPGACollateralized.main (null); + + CPGACollateralizedCorrelated.main (null); + + CPGAUncollateralized.main (null); + + CPGAUncollateralizedCorrelated.main (null); + + CPGAZeroThreshold.main (null); + + CPGAZeroThresholdCorrelated.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/xva/XVAStrategy.java b/src/main/java/org/drip/coverage/xva/XVAStrategy.java new file mode 100644 index 000000000000..7d7cf46e2042 --- /dev/null +++ b/src/main/java/org/drip/coverage/xva/XVAStrategy.java @@ -0,0 +1,81 @@ + +package org.drip.coverage.xva; + +import org.drip.sample.xvastrategy.FundingGroupBilateralCSA; +import org.drip.sample.xvastrategy.FundingGroupHedgeError; +import org.drip.sample.xvastrategy.FundingGroupPerfectReplication; +import org.drip.sample.xvastrategy.FundingGroupSemiReplication; +import org.drip.sample.xvastrategy.FundingGroupSetOff; +import org.drip.sample.xvastrategy.FundingGroupUnilateralCSA; + +import org.junit.Test; + +/* + * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + */ + +/*! + * Copyright (C) 2018 Lakshmi Krishnamurthy + * Copyright (C) 2017 Lakshmi Krishnamurthy + * + * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model + * libraries targeting analysts and developers + * https://lakshmidrip.github.io/DRIP/ + * + * DRIP is composed of four main libraries: + * + * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ + * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ + * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ + * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ + * + * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, + * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA + * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV + * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM + * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. + * + * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy + * Incorporator, Holdings Constraint, and Transaction Costs. + * + * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. + * + * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. + * + * 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. + */ + +/** + * XVAStrategy holds the JUnit Code Coverage Tests for the Strategy Metrics for the XVA Module. + * + * @author Lakshmi Krishnamurthy + */ + +public class XVAStrategy +{ + @Test public void codeCoverageTest() throws Exception + { + FundingGroupBilateralCSA.main (null); + + FundingGroupHedgeError.main (null); + + FundingGroupPerfectReplication.main (null); + + FundingGroupSemiReplication.main (null); + + FundingGroupSetOff.main (null); + + FundingGroupUnilateralCSA.main (null); + } +} diff --git a/src/main/java/org/drip/coverage/xva/package-info.java b/src/main/java/org/drip/coverage/xva/package-info.java new file mode 100644 index 000000000000..069113fcb1e9 --- /dev/null +++ b/src/main/java/org/drip/coverage/xva/package-info.java @@ -0,0 +1,8 @@ + +/** + * XVA Module Code Coverage Estimation Suite + * + * @author Lakshmi Krishnamurthy + */ + +package org.drip.coverage.xva; diff --git a/src/main/java/org/drip/sample/burgard2012/FixFloatVABank.java b/src/main/java/org/drip/sample/burgard2012/FixFloatVABank.java index 7ef4408332e6..582d48faf3d7 100644 --- a/src/main/java/org/drip/sample/burgard2012/FixFloatVABank.java +++ b/src/main/java/org/drip/sample/burgard2012/FixFloatVABank.java @@ -203,7 +203,12 @@ public static final void VA ( 0. ); - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/burgard2012/FixFloatVACounterParty.java b/src/main/java/org/drip/sample/burgard2012/FixFloatVACounterParty.java index 51fb826516b9..34e920fe9a78 100644 --- a/src/main/java/org/drip/sample/burgard2012/FixFloatVACounterParty.java +++ b/src/main/java/org/drip/sample/burgard2012/FixFloatVACounterParty.java @@ -203,7 +203,12 @@ public static final void VA ( 0. ); - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/burgard2013/BilateralCSACollateralizedFunding.java b/src/main/java/org/drip/sample/burgard2013/BilateralCSACollateralizedFunding.java index 202de48f9085..0c890125cb0f 100644 --- a/src/main/java/org/drip/sample/burgard2013/BilateralCSACollateralizedFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/BilateralCSACollateralizedFunding.java @@ -313,11 +313,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + mp + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/BilateralCSACollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/BilateralCSACollateralizedFundingStochastic.java index e09767cf68e5..b0b94c9b9d60 100644 --- a/src/main/java/org/drip/sample/burgard2013/BilateralCSACollateralizedFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/BilateralCSACollateralizedFundingStochastic.java @@ -605,7 +605,10 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( @@ -623,8 +626,14 @@ private static final ExposureAdjustmentAggregator[] Mix ( ); PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + mp + ), + new PositionGroupPath ( + aCGV2, + mp + ) }; aMPEAExtended[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/BilateralCSAUncollateralizedFunding.java b/src/main/java/org/drip/sample/burgard2013/BilateralCSAUncollateralizedFunding.java index 99cd8fc1ac7a..8f8f8f7f5df1 100644 --- a/src/main/java/org/drip/sample/burgard2013/BilateralCSAUncollateralizedFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/BilateralCSAUncollateralizedFunding.java @@ -317,11 +317,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/BilateralCSAUncollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/BilateralCSAUncollateralizedFundingStochastic.java index 85dc6c190b1b..989ac84c739b 100644 --- a/src/main/java/org/drip/sample/burgard2013/BilateralCSAUncollateralizedFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/BilateralCSAUncollateralizedFundingStochastic.java @@ -608,7 +608,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -625,10 +635,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/burgard2013/BilateralCSAZeroThresholdFunding.java b/src/main/java/org/drip/sample/burgard2013/BilateralCSAZeroThresholdFunding.java index 6a6a93aeddc0..1543a7f5091b 100644 --- a/src/main/java/org/drip/sample/burgard2013/BilateralCSAZeroThresholdFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/BilateralCSAZeroThresholdFunding.java @@ -313,11 +313,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/BilateralCSAZeroThresholdFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/BilateralCSAZeroThresholdFundingStochastic.java index 86e61554559e..f3843787de95 100644 --- a/src/main/java/org/drip/sample/burgard2013/BilateralCSAZeroThresholdFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/BilateralCSAZeroThresholdFundingStochastic.java @@ -605,11 +605,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationCollateralizedFunding.java b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationCollateralizedFunding.java index 6e09efaa9d86..7aa4c0913ec3 100644 --- a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationCollateralizedFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationCollateralizedFunding.java @@ -371,11 +371,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + mp + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationCollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationCollateralizedFundingStochastic.java index 8e63c8b4a92a..c2b58e31dca4 100644 --- a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationCollateralizedFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationCollateralizedFundingStochastic.java @@ -658,7 +658,10 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( @@ -676,8 +679,14 @@ private static final ExposureAdjustmentAggregator[] Mix ( ); PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + mp + ), + new PositionGroupPath ( + aCGV2, + mp + ) }; aMPEAExtended[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationUncollateralizedFunding.java b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationUncollateralizedFunding.java index c6e3e64b6885..d9519c759ca1 100644 --- a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationUncollateralizedFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationUncollateralizedFunding.java @@ -322,11 +322,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationUncollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationUncollateralizedFundingStochastic.java index 382772943d7d..84a12196a28b 100644 --- a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationUncollateralizedFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationUncollateralizedFundingStochastic.java @@ -612,7 +612,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -629,10 +639,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationZeroThresholdFunding.java b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationZeroThresholdFunding.java index f951f9b67c6d..0a37ebac405e 100644 --- a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationZeroThresholdFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationZeroThresholdFunding.java @@ -371,11 +371,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationZeroThresholdFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationZeroThresholdFundingStochastic.java index 0d1764231c7d..203ec6d49504 100644 --- a/src/main/java/org/drip/sample/burgard2013/PerfectReplicationZeroThresholdFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/PerfectReplicationZeroThresholdFundingStochastic.java @@ -658,11 +658,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/SemiReplicationCollateralizedFunding.java b/src/main/java/org/drip/sample/burgard2013/SemiReplicationCollateralizedFunding.java index 3bf987b74e3b..6c522a667a92 100644 --- a/src/main/java/org/drip/sample/burgard2013/SemiReplicationCollateralizedFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/SemiReplicationCollateralizedFunding.java @@ -369,11 +369,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + mp + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/SemiReplicationCollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/SemiReplicationCollateralizedFundingStochastic.java index 613913b96adf..83b9ec1d99f4 100644 --- a/src/main/java/org/drip/sample/burgard2013/SemiReplicationCollateralizedFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/SemiReplicationCollateralizedFundingStochastic.java @@ -656,7 +656,10 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( @@ -674,8 +677,14 @@ private static final ExposureAdjustmentAggregator[] Mix ( ); PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + mp + ), + new PositionGroupPath ( + aCGV2, + mp + ) }; aMPEAExtended[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/SemiReplicationUncollateralizedFunding.java b/src/main/java/org/drip/sample/burgard2013/SemiReplicationUncollateralizedFunding.java index 9893f8a9b2bf..54ff57578d89 100644 --- a/src/main/java/org/drip/sample/burgard2013/SemiReplicationUncollateralizedFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/SemiReplicationUncollateralizedFunding.java @@ -319,11 +319,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/SemiReplicationUncollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/SemiReplicationUncollateralizedFundingStochastic.java index 33b8ece35694..04b340f723ad 100644 --- a/src/main/java/org/drip/sample/burgard2013/SemiReplicationUncollateralizedFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/SemiReplicationUncollateralizedFundingStochastic.java @@ -610,7 +610,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -627,10 +637,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/burgard2013/SemiReplicationZeroThresholdFunding.java b/src/main/java/org/drip/sample/burgard2013/SemiReplicationZeroThresholdFunding.java index a474f6f960df..049197bbc4e2 100644 --- a/src/main/java/org/drip/sample/burgard2013/SemiReplicationZeroThresholdFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/SemiReplicationZeroThresholdFunding.java @@ -369,11 +369,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/SemiReplicationZeroThresholdFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/SemiReplicationZeroThresholdFundingStochastic.java index fd0bd8dcbed4..1f19263b177c 100644 --- a/src/main/java/org/drip/sample/burgard2013/SemiReplicationZeroThresholdFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/SemiReplicationZeroThresholdFundingStochastic.java @@ -656,11 +656,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/SetOffCollateralizedFunding.java b/src/main/java/org/drip/sample/burgard2013/SetOffCollateralizedFunding.java index ee5159d2d91d..c34dff99d8f9 100644 --- a/src/main/java/org/drip/sample/burgard2013/SetOffCollateralizedFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/SetOffCollateralizedFunding.java @@ -366,11 +366,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + mp + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/SetOffCollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/SetOffCollateralizedFundingStochastic.java index dde68dde43a1..ad1ef0ebc170 100644 --- a/src/main/java/org/drip/sample/burgard2013/SetOffCollateralizedFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/SetOffCollateralizedFundingStochastic.java @@ -654,7 +654,10 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( @@ -672,8 +675,14 @@ private static final ExposureAdjustmentAggregator[] Mix ( ); PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + mp + ), + new PositionGroupPath ( + aCGV2, + mp + ) }; aMPEAExtended[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/SetOffUncollateralizedFunding.java b/src/main/java/org/drip/sample/burgard2013/SetOffUncollateralizedFunding.java index 469aa465aaee..2095771709f3 100644 --- a/src/main/java/org/drip/sample/burgard2013/SetOffUncollateralizedFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/SetOffUncollateralizedFunding.java @@ -317,11 +317,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/SetOffUncollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/SetOffUncollateralizedFundingStochastic.java index 0c2e12ddd758..628b8ae465d9 100644 --- a/src/main/java/org/drip/sample/burgard2013/SetOffUncollateralizedFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/SetOffUncollateralizedFundingStochastic.java @@ -608,7 +608,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -625,10 +635,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/burgard2013/SetOffZeroThresholdFunding.java b/src/main/java/org/drip/sample/burgard2013/SetOffZeroThresholdFunding.java index 99fb9c401443..0e7bd5f4c50c 100644 --- a/src/main/java/org/drip/sample/burgard2013/SetOffZeroThresholdFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/SetOffZeroThresholdFunding.java @@ -366,11 +366,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/SetOffZeroThresholdFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/SetOffZeroThresholdFundingStochastic.java index 8530d2cfa65c..81228949acfa 100644 --- a/src/main/java/org/drip/sample/burgard2013/SetOffZeroThresholdFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/SetOffZeroThresholdFundingStochastic.java @@ -654,11 +654,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/UnilateralCSACollateralizedFunding.java b/src/main/java/org/drip/sample/burgard2013/UnilateralCSACollateralizedFunding.java index 496f3ec7def1..72a974a78d6b 100644 --- a/src/main/java/org/drip/sample/burgard2013/UnilateralCSACollateralizedFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/UnilateralCSACollateralizedFunding.java @@ -313,11 +313,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + mp + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/UnilateralCSACollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/UnilateralCSACollateralizedFundingStochastic.java index a4e9b524c905..a74b7d00e959 100644 --- a/src/main/java/org/drip/sample/burgard2013/UnilateralCSACollateralizedFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/UnilateralCSACollateralizedFundingStochastic.java @@ -605,7 +605,10 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( @@ -623,8 +626,14 @@ private static final ExposureAdjustmentAggregator[] Mix ( ); PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + mp + ), + new PositionGroupPath ( + aCGV2, + mp + ) }; aMPEAExtended[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/UnilateralCSAUncollateralizedFunding.java b/src/main/java/org/drip/sample/burgard2013/UnilateralCSAUncollateralizedFunding.java index 05bd66329a59..ad094e663c35 100644 --- a/src/main/java/org/drip/sample/burgard2013/UnilateralCSAUncollateralizedFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/UnilateralCSAUncollateralizedFunding.java @@ -317,11 +317,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/UnilateralCSAUncollateralizedFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/UnilateralCSAUncollateralizedFundingStochastic.java index 494c7906a49a..534619b2435e 100644 --- a/src/main/java/org/drip/sample/burgard2013/UnilateralCSAUncollateralizedFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/UnilateralCSAUncollateralizedFundingStochastic.java @@ -608,7 +608,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -625,10 +635,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/burgard2013/UnilateralCSAZeroThresholdFunding.java b/src/main/java/org/drip/sample/burgard2013/UnilateralCSAZeroThresholdFunding.java index 0065dcd4229e..8797f4653360 100644 --- a/src/main/java/org/drip/sample/burgard2013/UnilateralCSAZeroThresholdFunding.java +++ b/src/main/java/org/drip/sample/burgard2013/UnilateralCSAZeroThresholdFunding.java @@ -313,11 +313,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/burgard2013/UnilateralCSAZeroThresholdFundingStochastic.java b/src/main/java/org/drip/sample/burgard2013/UnilateralCSAZeroThresholdFundingStochastic.java index 5abca99e9027..dcb4d87067cf 100644 --- a/src/main/java/org/drip/sample/burgard2013/UnilateralCSAZeroThresholdFundingStochastic.java +++ b/src/main/java/org/drip/sample/burgard2013/UnilateralCSAZeroThresholdFundingStochastic.java @@ -605,11 +605,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/netting/PortfolioGroupRun.java b/src/main/java/org/drip/sample/netting/PortfolioGroupRun.java index 70361571bdc2..57dadc11ddc4 100644 --- a/src/main/java/org/drip/sample/netting/PortfolioGroupRun.java +++ b/src/main/java/org/drip/sample/netting/PortfolioGroupRun.java @@ -268,9 +268,19 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aCGP1 = new PositionGroupPath[] {new PositionGroupPath (aCGV1)}; + PositionGroupPath[] aCGP1 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + mp + ) + }; - PositionGroupPath[] aCGP2 = new PositionGroupPath[] {new PositionGroupPath (aCGV2)}; + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV2, + mp + ) + }; AlbaneseAndersenNettingGroupPath ngpaa2014_1 = new AlbaneseAndersenNettingGroupPath ( aCGP1, diff --git a/src/main/java/org/drip/sample/netting/PortfolioGroupSimulation.java b/src/main/java/org/drip/sample/netting/PortfolioGroupSimulation.java index 0defd0235d45..172463164ef2 100644 --- a/src/main/java/org/drip/sample/netting/PortfolioGroupSimulation.java +++ b/src/main/java/org/drip/sample/netting/PortfolioGroupSimulation.java @@ -209,7 +209,12 @@ public static final void main ( ); } - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/netting/PortfolioPathAggregationCorrelated.java b/src/main/java/org/drip/sample/netting/PortfolioPathAggregationCorrelated.java index fd224fb2055c..cecadb57509e 100644 --- a/src/main/java/org/drip/sample/netting/PortfolioPathAggregationCorrelated.java +++ b/src/main/java/org/drip/sample/netting/PortfolioPathAggregationCorrelated.java @@ -410,7 +410,12 @@ public static final void main ( ); } - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + new MarketPath (aMV) + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/netting/PortfolioPathAggregationDeterministic.java b/src/main/java/org/drip/sample/netting/PortfolioPathAggregationDeterministic.java index 9dc29cfb5f11..0a8b38e1205d 100644 --- a/src/main/java/org/drip/sample/netting/PortfolioPathAggregationDeterministic.java +++ b/src/main/java/org/drip/sample/netting/PortfolioPathAggregationDeterministic.java @@ -213,7 +213,12 @@ public static final void main ( ); } - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/netting/PortfolioPathAggregationUncorrelated.java b/src/main/java/org/drip/sample/netting/PortfolioPathAggregationUncorrelated.java index 948e351eaf42..c5f8861e021d 100644 --- a/src/main/java/org/drip/sample/netting/PortfolioPathAggregationUncorrelated.java +++ b/src/main/java/org/drip/sample/netting/PortfolioPathAggregationUncorrelated.java @@ -402,7 +402,12 @@ public static final void main ( ); } - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xva/CollateralizedCollateralGroup.java b/src/main/java/org/drip/sample/xva/CollateralizedCollateralGroup.java index c8deec1dc8e0..77b975b81ce0 100644 --- a/src/main/java/org/drip/sample/xva/CollateralizedCollateralGroup.java +++ b/src/main/java/org/drip/sample/xva/CollateralizedCollateralGroup.java @@ -301,7 +301,12 @@ public static final void main ( dblValueStart = dblValueEnd; } - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xva/CollateralizedCollateralGroupCorrelated.java b/src/main/java/org/drip/sample/xva/CollateralizedCollateralGroupCorrelated.java index 31910b5b8d88..77e1269dae96 100644 --- a/src/main/java/org/drip/sample/xva/CollateralizedCollateralGroupCorrelated.java +++ b/src/main/java/org/drip/sample/xva/CollateralizedCollateralGroupCorrelated.java @@ -520,7 +520,12 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xva/UncollateralizedCollateralGroup.java b/src/main/java/org/drip/sample/xva/UncollateralizedCollateralGroup.java index 0b49f85fb1f7..7e9afd5bd8f1 100644 --- a/src/main/java/org/drip/sample/xva/UncollateralizedCollateralGroup.java +++ b/src/main/java/org/drip/sample/xva/UncollateralizedCollateralGroup.java @@ -263,7 +263,12 @@ public static final void main ( ); } - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xva/UncollateralizedCollateralGroupCorrelated.java b/src/main/java/org/drip/sample/xva/UncollateralizedCollateralGroupCorrelated.java index c080b4554e73..25b0b699deb5 100644 --- a/src/main/java/org/drip/sample/xva/UncollateralizedCollateralGroupCorrelated.java +++ b/src/main/java/org/drip/sample/xva/UncollateralizedCollateralGroupCorrelated.java @@ -480,7 +480,12 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xva/ZeroThresholdCollateralGroup.java b/src/main/java/org/drip/sample/xva/ZeroThresholdCollateralGroup.java index ac4eee96ae5c..e6dda4684999 100644 --- a/src/main/java/org/drip/sample/xva/ZeroThresholdCollateralGroup.java +++ b/src/main/java/org/drip/sample/xva/ZeroThresholdCollateralGroup.java @@ -299,7 +299,12 @@ public static final void main ( dblValueStart = dblValueEnd; } - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xva/ZeroThresholdCollateralGroupCorrelated.java b/src/main/java/org/drip/sample/xva/ZeroThresholdCollateralGroupCorrelated.java index 1a699ab4e2bf..6e9b0e4a36a5 100644 --- a/src/main/java/org/drip/sample/xva/ZeroThresholdCollateralGroupCorrelated.java +++ b/src/main/java/org/drip/sample/xva/ZeroThresholdCollateralGroupCorrelated.java @@ -515,7 +515,12 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralNeutral.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralNeutral.java index 5ae53486e947..c99e3da7d9f6 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralNeutral.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralNeutral.java @@ -336,12 +336,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGPGround = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1) + new PositionGroupPath ( + aHGVR1, + mp + ) }; PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1), - new PositionGroupPath (aHGVR2) + new PositionGroupPath ( + aHGVR1, + mp + ), + new PositionGroupPath ( + aHGVR2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralNeutralStochastic.java index 4d59feaa2d9d..a49096127968 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralNeutralStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralNeutralStochastic.java @@ -585,7 +585,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGPGround = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1) + new PositionGroupPath ( + aHGVR1, + mp + ) + }; + + PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR1, + mp + ), + new PositionGroupPath ( + aHGVR2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( @@ -602,11 +616,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1), - new PositionGroupPath (aHGVR2) - }; - aMPEAExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralPayable.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralPayable.java index d57ab4f393b8..468252df52a6 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralPayable.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralPayable.java @@ -336,12 +336,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGPGround = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1) + new PositionGroupPath ( + aHGVR1, + mp + ) }; PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1), - new PositionGroupPath (aHGVR2) + new PositionGroupPath ( + aHGVR1, + mp + ), + new PositionGroupPath ( + aHGVR2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralPayableStochastic.java index df3ad2300234..eed7e0b2cf1c 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralPayableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralPayableStochastic.java @@ -585,7 +585,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGPGround = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1) + new PositionGroupPath ( + aHGVR1, + mp + ) + }; + + PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR1, + mp + ), + new PositionGroupPath ( + aHGVR2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( @@ -602,11 +616,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1), - new PositionGroupPath (aHGVR2) - }; - aMPEAExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralReceivable.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralReceivable.java index 338581cef75a..810165dc9ce5 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralReceivable.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralReceivable.java @@ -336,12 +336,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aMV); PositionGroupPath[] aHGPGround = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1) + new PositionGroupPath ( + aHGVR1, + np + ) }; PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1), - new PositionGroupPath (aHGVR2) + new PositionGroupPath ( + aHGVR1, + np + ), + new PositionGroupPath ( + aHGVR2, + np + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralReceivableStochastic.java index db6d5584c571..7ab838746334 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralReceivableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedCollateralReceivableStochastic.java @@ -585,7 +585,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGPGround = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1) + new PositionGroupPath ( + aHGVR1, + mp + ) + }; + + PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR1, + mp + ), + new PositionGroupPath ( + aHGVR2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( @@ -602,11 +616,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aHGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1), - new PositionGroupPath (aHGVR2) - }; - aMPEAExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingNeutral.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingNeutral.java index a6b1755800db..945319596149 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingNeutral.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingNeutral.java @@ -336,11 +336,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGP1 = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1) + new PositionGroupPath ( + aHGVR1, + mp + ) }; PositionGroupPath[] aHGP2 = new PositionGroupPath[] { - new PositionGroupPath (aHGVR2) + new PositionGroupPath ( + aHGVR1, + mp + ), + new PositionGroupPath ( + aHGVR2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingNeutralStochastic.java index 2825bf3eca36..8624bd1247e5 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingNeutralStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingNeutralStochastic.java @@ -585,11 +585,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGP1 = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1) + new PositionGroupPath ( + aHGVR1, + mp + ) }; PositionGroupPath[] aHGP2 = new PositionGroupPath[] { - new PositionGroupPath (aHGVR2) + new PositionGroupPath ( + aHGVR1, + mp + ), + new PositionGroupPath ( + aHGVR2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingPayable.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingPayable.java index 2c2b795802c0..0e52ca476e08 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingPayable.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingPayable.java @@ -336,11 +336,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGP1 = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1) + new PositionGroupPath ( + aHGVR1, + mp + ) }; PositionGroupPath[] aHGP2 = new PositionGroupPath[] { - new PositionGroupPath (aHGVR2) + new PositionGroupPath ( + aHGVR1, + mp + ), + new PositionGroupPath ( + aHGVR2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingPayableStochastic.java index 2f9ea014e1b0..60b01e3a7715 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingPayableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingPayableStochastic.java @@ -585,11 +585,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aNV); PositionGroupPath[] aHGP1 = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1) + new PositionGroupPath ( + aHGVR1, + mp + ) }; PositionGroupPath[] aHGP2 = new PositionGroupPath[] { - new PositionGroupPath (aHGVR2) + new PositionGroupPath ( + aHGVR1, + mp + ), + new PositionGroupPath ( + aHGVR2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingReceivable.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingReceivable.java index e843a1091667..07593c5d286e 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingReceivable.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingReceivable.java @@ -336,11 +336,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGP1 = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1) + new PositionGroupPath ( + aHGVR1, + mp + ) }; PositionGroupPath[] aHGP2 = new PositionGroupPath[] { - new PositionGroupPath (aHGVR2) + new PositionGroupPath ( + aHGVR1, + mp + ), + new PositionGroupPath ( + aHGVR2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingReceivableStochastic.java index 65e8cc9f2ed9..84b74cebd890 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingReceivableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedFundingReceivableStochastic.java @@ -585,11 +585,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath mp = new MarketPath (aMV); PositionGroupPath[] aHGP1 = new PositionGroupPath[] { - new PositionGroupPath (aHGVR1) + new PositionGroupPath ( + aHGVR1, + mp + ) }; PositionGroupPath[] aHGP2 = new PositionGroupPath[] { - new PositionGroupPath (aHGVR2) + new PositionGroupPath ( + aHGVR1, + mp + ), + new PositionGroupPath ( + aHGVR2, + mp + ) }; aMPEAGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingNeutral.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingNeutral.java index d724326224c9..724cf5b03eab 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingNeutral.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingNeutral.java @@ -336,11 +336,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingNeutralStochastic.java index bf7920278b8e..fea5cd2a482f 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingNeutralStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingNeutralStochastic.java @@ -585,11 +585,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingPayable.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingPayable.java index bee97225aa73..2148c58dc234 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingPayable.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingPayable.java @@ -336,11 +336,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingPayableStochastic.java index 789783c8f0a6..bb5f70ecf512 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingPayableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingPayableStochastic.java @@ -585,11 +585,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingReceivable.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingReceivable.java index 33453c0c8369..122486ba39ed 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingReceivable.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingReceivable.java @@ -336,11 +336,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingReceivableStochastic.java index 0a38b30b784a..304eaf7af11e 100644 --- a/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingReceivableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/CollateralizedNettingReceivableStochastic.java @@ -585,11 +585,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralNeutral.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralNeutral.java index d4a6dba039b2..448f84725149 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralNeutral.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralNeutral.java @@ -282,12 +282,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralNeutralStochastic.java index 4a7d68bd9e24..be188f5265e1 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralNeutralStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralNeutralStochastic.java @@ -534,7 +534,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -551,11 +565,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralPayable.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralPayable.java index a3a6202ecd9e..2fee925bd3ef 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralPayable.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralPayable.java @@ -282,12 +282,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralPayableStochastic.java index 462c09fa8541..aa15cfd5b097 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralPayableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralPayableStochastic.java @@ -534,7 +534,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -551,11 +565,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralReceivable.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralReceivable.java index 0bedb0ae4d8f..a931987ba329 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralReceivable.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralReceivable.java @@ -282,12 +282,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralReceivableStochastic.java index 131d3d110401..91c87edad76a 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralReceivableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedCollateralReceivableStochastic.java @@ -535,7 +535,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -552,11 +566,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingNeutral.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingNeutral.java index 6a95b1f877d8..915c349f95bf 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingNeutral.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingNeutral.java @@ -283,11 +283,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingNeutralStochastic.java index 4eef6a0720bb..d2234077d042 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingNeutralStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingNeutralStochastic.java @@ -536,7 +536,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -553,10 +567,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingPayable.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingPayable.java index 26ce8ff53ed9..113ba6701b01 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingPayable.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingPayable.java @@ -282,11 +282,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingPayableStochastic.java index 77064834ca2c..ae9e378f378a 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingPayableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingPayableStochastic.java @@ -534,7 +534,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -551,10 +565,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingReceivable.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingReceivable.java index d0ba75062202..0091f9cc5bff 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingReceivable.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingReceivable.java @@ -282,11 +282,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingReceivableStochastic.java index fc8ef50c4693..af8bae2be091 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingReceivableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedFundingReceivableStochastic.java @@ -534,7 +534,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -551,10 +565,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingNeutral.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingNeutral.java index facb1d78dcc5..0a7193fa8666 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingNeutral.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingNeutral.java @@ -282,11 +282,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingNeutralStochastic.java index ea303f377ccd..776658fe5021 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingNeutralStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingNeutralStochastic.java @@ -534,7 +534,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -551,10 +565,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingPayable.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingPayable.java index bb6b17176439..f763d7d9ab60 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingPayable.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingPayable.java @@ -282,11 +282,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingPayableStochastic.java index 6b21cca84fae..6b340e4f327f 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingPayableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingPayableStochastic.java @@ -534,7 +534,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -551,10 +565,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingReceivable.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingReceivable.java index ae5168dc3aaa..aa8206652456 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingReceivable.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingReceivable.java @@ -282,11 +282,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingReceivableStochastic.java index 8fc03dd5d460..4f013cf2df65 100644 --- a/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingReceivableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/UncollateralizedNettingReceivableStochastic.java @@ -534,7 +534,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -551,10 +565,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralNeutral.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralNeutral.java index 81b60171ebb3..a7a05e1f905c 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralNeutral.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralNeutral.java @@ -336,12 +336,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralNeutralStochastic.java index 6d9673e5dea2..076435c550aa 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralNeutralStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralNeutralStochastic.java @@ -585,7 +585,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -602,11 +616,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralPayable.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralPayable.java index 08cbba23c6a2..d9179f2b138d 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralPayable.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralPayable.java @@ -336,12 +336,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralPayableStochastic.java index 2ecbdfa64efb..90e252c17bfe 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralPayableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralPayableStochastic.java @@ -585,7 +585,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -602,11 +616,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralReceivable.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralReceivable.java index 1429bf766b96..60b0e4992a34 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralReceivable.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralReceivable.java @@ -336,12 +336,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralReceivableStochastic.java index 19d4a3329b0a..6986b2c5d015 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralReceivableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdCollateralReceivableStochastic.java @@ -585,7 +585,21 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGPGround = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) + }; + + PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { + new PositionGroupPath ( + aCGV1, + np + ), + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( @@ -602,11 +616,6 @@ private static final ExposureAdjustmentAggregator[] Mix ( } ); - PositionGroupPath[] aCGPExtended = new PositionGroupPath[] { - new PositionGroupPath (aCGV1), - new PositionGroupPath (aCGV2) - }; - aCPGPExtended[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { new AlbaneseAndersenFundingGroupPath ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingNeutral.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingNeutral.java index be2adb6a6884..1f3928774795 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingNeutral.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingNeutral.java @@ -336,11 +336,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingNeutralStochastic.java index 8e38d572230b..ad6cd01c5bad 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingNeutralStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingNeutralStochastic.java @@ -585,11 +585,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingPayable.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingPayable.java index 78a6e8faaa82..83628546370c 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingPayable.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingPayable.java @@ -336,11 +336,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingPayableStochastic.java index 6abca70abea0..00ad2b5f70ca 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingPayableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingPayableStochastic.java @@ -586,11 +586,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingReceivable.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingReceivable.java index 01302fe97a66..9db366dbe3b8 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingReceivable.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingReceivable.java @@ -336,11 +336,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingReceivableStochastic.java index 70ea1648d2b1..7736e0ff2ab2 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingReceivableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdFundingReceivableStochastic.java @@ -585,11 +585,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingNeutral.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingNeutral.java index 94b1c66173c7..164b2e8e1c1c 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingNeutral.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingNeutral.java @@ -336,11 +336,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingNeutralStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingNeutralStochastic.java index 27e579ae2e11..7fec5f0df48f 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingNeutralStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingNeutralStochastic.java @@ -586,11 +586,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingPayable.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingPayable.java index cb1046a03677..885105b6342f 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingPayable.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingPayable.java @@ -336,11 +336,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingPayableStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingPayableStochastic.java index 9a47c8afb7e8..5023480bee18 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingPayableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingPayableStochastic.java @@ -585,11 +585,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingReceivable.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingReceivable.java index 2da0d205a114..42e9a680073e 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingReceivable.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingReceivable.java @@ -336,11 +336,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingReceivableStochastic.java b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingReceivableStochastic.java index e33439472532..8e3629da8e2d 100644 --- a/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingReceivableStochastic.java +++ b/src/main/java/org/drip/sample/xvabasel/ZeroThresholdNettingReceivableStochastic.java @@ -584,11 +584,17 @@ private static final ExposureAdjustmentAggregator[] Mix ( MarketPath np = new MarketPath (aNV); PositionGroupPath[] aCGP1 = new PositionGroupPath[] { - new PositionGroupPath (aCGV1) + new PositionGroupPath ( + aCGV1, + np + ) }; PositionGroupPath[] aCGP2 = new PositionGroupPath[] { - new PositionGroupPath (aCGV2) + new PositionGroupPath ( + aCGV2, + np + ) }; aCPGPGround[i] = new MonoPathExposureAdjustment ( diff --git a/src/main/java/org/drip/sample/xvadigest/CPGACollateralized.java b/src/main/java/org/drip/sample/xvadigest/CPGACollateralized.java index 5b443df08967..bb56f520b0c9 100644 --- a/src/main/java/org/drip/sample/xvadigest/CPGACollateralized.java +++ b/src/main/java/org/drip/sample/xvadigest/CPGACollateralized.java @@ -368,7 +368,12 @@ public static final void main ( dblValueStart = dblValueEnd; } - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xvadigest/CPGACollateralizedCorrelated.java b/src/main/java/org/drip/sample/xvadigest/CPGACollateralizedCorrelated.java index 98744f94027c..cc70582f60fa 100644 --- a/src/main/java/org/drip/sample/xvadigest/CPGACollateralizedCorrelated.java +++ b/src/main/java/org/drip/sample/xvadigest/CPGACollateralizedCorrelated.java @@ -587,7 +587,12 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xvadigest/CPGAUncollateralized.java b/src/main/java/org/drip/sample/xvadigest/CPGAUncollateralized.java index 96547d0627de..8af50ea0c913 100644 --- a/src/main/java/org/drip/sample/xvadigest/CPGAUncollateralized.java +++ b/src/main/java/org/drip/sample/xvadigest/CPGAUncollateralized.java @@ -331,7 +331,12 @@ public static final void main ( ); } - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xvadigest/CPGAUncollateralizedCorrelated.java b/src/main/java/org/drip/sample/xvadigest/CPGAUncollateralizedCorrelated.java index 816e31e4b845..4c326fe6dabd 100644 --- a/src/main/java/org/drip/sample/xvadigest/CPGAUncollateralizedCorrelated.java +++ b/src/main/java/org/drip/sample/xvadigest/CPGAUncollateralizedCorrelated.java @@ -547,7 +547,12 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xvadigest/CPGAZeroThreshold.java b/src/main/java/org/drip/sample/xvadigest/CPGAZeroThreshold.java index 8c10c9650f0f..63fd87db9a46 100644 --- a/src/main/java/org/drip/sample/xvadigest/CPGAZeroThreshold.java +++ b/src/main/java/org/drip/sample/xvadigest/CPGAZeroThreshold.java @@ -366,7 +366,12 @@ public static final void main ( dblValueStart = dblValueEnd; } - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xvadigest/CPGAZeroThresholdCorrelated.java b/src/main/java/org/drip/sample/xvadigest/CPGAZeroThresholdCorrelated.java index a65ac854f113..b1e9c561da2d 100644 --- a/src/main/java/org/drip/sample/xvadigest/CPGAZeroThresholdCorrelated.java +++ b/src/main/java/org/drip/sample/xvadigest/CPGAZeroThresholdCorrelated.java @@ -582,7 +582,12 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aHGP = new PositionGroupPath[] {new PositionGroupPath (aHGVR)}; + PositionGroupPath[] aHGP = new PositionGroupPath[] { + new PositionGroupPath ( + aHGVR, + mp + ) + }; aMPEA[i] = new MonoPathExposureAdjustment ( new AlbaneseAndersenFundingGroupPath[] { diff --git a/src/main/java/org/drip/sample/xvastrategy/FundingGroupBilateralCSA.java b/src/main/java/org/drip/sample/xvastrategy/FundingGroupBilateralCSA.java index e2bfa7f7ab4e..d4f3f4c076b5 100644 --- a/src/main/java/org/drip/sample/xvastrategy/FundingGroupBilateralCSA.java +++ b/src/main/java/org/drip/sample/xvastrategy/FundingGroupBilateralCSA.java @@ -301,9 +301,19 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aCGP1 = new PositionGroupPath[] {new PositionGroupPath (aBKV1)}; + PositionGroupPath[] aCGP1 = new PositionGroupPath[] { + new PositionGroupPath ( + aBKV1, + mp + ) + }; - PositionGroupPath[] aCGP2 = new PositionGroupPath[] {new PositionGroupPath (aBKV2)}; + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aBKV2, + mp + ) + }; AlbaneseAndersenNettingGroupPath ngpaa2014_1 = new AlbaneseAndersenNettingGroupPath ( aCGP1, diff --git a/src/main/java/org/drip/sample/xvastrategy/FundingGroupHedgeError.java b/src/main/java/org/drip/sample/xvastrategy/FundingGroupHedgeError.java index f1cb24df0e69..2d71b570beb6 100644 --- a/src/main/java/org/drip/sample/xvastrategy/FundingGroupHedgeError.java +++ b/src/main/java/org/drip/sample/xvastrategy/FundingGroupHedgeError.java @@ -307,9 +307,19 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aCGP1 = new PositionGroupPath[] {new PositionGroupPath (aBKV1)}; + PositionGroupPath[] aCGP1 = new PositionGroupPath[] { + new PositionGroupPath ( + aBKV1, + mp + ) + }; - PositionGroupPath[] aCGP2 = new PositionGroupPath[] {new PositionGroupPath (aBKV2)}; + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aBKV2, + mp + ) + }; AlbaneseAndersenNettingGroupPath ngpaa2014_1 = new AlbaneseAndersenNettingGroupPath ( aCGP1, diff --git a/src/main/java/org/drip/sample/xvastrategy/FundingGroupPerfectReplication.java b/src/main/java/org/drip/sample/xvastrategy/FundingGroupPerfectReplication.java index 21b8582c4935..f34ab8414b89 100644 --- a/src/main/java/org/drip/sample/xvastrategy/FundingGroupPerfectReplication.java +++ b/src/main/java/org/drip/sample/xvastrategy/FundingGroupPerfectReplication.java @@ -306,9 +306,19 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aCGP1 = new PositionGroupPath[] {new PositionGroupPath (aBKV1)}; + PositionGroupPath[] aCGP1 = new PositionGroupPath[] { + new PositionGroupPath ( + aBKV1, + mp + ) + }; - PositionGroupPath[] aCGP2 = new PositionGroupPath[] {new PositionGroupPath (aBKV2)}; + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aBKV2, + mp + ) + }; AlbaneseAndersenNettingGroupPath ngpaa2014_1 = new AlbaneseAndersenNettingGroupPath ( aCGP1, diff --git a/src/main/java/org/drip/sample/xvastrategy/FundingGroupSemiReplication.java b/src/main/java/org/drip/sample/xvastrategy/FundingGroupSemiReplication.java index 0250c4362c74..40fc22c282b9 100644 --- a/src/main/java/org/drip/sample/xvastrategy/FundingGroupSemiReplication.java +++ b/src/main/java/org/drip/sample/xvastrategy/FundingGroupSemiReplication.java @@ -304,9 +304,19 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aCGP1 = new PositionGroupPath[] {new PositionGroupPath (aBKV1)}; + PositionGroupPath[] aCGP1 = new PositionGroupPath[] { + new PositionGroupPath ( + aBKV1, + mp + ) + }; - PositionGroupPath[] aCGP2 = new PositionGroupPath[] {new PositionGroupPath (aBKV2)}; + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aBKV2, + mp + ) + }; AlbaneseAndersenNettingGroupPath ngpaa2014_1 = new AlbaneseAndersenNettingGroupPath ( aCGP1, diff --git a/src/main/java/org/drip/sample/xvastrategy/FundingGroupSetOff.java b/src/main/java/org/drip/sample/xvastrategy/FundingGroupSetOff.java index b5a94c240670..1b662df721f4 100644 --- a/src/main/java/org/drip/sample/xvastrategy/FundingGroupSetOff.java +++ b/src/main/java/org/drip/sample/xvastrategy/FundingGroupSetOff.java @@ -302,9 +302,19 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aCGP1 = new PositionGroupPath[] {new PositionGroupPath (aBKV1)}; + PositionGroupPath[] aCGP1 = new PositionGroupPath[] { + new PositionGroupPath ( + aBKV1, + mp + ) + }; - PositionGroupPath[] aCGP2 = new PositionGroupPath[] {new PositionGroupPath (aBKV2)}; + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aBKV2, + mp + ) + }; AlbaneseAndersenNettingGroupPath ngpaa2014_1 = new AlbaneseAndersenNettingGroupPath ( aCGP1, diff --git a/src/main/java/org/drip/sample/xvastrategy/FundingGroupUnilateralCSA.java b/src/main/java/org/drip/sample/xvastrategy/FundingGroupUnilateralCSA.java index 6d21d6d44e35..0f332d7c9225 100644 --- a/src/main/java/org/drip/sample/xvastrategy/FundingGroupUnilateralCSA.java +++ b/src/main/java/org/drip/sample/xvastrategy/FundingGroupUnilateralCSA.java @@ -301,9 +301,19 @@ public static final void main ( MarketPath mp = new MarketPath (aMV); - PositionGroupPath[] aCGP1 = new PositionGroupPath[] {new PositionGroupPath (aBKV1)}; + PositionGroupPath[] aCGP1 = new PositionGroupPath[] { + new PositionGroupPath ( + aBKV1, + mp + ) + }; - PositionGroupPath[] aCGP2 = new PositionGroupPath[] {new PositionGroupPath (aBKV2)}; + PositionGroupPath[] aCGP2 = new PositionGroupPath[] { + new PositionGroupPath ( + aBKV2, + mp + ) + }; AlbaneseAndersenNettingGroupPath ngpaa2014_1 = new AlbaneseAndersenNettingGroupPath ( aCGP1, diff --git a/src/main/java/org/drip/service/env/BuildManager.java b/src/main/java/org/drip/service/env/BuildManager.java index 05ba3fb225af..4bbd96994137 100644 --- a/src/main/java/org/drip/service/env/BuildManager.java +++ b/src/main/java/org/drip/service/env/BuildManager.java @@ -69,6 +69,11 @@ public static final boolean Init() try { s_aBuildRecord = new org.drip.service.env.BuildRecord[] { + new org.drip.service.env.BuildRecord ( + "3.37.0", + "1.8.0_112", + "Fri Mar 28 19:26:05 EST 2018" + ), new org.drip.service.env.BuildRecord ( "3.36.0", "1.8.0_112", diff --git a/src/main/java/org/drip/xva/dynamics/PathSimulator.java b/src/main/java/org/drip/xva/dynamics/PathSimulator.java index 80a9cdbc6b86..9b556fe10d0f 100644 --- a/src/main/java/org/drip/xva/dynamics/PathSimulator.java +++ b/src/main/java/org/drip/xva/dynamics/PathSimulator.java @@ -144,8 +144,10 @@ private boolean collateralGroupPathArray ( { if (!_positionGroupContainer.setCollateralGroupPath ( positionGroupIndex, - new org.drip.xva.netting.PositionGroupPath - (collateralGroupVertexArray[positionGroupIndex]))) + new org.drip.xva.netting.PositionGroupPath ( + collateralGroupVertexArray[positionGroupIndex], + marketPath + ))) return false; } diff --git a/src/main/java/org/drip/xva/netting/PositionGroupPath.java b/src/main/java/org/drip/xva/netting/PositionGroupPath.java index 2aba3a58ab53..97d5b5bc1841 100644 --- a/src/main/java/org/drip/xva/netting/PositionGroupPath.java +++ b/src/main/java/org/drip/xva/netting/PositionGroupPath.java @@ -70,21 +70,25 @@ public class PositionGroupPath { + private org.drip.xva.universe.MarketPath _marketPath = null; private org.drip.xva.hypothecation.PositionGroupVertex[] _positionGroupVertexArray = null; /** * PositionGroupPath Constructor * * @param positionGroupVertexArray The Array of Collateral Hypothecation Group Trajectory Vertexes + * @param marketPath The Market Path * * @throws java.lang.Exception Thrown if the Inputs are Invalid */ public PositionGroupPath ( - final org.drip.xva.hypothecation.PositionGroupVertex[] positionGroupVertexArray) + final org.drip.xva.hypothecation.PositionGroupVertex[] positionGroupVertexArray, + final org.drip.xva.universe.MarketPath marketPath) throws java.lang.Exception { - if (null == (_positionGroupVertexArray = positionGroupVertexArray)) + if (null == (_positionGroupVertexArray = positionGroupVertexArray) || + null == (_marketPath = marketPath)) { throw new java.lang.Exception ("PositionGroupPath Constructor => Invalid Inputs"); } @@ -122,6 +126,17 @@ public org.drip.xva.hypothecation.PositionGroupVertex[] vertexes() return _positionGroupVertexArray; } + /** + * Retrieve the Market Path + * + * @return The Market Path + */ + + public org.drip.xva.universe.MarketPath marketPath() + { + return _marketPath; + } + /** * Retrieve the Array of the Vertex Anchor Dates *