Class AndersenPykhtinSokolEnsemble

java.lang.Object
org.drip.exposure.regressiontrade.AndersenPykhtinSokolEnsemble

public class AndersenPykhtinSokolEnsemble
extends java.lang.Object
AndersenPykhtinSokolEnsemble adjusts the Variation Margin, computes Path-wise Local Volatility, and eventually estimates the Path-wise Unadjusted Variation Margin across the Suite of Simulated Paths. The References are:

  • Andersen, L. B. G., M. Pykhtin, and A. Sokol (2017): Re-thinking Margin Period of Risk https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2902737 eSSRN
  • Andersen, L. B. G., M. Pykhtin, and A. Sokol (2017): Credit Exposure in the Presence of Initial Margin https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2806156 eSSRN
  • 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 (2017): Derivatives Funding, Netting, and Accounting https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2534011 eSSRN
  • Pykhtin, M. (2009): Modeling Counter-party Credit Exposure in the Presence of Margin Agreements http://www.risk-europe.com/protected/michael-pykhtin.pdf


Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • AndersenPykhtinSokolEnsemble

      public AndersenPykhtinSokolEnsemble​(VariationMarginTradePaymentVertex marginTradePaymentGenerator, MarketPath[] marketPathArray, int[] sparseExposureDateArray) throws java.lang.Exception
      AndersenPykhtinSokolEnsemble Constructor
      Parameters:
      marginTradePaymentGenerator - The Variation Margin Estimate and the Trade Payment Generator
      marketPathArray - Array of Market Paths
      sparseExposureDateArray - Array of Sparse Exposure Dates
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • marginTradePaymentGenerator

      public VariationMarginTradePaymentVertex marginTradePaymentGenerator()
      Retrieve the Path-wise Variation Margin/Trade Payment Generator
      Returns:
      The Path-wise Variation Margin/Trade Payment Generator
    • marketPathArray

      public MarketPath[] marketPathArray()
      Retrieve the Array of Market Paths
      Returns:
      The Array of Market Paths
    • sparseExposureDateArray

      public int[] sparseExposureDateArray()
      Retrieve the Array of Sparse Exposure Dates
      Returns:
      The Array of Sparse Exposure Dates
    • pathCount

      public int pathCount()
      Retrieve the Number of Simulation Paths
      Returns:
      The Number of Simulation Paths
    • sparseExposureDateCount

      public int sparseExposureDateCount()
      Retrieve the Number of Sparse Exposure Dates
      Returns:
      The Number of Sparse Exposure Dates
    • pathAdjustedVariationMarginEstimator

      public AdjustedVariationMarginEstimator[] pathAdjustedVariationMarginEstimator()
      Generate the Path-wise Adjusted Variation Margin Estimator
      Returns:
      The Path-wise Adjusted Variation Margin Estimator
    • pathAdjustedVariationMarginEstimate

      public AdjustedVariationMarginEstimate[] pathAdjustedVariationMarginEstimate()
      Generate the Path-wise Adjusted Variation Margin Estimate
      Returns:
      The Path-wise Adjusted Variation Margin Estimate
    • ensembleAdjustedVariationMarginDynamics

      public AdjustedVariationMarginDynamics ensembleAdjustedVariationMarginDynamics()
      Generate the Ensemble Adjusted Variation Margin Dynamics
      Returns:
      The Ensemble Adjusted Variation Margin Dynamics
    • ensemblePillarDynamics

      public PykhtinPillarDynamics[] ensemblePillarDynamics()
      Generate the Ensemble Pillar Dynamics Array
      Returns:
      The Ensemble Pillar Dynamics Array
    • denseVariationMargin

      public double[][] denseVariationMargin​(LocalVolatilityGenerationControl localVolatilityGenerationControl, double[][] wanderEnsemble)
      Generate the Path-wise Dense Variation Margin Array
      Parameters:
      localVolatilityGenerationControl - Local Volatility Generation Control
      wanderEnsemble - The Wander Ensemble
      Returns:
      The Path-wise Dense Variation Margin Array
    • denseTrajectory

      public AndersenPykhtinSokolTrajectory[] denseTrajectory​(LocalVolatilityGenerationControl localVolatilityGenerationControl, double[][] wanderEnsemble)
      Generate the Dense Variation Margin Trajectory
      Parameters:
      localVolatilityGenerationControl - Local Volatility Generation Control
      wanderEnsemble - The Wander Ensemble
      Returns:
      The Dense Variation Margin Trajectory