building a minimum cvar portfolio under generalized pareto returns - a. martel

39
Building a Minimum CVaR Portfolio under Generalized Pareto Returns by Alexandre Martel Department of Mathematics King’s College London The Strand, London WC2R 2LS United Kingdom Email: [email protected] Tel: +44 (0)814 185 633 9 September 2010 Report submitted in partial fulfillment of the requirements for the degree of MSc in Financial Mathematics in the University of London

Upload: alexandre-martel

Post on 08-Apr-2015

309 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Building a Minimum CVaR Portfoliounder Generalized Pareto Returns

by

Alexandre Martel

Department of MathematicsKing’s College London

The Strand, London WC2R 2LSUnited Kingdom

Email: [email protected]: +44 (0)814 185 633

9 September 2010

Report submitted in partial fulfillment of

the requirements for the degree of MSc inFinancial Mathematics in the University of

London

Page 2: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Acknowledgements

I would like first of all to record a particular acknowledgement to Pr. W.T.Shaw, who, as my supervisor, was able to take some time to answer mypersistent questions. Also, since this dissertation project was written as thefinal work of a one year MSc in Financial Mathematics, I would like also tothank the whole Department of Mathematics from King’s College Londonfor this enriching year : including the academic team, Dr. T. Di Matteo, Dr.C. Albanese, Dr. C. Buescu, Dr. A. Charafi, Dr P. Emms and Dr A. Jack,but also the administrative staff, Ms F. Benton, Miss J. Cooke and Miss S.Rice.

1

Page 3: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Abstract

This paper examines portfolio construction in an extreme value frameworkwith Conditional Value at Risk as a risk measure. In chapter 2, some resultsfrom Extreme Value and Copula theories are reviewed. To estimate returndistribution from a given asset in a consistent manner with the Peaks-over-Threshold method, we create a semi parametric distribution function byfitting a Generalized Pareto distribution on the lower and upper tails and aKernel distribution in the center. This is tested on the standardized dailylog return of the S&P500 index. After some literature review on CVaRoptimization, an example of asset allocation is presented in chapter 4 using5 stocks from the US market. A portfolio is generated from historical datas,using the semi parametric distribution function and a copula function. Theoptimal weights are found by minimizing CVaR for different level of return.Finally, the results are compared with an optimal portfolio assuming Normalreturns.

2

Page 4: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Contents

1 INTRODUCTION 6

2 ASSET RETURN DISTRIBUTION 10

2.1 Extreme Value Theory . . . . . . . . . . . . . . . . . . . . . . 10

2.1.1 The Peaks-Over-Threshold methodology . . . . . . . . 11

2.1.2 Threshold selection . . . . . . . . . . . . . . . . . . . . 13

2.1.3 Parameters estimation . . . . . . . . . . . . . . . . . . 13

2.2 Copulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

2.2.1 Clayton Copula . . . . . . . . . . . . . . . . . . . . . . 17

2.3 Data and Methodology . . . . . . . . . . . . . . . . . . . . . . 18

3 PORTFOLIO OPTIMIZATION 22

3.1 Portfolio Model . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3.2 Conditional Value at Risk . . . . . . . . . . . . . . . . . . . . 23

3.3 Minimization of C-VaR . . . . . . . . . . . . . . . . . . . . . . 24

4 MARKET APPLICATION 27

4.1 Portfolio Simulation . . . . . . . . . . . . . . . . . . . . . . . 28

4.2 Minimization of CVaR . . . . . . . . . . . . . . . . . . . . . . 30

5 CONCLUSION 34

3

Page 5: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

List of Tables

2.1 lower tail parameters for S&P500 : Threshold, Scale and Shape 20

2.2 upper tail parameters for S&P500: Threshold, Scale and Shape 20

4.1 lower tail parameters : Threshold, Shape and Scale . . . . . . 28

4.2 upper tail parameters : Threshold, Shape and Scale . . . . . . 29

4.3 Simulated Portfolios : Mean Return . . . . . . . . . . . . . . . 29

4.4 Simulated Portfolios : Skewness and Kurtosis . . . . . . . . . 29

4.5 EVT + Kernel Simulated Portfolio : Covariance Matrix . . . . 29

4.6 Normal Multivariate Simulated Portfolio : Covariance Matrix 30

4.7 EVT + Kernel Optimal Portfolios for β = 95%: OptimalPortfolio, VaR and CVaR for different return level . . . . . . . 30

4.8 Multivariate Normal Optimal Portfolios for β = 95%: OptimalPortfolio, VaR and CVaR for different return level . . . . . . . 31

4.9 EVT + Kernel Optimal Portfolios for β = 99%: OptimalPortfolio, VaR and CVaR for different return level . . . . . . . 32

4.10 Multivariate Normal Optimal Portfolios for β = 99%: OptimalPortfolio, VaR and CVaR for different return level . . . . . . . 32

4

Page 6: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

List of Figures

1.1 QQ Plot of the S&P500 index standardized daily log returnsversus strandard Normal . . . . . . . . . . . . . . . . . . . . . 7

1.2 S&P500 standardized daily log returns vs Normal density . . . 8

1.3 S&P500 standardized daily log returns vs Normal density (from-2% to -8%) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1 Generalized Pareto density for different level of ξ . . . . . . . 12

2.2 Estimates of ξ for various thresholds on the left tail of S&P500distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.3 Estimates of σ for various thresholds on the left tail of S&P500distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.4 3D-representation of Clayton copula for δ=10 . . . . . . . . . 17

2.5 Fitted Cumulative distribution of SP500 daily log returns . . . 19

2.6 Comparison of CDF for the lower tail . . . . . . . . . . . . . . 20

2.7 Comparison of CDF for the upper tail . . . . . . . . . . . . . 21

4.1 Daily Price Closings in base 100 . . . . . . . . . . . . . . . . . 27

4.2 Comparison of Efficient Frontier for β=95% . . . . . . . . . . 31

4.3 Comparison of Efficient Frontier for β=99% . . . . . . . . . . 33

