SWIM: SWIM: A Package for Sensitivity Analysis

Description Details Stresses for Relative Entropy Minimization Stresses for Wasserstein Distance Minimization A SWIM object A SWIMw object References See Also

View source: R/class.R

Description

The SWIM package provides weights on simulated scenarios from a stochastic model, such that a stressed model component (random variable) fulfil given probabilistic constraints (e.g. specified values for risk measures), under the new scenario weights. Scenario weights are selected by constrained minimisation of the relative entropy or Wasserstein distance to the baseline model.

Details

The SWIM (Scenario Weights for Importance Measurement) package provides weights on simulated scenarios from a stochastic model, such that stressed random variables fulfil given probabilistic constraints (e.g. specified values for risk measures), under the new scenario weights. Scenario weights are selected by constrained minimisation of the relative entropy or Wasserstein distance to the baseline model.

The SWIM package is based on the reverse sensitivity framework developed by (Pesenti et al. 2019) and \insertCitePesenti2021SSRNSWIM.

Consider the random vector X = (X1,...,Xn). Let P represent the probability measure under which all simulated scenarios have the same probability. First, take the approach of minimizing the relative entropy. Then, for a random variable Xi, the package solves:

min D(P | Q)

subject to constraints on the distribution of Xi under Q, where D(P | Q) is the Kullback-Leibler divergence (relative entropy) between P and Q.

The approach of minimizing the Wasserstein distance of order 2 proceeds as follows: Let F be the distribution function of the random variable Xi under P, then the package solves

argmin_{G} W_{2}(G, F)

subject to constraints on G, W_{2}(G, F) is the 2-Wasserstein distance between G and F. The solution to the above minimisation problem is the distribution of Xi under Q. The current implementation of the Wasserstein approach is based on Kernel density estimation with Gaussian kernels.

For both approaches, the scenario weights are then formed via the Radon-Nikodym derivative dQ / dP. The weighting generates a model for which the joint distribution of (X1,...,Xn) is stressed.

Different elements of X can be understood as inputs or outputs of a model. For example, consider a model Y = g(Z) with input vector Z = (Z1,...,Z(n-1)). One can then identify X1 = Y and X2 = Z1,...,Xn = Z(n-1). Subsequently, the user of the SWIM package can stress the model output or any of the inputs, measuring the resulting impact on the distributions of other variables.

Stresses for Relative Entropy Minimization

Scenario weights for the following stresses are provided:

stress calls one of the functions below by using type
stress_VaR for stressing the VaR (type = "VaR")
stress_VaR_ES for stressing the VaR and ES jointly (type = "VaR ES")
stress_mean for stressing means (type = "mean")
stress_mean_sd for stressing means and standard deviations (type = "mean std")
stress_moment for stressing moments (type = "moment")
stress_prob for stressing the probabilities of intervals (type = "prob")
stress_user for user defined scenario weights (type = "user")

Stresses for Wasserstein Distance Minimization

Scenario weights for the following stresses are provided:

stress_wass calls one of the functions below by using type
stress_RM_w for stressing the distortion risk measure (RM) (type = "RM")
stress_mean_sd_w for stressing mean and standard deviation (type = "mean sd")
stress_RM_mean_sd_w for stressing the RM, mean and standard deviation (type = "RM mean sd")
stress_HARA_RM_w for stressing the HARA utility and RM (type = "HARA RM")
stress_mean_w for stressing mean (type = "mean")

A SWIM object

A SWIM object is generated by applying a stress function subject to a relative entropy minimisation. An object of class SWIM contains a list of:

A SWIMw object

A SWIMw object is generated by applying a stress function subject to a Wasserstein minimisation. The Wasserstein minimisation approach assumes that all model components, (random variables) are continuously distributed. If only the stressed model component is continuously distributed, the SWIMw stress should be converted to a SWIM object, see convert_SWIMw_to_SWIM. An object of class SWIMw contains a list of:

References

\insertRef

Pesenti2019reverseSWIM

\insertRef

Pesenti2020SSRNSWIM

\insertRef

Csiszar1975SWIM

See Also

See get_data for extracting the data, x; get_weights for extracting the scenario weights, new_weights; get_weightsfun for extracting the functions generating the scenario weights; and get_specs for extracting the specifications of the stress on an object of class SWIM.


spesenti/SWIM documentation built on Jan. 15, 2022, 11:19 a.m.