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 boolean
addPathPnLRealization(PathPnLRealization pathPnLRealization)
Add the specified Path PnL Realizationint
count()
Retrieve the Number of Paths SimulatedEnsemblePnLDistribution
ensembleDistribution()
Generate the Ensemble PnL Distributiondouble
expectedShortfall(double confidenceLevel)
Compute Expected Short-fall given the Confidence Level by Percentagedouble
expectedShortfall(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 Distributionint
idiosyncraticEventIncidenceCount(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 ListCapitalUnitPnLAttribution
pnlAttribution(double confidenceLevel)
Construct the Contributing PnL Attribution given the Confidence Level by PercentageCapitalUnitPnLAttribution
pnlAttribution(int confidenceCount)
Construct the Contributing PnL Attribution given the Confidence Level by CountCapitalUnitPnLAttribution
pnlAttribution(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 Mapint
systemicEventIncidenceCount(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 Mapdouble
var(double confidenceLevel)
Compute VaR given the Confidence Level by Percentagedouble
var(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:PathEnsemble
Add the specified Path PnL Realization- Specified by:
addPathPnLRealization
in 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:PathEnsemble
Retrieve the PnL List Map- Specified by:
pnlListMap
in interfacePathEnsemble
- 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 interfacePathEnsemble
- 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 interfacePathEnsemble
- 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 interfacePathEnsemble
- 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 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:PathEnsemble
Retrieve the Occurrence Count for the specified Idiosyncratic Event- Specified by:
idiosyncraticEventIncidenceCount
in 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:PathEnsemble
Compute VaR given the Confidence Level by Count- Specified by:
var
in 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:PathEnsemble
Compute VaR given the Confidence Level by Percentage- Specified by:
var
in 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:PathEnsemble
Compute Expected Short-fall given the Confidence Level by Count- Specified by:
expectedShortfall
in 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:PathEnsemble
Compute Expected Short-fall given the Confidence Level by Percentage- Specified by:
expectedShortfall
in 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:PathEnsemble
Construct the Contributing PnL Attribution given the Confidence Level by Count- Specified by:
pnlAttribution
in interfacePathEnsemble
- Parameters:
confidenceCount
- Confidence Level by Count- Returns:
- The Contributing PnL Attribution
-
pnlAttribution
Description copied from interface:PathEnsemble
Construct the Contributing PnL Attribution given the Confidence Level by Percentage- Specified by:
pnlAttribution
in interfacePathEnsemble
- Parameters:
confidenceLevel
- Confidence Level by Percentage- Returns:
- The Contributing PnL Attribution
-
pnlAttribution
Description copied from interface:PathEnsemble
Construct the Contributing Path Attribution given the Path Index List- Specified by:
pnlAttribution
in interfacePathEnsemble
- 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 interfaceEnsemblePnLDistributionGenerator
- 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 interfaceEnsemblePnLDistributionGenerator
- 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 interfaceEnsemblePnLDistributionGenerator
- 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 interfaceEnsemblePnLDistributionGenerator
- Returns:
- The Gross PnL Distribution
-
ensembleDistribution
Description copied from interface:EnsemblePnLDistributionGenerator
Generate the Ensemble PnL Distribution- Specified by:
ensembleDistribution
in interfaceEnsemblePnLDistributionGenerator
- Returns:
- The Ensemble PnL Distribution
-