34
Jorge Rosales Contreras Gerencia de Riesgo Financiero LarrainVial Finite Gaussian mixtures in market risk assessment ASTIN/AFIR Colloquium 2017 Panama City, Panama

Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Jorge Rosales ContrerasGerencia de Riesgo FinancieroLarrainVial

Finite Gaussianmixtures inmarket riskassessment

ASTIN/AFIR Colloquium2017

Panama City, Panama

Page 2: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

1 Finite Gaussian mixturesDefinition and PropertiesLatAm Risk Factors

2 Risk MeasuresDefinitionGaussian MixturesBacktesting

3 Confidence IntervalsMaximum LikelihoodGaussian Mixtures

4 ApplicationsEarly AlertsOther

5 Conclussions

Page 3: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Definition

A random vector X ⊆ Rd follows a finite (g−component) GaussianMixture distribution if its density function is a mixture of d-variatenormal densities:

fX (x) =

g∑j=1

πj

(2π)d/2 |Σj |1/2exp

{−1

2(x− µj)

′Σ−1j (x− µj)

},

where∑g

j=1 πj = 1, πj ≥ 0, µj ∈ Rd and Σj ∈ Rdxd arepositive-definite matrices for each j = 1, . . . , g .

The -cumulative- distribution function is

FX (x) =

g∑j=1

πjΦ((x− µj)′Σ−1/2j ).

Page 4: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Properties

1. It includes the Normal distribution (with g = 1).

2. Set g = n and (under additional assumptions) it becomes anon-parametric model.

3. For intermediate cases (1 < g < n) it is a semi-parametricmodel that can approximate any continuous distribution.

4. All moments are finite (therefore it does not have heavy tails).

5. It is easy to simulate (MonteCarlo, bootstrap, ...).

6. Useful to model continuous distortions from normality:biasedness, leptokurtosis, multimodality, usually with g = 2 .

7. It reproduces financial stylized facts, such as volatility regimes.

8. It is closed under convolution.

Page 5: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Stylized facts.

−4 −3 −2 −1 0 1 2 3 40

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Student´s t

3−component GM

2−component GM

1−component GM

Figure: Approximation of a t-distribution using Gaussian mixtures

Page 6: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Stylized facts.

−6 −4 −2 0 2 4 60

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

(a)

−6 −4 −2 0 2 4 60

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

(b)

Figure: Stylized facts reproduced with Gaussian mixtures:(a) biasedness with 0.35N(-1,4)+0.65N(1,1) and(b) leptokurtosis with 0.85N(0,1)+0.15N(0,9).Dashed-line is Normal with same mean and variance.

Page 7: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Stylized facts.

−8

−6

−4

−2

0

2

4

6

8

Time

Re

turn

s

Figure: Volatility regimes using Gaussian mixtures: random sample from0.85N(0, 1) + 0.15N(0, 9).

Page 8: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Jarque-Bera Normality Goodness of Fit Test Statistic.Year MEXBOL IBOV IPSA IGBVL IGBC

2002 21.7** 3.6 5.1 8.2* 11.8**2003 0.2 3.4 2.2 15.0** 105.7**2004 71.1** 18.1** 13.1** 142.4** 394.9**2005 2.2 2.2 2.7 1831.3** 44.8**2006 74.9** 11.9** 21.3** 4.9 1020.5**2007 47.3** 30.5** 27.7** 226.6** 81.9**2008 193.2** 119.2** 792.6** 221.1** 200.0**2009 22.4** 16.1** 10.9** 13.1** 13.8**2010 67.7** 23.6** 10.3** 16.9** 48.2**2011 148.1** 197.6** 294.7** 671.8** 21.6**2012 5.7 5.5 3.4 5.3 21.8**2013 8.0* 3.4 10.3** 111.7** 67.5**2014 36.7** 4.7 13.1** 14.9** 104.4**2015 8.6* 4.0 33.7** 369.4** 60.5**

