  Stress testing, and in particular, reverse stress testing, is a prominent
exercise in risk management practice. Reverse stress testing, in contrast to
(forward) stress testing, aims to find an alternative but plausible model such
that under that alternative model, specific adverse stresses (i.e. constraints)
are satisfied. Here, we propose a reverse stress testing framework for dynamic
models. Specifically, we consider a compound Poisson process over a finite time
horizon and stresses composed of expected values of functions applied to the
process at the terminal time. We then define the stressed model as the
probability measure under which the process satisfies the constraints and which
minimizes the Kullback-Leibler divergence to the reference compound Poisson
model.
  We solve this optimization problem, prove existence and uniqueness of the
stressed probability measure, and provide a characterization of the
Radon-Nikodym derivative from the reference model to the stressed model. We
find that under the stressed measure, the intensity and the severity
distribution of the process depend on time and state. We illustrate the dynamic
stress testing by considering stresses on VaR and both VaR and CVaR jointly and
provide illustrations of how the stochastic process is altered under these
stresses. We generalize the framework to multivariate compound Poisson
processes and stresses at times other than the terminal time. We illustrate the
applicability of our framework by considering ``what if'' scenarios, where we
answer the question: What is the severity of a stress on a portfolio component
at an earlier time such that the aggregate portfolio exceeds a risk threshold
at the terminal time? Furthermore, for general constraints, we propose an
algorithm to simulate sample paths under the stressed measure, thus allowing to
compare the effects of stresses on the dynamics of the process.
