-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Smoothing vs Shape Preserving Investigations (7, 8) - Convert Default Builds to SMOOTH (9, 10) - Natve Forward IE EI #1 (15, 16) - Natve Forward IE EI #2 (17, 18) - Latent State Tradeable - Shell Implementation (22) - Latent State Tradeable - Repo Rate (23) - Latent State Tradeable - Cash Rate (24) - Tradeable Latent State Evolver Contructor (26, 27, 28) - Latent State Evolver Tradeable Instance (29, 30) - Tradeable Security Repoable Indicator Flag (31) - Primary Security Container Position #1 (33, 34) - Primary Security Container Position #2 (35, 36) - XVA Equity Primary Security Evolver (43) - Scaling Numeraire XVA Evolver Shell (44) - Scaling Numeraire XVA Diffusive Evolver (45) - Scaling Numeraire XVA Evolver Constructor (46, 47) - XVA Evolver Primary Security Numeraire (48) - XVA Evolver Primary Security Label (49, 50) Bug Fixes/Clean-up: - Switch Funding Default -> Financial Spline (11, 12) - Tradeable Latent State Evolver Rename (25) - Tradeable to Primary Security Conversion (32) - XVA Securities and State Evolvers (37) - Primary Security Latent State Evolvers (38, 39) - XVA Latent State Evolution Container (40) - Terminal XVA Latent State Evolver (41, 42) - Vertex Date Builder Analytics Support (44) Samples: - Aizawl Bond Metrics #1 (1, 2) - Aizawl Bond Metrics #2 (3, 4) - Aizawl Bond Metrics #3 (5, 6) - QUARTIC/QUINTIC Funding Spline Curves (13, 14) - Aizawl Bond Metrics #4 (19, 20, 21) - Correlated Numeraire XVA Attribution (51, 52) - Correlated Numeraire XVA Greeks (53, 54) - Correlated Numeraire XVA Explain (55, 56) - Correlated Numeraire XVA Replication Portfolio (57, 58) - Burgard 2011 XVA Explain (59, 60) - Burgard 2011 XVA Greeks (61, 62) - Burgard 2011 XVA Market Generation (63, 64) - Burgard 2011 XVA Replication Portfolio (65, 66)
- Loading branch information
1 parent
abd7172
commit 9b5f783
Showing
29 changed files
with
1,554 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
Features: | ||
|
||
- Smoothing vs Shape Preserving Investigations (7, 8) | ||
- Convert Default Builds to SMOOTH (9, 10) | ||
- Natve Forward IE EI #1 (15, 16) | ||
- Natve Forward IE EI #2 (17, 18) | ||
- Latent State Tradeable - Shell Implementation (22) | ||
- Latent State Tradeable - Repo Rate (23) | ||
- Latent State Tradeable - Cash Rate (24) | ||
- Tradeable Latent State Evolver Contructor (26, 27, 28) | ||
- Latent State Evolver Tradeable Instance (29, 30) | ||
- Tradeable Security Repoable Indicator Flag (31) | ||
- Primary Security Container Position #1 (33, 34) | ||
- Primary Security Container Position #2 (35, 36) | ||
- XVA Equity Primary Security Evolver (43) | ||
- Scaling Numeraire XVA Evolver Shell (44) | ||
- Scaling Numeraire XVA Diffusive Evolver (45) | ||
- Scaling Numeraire XVA Evolver Constructor (46, 47) | ||
- XVA Evolver Primary Security Numeraire (48) | ||
- XVA Evolver Primary Security Label (49, 50) | ||
|
||
|
||
Bug Fixes/Clean-up: | ||
|
||
- Switch Funding Default -> Financial Spline (11, 12) | ||
- Tradeable Latent State Evolver Rename (25) | ||
- Tradeable to Primary Security Conversion (32) | ||
- XVA Securities and State Evolvers (37) | ||
- Primary Security Latent State Evolvers (38, 39) | ||
- XVA Latent State Evolution Container (40) | ||
- Terminal XVA Latent State Evolver (41, 42) | ||
- Vertex Date Builder Analytics Support (44) | ||
|
||
|
||
Samples: | ||
|
||
- Aizawl Bond Metrics #1 (1, 2) | ||
- Aizawl Bond Metrics #2 (3, 4) | ||
- Aizawl Bond Metrics #3 (5, 6) | ||
- QUARTIC/QUINTIC Funding Spline Curves (13, 14) | ||
- Aizawl Bond Metrics #4 (19, 20, 21) | ||
- Correlated Numeraire XVA Attribution (51, 52) | ||
- Correlated Numeraire XVA Greeks (53, 54) | ||
- Correlated Numeraire XVA Explain (55, 56) | ||
- Correlated Numeraire XVA Replication Portfolio (57, 58) | ||
- Burgard 2011 XVA Explain (59, 60) | ||
- Burgard 2011 XVA Greeks (61, 62) | ||
- Burgard 2011 XVA Market Generation (63, 64) | ||
- Burgard 2011 XVA Replication Portfolio (65, 66) |
2 changes: 1 addition & 1 deletion
2
.../drip/xva/universe/VertexDateBuilder.java → .../analytics/support/VertexDateBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,247 @@ | ||
|
||
package org.drip.sample.bondmetrics; | ||
|
||
import org.drip.analytics.date.*; | ||
import org.drip.product.creator.BondBuilder; | ||
import org.drip.product.credit.BondComponent; | ||
import org.drip.service.env.EnvManager; | ||
import org.drip.service.scenario.*; | ||
|
||
/* | ||
* -*- 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. | ||
*/ | ||
|
||
/** | ||
* Aizawl demonstrates the Analytics Calculation/Reconciliation for the Bond Aizawl. | ||
* | ||
* @author Lakshmi Krishnamurthy | ||
*/ | ||
|
||
public class Aizawl { | ||
|
||
public static final void main ( | ||
final String[] astArgs) | ||
throws Exception | ||
{ | ||
EnvManager.InitEnv ( | ||
"", | ||
true | ||
); | ||
|
||
JulianDate dtSpot = DateUtil.CreateFromYMD ( | ||
2018, | ||
DateUtil.JANUARY, | ||
30 | ||
); | ||
|
||
String[] astrDepositTenor = new String[] { | ||
"2D" | ||
}; | ||
|
||
double[] adblDepositQuote = new double[] { | ||
0.0130411 // 2D | ||
}; | ||
|
||
double[] adblFuturesQuote = new double[] { | ||
0.01345, // 98.655 | ||
0.01470, // 98.530 | ||
0.01575, // 98.425 | ||
0.01660, // 98.340 | ||
0.01745, // 98.255 | ||
0.01845 // 98.155 | ||
}; | ||
|
||
String[] astrFixFloatTenor = new String[] { | ||
"02Y", | ||
"03Y", | ||
"04Y", | ||
"05Y", | ||
"06Y", | ||
"07Y", | ||
"08Y", | ||
"09Y", | ||
"10Y", | ||
"11Y", | ||
"12Y", | ||
"15Y", | ||
"20Y", | ||
"25Y", | ||
"30Y", | ||
"40Y", | ||
"50Y" | ||
}; | ||
|
||
String[] astrGovvieTenor = new String[] { | ||
"1Y", | ||
"2Y", | ||
"3Y", | ||
"5Y", | ||
"7Y", | ||
"10Y", | ||
"20Y", | ||
"30Y" | ||
}; | ||
|
||
double[] adblFixFloatQuote = new double[] { | ||
0.016410, // 2Y | ||
0.017863, // 3Y | ||
0.019030, // 4Y | ||
0.020035, // 5Y | ||
0.020902, // 6Y | ||
0.021660, // 7Y | ||
0.022307, // 8Y | ||
0.022879, // 9Y | ||
0.023363, // 10Y | ||
0.023820, // 11Y | ||
0.024172, // 12Y | ||
0.024934, // 15Y | ||
0.025581, // 20Y | ||
0.025906, // 25Y | ||
0.025973, // 30Y | ||
0.025838, // 40Y | ||
0.025560 // 50Y | ||
}; | ||
|
||
double[] adblGovvieYield = new double[] { | ||
0.01219, // 1Y | ||
0.01391, // 2Y | ||
0.01590, // 3Y | ||
0.01937, // 5Y | ||
0.02200, // 7Y | ||
0.02378, // 10Y | ||
0.02677, // 20Y | ||
0.02927 // 30Y | ||
}; | ||
|
||
String[] astrCreditTenor = new String[] { | ||
"06M", | ||
"01Y", | ||
"02Y", | ||
"03Y", | ||
"04Y", | ||
"05Y", | ||
"07Y", | ||
"10Y" | ||
}; | ||
|
||
double[] adblCreditQuote = new double[] { | ||
60., // 6M | ||
68., // 1Y | ||
88., // 2Y | ||
102., // 3Y | ||
121., // 4Y | ||
138., // 5Y | ||
168., // 7Y | ||
188. // 10Y | ||
}; | ||
|
||
double dblFX = 1.; | ||
int iSettleLag = 3; | ||
int iCouponFreq = 2; | ||
String strName = "Aizawl"; | ||
double dblCleanPrice = 1.028625; | ||
double dblIssuePrice = 1.; | ||
String strCurrency = "USD"; | ||
double dblSpreadBump = 20.; | ||
double dblCouponRate = 0.05; | ||
double dblIssueAmount = 1.0; | ||
String strTreasuryCode = "UST"; | ||
String strCouponDayCount = "30/360"; | ||
double dblSpreadDurationMultiplier = 5.; | ||
|
||
JulianDate dtEffective = DateUtil.CreateFromYMD ( | ||
2017, | ||
9, | ||
21 | ||
); | ||
|
||
JulianDate dtMaturity = DateUtil.CreateFromYMD ( | ||
2037, | ||
3, | ||
21 | ||
); | ||
|
||
BondComponent bond = BondBuilder.CreateSimpleFixed ( | ||
strName, | ||
strCurrency, | ||
strName, | ||
dblCouponRate, | ||
iCouponFreq, | ||
strCouponDayCount, | ||
dtEffective, | ||
dtMaturity, | ||
null, | ||
null | ||
); | ||
|
||
BondReplicator abr = BondReplicator.CorporateSenior ( | ||
dblCleanPrice, | ||
dblIssuePrice, | ||
dblIssueAmount, | ||
dtSpot, | ||
astrDepositTenor, | ||
adblDepositQuote, | ||
adblFuturesQuote, | ||
astrFixFloatTenor, | ||
adblFixFloatQuote, | ||
dblSpreadBump, | ||
dblSpreadDurationMultiplier, | ||
strTreasuryCode, | ||
astrGovvieTenor, | ||
adblGovvieYield, | ||
astrCreditTenor, | ||
adblCreditQuote, | ||
dblFX, | ||
Double.NaN, | ||
iSettleLag, | ||
bond | ||
); | ||
|
||
BondReplicationRun abrr = abr.generateRun(); | ||
|
||
System.out.println (abrr.display()); | ||
|
||
EnvManager.TerminateEnv(); | ||
} | ||
} |
Oops, something went wrong.