4
$\begingroup$

I am doing a research for a paper for market risk stress testing. In fact I found some information on the web about this important topic such as:

However, this papers are mostly theoretical and do not talk about best practices or specific examples of market risk stress tests. I really would value a simple R example to understand the underlying calculations?

I appreciate your answer!

$\endgroup$
2
$\begingroup$

One of the easiest ways is described in Duffie, Pan (1997) "Bootstrapped Simulation from Historical Data" p.55.

$R$ is the set of all risk factors (a time series) $C_{norm}$ is the Covariance Matrix during normal times. $C_{stressed}$ is the Covariance Matrix from a period of stress.

You can update $R$ in the following way.

$R_{i,stressed}=C_{stressed}^{1/2}* C_{norm}^{-1/2}*R_{i,norm}$

This can be implemented in R in the following way:

Rstressed = Rnorm %*% solve(chol(cov(Rnorm))) %*% chol(cov(Rstressperiod))

Checking

cov(Rstressed)
cov(Rstressperiod)

will yield identical results.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.