Table: ∗ p-value significant at 5% level.∗∗ p-value significant at 1% level.

Page 9: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Jarque-Bera Normality Goodness of Fit Test Statistic.

Year MXN BRL CLP PEN COP

2002 20.1** 362.9** 9.6** 130.2** 172.8**2003 28.5** 17.0** 12.2** 141.9** 162.5**2004 9.9** 135.0** 5.1 131.1** 41.3**2005 15.5** 48.7** 3.9 2032.7** 714.1**2006 47.4** 169.1** 14.8** 318.0** 339.6**2007 2.3 86.5** 55.0** 2175.8** 912.4**2008 1673.2** 149.1** 44.1** 111.5** 565.8**2009 122.4** 3.5 40.9** 38.8** 6.2*2010 46.6** 64.6** 6.3* 53.2** 223.3**2011 143.2** 152.1** 629.5** 307.2** 17.5**2012 1.0 216.9** 2.5 135.5** 20.5**2013 16.9** 63.5** 318.1** 335.7** 265.7**2014 7.6* 7.8* 1.6 68.7** 315.2**2015 0.6 9.6** 1.5 1686.3** 11.8**

Table: ∗ p-value significant at 5% level.∗∗ p-value significant at 1% level.

Page 10: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Normality tests

I Normality can not be rejected for only 18% of the tests.

I For IGBC and USDPEN normality is rejected at 1% every year.

I For 2008 and 2011, all risk factors are rejected at the 1% level.

I BOVESPA is the ”most normal” factor, rejected 7 out of 14years.

I 2012 is the ”most normal” year, when 6 of the 10 factors arenot rejected even at 5% level.

Therefore, none of the risk factors can be thought of as arealization from a normal distribution consistently through time.The above results provide justification to look for an alternativemodel to describe the returns of the risk factors.

Page 11: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

KS GoF Test Statistic for 2-Component Gaussian Mixture.

Year MEXBOL IBOV IPSA IGBVL IGBC

2002 0.031 0.044 0.021 0.040 0.0272003 0.043 0.032 0.032 0.027 0.0292004 0.039 0.040 0.056 0.037 0.0352005 0.029 0.028 0.031 0.045 0.0392006 0.070 0.027 0.038 0.021 0.0502007 0.032 0.034 0.028 0.037 0.0282008 0.036 0.043 0.043 0.054 0.0402009 0.031 0.026 0.051 0.031 0.0232010 0.030 0.033 0.029 0.023 0.0362011 0.024 0.033 0.046 0.037 0.0312012 0.026 0.036 0.031 0.032 0.0362013 0.031 0.027 0.049 0.031 0.0382014 0.033 0.027 0.054 0.031 0.0272015 0.039 0.038 0.031 0.036 0.037

Page 12: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

KS GoF Test Statistic for 2-Component Gaussian Mixture.

Year MXN BRL CLP PEN COP

2002 0.028 0.027 0.029 0.039 0.0302003 0.026 0.024 0.028 0.043 0.0452004 0.025 0.024 0.023 0.049 0.0322005 0.030 0.030 0.036 0.071 0.0552006 0.031 0.047 0.030 0.061 0.0362007 0.032 0.040 0.025 0.048 0.0382008 0.041 0.049 0.036 0.053 0.0342009 0.047 0.041 0.031 0.030 0.0382010 0.025 0.027 0.035 0.066 0.0312011 0.031 0.036 0.033 0.050 0.0312012 0.044 0.076* 0.038 0.068 0.0332013 0.031 0.023 0.032 0.033 0.0322014 0.029 0.022 0.046 0.030 0.0252015 0.035 0.033 0.028 0.068 0.028

Table: ∗ p-value significant at 10% level.

Page 13: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Value at Risk (VaR)

VaRα := Q(α,θ) = F−1L (α).

Expected Shortfall (ES)

ESα :=1

1− α

∫ 1

αQ(z ,θ)dz = E [L | L > VaRα] .

I Q is known as the quantile function.

