Aj Copulas V4


Published on

Use of Copulas for risk management and modeling via MATLAB

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Aj Copulas V4

  1. 1. MATLAB® Products for Financial Risk Management & ModelingUse of COPULAS<br />ANURAG JAIN<br />
  2. 2. Case Study Topic: Copulas in Risk Management<br />Demo: Equity Portfolio Risk Management using Copulas<br /><ul><li>Chief Risk Officer needs methods for AGGREGATION OF RISKS: Enterprise Level Mgt.</li></ul>Quantitative Risk Modeling gaining more attention and exposure after recent crisis<br />Function that links (couples) univariate margins distributions to create full multivariate distribution (MVD)<br />Joint distribution function of d standard uniform random variables<br />3/29/2010<br />2<br />
  3. 3. Needs, Uses and Target Users<br />Returns in real world are not normal, simple Pearson correlations don’t always work especially in tails<br />Fat Tails and Tail Dependence need to be modeled separately<br />Internal models for credit, market & operational risks (for Bank Capital Allocation based on Basel II): Problem: modeling of joint distributions of different risks<br />Equity Portfolios: Estimation of covariances alone not sufficient to capture the real extreme movements among individual equities: portfolio risk manager has to optimize allocation<br />Demo shown later<br />3/29/2010<br />3<br />
  4. 4. Needs, Uses and Target Users<br />Credit Portfolio: Individual default risk of an obligor can be better handled but not the dependence among default risks for several obligors<br />Need better estimation of credit risk of a portfolio and corresponding VaR, Expected Shortfall<br />Identify particular sector exposure and dependencies<br />Energy & Commodities Trading<br />Spread relationships dominate physical markets and asset hedging activities<br />Need dependence among various spreads: refinery crack, spark, storage time, geographical (shipping and pipelines)<br />A commodity or energy trader/quant would need to model these<br />3/29/2010<br />4<br />
  5. 5. Needs, Uses and Target Users<br />Pricingof Credit Derivatives, Structured Products<br />First-to-default swap credit-linked products, CDOs, other exotic options etc.<br />Li made Gaussian Copula famous but needed to look beyond normality assumption {Recall : Formula that killed Wall Street}<br />Actuarial: Pricing of Life Insurance Products<br />Relationship between individuals' incidence of disease<br />Joint survival time distributions of multiple dependent life times<br />Reinsurance: e.g. Pricing of Sovereign Risk Products<br />Assess the risk of a large political risk reinsurance portfolio based on historical country risk ratings, sovereign ceilings, default rates and severity assumptions <br />3/29/2010<br />5<br />
  6. 6. Advantages<br />Understanding of dependence at a deeper level<br />Highlight the fallacies and dangers of dependence only on correlation<br />Copulas are easily simulated: allow Monte Carlo studies of risk<br />Express dependence on quantile scale: useful for describing dependence of extreme outcomes <br />VaR and Expected Shortfall express risk in terms of quantiles of loss distributions<br />Allow fitting to MV risk factor data ; separate problem into 2 steps<br />Finding marginal models for individual risk factors <br />Copula models for their dependence structure<br />3/29/2010<br />6<br />
  7. 7. Most Common Marginal Distributions<br />Market portfolio returns<br />Generalized hyperbolic (GH), or special cases such as:<br />Normal inverse Gaussian (NIG)<br />Student t and Gaussian <br />Credit portfolio returns<br />Beta<br />Weibull <br />Insurance portfolio returns and operational risk<br />Pareto<br />Log-normal<br />Gamma<br /> All (and more) can be handled by “Statistics Toolbox”<br /> Model return time series with “Econometrics Toolbox”: ARMA & GARCH<br />3/29/2010<br />7<br />
  8. 8. Copula Functions in MATLAB<br />MATLAB’s “Statistics Toolbox” has many copula related functions and capabilities<br />Probability density functions (copulapdf) and the cumulative distribution functions (copulacdf)<br />Rank correlations from linear correlations (copulastat) and vice versa (copulaparam)<br />Random vectors (copularnd)<br />Parameters for copulas fit to data (copulafit)<br />Available Copulas: Gaussian, Student -t and 3 bivariate Archimedean: One parameter families defined directly in terms of their cdfs: Clayton , Frank, Gumbel<br />Combined with related toolboxes (Econometrics, Optimization, Financial etc.) MATLAB provides comprehensive, unique platform for risk modeling <br />3/29/2010<br />8<br />
  9. 9. Demo Case Study: Joint Extreme Events<br />For 1/1/1996 to 12/31/2000 daily (1262) logarithmic returns Xt = (Xt1, …Xt5) for 5 stocks (MSFT, GE, INTC, AAPL, IBM), interested in probability: P[X1 ≤ qa(F1),……, X5 ≤ qa (F5)] for a = 0.05<br /> using four different models<br />MV normal distribution N5( m, S ) calibrated via sample mean vector and covariance matrix<br />Gaussian copula CPGa calibrated by estimating P via rank correlation <br />Student-t copula Cnt calibrated via covariance matrix and degrees of freedom<br />Clayton copula CqCl calibrated by MLE for 5 dimensional Clayton Copula<br />3/29/2010<br />9<br />
  10. 10. Demo Case Study Results (Probabilities)<br />Model 1): CRGa (a,....,a) = 0.035%<br />Model 2): CPGa (a,….,a) = [0.062%; 0.066%] (for Kendall's or Spearman's method used to estimate P)<br />Model 3): Cnt (a,….,a) = 0.162% for n = 4<br />Model 4): CqCl (a,….,a) = 0.25% for q = 0.465<br />Comparing these with historical frequency of event in 1996 - 2000 period<br />qi is a-quantile under empirical distribution of Xi (for a = 0.05 and n = 1262 the qi is the 64th smallest of observations X1i, ..…, Xni), <br />phist = 0.158%<br />3/29/2010<br />10<br />
  11. 11. Demo Case Study Summary<br />Estimating probability by simple MV normal distribution underestimates by factor of 4.5<br />Improvement using Gaussian copula via Spearman or Kendall’s tau Rank correlation<br />Student – t copula gives the closest match with empirical probability <br />Clayton copula : Best copula for modeling lower tail dependence<br />MATLAB function for MLE parameter estimation for Clayton Copula would be a good addition<br />3/29/2010<br />11<br />
  12. 12. Possible Extension & Improvements in Functionality: Future opportunities for demos by AE<br />Dependencies among any kind of asset returns can be modeled using Copulas: Enable risk modeling and estimation, portfolio optimization and allocation, pricing<br />Equities, Indices, Options<br />Fixed Income, Credit products, Structured products<br />Hedge funds and other alternatives<br />Commodities, Electricity<br />Insurance<br />Macroeconomic Relationships<br />Some examples in literature already exist<br />A separate “Risk Management” toolbox or visible added related functionalities in Financial or Econometrics toolbox<br />3/29/2010<br />12<br />
  13. 13. Alternatives<br />R is the only other package that has most of the Copula functionalities<br />Limited copula capabilities in Mathematica<br />Can work in others: C++, Java etc. but need to build all functions/routines from scratch<br />MATLAB has many advantages as discussed in following slides<br />3/29/2010<br />13<br />
  14. 14. MATLAB vs. R<br />Power/friendliness of user interfaces and documentation of MATLAB and R is light years apart<br />MATLAB has a really mature GUI, help and documentation well laid out and browsable, for R need to search through multiple pages for simple task<br />MATLAB, unlike R, has a working debugger, tool to find syntax errors and suggest improvements, a file dependency checker<br />No Standards and Control for R: CRAN package repository features 2274 available packages<br />Study by D. Knowles, U. Cambridge using (MATLAB R2008b & R 2.8.0 with Intel Core 2- 1.86 GHz processor, 4 GB RAM) showed MATLAB at par or better than R in speed<br />3/29/2010<br />14<br />
  15. 15. MATLAB allows to develop complete models & applications with other toolboxes<br />Example: Marginal distributions of an asset may require GARCH modeling<br />Image taken from one of the recorded webinar at MathWorks site<br />3/29/2010<br />15<br />
  16. 16. Deployment with multiple platforms possible<br />Image taken from one of the recorded webinar at MathWorks site<br />3/29/2010<br />16<br />
  17. 17. Selected References<br />Bouy’e et al., Copulas for Finance, A Reading Guide and Some Applications, July 2000<br />Claudio Romano, Applying Copula Functions to Risk Management, part of PhD Thesis<br />Trivedi & Zimmer, Copula Modeling: An Introduction for Practitioners, Foundations & TrendsinEconometrics, 1(1) (2005) 1–111<br />Schuermann, Integrated Risk Management in a Financial Conglomerate, http://nyfedeconomists.org/schuermann/<br />3/29/2010<br />17<br />
  18. 18. Backup: In Mathematical Terms<br />For an m-variate function F, copula associated with F is distribution function C : [0, 1]m -> [0, 1] that satisfies<br /> F(y1, . . . , ym) = C(F1(y1),...,Fm(ym);θ)<br />where θ is a parameter of the copula called the dependence parameter, which measures dependence between the marginals.<br />3/29/2010<br />18<br />