Class CapitalUnitPathEnsemble

java.lang.Object
org.drip.capital.simulation.CapitalUnitPathEnsemble
All Implemented Interfaces:
EnsemblePnLDistributionGenerator, PathEnsemble
Direct Known Subclasses:
CapitalSegmentPathEnsemble

public class CapitalUnitPathEnsemble
extends java.lang.Object
implements PathEnsemble
CapitalUnitPathEnsemble generates the Ensemble of Capital Paths from the Simulation PnL Realizations for the specified Capital Unit. The References are:

  • Bank for International Supervision(2005): Stress Testing at Major Financial Institutions: Survey Results and Practice https://www.bis.org/publ/cgfs24.htm
  • Glasserman, P. (2004): Monte Carlo Methods in Financial Engineering Springer
  • Kupiec, P. H. (2000): Stress Tests and Risk Capital Risk 2 (4) 27-39


Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • CapitalUnitPathEnsemble

      public CapitalUnitPathEnsemble()
      CapitalUnitPathEnsemble Constructor
  • Method Details

    • pathPnLRealizationList

      public java.util.List<PathPnLRealization> pathPnLRealizationList()
      Retrieve the Path PnL Realization List
      Returns:
      The Path PnL Realization List
    • pathPnLRealizationArray

      public PathPnLRealization[] pathPnLRealizationArray()
      Retrieve the Path PnL Realization Array
      Returns:
      The Path PnL Realization Array
    • addPathPnLRealization

      public boolean addPathPnLRealization​(PathPnLRealization pathPnLRealization)
      Description copied from interface: PathEnsemble
      Add the specified Path PnL Realization
      Specified by:
      addPathPnLRealization in interface PathEnsemble
      Parameters:
      pathPnLRealization - Path PnL Realization
      Returns:
      The Path PnL Realization successfully added
    • pnlListMap

      public java.util.Map<java.lang.Double,​java.util.List<java.lang.Integer>> pnlListMap()
      Description copied from interface: PathEnsemble
      Retrieve the PnL List Map
      Specified by:
      pnlListMap in interface PathEnsemble
      Returns:
      The PnL List Map
    • systemicEventIncidenceCountMap

      public java.util.Map<java.lang.String,​java.lang.Integer> systemicEventIncidenceCountMap()
      Description copied from interface: PathEnsemble
      Retrieve the Systemic Event Incidence Count Map
      Specified by:
      systemicEventIncidenceCountMap in interface PathEnsemble
      Returns:
      The Systemic Event Incidence Count Map
    • idiosyncraticEventIncidenceCountMap

      public java.util.Map<java.lang.String,​java.lang.Integer> idiosyncraticEventIncidenceCountMap()
      Description copied from interface: PathEnsemble
      Retrieve the Idiosyncratic Event Incidence Count Map
      Specified by:
      idiosyncraticEventIncidenceCountMap in interface PathEnsemble
      Returns:
      The Idiosyncratic Event Incidence Count Map
    • count

      public int count()
      Description copied from interface: PathEnsemble
      Retrieve the Number of Paths Simulated
      Specified by:
      count in interface PathEnsemble
      Returns:
      The Number of Paths Simulated
    • systemicEventIncidenceCount

      public int systemicEventIncidenceCount​(java.lang.String event)
      Description copied from interface: PathEnsemble
      Retrieve the Occurrence Count for the specified Systemic Event
      Specified by:
      systemicEventIncidenceCount in interface PathEnsemble
      Parameters:
      event - The Systemic Event
      Returns:
      Occurrence Count for the specified Systemic Event
    • idiosyncraticEventIncidenceCount

      public int idiosyncraticEventIncidenceCount​(java.lang.String event)
      Description copied from interface: PathEnsemble
      Retrieve the Occurrence Count for the specified Idiosyncratic Event
      Specified by:
      idiosyncraticEventIncidenceCount in interface PathEnsemble
      Parameters:
      event - The Idiosyncratic Event
      Returns:
      Occurrence Count for the specified Idiosyncratic Event
    • var

      public double var​(int confidenceCount) throws java.lang.Exception
      Description copied from interface: PathEnsemble
      Compute VaR given the Confidence Level by Count
      Specified by:
      var in interface PathEnsemble
      Parameters:
      confidenceCount - Confidence Level by Count
      Returns:
      VaR
      Throws:
      java.lang.Exception - Thrown if the VaR cannot be computed
    • var

      public double var​(double confidenceLevel) throws java.lang.Exception
      Description copied from interface: PathEnsemble
      Compute VaR given the Confidence Level by Percentage
      Specified by:
      var in interface PathEnsemble
      Parameters:
      confidenceLevel - Confidence Level by Percentage
      Returns:
      VaR
      Throws:
      java.lang.Exception - Thrown if the VaR cannot be computed
    • expectedShortfall

      public double expectedShortfall​(int confidenceCount) throws java.lang.Exception
      Description copied from interface: PathEnsemble
      Compute Expected Short-fall given the Confidence Level by Count
      Specified by:
      expectedShortfall in interface PathEnsemble
      Parameters:
      confidenceCount - Confidence Level by Count
      Returns:
      Expected Short-fall
      Throws:
      java.lang.Exception - Thrown if the VaR cannot be computed
    • expectedShortfall

      public double expectedShortfall​(double confidenceLevel) throws java.lang.Exception
      Description copied from interface: PathEnsemble
      Compute Expected Short-fall given the Confidence Level by Percentage
      Specified by:
      expectedShortfall in interface PathEnsemble
      Parameters:
      confidenceLevel - Confidence Level by Percentage
      Returns:
      Expected Short-fall
      Throws:
      java.lang.Exception - Thrown if the VaR cannot be computed
    • pnlAttribution

      public CapitalUnitPnLAttribution pnlAttribution​(int confidenceCount)
      Description copied from interface: PathEnsemble
      Construct the Contributing PnL Attribution given the Confidence Level by Count
      Specified by:
      pnlAttribution in interface PathEnsemble
      Parameters:
      confidenceCount - Confidence Level by Count
      Returns:
      The Contributing PnL Attribution
    • pnlAttribution

      public CapitalUnitPnLAttribution pnlAttribution​(double confidenceLevel)
      Description copied from interface: PathEnsemble
      Construct the Contributing PnL Attribution given the Confidence Level by Percentage
      Specified by:
      pnlAttribution in interface PathEnsemble
      Parameters:
      confidenceLevel - Confidence Level by Percentage
      Returns:
      The Contributing PnL Attribution
    • pnlAttribution

      public CapitalUnitPnLAttribution pnlAttribution​(java.util.List<java.lang.Integer> pathIndexList)
      Description copied from interface: PathEnsemble
      Construct the Contributing Path Attribution given the Path Index List
      Specified by:
      pnlAttribution in interface PathEnsemble
      Parameters:
      pathIndexList - Path Index List
      Returns:
      The Contributing Path Attribution
    • grossSystemicStressPnLList

      public java.util.List<java.lang.Double> grossSystemicStressPnLList()
      Description copied from interface: EnsemblePnLDistributionGenerator
      Generate the Gross Systemic PnL Distribution
      Specified by:
      grossSystemicStressPnLList in interface EnsemblePnLDistributionGenerator
      Returns:
      The Gross Systemic PnL Distribution
    • grossIdiosyncraticStressPnLList

      public java.util.List<java.lang.Double> grossIdiosyncraticStressPnLList()
      Description copied from interface: EnsemblePnLDistributionGenerator
      Generate the Gross Idiosyncratic PnL Distribution
      Specified by:
      grossIdiosyncraticStressPnLList in interface EnsemblePnLDistributionGenerator
      Returns:
      The Gross Idiosyncratic PnL Distribution
    • grossFSPnLList

      public java.util.List<java.lang.Double> grossFSPnLList()
      Description copied from interface: EnsemblePnLDistributionGenerator
      Generate the Gross FS PnL Distribution
      Specified by:
      grossFSPnLList in interface EnsemblePnLDistributionGenerator
      Returns:
      The Gross FS PnL Distribution
    • grossPnLList

      public java.util.List<java.lang.Double> grossPnLList()
      Description copied from interface: EnsemblePnLDistributionGenerator
      Generate the Gross PnL Distribution
      Specified by:
      grossPnLList in interface EnsemblePnLDistributionGenerator
      Returns:
      The Gross PnL Distribution
    • ensembleDistribution

      public EnsemblePnLDistribution ensembleDistribution()
      Description copied from interface: EnsemblePnLDistributionGenerator
      Generate the Ensemble PnL Distribution
      Specified by:
      ensembleDistribution in interface EnsemblePnLDistributionGenerator
      Returns:
      The Ensemble PnL Distribution