I In each case, the second equality requires the continuity of FL.

I Traditional risk methodologies: Historical Simulation (FL isempirical), Delta-Normal (FL = Φ), MonteCarlo (FL iselliptic).

Page 14: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Risk Measures

VaR and ES under fGM

Value at Risk (VaR)

VaRα = qα such that

g∑j=1

πjΦ

(qα − µLjσLj

)= α.

Expected Shortfall (ES)

ESα :=1

1− α

g∑j=1

πjΦ(−zj ,α)

[µj + σj

φ(zj ,α)

Φ(−zj ,α)

],

where zj ,α =(qα−µj )

σjy FL(qα) = α.

Page 15: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Risk Measures

VaR(99%) under finite Gaussian Mixture

Dec-05 Dec-06 Dec-07 Dec-08 Dec-09 Dec-10 Dec-11 Dec-12 Dec-13 Dec-14 Dec-15

0

500

1000

1500

2000

2500

CLP

mln

VaR

Pérdidas

Page 16: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Value at Risk (VaR)

VaRα = qα such that

g∑j=1

πjΦ((qα − µLj )/σLj

)= α.

Expected Shortfall (ES)

ESα :=1

1− α

g∑j=1

πjΦ(−zj ,α)

[µj + σj

φ(zj ,α)

Φ(−zj ,α)

].

I Both metrics depend on θ = {πj , µj , σj}gj=1 (they are r.v.).

I Therefore, they have a distribution (both unbiased) and theirprecision depends on their variance.

I Usually, their goodness is assessed through backtesting :Kupiec (1995) for VaR and McNeil et al (2005) for ES.

Page 17: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Risk Measures

Backtesting for VaR(99%) under fGM

Year Obs Excesses p-value

2005 33 1 0.0432006 257 1 0.7282007 257 10 0.0002008 258 13 0.0002009 257 2 0.4752010 259 0 0.9262011 259 2 0.4802012 258 0 0.9252013 257 0 0.9242014 257 0 0.9242015 257 2 0.4752016 91 1 0.231

Table: p-value calculated according to Casella & Berger (2002)

Page 18: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Confidence Intervals

Maximum Likelihood (ML)

Let h(θ) be the risk metric and θML the MLE of θ, then[h(θML)− h(θ)

]d→ N

(0,Var(h(θML))

)as n→ +∞.

The asymptotic δ-level confidence interval for the ML estimator ofh(θ) is given by[

h(θML)− z 1+δ2

√σ2h(θML)

, h(θML) + z 1+δ2

√σ2h(θML)

],

where σ2h(θML)

is the variance of the risk metric estimator h(θML).

This interval corresponds to the non-rejection region of the testH0 : h(θ) = h(θML) vs H1 : h(θ) 6= h(θML) (Rosales 2016).

Page 19: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Confidence Intervals

Maximum Likelihood (ML)

Let h(θ) be the risk metric and θML the MLE of θ, then[h(θML)− h(θ)

]d→ N

(0,Var(h(θML))

)as n→ +∞.

The asymptotic δ-level confidence interval for the ML estimator ofh(θ) is given by[

h(θML)− z 1+δ2

√σ2h(θML)

, h(θML) + z 1+δ2

√σ2h(θML)

],

where σ2h(θML)

is the variance of the risk metric estimator h(θML).

This interval corresponds to the non-rejection region of the testH0 : h(θ) = h(θML) vs H1 : h(θ) 6= h(θML) (Rosales 2016).

Page 20: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Confidence Intervals

Maximum Likelihood (ML)

Let h(θ) be the risk metric and θML the MLE of θ, then[h(θML)− h(θ)

]d→ N

(0,Var(h(θML))

)as n→ +∞.

The asymptotic δ-level confidence interval for the ML estimator ofh(θ) is given by[

h(θML)− z 1+δ2

√σ2h(θML)

, h(θML) + z 1+δ2

√σ2h(θML)

],

