Parametric Risk Attribution¶
The Parametric Risk Attribution worker calculates the magnitude of a security's reaction to changes in underlying factors — most often in terms of its price response — and returns the results as a datastore.

Parameters¶
Input¶
| Field | Description |
|---|---|
| Portfolio | The target portfolio. Accepts Fixed Portfolio, Get Latest, or Upstream Data |
| Workspace | Workspace of the portfolio. Accepts Fixed Workspace. Defaults to the current workspace |
| Volatility | Whether to calculate volatility at the Security, Standalone, Portfolio, and/or Risk Factor level. Accepts Boolean |
| VaR | Whether to calculate Value at Risk at the Security, Standalone, Portfolio, and/or Risk Factor level. Accepts Boolean |
| CVaR | Whether to calculate Conditional VaR at the Security, Standalone, Portfolio, and/or Risk Factor level. Accepts Boolean |
| Risk Factor Exposures | Whether to calculate Risk Factor Exposures at the Security, Standalone, Portfolio, and/or Risk Factor level. Accepts Boolean |

Output¶
| Field | Description |
|---|---|
| Name | Name of the output datastore. Accepts Template Text or Upstream Data. Defaults to the portfolio name |
| Date | Date of the output datastore. Accepts Fixed Date or Upstream Data. Defaults to the portfolio date |
| Workspace | Workspace where the output datastore will be saved. Accepts Fixed Workspace. Defaults to the portfolio workspace |
| Tags | Tags for the output datastore. Accepts Fixed Tags or Upstream Data. Defaults to the portfolio tags |
| Storage Mode | Transient — exists only within the current workflow run (default); Create — saves the datastore to the platform |

Advanced¶
| Field | Description |
|---|---|
| Header Suffix | Suffix appended to the end of property column names in the output datastore. Accepts Template Text or Upstream Data. Default is no suffix |
| Fixed Income Mapping | How fixed income securities are mapped to interest rate curves. Cashflows maps each cashflow event to key rate curve points; Duration uses Macaulay duration. Default is Duration |
| Days | Number of historical business days used in the calculation. Default is 252 |
| Exponential Decay | Weighting factor determining the rate at which older data enters the calculation. Default is 0.94 |
| Sampling | Frequency at which historical prices and rates are sampled to compute risk factors. Use 1 for daily, 5 for weekly (non-overlapping). Default is 1 |
| Horizon | The forecast horizon for calculation. Default is 1-day forecast |
| Confidence | Confidence level for calculation. For example, at 95% confidence, the first 5% of simulations are used. Default is 95% |

Result¶
Once the worker finishes successfully, it returns a result object containing the datastore. You can check the Output Types article to learn more about result object types.
- Datastore (datastore)
- ID (string)
- Name (string)
- Date (date)
- Tags (list of strings)
- Data (list of lists)
The Data component includes the following columns:
factor_parametric_contribution_to_cvar_*factor_parametric_contribution_to_var_*factor_parametric_contribution_to_vol_*port_parametric_cvarport_parametric_varport_parametric_volsec_parametric_contribution_to_cvarsec_parametric_contribution_to_varsec_parametric_contribution_to_volsec_parametric_factor_exposure_*sec_parametric_no_sens_factor_exposure_*sec_parametric_standalone_cvarsec_parametric_standalone_varsec_parametric_standalone_vol