Skip to content

Commit

Permalink
Features:
Browse files Browse the repository at this point in the history
	- Path Simulator Market Vertex Generator (1, 2)
	- MVG - Position Group Value Generator (3)
	- Position Group Value Generator Default (4, 5)
	- Path Simulator Position Value Application (6, 7)
	- Unit Position Group Path Simulator (8, 9)
	- Path Position Group Value Generator (11, 12)
	- XVA Universe Position Tradeable Wanderer (21, 22)
	- XVA Universe Position Tradeable Manifest (23, 24)
	- Position Manifest Value Market Vertex (25, 26)
	- Position Manifest Value Change Ripple (27, 28)
	- Market Vertex Generator Position Manifest (29)
	- Path Simulator MPEA Single Trajectory (30)
	- Path Simulator Collateral Balance #1 (31, 32)
	- Path Simulator Collateral Balance #2 (33, 34)
	- Path Simulator Collateral Balance #3 (35, 36)
	- Path Simulator Collateral Balance #4 (37, 38)
	- Path Simulator Position Value #1 (39, 40)
	- Path Simulator Position Value #2 (41, 42)
	- Path Simulator Position Value #3 (43, 44)
	- Collateral Group Vertex Array #1 (45, 46)
	- Collateral Group Vertex Array #2 (47, 48)
	- Path Simulator Collateral Balance Array (49, 50)
	- Collateral Balance Position Value Arrays (51)
	- Path Simulator Collateral Group Vertex (53, 54)
	- Path Simulator Collateral Path Array (55, 56)
	- Path Simulator Realized Cash Flow (58)
	- Path Simulator Collateral Vertex Generation (59, 60)
	- XVA Dynamics Position Replication Scheme (62, 63)


Bug Fixes/Clean-up:

Samples:

	- Basel Fix Float Digest #1 (10)
	- Basel Fix Float Digest #2 (13, 14)
	- Basel Fix Float Digest #3 (15, 16)
	- Basel Fix Float Digest #4 (17, 18)
	- Basel Fix Float Digest #5 (19, 20)
	- Basel Fix Float Digest #6 (52)
	- Basel Fix Float Digest #7 (57)
	- Basel Fix Float Digest #8 (61)
  • Loading branch information
lakshmiDRIP committed Jan 15, 2018
1 parent defab1e commit f7f3229
Show file tree
Hide file tree
Showing 17 changed files with 412 additions and 271 deletions.
45 changes: 45 additions & 0 deletions ReleaseNotes/01_24_2018.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

Features:

- Path Simulator Market Vertex Generator (1, 2)
- MVG - Position Group Value Generator (3)
- Position Group Value Generator Default (4, 5)
- Path Simulator Position Value Application (6, 7)
- Unit Position Group Path Simulator (8, 9)
- Path Position Group Value Generator (11, 12)
- XVA Universe Position Tradeable Wanderer (21, 22)
- XVA Universe Position Tradeable Manifest (23, 24)
- Position Manifest Value Market Vertex (25, 26)
- Position Manifest Value Change Ripple (27, 28)
- Market Vertex Generator Position Manifest (29)
- Path Simulator MPEA Single Trajectory (30)
- Path Simulator Collateral Balance #1 (31, 32)
- Path Simulator Collateral Balance #2 (33, 34)
- Path Simulator Collateral Balance #3 (35, 36)
- Path Simulator Collateral Balance #4 (37, 38)
- Path Simulator Position Value #1 (39, 40)
- Path Simulator Position Value #2 (41, 42)
- Path Simulator Position Value #3 (43, 44)
- Collateral Group Vertex Array #1 (45, 46)
- Collateral Group Vertex Array #2 (47, 48)
- Path Simulator Collateral Balance Array (49, 50)
- Collateral Balance Position Value Arrays (51)
- Path Simulator Collateral Group Vertex (53, 54)
- Path Simulator Collateral Path Array (55, 56)
- Path Simulator Realized Cash Flow (58)
- Path Simulator Collateral Vertex Generation (59, 60)
- XVA Dynamics Position Replication Scheme (62, 63)