5

Page 7: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Chapter 1

INTRODUCTION

“The process of selecting a portfolio may be divided in two stages. Thefirst stage starts with observation and experience and ends with beliefs aboutthe future performances of available securities. The second stage starts withthe relevant beliefs about future performances and ends with the choice ofportfolio.” Harry Markowitz, The Journal of Finance, 1952.

Despite this fundamental idea, the Modern Portfolio Theory, introducedby H. Markowitz, has been questionned in many ways. The main criticismsmade by professionals and researchers have been on the assumptions underly-ing the framework of this theory. To model returns from financial assets, thewell-known Normal distribution is assumed. Therefore, in a “normal” worldthe variance of the portfolio is a good risk measure, and optimal portfoliosare drawn from the mean-variance criteria.

Unfortunately, historical observations show that the normal distributionsignificantly underestimates the probability of having high returns. This sug-gests an excess kurtosis, i.e. a fatter tail than with the Normal distribution.To display this idea, a quantile-quantile plot compares the sample quantilesversus theoretical quantiles from a normal distribution. If the sample dis-tribtion is normal, the plot will be close to linear. In Figure 1.1, it is clearthat some deviations appear in both tails of the distribution of the S&P500index1, meaning that the Normal distribution fails to fit the data in bothtails. This is also visible by plotting the graph of the histogram of the re-turns compared to the Normal density (see Figures 1.2 and 1.3).

1datas correspond to the standardized daily log returns of the S&P500 index from01/01/1970 to 01/01/2010 (historical prices were downloaded from Yahoo! Finance)

6

Page 8: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Figure 1.1: QQ Plot of the S&P500 index standardized daily log returnsversus strandard Normal

Also, since variance is a symmetric measure that takes into account neg-ative returns as well as positive ones, one can argue that investors are onlyconcerned about losses and thus shall use asymetric risk measures or ”coher-ent risk measures” instead. Thus, some new risk measures such as the Valueat Risk (VaR) or its extension, the Conditional Value at Risk (CVaR) havebeen introduced in the emerging Risk Management industry back in the late80’s.

Mathematically, given a confidence interval α between 0 and 1, and let Lbe the loss function of the portfolio, the VaR at confidence level α is givenby the smallest value X such that the probability that the loss L exceeds Xis not larger than (1 − α) (see P. Jaurion [17] for a complete introduction).Though VaR was very popular and efficient while estimating risk when re-turns are normally distributed, it has recognized limitations in the case ofnon-normal distributions. The main limit where its lack of subadditivity and

7

Page 9: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Figure 1.2: S&P500 standardized daily log returns vs Normal density

convexity, meaning for example that the VaR of a portfolio containing twoassets may be greater than the sum of the VaR of each asset. Another limitis that in case the VaR is exceeded, no one knows how much the effectiveloss would be.

However, the Conditional Value at Risk overcomes many of the draw-backs of Variance and VaR as risk measures. Since it only evaluates risk onthe downside, it captures the incidence of heavy tailed distribution observedfrom return distributions. Moreover, it is a coherent risk measure, and thuswould be more appropriate to incorporate in a portfolio optimization model.

This paper was written in the context of the MSc in Financial Mathemat-ics at King’s College London. It also contributes to the growing literature onrisks from portfolio using non-gaussian distribution.Two main subjects willbe discussed: the use of Extreme Value Theory (EVT) in modeling extremereturns and the related portfolio optimization using CVaR criteria.

8

Page 10: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

This paper is organised as follows. Chapter 2 reviews the implicationsof univariate Extreme Value Theory combined with Copulas to generate aportfolio. In this section, we will also empirically examine and comparehow our distribution performs better in fitting historical datas. In Chapter3, we will solved the CVaR optimization problem and show how it can beapplied to financial markets. In Chapter 4, a numerical application is given bysimulating an equity based portfolio and some comments are made. Section5 concludes this paper.

Figure 1.3: S&P500 standardized daily log returns vs Normal density (from-2% to -8%)

9

Page 11: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Chapter 2

ASSET RETURNDISTRIBUTION

2.1 Extreme Value Theory

In Extreme Value Theory, two statistical methods are available to estimatethe tails of distribution : the Block Maxima (BM) method (developped byFisher and Tippett, 1928; Gnedenko, 1943) and the Peaks-Over-Threshold(POT) method (Pickands, 1975; Balkema and de Haan, 1974). However, inFinance, one method will be prefered to the other because of the clusteringphenomenom. Indeed, we will considered the estimation of tails distribu-tion by the POT method with the Maximum Likelihood estimation whichpossesses numerous advantages. First of all, POT method is pretty flexibleand realistic compared to BM method, which doesn’t take into account allthe possible extreme outcomes. The BM method extracts the maximum ofeach period (block), previously defined (month, year, etc...). Thus, it canmiss some extreme values which could happen around the maximum of theperiod (financial cycle or clustering phenomenom) whereas during the fol-lowing period, the maximum could be relatively low. In the contrary, thePOT method avoids this kind of problem since it extracts the maximumabove a given threshold previously defined. Consequently, this method takesinto account the clustering phenomenom, representative of the financial as-set returns. It is therefore particularly adapted to Finance, whereas, in otherdomains, where cycles are absent, the BM method will be prefered (See P.Embrechts in [11]).

10

Page 12: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

2.1.1 The Peaks-Over-Threshold methodology

We suppose that we have some observations Z1, ..., Zn independant and iden-tically distributed (i.i.d.) from an unknown distribution F. We are interestedin the number Nu of extremes which exceed the high threshold u, and moreprecisely on the excesses sample X1, ..., XNu , assumed to be i.i.d., defined byXi = Zi − u.

Given the high threshold u on the observations, the distribution of ex-cesses over u is given by

Fu(x) = P{Z − u ≤ x | Z > u} (2.1)

for 0 ≤ x < z0 − u where z0 ≤ ∞ is the right endpoint of F.

