Class PathSimulator

java.lang.Object
org.drip.xva.dynamics.PathSimulator

public class PathSimulator
extends java.lang.Object
PathSimulator drives the Simulation for various Latent States and Exposures. The References are:

  • Albanese, C., and L. Andersen (2014): Accounting for OTC Derivatives: Funding Adjustments and the Re-Hypothecation Option https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2482955 eSSRN
  • Burgard, C., and M. Kjaer (2014): PDE Representations of Derivatives with Bilateral Counter-party Risk and Funding Costs Journal of Credit Risk 7 (3) 1-19
  • Burgard, C., and M. Kjaer (2014): In the Balance Risk 24 (11) 72-75
  • Burgard, C., and M. Kjaer (2017): Derivatives Funding, Netting, and Accounting https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2534011 eSSRN
  • Piterbarg, V. (2010): Funding Beyond Discounting: Collateral Agreements and Derivatives Pricing Risk 21 (2) 97-102




Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • PathSimulator

      public PathSimulator​(int iCount, MarketVertexGenerator marketVertexGenerator, int adjustmentDigestScheme, PositionGroupContainer positionGroupContainer) throws java.lang.Exception
      PathSimulator Constructor
      Parameters:
      iCount - Path Count
      marketVertexGenerator - Market Vertex Generator
      adjustmentDigestScheme - Adjustment Digest Scheme
      positionGroupContainer - Container of Position Groups
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • UnitPositionGroupValue

      public static final PathSimulator UnitPositionGroupValue​(int iPathCount, MarketVertexGenerator marketVertexGenerator, PositionGroupContainer positionGroupContainer)
      Generate a PathSimulator Instance with the corresponding Position Group Value
      Parameters:
      iPathCount - Path Count
      marketVertexGenerator - Market Vertex Generator
      positionGroupContainer - Container of Position Groups
      Returns:
      The PathSimulator Instance
    • count

      public int count()
      Retrieve the Path Count
      Returns:
      The Path Count
    • marketVertexGenerator

      public MarketVertexGenerator marketVertexGenerator()
      Retrieve the Market Vertex Generator
      Returns:
      The Market Vertex Generator
    • adjustmentDigestScheme

      public int adjustmentDigestScheme()
      Retrieve the Adjustment Digest Scheme
      Returns:
      The Adjustment Digest Scheme
    • positionGroupContainer

      public PositionGroupContainer positionGroupContainer()
      Retrieve the Position Group Container
      Returns:
      Position Group Container
    • singleTrajectory

      public PathExposureAdjustment singleTrajectory​(MarketVertex initialMarketVertex, LatentStateWeiner latentStateWeiner)
      Generate a Single Trajectory from the Specified Initial Market Vertex and the Evolver Sequence
      Parameters:
      initialMarketVertex - The Initial Market Vertex
      latentStateWeiner - The Latent State Weiner Instance
      Returns:
      Single Trajectory Path Exposure Adjustment
    • simulate

      public ExposureAdjustmentAggregator simulate​(java.util.List<LatentStateLabel> latentStateLabelList, MarketVertex initialMarketVertex, CorrelatedPathVertexDimension correlatedPathVertexDimension)
      Simulate the Realized State/Entity Values and their Aggregates over the Paths
      Parameters:
      latentStateLabelList - Latent State Label List
      initialMarketVertex - The Initial Market Vertex
      correlatedPathVertexDimension - Path Vertex Dimension Generator
      Returns:
      The Exposure Adjustment Aggregator - Simulation Result