Bug Fixes/Clean-up:

Samples:

- Basel Fix Float Digest #1 (10)
- Basel Fix Float Digest #2 (13, 14)
- Basel Fix Float Digest #3 (15, 16)
- Basel Fix Float Digest #4 (17, 18)
- Basel Fix Float Digest #5 (19, 20)
- Basel Fix Float Digest #6 (52)
- Basel Fix Float Digest #7 (57)
- Basel Fix Float Digest #8 (61)

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private static final EvolutionTrajectoryVertex RunStep (

double dblCashAccountAccumulationFinish = cae.accumulation();

double dblAssetNumeraireFinish = mvFinish.positionValue();
double dblAssetNumeraireFinish = mvFinish.positionManifestValue();

double dblBankSeniorFundingNumeraireFinish = mvFinish.bank().seniorFundingLatentState().nodal();

Expand Down Expand Up @@ -549,7 +549,7 @@ public static final void main (
System.out.println ("\t||" +
FormatUtil.FormatDouble (1., 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (agvInitial.derivativeXVAValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[iNumVertex].positionValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[iNumVertex].positionManifestValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[iNumVertex].bank().seniorFundingLatentState().nodal(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[iNumVertex].counterParty().seniorFundingLatentState().nodal(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[iNumVertex].csaNumeraire().nodal(), 1, 6, 1.) + " | " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private static final EvolutionTrajectoryVertex RunStep (

double dblCashAccountAccumulationFinish = cae.accumulation();

double dblAssetNumeraireFinish = mvFinish.positionValue();
double dblAssetNumeraireFinish = mvFinish.positionManifestValue();

double dblBankSeniorFundingNumeraireFinish = mvFinish.bank().seniorFundingLatentState().nodal();

Expand Down Expand Up @@ -552,7 +552,7 @@ public static final void main (
System.out.println ("\t||" +
FormatUtil.FormatDouble (1., 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (agvInitial.derivativeXVAValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[iNumVertex].positionValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[iNumVertex].positionManifestValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[iNumVertex].bank().seniorFundingLatentState().nodal(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[iNumVertex].counterParty().seniorFundingLatentState().nodal(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[iNumVertex].csaNumeraire().nodal(), 1, 6, 1.) + " | " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private static final EvolutionTrajectoryVertex RunStep (
System.out.println ("\t||" +
FormatUtil.FormatDouble (dblTime, 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (dblDerivativeXVAValueFinish, 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (mvFinish.positionValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (mvFinish.positionManifestValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (dblBankSeniorFundingNumeraireFinish, 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (dblCounterPartyFundingNumeraireFinish, 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (mvFinish.csaNumeraire().nodal(), 1, 6, 1.) + " | " +
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/drip/sample/burgard2011/XVAExplain.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private static final EvolutionTrajectoryVertex RunStep (

double dblCashAccountAccumulationFinish = cae.accumulation();

double dblAssetNumeraireFinish = mvFinish.positionValue();
double dblAssetNumeraireFinish = mvFinish.positionManifestValue();

double dblBankSeniorFundingNumeraireFinish = mvFinish.bank().seniorFundingLatentState().nodal();

Expand Down Expand Up @@ -550,7 +550,7 @@ public static void main (
System.out.println ("\t||" +
FormatUtil.FormatDouble (1., 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (agvInitial.derivativeXVAValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[aMV.length - 1].positionValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[aMV.length - 1].positionManifestValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (1., 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (1., 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (1., 1, 6, 1.) + " | " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public static final void main (
for (int i = 0; i < aMV.length; ++i)
System.out.println (
"\t|| " + aMV[i].anchorDate() + " => " +
FormatUtil.FormatDouble (aMV[i].positionValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[i].positionManifestValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[i].overnightRate(), 1, 2, 100.) + "% | " +
FormatUtil.FormatDouble (aMV[i].overnightNumeraire().nodal(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[i].csaRate(), 1, 2, 100.) + "% | " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private static final EvolutionTrajectoryVertex RunStep (

double dblCashAccountAccumulationFinish = cae.accumulation();

double dblAssetNumeraireFinish = mvFinish.positionValue();
double dblAssetNumeraireFinish = mvFinish.positionManifestValue();

double dblBankSeniorFundingNumeraireFinish = mvFinish.bank().seniorFundingLatentState().nodal();

Expand Down Expand Up @@ -549,7 +549,7 @@ public static void main (
System.out.println ("\t||" +
FormatUtil.FormatDouble (1., 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (agvInitial.derivativeXVAValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[aMV.length - 1].positionValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMV[aMV.length - 1].positionManifestValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (1., 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (1., 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (1., 1, 6, 1.) + " | " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public static final void main (
System.out.println ("\t||" +
FormatUtil.FormatDouble (1., 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (agvInitial.derivativeXVAValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMVBase[aMV.length - 1].positionValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMVBase[aMV.length - 1].positionManifestValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMVBase[aMV.length - 1].bank().seniorFundingLatentState().nodal(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMVBase[aMV.length - 1].counterParty().seniorFundingLatentState().nodal(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMVBase[aMV.length - 1].csaNumeraire().nodal(), 1, 6, 1.) + " | " +
Expand Down Expand Up @@ -467,7 +467,7 @@ public static final void main (
System.out.println ("\t||" +
FormatUtil.FormatDouble (etv.time(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (etv.positionGreekVertex().derivativeXVAValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMVBase[i].positionValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMVBase[i].positionManifestValue(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMVBase[i].bank().seniorFundingLatentState().nodal(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMVBase[i].counterParty().seniorFundingLatentState().nodal(), 1, 6, 1.) + " | " +
FormatUtil.FormatDouble (aMVBase[i].csaNumeraire().nodal(), 1, 6, 1.) + " | " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package org.drip.sample.xvasimulation;

import org.drip.analytics.date.*;
import org.drip.function.definition.R1ToR1;
import org.drip.measure.dynamics.*;
import org.drip.measure.process.*;
import org.drip.measure.statistics.UnivariateDiscreteThin;
Expand Down Expand Up @@ -123,10 +124,9 @@ private static final TradeablesContainer GenerateTradeablesContainer (

Tradeable tAsset = new Tradeable (
new DiffusionEvolver (
DiffusionEvaluatorLinearFader.Standard (
DiffusionEvaluatorLinear.Standard (
dblAssetNumeraireDrift,
dblAssetNumeraireVolatility,
iTerminationDate
dblAssetNumeraireVolatility
)
),
dblAssetNumeraireRepo
Expand Down Expand Up @@ -358,6 +358,13 @@ public static final void main (

JulianDate dtSpot = DateUtil.Today();

JulianDate terminationDate = dtSpot;

for (int i = 0; i < eventCount; ++i)
terminationDate = terminationDate.addTenor (eventTenor);

final int maturityDate = terminationDate.julian();

/*
* Group Settings
*/
Expand All @@ -379,7 +386,18 @@ public static final void main (
dblBankThreshold
),
CounterPartyGroupSpecification.Standard ("CPGROUP")
)
),
new R1ToR1 (null)
{
@Override public double evaluate (
final double dblDate)
throws Exception
{
double dblTimeToHorizon = 1. * (maturityDate - dblDate) / 365.25;

return dblTimeToHorizon > 0. ? dblTimeToHorizon : 0.;
}
}
);

MarketVertex initialMarketVertex = MarketVertex.StartUp (
Expand Down
Loading

0 comments on commit f7f3229

Please sign in to comment.