The Datastore Parametric Stress Test worker calculates the behavior of the portfolio under various market scenarios, it aims to determine how a portfolio will respond to extreme events and which securities (or group of securities) will benefit or detract on those scenarios, creating a new datastore with the result of the calculations.
Parameters
The Datastore Parametric Stress Test worker must receive specific parameters in order to execute properly. When parameters are not set correctly it may cause the worker to not work as expected. This worker parameters is separated in the following tabs: Input, Output and Advanced.
1. Input
The Input tab contains parameters which are consumed by the worker, in order to execute it's calculations.
1.1 Portfolio
Set the target portfolio using Fixed Portfolio, Get Latest or Upstream Data variants.
1.2 Workspace
Set the research workspace of the portfolio using Fixed Workspace variant. The default is using the current workspace.
1.3 Property Selection
The property selection section contains the properties that will be included in the datastore.
1.3.1 B3 Bearish
Select whether the B3 Bearish scenario will be calculated or not using Boolean variants. The calculation returns options which can be chosen from the following items: Security and Portfolio.
1.3.2 B3 Bullish
Select whether the B3 Bullish scenario will be calculated or not using Boolean variants. The calculation returns options which can be chosen from the following items: Security and Portfolio.
1.3.3 B3 Worst
Select whether the B3 Worst scenario will be calculated or not using Boolean variants. The calculation returns options which can be chosen from the following items: Security and Portfolio.
1.3.3 Custom Shocks
Set the data store containing the custom scenarios to calculate expected portfolio behavior using a Upstream Data, Fixed Datastore or Get Latest variants.
2. Output
The Output tab contains parameters that defines the worker execution results, and how it will be provided to downstream workers.
2.1 Name
Set the output datastore name using Template Text or Upstream Data variants. Default setting is the name of the input portfolio.
2.2 Date
Set the output datastore date using Fixed Date or Upstream Data variants. Default setting is the date of the input portfolio.
2.3 Workspace
Set the workspace in which the output datastore will be saved on the platform using Fixed Workspace. Default setting is the workspace of the input portfolio.
2.4 Tags
Set the output datastore tags using Fixed Tags or Upstream Data variants. Default setting is the tags of the input portfolio.
2.5 Persist
Select if the output datastore will be saved on the platform or be a transient one (temporary during workflow execution), through the following options: Transient or Create. The default is a transient datastore.
3. Advanced
The Advanced tab contains the header suffix and the set of parameters that will be used in the calculations.
3.1 Header Suffix
Set the header suffix that will be added to the end of selected properties columns in the datastore using Template Text or Upstream Data variants. The default is not using header suffix.
3.2 Fixed Income Mapping
For fixed income securities, when select is Cashflows, maps each cashflow event (interest, principal amortization) to various key points in the respective interest rate curve. When select is Duration, it uses the Macaulay duration to map bond price to neighboring key points in the respective interest rate curve. The default is using Duration.
3.2 Days
Number of business days used to calculate the covariance for the primitive risk factors using Number variants, the default is 252.
3.4 Sampling
Sampling represents the frequency that historical prices and rates (spreads) are collected in order to compute the invariant risk factors. In order to sample daily, use 1. In order to sample weekly (non-overlapping), pass 5. For various combinations between horizon and sampling click here. The default is 1-day sampling.
3.5 Horizon
Determines the Horizon for calculation. The horizon parameter produces a range of outcomes for each security via their underlying factors across specific date range. The default is 1-day Forecast.
Result
Once the worker finishes it's executions succesfully, it will return a result object containing the datastore to the workflow, which can be used by upstream workers. Below you can see an example of the datastore result object hierarchy.
- Datastore (datastore)
- ID (string)
- Name (string)
- Date (date)
- Tags (list of strings)
- Data (list of lists)
The Data component is composed of the columns common to all datastores, attributes and aggregations, including the selected properties columns. The possible columns added to the datastore are listed below.
- "port_parametric_st_bear_b3"
- "port_parametric_st_bull_b3"
- "port_parametric_st_worst_b3"
- "sec_parametric_st_bear_b3_*"
- "sec_parametric_st_bull_b3_*"
- "sec_parametric_st_worst_b3_"
- "sec_parametric_st_custom_*"