elStressScenario
Last modified in version : -
Purpose : retrieve a specific measure of a portfolio in the context of a specified stress scenario
Summary
The elStressScenario function retrieves the risk measure of a portfolio in the context of a specified stress scenario. This function supports only positions and portfolio as calculation levels.
Examples
In these example the chosen stress scenario is the 2007-2009 sub-prime crisis (scenario 3021).
=elStressScenario("pnl","portfolio", 3021, C11,D11,"EUR", "relative")
Calculates the P&L impact a market stress scenario would have on a portfolio (here one asset) defined by C11 and its corresponding quantity defined by D11. Here, the currency is EUR. MeasureType is set to relative.
=elStressScenario("pnl","portfolio", 3021, C11:C50,D11:D50,"EUR", "relative")
Calculates the P&L impact a market stress scenario would have on a portfolio whose instrument IDs are defined by C11:C50 and their corresponding quantities are listed in D11:D50. The currency is still EUR.
=elStressScenario("pnl","portfolio", 3021, {"CHF","EUR"},{1000,1000},"EUR", "relative")
This example can be copied and pasted to Excel and will give an instantaneous result.
Syntax
elStressScenario(Measure, CalculationsLevel, ScenarioID, AssetsIDs[], Quantities[], Currency, MeasureType)
Argument name | Default | Description |
---|---|---|
Measure | “pnl” (Profit and Loss). | |
CalculationsLevel | The granularity at which the results should be calculated (individual asset, portfolio). | |
ScenarioID | The ID of a pre-defined scenario to serve as the basis for the simulation. | |
AssetsIDs | Single or multiple asset identifiers (ISIN, FIGI, currency ISO, Edgelab ID). | |
Quantities | Asset quantities in the same orders as the specified asset ids. | |
Currency (Optional) | local | The ISO code of the reference currency for deriving the calculation results. Specify “local” to use the instruments native currency where appropriate. It is mandatory to specify a currency when the granularity is “portfolio”. |
MeasureType (Optional) | relative | Whether the result should be normalized. The input should be “relative” or “absolute”. “True” or “False” are still supported for the moment. |