Package org.drip.capital.simulation
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
- Module = Portfolio Core Module
- Library = Capital Analytics
- Project = Basel Market Risk and Operational Capital
- Package = Economic Risk Capital Simulation Ensemble
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description CapitalUnitPathEnsemble()CapitalUnitPathEnsemble Constructor -
Method Summary
Modifier and Type Method Description booleanaddPathPnLRealization(PathPnLRealization pathPnLRealization)Add the specified Path PnL Realizationintcount()Retrieve the Number of Paths SimulatedEnsemblePnLDistributionensembleDistribution()Generate the Ensemble PnL DistributiondoubleexpectedShortfall(double confidenceLevel)Compute Expected Short-fall given the Confidence Level by PercentagedoubleexpectedShortfall(int confidenceCount)Compute Expected Short-fall given the Confidence Level by Countjava.util.List<java.lang.Double>grossFSPnLList()Generate the Gross FS PnL Distributionjava.util.List<java.lang.Double>grossIdiosyncraticStressPnLList()Generate the Gross Idiosyncratic PnL Distributionjava.util.List<java.lang.Double>grossPnLList()Generate the Gross PnL Distributionjava.util.List<java.lang.Double>grossSystemicStressPnLList()Generate the Gross Systemic PnL DistributionintidiosyncraticEventIncidenceCount(java.lang.String event)Retrieve the Occurrence Count for the specified Idiosyncratic Eventjava.util.Map<java.lang.String,java.lang.Integer>idiosyncraticEventIncidenceCountMap()Retrieve the Idiosyncratic Event Incidence Count MapPathPnLRealization[]pathPnLRealizationArray()Retrieve the Path PnL Realization Arrayjava.util.List<PathPnLRealization>pathPnLRealizationList()Retrieve the Path PnL Realization ListCapitalUnitPnLAttributionpnlAttribution(double confidenceLevel)Construct the Contributing PnL Attribution given the Confidence Level by PercentageCapitalUnitPnLAttributionpnlAttribution(int confidenceCount)Construct the Contributing PnL Attribution given the Confidence Level by CountCapitalUnitPnLAttributionpnlAttribution(java.util.List<java.lang.Integer> pathIndexList)Construct the Contributing Path Attribution given the Path Index Listjava.util.Map<java.lang.Double,java.util.List<java.lang.Integer>>pnlListMap()Retrieve the PnL List MapintsystemicEventIncidenceCount(java.lang.String event)Retrieve the Occurrence Count for the specified Systemic Eventjava.util.Map<java.lang.String,java.lang.Integer>systemicEventIncidenceCountMap()Retrieve the Systemic Event Incidence Count Mapdoublevar(double confidenceLevel)Compute VaR given the Confidence Level by Percentagedoublevar(int confidenceCount)Compute VaR given the Confidence Level by CountMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CapitalUnitPathEnsemble
public CapitalUnitPathEnsemble()CapitalUnitPathEnsemble Constructor
-
-
Method Details
-
pathPnLRealizationList
Retrieve the Path PnL Realization List- Returns:
- The Path PnL Realization List
-
pathPnLRealizationArray
Retrieve the Path PnL Realization Array- Returns:
- The Path PnL Realization Array
-
addPathPnLRealization
Description copied from interface:PathEnsembleAdd the specified Path PnL Realization- Specified by:
addPathPnLRealizationin interfacePathEnsemble- 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:PathEnsembleRetrieve the PnL List Map- Specified by:
pnlListMapin interfacePathEnsemble- Returns:
- The PnL List Map
-
systemicEventIncidenceCountMap
public java.util.Map<java.lang.String,java.lang.Integer> systemicEventIncidenceCountMap()Description copied from interface:PathEnsembleRetrieve the Systemic Event Incidence Count Map- Specified by:
systemicEventIncidenceCountMapin interfacePathEnsemble- Returns:
- The Systemic Event Incidence Count Map
-
idiosyncraticEventIncidenceCountMap
public java.util.Map<java.lang.String,java.lang.Integer> idiosyncraticEventIncidenceCountMap()Description copied from interface:PathEnsembleRetrieve the Idiosyncratic Event Incidence Count Map- Specified by:
idiosyncraticEventIncidenceCountMapin interfacePathEnsemble- Returns:
- The Idiosyncratic Event Incidence Count Map
-
count
public int count()Description copied from interface:PathEnsembleRetrieve the Number of Paths Simulated- Specified by:
countin interfacePathEnsemble- Returns:
- The Number of Paths Simulated
-
systemicEventIncidenceCount
public int systemicEventIncidenceCount(java.lang.String event)Description copied from interface:PathEnsembleRetrieve the Occurrence Count for the specified Systemic Event- Specified by:
systemicEventIncidenceCountin interfacePathEnsemble- 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:PathEnsembleRetrieve the Occurrence Count for the specified Idiosyncratic Event- Specified by:
idiosyncraticEventIncidenceCountin interfacePathEnsemble- Parameters:
event- The Idiosyncratic Event- Returns:
- Occurrence Count for the specified Idiosyncratic Event
-
var
public double var(int confidenceCount) throws java.lang.ExceptionDescription copied from interface:PathEnsembleCompute VaR given the Confidence Level by Count- Specified by:
varin interfacePathEnsemble- 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.ExceptionDescription copied from interface:PathEnsembleCompute VaR given the Confidence Level by Percentage- Specified by:
varin interfacePathEnsemble- 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.ExceptionDescription copied from interface:PathEnsembleCompute Expected Short-fall given the Confidence Level by Count- Specified by:
expectedShortfallin interfacePathEnsemble- 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.ExceptionDescription copied from interface:PathEnsembleCompute Expected Short-fall given the Confidence Level by Percentage- Specified by:
expectedShortfallin interfacePathEnsemble- Parameters:
confidenceLevel- Confidence Level by Percentage- Returns:
- Expected Short-fall
- Throws:
java.lang.Exception- Thrown if the VaR cannot be computed
-
pnlAttribution
Description copied from interface:PathEnsembleConstruct the Contributing PnL Attribution given the Confidence Level by Count- Specified by:
pnlAttributionin interfacePathEnsemble- Parameters:
confidenceCount- Confidence Level by Count- Returns:
- The Contributing PnL Attribution
-
pnlAttribution
Description copied from interface:PathEnsembleConstruct the Contributing PnL Attribution given the Confidence Level by Percentage- Specified by:
pnlAttributionin interfacePathEnsemble- Parameters:
confidenceLevel- Confidence Level by Percentage- Returns:
- The Contributing PnL Attribution
-
pnlAttribution
Description copied from interface:PathEnsembleConstruct the Contributing Path Attribution given the Path Index List- Specified by:
pnlAttributionin interfacePathEnsemble- Parameters:
pathIndexList- Path Index List- Returns:
- The Contributing Path Attribution
-
grossSystemicStressPnLList
public java.util.List<java.lang.Double> grossSystemicStressPnLList()Description copied from interface:EnsemblePnLDistributionGeneratorGenerate the Gross Systemic PnL Distribution- Specified by:
grossSystemicStressPnLListin interfaceEnsemblePnLDistributionGenerator- Returns:
- The Gross Systemic PnL Distribution
-
grossIdiosyncraticStressPnLList
public java.util.List<java.lang.Double> grossIdiosyncraticStressPnLList()Description copied from interface:EnsemblePnLDistributionGeneratorGenerate the Gross Idiosyncratic PnL Distribution- Specified by:
grossIdiosyncraticStressPnLListin interfaceEnsemblePnLDistributionGenerator- Returns:
- The Gross Idiosyncratic PnL Distribution
-
grossFSPnLList
public java.util.List<java.lang.Double> grossFSPnLList()Description copied from interface:EnsemblePnLDistributionGeneratorGenerate the Gross FS PnL Distribution- Specified by:
grossFSPnLListin interfaceEnsemblePnLDistributionGenerator- Returns:
- The Gross FS PnL Distribution
-
grossPnLList
public java.util.List<java.lang.Double> grossPnLList()Description copied from interface:EnsemblePnLDistributionGeneratorGenerate the Gross PnL Distribution- Specified by:
grossPnLListin interfaceEnsemblePnLDistributionGenerator- Returns:
- The Gross PnL Distribution
-
ensembleDistribution
Description copied from interface:EnsemblePnLDistributionGeneratorGenerate the Ensemble PnL Distribution- Specified by:
ensembleDistributionin interfaceEnsemblePnLDistributionGenerator- Returns:
- The Ensemble PnL Distribution
-