R Programming Language Certification Risk Assessment & Management 3 — Questions and Answers
Question 1: In credit risk modeling with R, which function from the `CreditMetrics` package computes portfolio loss distributions?
- cm.portfolio() (Correct answer)
- cm.val()
- cm.cs()
- cm.ead()
Correct answer: cm.portfolio()
`cm.portfolio()` simulates the portfolio loss distribution using asset correlations and default thresholds.
Question 2: What R technique is used to assess model risk by comparing predictions across multiple model specifications?
- Model averaging with BMA or ensemble methods (Correct answer)
- Cross-validation alone
- AIC selection of a single model
- Stepwise regression
Correct answer: Model averaging with BMA or ensemble methods
Bayesian Model Averaging (BMA) and ensemble methods quantify uncertainty across model specifications, directly addressing model risk.
Question 3: Which R function computes the Conditional Value at Risk (CVaR), also called Expected Shortfall?
- PerformanceAnalytics::ES() (Correct answer)
- stats::quantile()
- base::mean()
- PerformanceAnalytics::VaR()
Correct answer: PerformanceAnalytics::ES()
`ES()` from PerformanceAnalytics computes the expected loss given that the loss exceeds the VaR threshold.
Question 4: When modeling operational risk with heavy-tailed distributions in R, which distribution family is most commonly applied?
- Extreme Value (GEV/GPD) (Correct answer)
- Normal
- Uniform
- Binomial
Correct answer: Extreme Value (GEV/GPD)
Extreme Value Theory distributions like GEV and GPD are specifically designed to model the tails of loss distributions in operational risk.
Question 5: In R, the `evd` package function `fpot()` is used to fit which model relevant to tail risk?
- Peaks Over Threshold (POT) using the Generalized Pareto Distribution (Correct answer)
- ARMA model for volatility
- Normal mixture model
- Logistic regression for default
Correct answer: Peaks Over Threshold (POT) using the Generalized Pareto Distribution
`fpot()` fits a Generalized Pareto Distribution to exceedances over a chosen threshold, central to Peaks-Over-Threshold analysis.
Question 6: What does the `RiskPortfolios::covEstimation()` function help mitigate in large-portfolio risk calculations?
- Estimation error in the covariance matrix with many assets (Correct answer)
- Overfitting in regression models
- Autocorrelation in return series
- Multicollinearity in factor models
Correct answer: Estimation error in the covariance matrix with many assets
Robust covariance estimation methods address the instability of sample covariance matrices when the number of assets approaches the number of observations.
Question 7: In R, which approach correctly calculates the 99% Historical Simulation VaR from a vector of returns `r`?
- -quantile(r, 0.01) (Correct answer)
- quantile(r, 0.99)
- -mean(r)
- sd(r) * 2.33
Correct answer: -quantile(r, 0.01)
The 99% VaR is the negative of the 1st percentile of the return distribution, representing the loss not exceeded 99% of the time.
In credit risk modeling with R, which function from the `CreditMetrics` package computes portfolio loss distributions?