@@ -143,9 +143,9 @@ public org.drip.analytics.date.JulianDate[] anchorDates()
143
143
}
144
144
145
145
/**
146
- * Retrieve the Array of Collateralized Exposures
146
+ * Retrieve the Array of Vertex Collateralized Exposures
147
147
*
148
- * @return The Array of Collateralized Exposures
148
+ * @return The Array of Vertex Collateralized Exposures
149
149
*/
150
150
151
151
public double [] collateralizedExposure ()
@@ -175,9 +175,9 @@ public double[] collateralizedExposure()
175
175
}
176
176
177
177
/**
178
- * Retrieve the Array of Collateralized Exposure PV
178
+ * Retrieve the Array of Vertex Collateralized Exposure PV
179
179
*
180
- * @return The Array of Collateralized Exposure PV
180
+ * @return The Array of Vertex Collateralized Exposure PV
181
181
*/
182
182
183
183
public double [] collateralizedExposurePV ()
@@ -210,9 +210,9 @@ public double[] collateralizedExposurePV()
210
210
}
211
211
212
212
/**
213
- * Retrieve the Array of Collateralized Positive Exposures
213
+ * Retrieve the Array of Vertex Collateralized Positive Exposures
214
214
*
215
- * @return The Array of Collateralized Positive Exposures
215
+ * @return The Array of Vertex Collateralized Positive Exposures
216
216
*/
217
217
218
218
public double [] collateralizedPositiveExposure ()
@@ -247,9 +247,9 @@ public double[] collateralizedPositiveExposure()
247
247
}
248
248
249
249
/**
250
- * Retrieve the Array of Collateralized Positive Exposure PV
250
+ * Retrieve the Array of Vertex Collateralized Positive Exposure PV
251
251
*
252
- * @return The Array of Collateralized Positive Exposures PV
252
+ * @return The Array of Vertex Collateralized Positive Exposures PV
253
253
*/
254
254
255
255
public double [] collateralizedPositiveExposurePV ()
@@ -287,9 +287,9 @@ public double[] collateralizedPositiveExposurePV()
287
287
}
288
288
289
289
/**
290
- * Retrieve the Array of Collateralized Negative Exposures
290
+ * Retrieve the Array of Vertex Collateralized Negative Exposures
291
291
*
292
- * @return The Array of Collateralized Negative Exposures
292
+ * @return The Array of Vertex Collateralized Negative Exposures
293
293
*/
294
294
295
295
public double [] collateralizedNegativeExposure ()
@@ -324,9 +324,9 @@ public double[] collateralizedNegativeExposure()
324
324
}
325
325
326
326
/**
327
- * Retrieve the Array of Collateralized Negative Exposure PV
327
+ * Retrieve the Array of Vertex Collateralized Negative Exposure PV
328
328
*
329
- * @return The Array of Collateralized Negative Exposure PV
329
+ * @return The Array of Vertex Collateralized Negative Exposure PV
330
330
*/
331
331
332
332
public double [] collateralizedNegativeExposurePV ()
@@ -364,9 +364,9 @@ public double[] collateralizedNegativeExposurePV()
364
364
}
365
365
366
366
/**
367
- * Retrieve the Array of Uncollateralized Exposures
367
+ * Retrieve the Array of Vertex Uncollateralized Exposures
368
368
*
369
- * @return The Array of Uncollateralized Exposures
369
+ * @return The Array of Vertex Uncollateralized Exposures
370
370
*/
371
371
372
372
public double [] uncollateralizedExposure ()
@@ -396,9 +396,9 @@ public double[] uncollateralizedExposure()
396
396
}
397
397
398
398
/**
399
- * Retrieve the Array of Uncollateralized Exposure PV
399
+ * Retrieve the Array of Vertex Uncollateralized Exposure PV
400
400
*
401
- * @return The Array of Uncollateralized Exposure PV
401
+ * @return The Array of Vertex Uncollateralized Exposure PV
402
402
*/
403
403
404
404
public double [] uncollateralizedExposurePV ()
@@ -431,9 +431,9 @@ public double[] uncollateralizedExposurePV()
431
431
}
432
432
433
433
/**
434
- * Retrieve the Array of Uncollateralized Positive Exposures
434
+ * Retrieve the Array of Vertex Uncollateralized Positive Exposures
435
435
*
436
- * @return The Array of Uncollateralized Positive Exposures
436
+ * @return The Array of Vertex Uncollateralized Positive Exposures
437
437
*/
438
438
439
439
public double [] uncollateralizedPositiveExposure ()
@@ -467,9 +467,9 @@ public double[] uncollateralizedPositiveExposure()
467
467
}
468
468
469
469
/**
470
- * Retrieve the Array of Uncollateralized Positive Exposure PV
470
+ * Retrieve the Array of Vertex Uncollateralized Positive Exposure PV
471
471
*
472
- * @return The Array of Uncollateralized Positive Exposure PV
472
+ * @return The Array of Vertex Uncollateralized Positive Exposure PV
473
473
*/
474
474
475
475
public double [] uncollateralizedPositiveExposurePV ()
@@ -507,9 +507,9 @@ public double[] uncollateralizedPositiveExposurePV()
507
507
}
508
508
509
509
/**
510
- * Retrieve the Array of Uncollateralized Negative Exposures
510
+ * Retrieve the Array of Vertex Uncollateralized Negative Exposures
511
511
*
512
- * @return The Array of Uncollateralized Negative Exposures
512
+ * @return The Array of Vertex Uncollateralized Negative Exposures
513
513
*/
514
514
515
515
public double [] uncollateralizedNegativeExposure ()
@@ -544,9 +544,9 @@ public double[] uncollateralizedNegativeExposure()
544
544
}
545
545
546
546
/**
547
- * Retrieve the Array of Uncollateralized Negative Exposure PV
547
+ * Retrieve the Array of Vertex Uncollateralized Negative Exposure PV
548
548
*
549
- * @return The Array of Uncollateralized Negative Exposure PV
549
+ * @return The Array of Vertex Uncollateralized Negative Exposure PV
550
550
*/
551
551
552
552
public double [] uncollateralizedNegativeExposurePV ()
@@ -584,9 +584,9 @@ public double[] uncollateralizedNegativeExposurePV()
584
584
}
585
585
586
586
/**
587
- * Retrieve the Array of Collateral Balances
587
+ * Retrieve the Array of Vertex Collateral Balances
588
588
*
589
- * @return The Array of Collateral Balances
589
+ * @return The Array of Vertex Collateral Balances
590
590
*/
591
591
592
592
public double [] collateralBalance ()
@@ -616,9 +616,9 @@ public double[] collateralBalance()
616
616
}
617
617
618
618
/**
619
- * Retrieve the Array of Credit Exposures
619
+ * Retrieve the Array of Vertex Credit Exposures
620
620
*
621
- * @return The Array of Credit Exposures
621
+ * @return The Array of Vertex Credit Exposures
622
622
*/
623
623
624
624
public double [] creditExposure ()
@@ -648,9 +648,9 @@ public double[] creditExposure()
648
648
}
649
649
650
650
/**
651
- * Retrieve the Array of Credit Exposure PV
651
+ * Retrieve the Array of Vertex Credit Exposure PV
652
652
*
653
- * @return The Array of Credit Exposure PV
653
+ * @return The Array of Vertex Credit Exposure PV
654
654
*/
655
655
656
656
public double [] creditExposurePV ()
@@ -683,9 +683,9 @@ public double[] creditExposurePV()
683
683
}
684
684
685
685
/**
686
- * Retrieve the Array of Debt Exposures
686
+ * Retrieve the Array of Vertex Debt Exposures
687
687
*
688
- * @return The Array of Debt Exposures
688
+ * @return The Array of Vertex Debt Exposures
689
689
*/
690
690
691
691
public double [] debtExposure ()
@@ -714,9 +714,9 @@ public double[] debtExposure()
714
714
}
715
715
716
716
/**
717
- * Retrieve the Array of Debt Exposure PV
717
+ * Retrieve the Array of Vertex Debt Exposure PV
718
718
*
719
- * @return The Array of Debt Exposure PV
719
+ * @return The Array of Vertex Debt Exposure PV
720
720
*/
721
721
722
722
public double [] debtExposurePV ()
@@ -748,9 +748,9 @@ public double[] debtExposurePV()
748
748
}
749
749
750
750
/**
751
- * Retrieve the Array of Funding Exposures
751
+ * Retrieve the Array of Vertex Funding Exposures
752
752
*
753
- * @return The Array of Funding Exposures
753
+ * @return The Array of Vertex Funding Exposures
754
754
*/
755
755
756
756
public double [] fundingExposure ()
@@ -780,9 +780,9 @@ public double[] fundingExposure()
780
780
}
781
781
782
782
/**
783
- * Retrieve the Array of Funding Exposure PV
783
+ * Retrieve the Array of Vertex Funding Exposure PV
784
784
*
785
- * @return The Array of Funding Exposure PV
785
+ * @return The Array of Vertex Funding Exposure PV
786
786
*/
787
787
788
788
public double [] fundingExposurePV ()
@@ -814,43 +814,6 @@ public double[] fundingExposurePV()
814
814
return fundingExposurePV ;
815
815
}
816
816
817
- /**
818
- * Compute Period-wise Path Bilateral Collateral Value Adjustment
819
- *
820
- * @return The Period-wise Path Bilateral Collateral Value Adjustment
821
- */
822
-
823
- public double [] periodBilateralCollateralValueAdjustment ()
824
- {
825
- org .drip .xva .universe .MarketVertex [] marketVertexArray = _marketPath .vertexes ();
826
-
827
- double [] collateralBalance = collateralBalance ();
828
-
829
- int vertexCount = collateralBalance .length ;
830
- double [] periodBilateralCollateralValueAdjustment = new double [vertexCount - 1 ];
831
-
832
- for (int vertexIndex = 1 ; vertexIndex < vertexCount ; ++vertexIndex )
833
- {
834
- double periodIntegrandStart = collateralBalance [vertexIndex - 1 ] *
835
- marketVertexArray [vertexIndex - 1 ].dealer ().survivalProbability () *
836
- marketVertexArray [vertexIndex - 1 ].client ().survivalProbability () *
837
- marketVertexArray [vertexIndex - 1 ].csaSpread () *
838
- marketVertexArray [vertexIndex - 1 ].overnightReplicator ();
839
-
840
- double periodIntegrandEnd = collateralBalance [vertexIndex ] *
841
- marketVertexArray [vertexIndex ].dealer ().survivalProbability () *
842
- marketVertexArray [vertexIndex ].client ().survivalProbability () *
843
- marketVertexArray [vertexIndex ].csaSpread () *
844
- marketVertexArray [vertexIndex ].overnightReplicator ();
845
-
846
- periodBilateralCollateralValueAdjustment [vertexIndex - 1 ] = -0.5 * (periodIntegrandStart +
847
- periodIntegrandEnd ) * (marketVertexArray [vertexIndex ].anchorDate ().julian () -
848
- marketVertexArray [vertexIndex - 1 ].anchorDate ().julian ()) / 365.25 ;
849
- }
850
-
851
- return periodBilateralCollateralValueAdjustment ;
852
- }
853
-
854
817
/**
855
818
* Compute Period-wise Path Collateral Value Adjustment
856
819
*
@@ -885,58 +848,4 @@ public double[] periodCollateralValueAdjustment()
885
848
886
849
return periodCollateralValueAdjustment ;
887
850
}
888
-
889
- /**
890
- * Compute Path Bilateral Collateral Value Adjustment
891
- *
892
- * @return The Path Bilateral Collateral Value Adjustment
893
- *
894
- * @throws java.lang.Exception Thrown if the Inputs are Invalid
895
- */
896
-
897
- public double bilateralCollateralAdjustment ()
898
- throws java .lang .Exception
899
- {
900
- org .drip .xva .universe .MarketVertex [] marketVertexArray = _marketPath .vertexes ();
901
-
902
- double [] collateralBalance = collateralBalance ();
903
-
904
- double bilateralCollateralValueAdjustment = 0. ;
905
- int vertexCount = collateralBalance .length ;
906
-
907
- for (int vertexIndex = 1 ; vertexIndex < vertexCount ; ++vertexIndex )
908
- {
909
- double periodIntegrandStart = collateralBalance [vertexIndex - 1 ] *
910
- marketVertexArray [vertexIndex - 1 ].dealer ().survivalProbability () *
911
- marketVertexArray [vertexIndex - 1 ].client ().survivalProbability () *
912
- marketVertexArray [vertexIndex - 1 ].csaSpread () *
913
- marketVertexArray [vertexIndex - 1 ].overnightReplicator ();
914
-
915
- double periodIntegrandEnd = collateralBalance [vertexIndex ] *
916
- marketVertexArray [vertexIndex ].dealer ().survivalProbability () *
917
- marketVertexArray [vertexIndex ].client ().survivalProbability () *
918
- marketVertexArray [vertexIndex ].csaSpread () *
919
- marketVertexArray [vertexIndex ].overnightReplicator ();
920
-
921
- bilateralCollateralValueAdjustment -= 0.5 * (periodIntegrandStart + periodIntegrandEnd ) *
922
- (marketVertexArray [vertexIndex ].anchorDate ().julian () -
923
- marketVertexArray [vertexIndex - 1 ].anchorDate ().julian ()) / 365.25 ;
924
- }
925
-
926
- return bilateralCollateralValueAdjustment ;
927
- }
928
-
929
- /**
930
- * Compute Path Collateral Value Adjustment
931
- *
932
- * @return The Path Collateral Value Adjustment
933
- *
934
- * @throws java.lang.Exception Thrown if the Inputs are Invalid
935
- */
936
-
937
- public double collateralAdjustment ()
938
- throws java .lang .Exception
939
- {
940
- return bilateralCollateralAdjustment ();
941
- }
942
851
}
0 commit comments