where σ2h(θML)

is the variance of the risk metric estimator h(θML).

This interval corresponds to the non-rejection region of the testH0 : h(θ) = h(θML) vs H1 : h(θ) 6= h(θML) (Rosales 2016).

Page 21: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

MLE Confidence Interval[h(θML)− z 1+δ

2

√σ2h(θML)

, h(θML) + z 1+δ2

√σ2h(θML)

],

I This result is true in general. However, if FL is known, itsprecision can be improved.

I σ2h(θML)

should be estimated by: σ2h(θML)

.

From a first-order Taylor series expansion:

h(θ)− h(θ) ≈ ∇h(θ)′(θ − θ),

Whence it follows that

Var(h(θML)) ≈ ∇h(θ)′cov(θML)∇h(θ).

The elements of ∇h(θ) can be estimated numerically (sensitivities,or greeks).

Page 22: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

MLE Confidence Interval[h(θML)− z 1+δ

2

√σ2h(θML)

, h(θML) + z 1+δ2

√σ2h(θML)

],

I This result is true in general. However, if FL is known, itsprecision can be improved.

I σ2h(θML)

should be estimated by: σ2h(θML)

.

From a first-order Taylor series expansion:

h(θ)− h(θ) ≈ ∇h(θ)′(θ − θ),

Whence it follows that

Var(h(θML)) ≈ ∇h(θ)′cov(θML)∇h(θ).

The elements of ∇h(θ) can be estimated numerically (sensitivities,or greeks).

Page 23: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

MLE Confidence Interval[h(θML)− z 1+δ

2

√σ2h(θML)

, h(θML) + z 1+δ2

√σ2h(θML)

],

I This result is true in general. However, if FL is known, itsprecision can be improved.

I σ2h(θML)

should be estimated by: σ2h(θML)

.

From a first-order Taylor series expansion:

h(θ)− h(θ) ≈ ∇h(θ)′(θ − θ),

Whence it follows that

Var(h(θML)) ≈ ∇h(θ)′cov(θML)∇h(θ).

The elements of ∇h(θ) can be estimated numerically (sensitivities,or greeks).

Page 24: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

The matrix cov(θML) is the inverse of the expected informationmatrix I , estimated by the empirical information one Ie :

Ie(θML; x) =n∑

j=1

s(xj ; θML)s′(xj ; θML),

where s (xj ;θ) = ∂∂θ log L(xj ;θ) is the score function.

Valuing the variance of h(θ) at θ = θML:

Var(h(θML)) = ∇h(θML)′I−1e (θML)∇h(θML).

Page 25: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

The matrix cov(θML) is the inverse of the expected informationmatrix I , estimated by the empirical information one Ie :

Ie(θML; x) =n∑

j=1

s(xj ; θML)s′(xj ; θML),

where s (xj ;θ) = ∂∂θ log L(xj ;θ) is the score function.

Valuing the variance of h(θ) at θ = θML:

Var(h(θML)) = ∇h(θML)′I−1e (θML)∇h(θML).

Page 26: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Confidence Intervals

FL Gaussian Mixture

In the case of a fGM, the score function is

s (xj ;θ) =n∑

j=1

zij∂

∂θ[log πi + log fi (xj ;θj)], j = 1, . . . , n.

The partial derivatives with respect to the parameters are:

∂l (xj ;θ)

∂πi=

zijπi−

zgjπg

i = 1, . . . , g − 1,

∂l (xj ;θ)

∂µij= zijΣ

−1i (xj − µi ) i = 1, . . . , g .

∂l (xj ;θ)

∂ξijk=

1

2zij(2− δrs)∗

∗[−(Σ−1i )rs + (xj − µi )

′Σ−1,(r)i (xj − µi )

′Σ−1,(s)i

].

Page 27: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Confidence Intervals

Empirical Results. VaR Confidence Interval

Dec-05 Dec-06 Dec-07 Dec-08 Dec-09 Dec-10 Dec-11 Dec-12 Dec-13 Dec-14 Dec-150