The excess distribution represents the probability that a loss exceeds thethreshold u by at most an amount x, given the information that it exceedsthe threshold. In terms of the underlying asset distribution

Fu(x) =P{Z − u ≤ x, Z > u}

P{Z > u}=P{Z ≤ x+ u} − P{Z ≤ u}

P{Z > u}Finally,

Fu(x) =F (x+ u)− F (u)

1− F (u)(2.2)

We shall now introduce the Generalized Pareto distribution (GPD) bythe following essential theorem

Theorem 2.1.1. The Pickands-Balkema-de Haan Theorem Providedthat the underlying distribution F belongs to the domain of attraction1 of theGeneralised Extreme Value distribution, then ∃ a function β(u) such thatlimu→x0

sup0≤y≤x0−u

| Fu(y)−Gξ,β(u)(y) |= 0 where Gξ,β(u) denotes the Generalised

Pareto distribution.

The Generalized Pareto distribution (GPD) with two parameters ξ andβ is defined by

1In the literature, the domain of attraction of the Generalized Extreme Value distri-bution corresponds to a large class of underlying distributions, containing all the mostcommon distributions : normal, lognormal, χ2, t, gamma, exponential, uniform, beta,etc...

11

Page 13: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Gξ,σ(x) =

{1− (1 + ξx/σ)−1/ξ ξ 6= 0,

1− exp(−x/σ) ξ = 0.(2.3)

where σ > 0, and where x ≥ 0

The parameter ξ defines the important shape parameter of the distri-bution and σ is an additional scaling parameter. If ξ > 0 then Gξ,σ is areparametrized version of the ordinary Pareto distribution, which has a longhistory in actuarial mathematics as a model for large losses; ξ = 0 corre-sponds to the exponential distribution and ξ < 0 is known as a Pareto typeII distribution. See Figure 2.1 for graphical example.The first case is the most relevant for risk management purposes since theGPD is heavy-tailed when ξ > 0. Whereas the normal distribution has mo-ments of all orders, a heavy-tailed distribution does not possess a completeset of moments.

Figure 2.1: Generalized Pareto density for different level of ξ

12

Page 14: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

2.1.2 Threshold selection

Choosing the optimal threshold may be a cornelian compromise between se-lecting a sufficiently high threshold so that the Pickands-Balkema-de Haantheorem holds and a sufficiently low threshold so that we have enough obser-vations for the estimation of our parameters ξ and σ. Indeed, choosing a highvalue for u leads to few observations of extreme returns and implies inefficientparameter estimates with large standard errors. On the other hand, a lowvalue for u leads to many observations of extreme returns but induces biasedparameter estimates as observations not belonging to the tails are includedin the estimation process.In this paper, we follow a method explained by M. Sarma in [20]. The mainidea is simply to plot the graph of the estimated parameters for differentlevel of threshold. Then an optimal threshold is found when the estimatesstart to stabilize. Such graphs are plotted in figures (2.2) and (2.3). As anexample, for the left tail of the S&P500 daily log return distribution, it canbe seen that from 500 observations beyond the lower threshold, the estimatesseem to stabilize in both graph. The corresponding lower threshold is the 5%quantile of the S&P500 sample, which is equaled to -1.6238. The same pro-cedure is applied for the upper tail : the associated optimal upper thresholdis 1.7096 which is the 96% quantile of the S&P500 sample.

2.1.3 Parameters estimation

In this section, we aim to find estimators of the shape ξ and the scale σparameters. We will introduce here the parametric approach in the case ofthe POT method2. Under the assumption that the limit distribution holds,the maximum likelihood method gives unbiased and asymptotically normal,and of minimum variance, estimators. The system of non-linear equationscan be solved numerically using the Newton-Raphson iterative method (SeeF.M. Longin in [17] for details).

Suppose that our excess sample X = (X1, ..., XNu) is i.i.d. with cumulativedistribution function the Generalized Pareto distribution G. The probability

2To estimate parameters of the GPD, various methods such as the method of moments,the probability weighted moments, the L-moments, Maximum Likelihood, principle ofMaximum Entropy and Least Squares method have been used. A review of all this methodcan be found in [19].

13

Page 15: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Figure 2.2: Estimates of ξ for various thresholds on the left tail of S&P500distribution

density function g of G is

g(x) =1

σexp−x

σ, for ξ = 0,

g(x) =1

σ

(1 + ξ

x

σ

)− 1ξ−1

, for ξ 6= 0.

The log-likelihood is then equal to

l(0, σ;X) = −Nu lnσ − 1

σ

Nu∑i=1

Xi , for ξ = 0,

l(ξ, σ;X) = −Nu lnσ −(

1

ξ+ 1

) Nu∑i=1

ln

(1 +

ξ

σXi

), for ξ 6= 0.

14

Page 16: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Figure 2.3: Estimates of σ for various thresholds on the left tail of S&P500distribution

By deriving those expressions in ξ and σ, we obtain the maximizationequation from which we find the Maximum Likelihood estimators (ξ̂Nu , σ̂Nu).For ξ 6= 0, we use numerical methods such as Newton-Raphson method tofind the parameters. For ξ = 0 it is straightforward since

∂σl(0, σ;X) =

−Nu

σ+

1

σ2

Nu∑i=1

Xi

which leads to

σ̂Nu =1

Nu

Nu∑i=1

Xi = XNu

15

Page 17: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

2.2 Copulas

Given d random variables (X1, ..., Xd) with certain marginal distributions,copulas provide a systematic way of building joint distributions that respectthese given marginal distributions. In this section we shall establish a linkbetween a general joint distribution and the joint distribution of d uniformrandom variables. This study will help us in order to simulate dependentrandom variables from a given copula.

A d-dimensional copula C is defined as the joint distribution functionC : [0, 1]d → [0, 1] of a vector (U1, ..., Ud) of uniform (0,1) random variables,that is,

C(u, v) = P (U1 ≤ u1, ..., Ud ≤ ud), u1, ..., ud ∈ [0, 1].

We introduce now the following fundamental theorem, which was first provedby Sklar (1959), it states that for any joint distribution function H there existsa copula C that ’couples’ H to its marginal distribution functions (X1, ..., Xd).

Theorem 2.2.1. Sklar’s Theorem Let F be a d-dimensional cdf with con-tinuous margins F1, ..., Fd.Then it has the following unique copula represen-tation: F (x1, ..., xd) = C [ F1(x1), ..., Fd(xd) ]

From this theorem, we can see that for continuous multivariate distri-bution functions, the univariate margins and the multivariate dependencestructure, i.e. the copula, can be separated. Before introducing a specificcopula in the following subsection, we define the family of Archimedean cop-ulas.

Definition 1. Archimedean Copulas are of the form

C(u1, ..., un) = ψ−1[ ψ(u1) + ...+ ψ(un) ] for all 0 ≤ u1, ..., un ≤ 1

and where ψ is a function termed generator, satisfying:

1. ψ(1) = 0,

2. Decreasing. For all t ∈ (0, 1), ψ′ < 0,

3. Convex. For all t ∈ (0, 1), ψ′′ ≥ 0,

16

Page 18: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Figure 2.4: 3D-representation of Clayton copula for δ=10

2.2.1 Clayton Copula

The Clayton copula, which is an asymmetric Archimedean copula, exhibitsgreater dependence in the negative tail than in the positive. From a financialpoint of view, this copula will express the trend that stocks have when theydepreciate simultaneously in times of financial stress in the markets.

This copula is given by

Cδ(u, v) = (u−δ + v−δ − 1)−1/δ,

where 0 < δ <∞ is a parameter controlling the dependence. Perfect depen-dence is obtained if δ →∞, while δ → 0 implies independance.

In her paper [1], K. Aas gives a simulation algorithm for the Claytoncopula.

• Simulate a gamma variate X ∼ Ga(1/δ, 1).

17

Page 19: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

• Simulate d independent standard uniforms V1, ..., Vd.

• Return U =((1− log V1

X)−1/δ, ..., (1− log Vd

X)−1/δ

).

2.3 Data and Methodology

In order to build our multivariate distribution, we will use first of all the Clay-ton copula to provide the correlation structure between our stock returns.Next, for a given stock, we will use the following marginal distribution.

• a lower tail bounded by the threshold u1 (corresponding to the 5%quantile), fitted with a Generalized Pareto distribution with parameters(ξ̂1, σ̂1),

• the interior of the distribution, between the threshold u1 and u2 (cor-responding to the 95% quantile), estimated by a non-parametric kerneldistribution,

• an upper tail, from the threshold u2, fitted with a Generalized Paretodistribution with parameters (ξ̂2, σ̂2),

More precisely, the marginal cumulative distribution function of our stockreturn will be defined as (See Figure 2.5 for a graphical representation)

F (x) =

GPD(x, u1, ξ̂1, σ̂1) if x ≤ u1

Φ(x) if u1 ≤ x ≤ u2

GPD(x, u2, ξ̂2, σ̂2) if x ≥ u2

where GPD(x, u, ξ, σ) represents the cumulative distribution function ofthe Generalized Pareto Distribution for a threshold u, with scale parameterξ and shape parameter σ. ξ̂ and σ̂ are the estimated parameters (see section2.2.2) from the historical datas for the Generalized Pareto Distribution.

Having estimated the three distinct regions of the composite semi-parametricempirical CDF, we still need the corresponding inverse CDF which will beof the form

Q(v) =

GPD−1(v, u1, ξ̂1, σ̂1) if v ≤ v1

Φ−1(v) if v1 ≤ v ≤ v2

GPD−1(v, u2, ξ̂2, σ̂2) if v ≥ v2

18

Page 20: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Figure 2.5: Fitted Cumulative distribution of SP500 daily log returns

where GPD−1(v, u, ξ, σ) represents the inverse cumulative distributionfunction of the Generalized Pareto Distribution for a threshold u, with scaleparameter ξ and shape parameter σ. ξ̂ and σ̂ are the estimated parame-ters (see section 2.2.2) from the historical datas for the Generalized ParetoDistribution. Also, we have the following equalities

v1 = Φ(u1) = GPD(u1, u1, ξ̂1, σ̂1)

v2 = Φ(u2) = GPD(u2, u2, ξ̂2, σ̂2)

In tables 4.1 and 4.2 we give estimates of the scale and shape parametersfor the corresponding lower threshold and upper threshold for the S&P500index. The positive shape estimate indicates clearly some thickness in bothleft and right tail. In particular, the left tail with shape value 0.2949 is heavierthan the right tail with shape value 0.2024, showing some asymmetry in thestandardized S&P500 observations. This is confirmed by the calculation ofthe skewness which has a negative value of -1.0780.

19

Page 21: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

lower threshold scale parameter shape parameter

-1.4595 0.2949 0.6243

Table 2.1: lower tail parameters for S&P500 : Threshold, Scale and Shape

upper threshold scale parameter shape parameter

1.4159 0.2024 0.6081

Table 2.2: upper tail parameters for S&P500: Threshold, Scale and Shape

Figure 2.6: Comparison of CDF for the lower tail

Those results allow us to compute a visual representation of the CDFand the inverse CDF for the S&P500 sample. In particular, if we comparethe graph of the empirical CDF with those of the Normal CDF and ourconstructed CDF, it can be clearly seen that our distribution fits much betterthe tails (See Figures (2.6) and (2.7) for the lower and upper tail respectively

20

Page 22: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

of the S&P500 index standardized daily log returns), and thus can performedbetter risk management.

Figure 2.7: Comparison of CDF for the upper tail

In chapter 4, we use the Clayton copula for n=5 to obtain a uniformdependant sample U = [U1, U2, U3, U4, U5]. For the dependance parameter, areasonable δ value of 0.05 is taken. By applying the inverse marginal CDF ofdifferent asset to our uniform sample we obtain the multivariate distributionwhich will be used to model a portfolio.

Y = [Y1, Y2, Y3, Y4, Y5] = [Q1(U1), Q2(U2), Q3(U3), Q4(U4), Q5(U5)]

where Qi represents the inverse marginal CDF based on parameters fromasset i.

21

Page 23: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Chapter 3

PORTFOLIO OPTIMIZATION

3.1 Portfolio Model

We start by considering n assets available in the financial market. Letx = {x1, x2, ..., xn}T ∈ X represents the weight of stock i allocated to theportfolio, where X is a subset of IRn and corresponds to the set of alloca-tion constraints. For example, if we do not allow short postions X = {x1 ≥0, x2 ≥ 0, ..., xn ≥ 0}. We also define the uncertain returns of the n assets,from time 0 to a fixed time T, by r = {r1, r2, ..., rn}T ∈ IRn, with proba-bility density function p(r). A static portfolio allocation model aims to findthe optimal portfolio x to be constructed at time 0, in order to optimize agiven criteria. In this paper, we will focus in finding the optimal portfolio x∗

minimizing the Conditional Value at Risk for a given level of portfolio returnunder some allocation constraints.The return on the portfolio is the random variable

Rp = x1r1 + x2r2 + ...+ xnrn = xT r

The weight constraint condition is written as

n∑i=1

xi = 1 (3.1)

We suppose that short positions are not allowed

xi ≥ 0, for i = 1, ..., n (3.2)

Also, we impose the portfolio return to reach a given value

Rp = xT r = R∗ (3.3)

22

Page 24: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Finally, we can define the set of allocation constraints as

X = {xi, i = 1, ..., n, such that (3.1), (3.2) and (3.3) are verified} (3.4)

Finally, we define the loss function f : IRn → IR of the portfolio as

f(x/r) = −rTx (3.5)

3.2 Conditional Value at Risk

The Conditional Value at Risk with probability level β is the expected returnon the portfolio in the worst β% of the cases. This is a coherent measureand moreover a spectral measure of financial portfolio risk. It represents theaverage loss value given that the loss already exceeded the VaR, i.e. theaverage loss on the tail of the distribution of the portfolio.

Definition 2. Coherent Risk Measure A real valued function ρ of a ran-dom variable is a coherent risk measure if it satisfies the following properties,

1. Subadditivity. For any two random variables X and Y, ρ(X + Y ) ≤ρ(X) + ρ(Y ),

2. Monotonicity. For any two random variables X ≥ Y, ρ(X) ≥ ρ(Y ),

3. Positive homogeneity. For λ ≥ 0, ρ(λX) = λρ(X),

4. Translation invariance. For any a ∈ IR, ρ(a+X) = a+ ρ(X).

The recent theory of spectral risk measures have been introduced by C.Acerbi in [2]. Spectral risk measures define a class of measures based onintegrals of the quantile function of the portfolio return. It consists in aweighted average of the quantiles of the distribution of the returns, usinga non-increasing weight function called the spectrum. It can be viewed asweighted averages of Values at Risk.

Definition 3. Spectral Risk Measure Consider a portfolio X. There areS equiprobable outcomes with the corresponding payoffs given by the orderstatistics X1:S, ..., XS:S. Let φ ∈ IRS. The measure Mφ : IRS → IR defined

by Mφ(X) = −δ∑S

s=1 φsXs:S is a spectral measure of risk if φ ∈ IRS satisfiesthe conditions

1. Nonnegativity. φs ≥ 0 for all s = 1, ..., S,

23

Page 25: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

2. Normalization.∑S

s=1 φs = 1,

3. Monotonicity. φs is non-increasing, that is φs1 ≥ φs2 if s1 ≤s2 and s1, s2 ∈ {1, ..., S}.

3.3 Minimization of C-VaR

This technique was first introduced by S. Uryasev and R. Tyrrell Rockafellarin 1999 [23]. For (x, α) ∈ X × IR, the probability that the loss functionf(x/r) does not exceed some threshold value α is given by

ψ(x, α) =

∫f(x/r)≤α

p(r)dr (3.6)

In what follows, ψ(x, α) is assumed to be everywhere continuous withrespect to α

The associated Value at Risk (VaR) with probability level β ∈ (0, 1) is

V aRβ(x) = min{α : ψ(x, α) ≥ β} (3.7)

While the associated Conditional-VaR (CVaR) with probability level β ∈[0, 1] is

CV aRβ(x) = E[f(x/r)/f(x/r) ≥ V aRβ(x)] (3.8)

The calculation leads to

CV aRβ(x) =

∫V aRβ(x)≤f(x/r)

f(x/r)p(r)dr∫V aRβ(x)≤f(x/r)

p(r)dr

where the denominator is the probability that the loss function exceeds theV aRβ(x) which is equaled by definition to 1− β.

CV aRβ(x) =1

1− β

∫V aRβ(x)≤f(x/r)

f(x/r)p(r)dr

Which can be written as

CV aRβ(x) = V aRβ(x) +1

1− β

∫(f(x/r)− V aRβ(x))+p(r)dr (3.9)

Since:

V aRβ(x) =V aRβ(x)

1− β

∫V aRβ(x)≤f(x/r)

p(r)dr

24

Page 26: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

where (u)+ =

{u if u > 0

0 if u ≤ 0

Next, from Equation (3.9) we can defined the following objective functionFβ(x, α) on X × IR, with alpha a parameter:

Fβ(x, α) = α +1

1− β

∫(f(x/r)− α)+p(r)dr (3.10)

The idea behind this objective function is drawn from the two followingtheorems. For proves, see [23].

Theorem 3.3.1. As a function of α, Fβ(x, α) is convex and continuouslydifferentiable. The CV aRβ of the loss associated with any x ∈ X can bedetermined from the formula

φβ(x) = minα∈IR

Fβ(x, α)

In this formula the set consisting of the values of α for which the minimumis attained, namely

Aβ(x) = arg minα∈IR

Fβ(x, α)

is a nonempty, colsed, bounded interval (perhaps reducing to a single point),and the V aRβ of the loss is given by

αβ(x) = left endpoint of Aβ(x).

In particular, on always has

αβ(x) ∈ arg minα∈IR

Fβ(x, α) and φβ(x) = Fβ(x, αβ(x)).

Theorem 3.3.2. Minimizing the CV aRβ of the loss associated with x overall x ∈ X is equivalent to minimizing Fβ(x, α) over all (x, α) ∈ X × IR, inthe sense that

minx∈X

φβ(x) = min(x,α)∈X×IR

Fβ(x, α),

where moreover a pair (x∗, α∗) achieves the second minimum if and only ifx∗ achieves the first minimum and α∗ ∈ Aβ(x∗). In particular, therefore,in circumstances where the interval Aβ(x∗) reduces to a single point (as istypical), the minimization of Fβ(x, α) over (x, α) ∈ X × IR produces a pair(x∗, α∗) not necessarily unique, such that x∗ minimizes the CV aRβ and α∗

25

Page 27: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

gives the corresponding V aRβ. Furthermore, Fβ(x, α) is convex with respectto (x, α), and φβ(x) is convex with respect to x, when f(x/r) is convex withrespect to x, in which case, if the constraints are such that X is a convex set,the joint minimization is an instance of convex programming.

Assuming that the loss function f(x/r) is convex with respect to (w.r.t.)x, the function Fβ(x, α) is convex w.r.t. x. Also, it can be verified thatEquation (3.10) is linear and convex w.r.t. α, see [23] for proof. Finally, wesee that Equation (3.10) is convex with respect to (x, α) if the loss f(x, y)is convex with respect to x. Therefore, those two theorems explain how theCVaR minimization problem can be reduced to a simpler continuously dif-ferentiable and convex function optimization problem.

Moreover, it appears that, by using the objective function Fβ, it is not neededto calculate first the V aRβ, which would be more complicated.

Next, for practical cases, the integral in Equation (3.10) can be approxi-mated using scenari rj, j = 1, ..., J which are sampled using the density func-tion p. The set of the generated scenari can be represented from J vectorsr1, r2, ..., rJ . Hence, Equation (3.10) becomes:

F̃β(x, α) ≈ α +1

1− β1

J

J∑j=1

(f(x/ri)− α)+ (3.11)

Now, assuming that the set of allocation constraints X is convex, weshall solve the convex optimization problem

min(x,α)∈X×IR

F̃β(x, α) (3.12)

Following the two previous theorems, there exists (x∗, α∗) solution to(3.12). x∗ represents the optimal portfolio vector and the correspondingVaR is equaled to α∗.

26

Page 28: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Chapter 4

MARKET APPLICATION

Figure 4.1: Daily Price Closings in base 100

In this section, we aim to construct a portfolio of 5 stocks and find theoptimal weights in order to minimize the CVaR, by following the procedure

27

Page 29: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

seen in the previous chapters. We shall start by simulating our portfolio,that is finding the multivariate distribution using the Clayton copula andthe semi-parametric distribution based on historical prices, as introduced inchapter 2. Then, we will run the linear optimization, studied in chapter 3,under the associated portfolio allocation constraints. Some comments willbe made by comparing the results with a minimum CVaR portfolio using amultivariate normal distribution for the stock returns.

4.1 Portfolio Simulation

Our portfolio will be based on 5 stocks : Coca Cola Company (ticker KO),Ebay Inc.(EBAY), Intel Corpotation (INTC), Goldman Sachs Group Inc.(GS) and Exxon Mobil Corp.(XOM). The data corresponds to the period01/01/2003 to 01/01/2010 for a length of N=1762 daily log returns and weredownloaded from Yahoo! Finance. For subsequent examination, figure (4.1)illustrates the price movements of each stock. The initial level of each stockhas been normalized in base 100 to facilitate the comparison.

In tables (4.1) and (4.2), we give estimates of the scale and shape pa-rameters for the corresponding lower threshold and upper threshold for eachstock. Positive shape estimates clearly indicate some heavy-tailed distribu-tion for each stock. Then, we simulate two portfolios of 5 stocks of sizeJ=5000. The first portfolio is based on the Clayton copula and the semiparametric distribution and the second one is based on the Clayton copulaand normal distribution. For the Clayton copula, a reasonable delta value of0.05 is used. In tables (4.3), (4.4), (4.5) and (4.6) some basic statistics arecomputed for the simulated portfolios.

The MATLAB codes for the inverse semi parametric CDF and the Clay-ton copula are availlable in the Appendix.

Asset lower threshold shape parameter scale parameter

KO -1.4595 0.1496 0.7455EBAY -1.3984 0.4065 0.4899INTC -1.5574 0.1428 0.7048

GS -1.3602 0.2790 0.7323XOM -1.4293 0.2099 0.7306

Table 4.1: lower tail parameters : Threshold, Shape and Scale

28

Page 30: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Asset upper threshold shape parameter scale parameter

KO 1.4159 0.2409 0.7043EBAY 1.5521 0.2164 0.6173INTC 1.5666 0.0744 0.6237

GS 1.3373 0.4065 0.6504XOM 1.2821 0.4938 0.4601

Table 4.2: upper tail parameters : Threshold, Shape and Scale

Stock EVT + Kernel Multivariate NormalMean Return Mean Return

KO 0.0073 0.0147EBAY -0.0481 -0.0526INTC -0.0406 -0.0451

GS -0.0008 0.0374XOM 0.0857 0.0750

Table 4.3: Simulated Portfolios : Mean Return

Stock EVT + Kernel EVT + Kernel Multivariate Normal Multivariate NormalSkewness Kurtosis Skewness Kurtosis

KO -0.0510 14.7517 -0.0398 3.1084EBAY -1.1042 29.5859 0.0190 2.9521INTC -0.1315 6.2294 0.0058 2.8875

GS -1.6640 128.2658 -0.0645 3.1883XOM 1.2944 26.1583 0.0377 3.1171

Table 4.4: Simulated Portfolios : Skewness and Kurtosis

KO EBAY INTC GS XOM

KO 1.7565 0.1173 0.1340 0.0994 0.1556EBAY 0.1173 6.8625 0.2930 0.2798 0.2992INTC 0.1340 0.2930 4.5394 0.1513 0.2185

GS 0.0994 0.2798 0.1513 12.2104 0.2950XOM 0.1556 0.2992 0.2185 0.2950 3.3882

Table 4.5: EVT + Kernel Simulated Portfolio : Covariance Matrix

29

Page 31: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

KO EBAY INTC GS XOM

KO 1.6794 0.1465 0.1223 0.0304 0.1125EBAY 0.1465 6.3459 0.2631 0.3247 0.2927INTC 0.1223 0.2631 4.5908 0.1665 0.1771

GS 0.0304 0.3247 0.1665 7.5439 0.1652XOM 0.1125 0.2927 0.1771 0.1652 3.0105

Table 4.6: Normal Multivariate Simulated Portfolio : Covariance Matrix

4.2 Minimization of CVaR

From the results (see tables (4.7), (4.8), (4.9) and (4.10)), it can be seen thatstocks with low volatility and positive skewness are prefered. Indeed CocaCola and Exxon Mobil represent the most important weights in the optimalportfolios but show the smallest volatility and the higher skewness. Sincekurtosis depends on the behaviour of both the peakedness of the tails andthe center of the distribution, no relation can be conclude.

Since the left tail of the distribution is underestimated in the Normalcase, it is obvious that the CVaR and VaR should be smaller than in thesemi-parametric case. While for the confidence level β=95%, the CVaR andVaR are almost identical for both portfolios, for β=99% there is evidence ofa clear inflation of the CVaR while going from the Normal distribution tothe hybrid distribution. This can also be seen from the efficient frontiers in(4.2) and (4.3).

For the numerical experiment, the MATLAB script for the CVaR port-folio optimization is available from M. Vogiatzoglou in [24].

Return KO EBAY INTEL GSAC EXXON VaR CVaR

-0.02 0.4339 0.1027 0.1673 0.0572 0.2390 1.4660 2.22670 0.4322 0.1027 0.1679 0.0572 0.2399 1.4661 2.2267

0.02 0.4274 0.0755 0.1411 0.0495 0.3065 1.4651 2.25030.04 0.3924 0.0215 0.0744 0.0306 0.4810 1.5595 2.50360.06 0.3231 0 0 0.0041 0.6728 1.8022 2.97780.07 0.1999 0 0 0 0.8001 1.9865 3.3258

Table 4.7: EVT + Kernel Optimal Portfolios for β = 95%: Optimal Portfolio,VaR and CVaR for different return level

30

Page 32: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Return KO EBAY INTEL GSAC EXXON VaR CVaR

-0.02 0.4176 0.1010 0.1481 0.1019 0.2315 1.4793 1.90170 0.4174 0.1010 0.1482 0.1019 0.2316 1.4791 1.9017

0.02 0.4264 0.0892 0.1172 0.1026 0.2647 1.4728 1.90930.04 0.4476 0.0007 0.0315 0.1105 0.4097 1.6210 2.10530.06 0.1907 0 0 0.0935 0.7158 2.1196 2.70580.07 0.0315 0 0 0.0827 0.8858 2.4300 3.2009

Table 4.8: Multivariate Normal Optimal Portfolios for β = 95%: OptimalPortfolio, VaR and CVaR for different return level

Figure 4.2: Comparison of Efficient Frontier for β=95%

31

Page 33: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Return KO EBAY INTEL GSAC EXXON VaR CVaR

-0.02 0.4204 0.0790 0.2422 0.0177 0.2408 2.7668 3.45410 0.4227 0.0764 0.2426 0.0177 0.2406 2.7712 3.4539

0.02 0.3915 0.0689 0.1987 0.0080 0.3329 2.7346 3.55520.04 0.4112 0.0139 0.0896 0.031 0.4821 3.0511 4.14580.06 0.3276 0 0 0 0.6724 3.7722 5.11150.07 0.1999 0 0 0 0.8001 4.1744 5.8798

Table 4.9: EVT + Kernel Optimal Portfolios for β = 99%: Optimal Portfolio,VaR and CVaR for different return level

Return KO EBAY INTEL GSAC EXXON VaR CVaR

-0.02 0.4365 0.0949 0.1622 0.0793 0.2271 2.1429 2.52190 0.4364 0.0959 0.1613 0.0804 0.2260 2.1458 2.5219

0.02 0.4262 0.0716 0.1348 0.0743 0.2731 2.1889 2.54510.04 0.4593 0.0003 0.0380 0.0726 0.4299 2.4183 2.84140.06 0.2112 0 0 0.0606 0.7282 3.1206 3.61570.07 0.0328 0 0 0.0806 0.8865 3.6347 4.2465

Table 4.10: Multivariate Normal Optimal Portfolios for β = 99%: OptimalPortfolio, VaR and CVaR for different return level

32

Page 34: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Figure 4.3: Comparison of Efficient Frontier for β=99%

33

Page 35: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Chapter 5

CONCLUSION

The paper considered the well-studied optimal portfolio problem. In particu-lar, we decided to minimize the coherent CVaR risk measure of the portfolio.In addition, we used a semi-parametric distribution to model the stock re-turns, based on a mixture of two distributions : the Generalized Paretodistribution and the Kernel distribution following the Extreme Value theory.In chapter 2, the Peaks-over-Threshold method was explained, showing howthe tails can be estimated by finding first a consistent threshold, and thenthe shape and scale parameters by a Maximum Likelihood method. We il-lustrated how our hybrid distribution fits historical data much better thanthe normal distribution. We used the standardized daily-log return of theS&P500 as an example. Chapter 3 explained the CVaR optimization processfollowing the paper from S. Uryasev and R.T. Rockafellar in [23]. This wasdone by introducing an objective function and some portfolio constraints un-der which the optimization problem reduces to a simpler linear programmingproblem. Finally, we conducted a numerical experiment based on historicaldatas from 5 stocks of the US market. We constructed two portfolios, oneusing the semi parametric distribution and one using a normal distribution.We also proposed the inclusion of the Clayton copula, introduced in chapter2, into the simulation process to model the correlation structure between thestocks. After optimizing our portfolios, some optimal weights were foundfor each portfolio. A slightly different capital allocation was obtained, withhigher values of portfolio CVaR in the semi parametric case. Indeed, byincorporating non-normality in the portfolio allocation process, one shall becloser to the reality and thus observes greater downside risk than in the ’nor-mal’ world. Also, using a coherent risk measure such as CVaR may help ina better understanding of Risk Management.

34

Page 36: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Bibliography

[1] K. Aas Modelling the dependence structure of financial assets : A sur-vey of four copulas, Norwegian Computing Center, 2004.

[2] C. Acerbi Spectral measures of risk: A coherent representation of sub-jective risk aversion, Journal of Banking and Finance (Elsevier) 26:15051518, 2002.

[3] M. Bohdaova and O. Nanasiova A Note to Copula Functions, 2006.

[4] Y. Bensalah Asset Allocation using Extreme Value Theory, Bank ofCanada, ISSN 1192-5434, 2002.

[5] B. O. Bradley and M. S. Taqqu An Extreme Value Theory Ap-proach to the Allocation of Multiple Assets, International Journal ofTheoretical and Applied Finance, Vol. 7, No. 8 (2004) 10311068, 2004.

[6] U. Cherubini, E. Luciano and W. Vecchiato Copula methods infinance, Wiley, 2004.

[7] S. Ciliberti, I. Kondor and M. Mezard On the Feasibility ofPortfolio Optimization under Expected Shortfall, 2006.

[8] E. De Giorgi A Note on Portfolio Selection under Various Risk Mea-sures, FINRISK, 2002.

[9] A. Di Clemente and C. Romano Beyond Markowitz : Building Op-timal Portfolio Using Non-Elliptical Asset Return Distributions, 2003.

[10] Z. Eksi, I. Yildirim and K. Yildirak Alternative Risk Measuresand Extreme Value Theory in Finance : Implementation on ISE 100Index, 1999.

[11] P. Embrechts, C. Kluppelberg and T. Mikosch Modelling ex-tremal events for insurance and finance, Springer, ISBN-10 3540609318,1997.

35

Page 37: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

[12] P. Embrechts, F. Lindskog and A. McNeil Modelling Depen-dence with Copulas and Applications to Risk Management, 2001.

[13] A. A. Jobst Loss Distribution Modelling of a Credit Portfolio throughExtreme Value Theory, 2002.

[14] E. Jondeau, S. Poon and M. Rockinger Financial Modeling UnderNon-Gaussian Distributions, Springer, 2007.

[15] P. Jorion Value at Risk, Second edition, McGraw Hill, New York,2001.

[16] S. Kotz and S. Nadarajah Extreme Value Distributions, Theory andApplications, Imperial College Press, 2000.

[17] F.M. Longin The Asymptotic Distribution of Extreme Stock MarketReturns, The Journal of Business, Vol. 69, No. 3, pp. 383-408, Jul. 1996.

[18] A. J. Neil and T. Saladin The Peaks over Thresholds Method forEstimating High Quantiles of Loss Distributions, 2007.

[19] T. Oztekin Comparison of Parameter Estimation Methods for theThree-Parameter Generalized Pareto Distribution, 2004.

[20] M. Sarma Characterisation of the tail behaviour of financial returns :studies from India, 2005.

[21] R. L. Smith Measuring Risk with Extreme Value Theory, 1998.

[22] R. Suarez Araya Improving Modeling of Extreme Events using Gen-eralized Extreme Value Distribution or Generalized Pareto Distributionwith Mixing Uncondtional Disturbances, 2009.

[23] S. Uryasev and R. Tyrrell Rockafellar Optimization of Con-ditional Value at Risk, 1999.

[24] M. Vogiatzoglou CVaR Optimization, MATLAB Central, 2002.http: // www. mathworks. com/ matlabcentral/ fileexchange/

19907-cvar-optimization

36

Page 38: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Appendix

inverse of semi parametric CDF

function [x] = invGepadiCDF(u,index)x=zeros(numel(u),1);upperQuantile=quantile(index,.95);lowerQuantile=quantile(index,.05);z=sort(index);isInUpperTail=z>upperQuantile;isInLowerTail=z<lowerQuantile;upperTail=z(isInUpperTail);lowerTail=z(isInLowerTail);

lowerTailParam=gpfit(abs(lowerTail-lowerQuantile));upperTailParam=gpfit(upperTail-upperQuantile);vi=linspace(0,1, numel(index));g = ksdensity(index,vi,’function’,’icdf’);

for i=1:numel(u)if (u(i)<0.05) % lower Tail : Generalized pareto distributionx(i)=lowerQuantile-gpinv(1-u(i)/.05,lowerTailParam(1),lowerTailParam(2));endif ((u(i)>=0.05)&&(u(i)<=0.95)) % center : kernel cdfx(i) = interp1(vi,g,u(i));endif (u(i)>0.95) % upper Tail : Generalized pareto distributionx(i)=upperQuantile+gpinv((u(i)-.95)/.05,upperTailParam(1),upperTailParam(2));endendend

37

Page 39: Building a Minimum CVaR Portfolio Under Generalized Pareto Returns - A. Martel

Clayton copula for n=5

function [u] = claycop(delta)x=gamrnd(1/delta,1);v1=unifrnd(0,1);v2=unifrnd(0,1);v3=unifrnd(0,1);v4=unifrnd(0,1);v5=unifrnd(0,1);u1=(1− log(v1)/x)ˆ(−1/delta);u2=(1− log(v2)/x)ˆ(−1/delta);u3=(1− log(v3)/x)ˆ(−1/delta);u4=(1− log(v4)/x)ˆ(−1/delta);u5=(1− log(v5)/x)ˆ(−1/delta);u=[u1,u2,u3,u4,u5];end

38