500

1000

1500

2000

2500

CLP

mln

Límite Superior

VaR

Límite Inferior

Pérdidas

Page 28: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Confidence Intervals

VaR(99%) under Gaussian Mixture

Year Obs (LimInf, (VaR, (LimSup, ExcessesVaR] LimSup] +∞)

2005 33 2 1 0 12006 257 7 0 1 12007 257 11 7 3 102008 258 9 6 7 132009 257 5 1 1 22010 259 0 0 0 02011 259 7 1 1 22012 258 0 0 0 02013 257 5 0 0 02014 257 2 0 0 02015 257 12 2 0 22016 91 2 1 0 1

Page 29: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Applications

Early Alerts

Dic-06 Ene-07 Feb-07 Mar-07 Abr-07 May-07 Jun-07 Jul-07 Ago-07 Sep-07 Oct-07 Nov-070

200

400

600

800

1000

1200

CL

P m

ln

Límite Superior

VaR

Límite Inferior

PérdidasX: 26-Feb-2007

Y: 1221

X: 20-Feb-2007

Y: 867.7

X: 19-Feb-2007

Y: 674.9

X: 18-May-2007

Y: 703.5

X: 27-Aug-2007

Y: 740.8

Up to Dec 4, 2007 there were no more than 5 excesses in 250 days,but 2 of them were over the CI.

Year Obs Excesses p-value

2007 257 10 0.0001

Page 30: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Applications

Early Alerts

Dic-06 Ene-07 Feb-07 Mar-07 Abr-07 May-07 Jun-07 Jul-07 Ago-07 Sep-07 Oct-07 Nov-070

200

400

600

800

1000

1200

CL

P m

ln

Límite Superior

VaR

Límite Inferior

PérdidasX: 26-Feb-2007

Y: 1221

X: 20-Feb-2007

Y: 867.7

X: 19-Feb-2007

Y: 674.9

X: 18-May-2007

Y: 703.5

X: 27-Aug-2007

Y: 740.8

Up to Dec 4, 2007 there were no more than 5 excesses in 250 days,but 2 of them were over the CI.

Year Obs Excesses p-value

2007 257 10 0.0001

Page 31: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Applications

Risk measures based on VaR(99%)

I Counterparty Risk.Potencial Future Exposure (PFE) based on VaR(99%) atinstrument maturity.

I Capital Requirement (BIS III).It penalizes the frequency, but not the magnitude ofVaR(99%) excesses.

Page 32: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Conclussions

Conclussions

I It is equivalent to perform backtesting (BT) and build aconfidence interval (CI).

I BT rejection region may not be observable, but CI can alwaysbe constructed.

I CI may allow to rise early alerts over the risk estimation modelby taking into account the magnitude and not only thefrequency of excesses.

I Discrepancies may arise due to outliers, use of asymptoticdistributions, approximations or estimation error.

Page 33: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Appendix

References

Casella, G. and R. Berger, (2002). Statistical inference, 2nded. Duxbury Pacific Grove, CA.

McNeil, Alexander J., Rudiger Frey and Paul Embrechts(2005). Quantitative risk management. Princeton UP.

Jarque, C. and A. Bera (1987). A test for normality ofobservations and regression residuals. Int Stat Rev, 55,163–172.

Kupiec, Paul H. (1995). Techniques for Verifying the Accuracyof Risk Measurement Models. The Journal of Derivatives,3(2)73–84.

Rosales, J. (2016). Intervalos de confianza para VaR y ES y suaplicacion al mecado colombiano. Estocastica: Finanzas yRiesgo, 6(1)55–82.

Page 34: Finite Gaussian mixtures in market risk assessment · De nition A random vector X Rd follows a nite (g component) Gaussian Mixture distribution if its density function is a mixture

Appendix

Finite Gaussian mixtures in market risk assessmentJorge Rosales Contreras

¡MUCHAS GRACIAS!