Documente Academic
Documente Profesional
Documente Cultură
May 2010
Abstract
The financial concept of value-at-risk (VaR) plays an integral role in modern financial
risk management. VaR is used by many large financial institutions to measure the
riskiness of their holdings and determine safe levels of capital to hold. This paper will
explore the mathematics behind this fundamental concept. Specifically, the relevant
probability theory underlying VaR will be discussed as will some concepts from linear
algebra and applied mathematics that are useful in the computation of VaR. The paper
will conclude with a sample problem that illustrates how to go about finding the VaR for
a hypothetical portfolio.
I. Introduction
Value-at-Risk (VaR) gives the financial risk manager the worst expected loss under
average market conditions over a certain time interval at a given confidence level. In
other words, VaR gives the risk manager a sense of what he or she can expect to
over the time period t is given by the smallest number k ∈ ℜ such that the probability of
portfolio has a “one-day VaR at a confidence level of 5% of $10 million.” This means
that over a typical one-day period, the bond portfolio will lose $10 million or more only
5% of the time. While the concept of VaR is not too difficult to grasp, obtaining an
actual VaR is quite involved. A large amount of data on historical returns for the
covariances of the returns of each holding are calculated. Using these values, an average
return and variance of the overall portfolio can be determined. At this point, the risk
manager determines the probability distribution that the return data will be assumed to
follow. Using the calculated portfolio return mean and variance and this assumed
probability distribution, one can solve for the VaR at a given confidence level.
2
II. The Mathematics Underlying Value-at-Risk
Two areas of mathematics that are relevant to understanding VaR will be discussed.
First, the relevant probability theory will be covered, as this forms the underpinning of
VaR. Second, some topics from linear algebra will be reviewed. While not integral to
the underlying mathematics of VaR, techniques from linear algebra are very useful in the
Perhaps the most important concept in probability theory is that of expected value.
n
given by E[X] = ∑x p( x ) , where x are the various values that X can take, and p(x )
i =1
i i i i
The expected value can be thought of as a weighted average of the possible values that X
can take. When each value of X occurs with the same probability, the expected value
n n n
1
takes on the more familiar form E[X] = ∑xi p( xi ) =
i =1
∑ px i =
i =1 n
∑x
i =1
i .
If X and Y are two random variables, and a,b ∈ℜ , then the following holds:
3
n n
E[ ∑αi X i ] = ∑α E[ Xi i ] , for random variables Xi and αi ∈ℜ . This can be proved
i =1 i =1
In addition to having a measure of the average value of a set of data, being able to
n
is given by Var(X) = E[(X-µ)2] = ∑( x
i =1
i − µ ) 2 pi , where µ is the expected value of X, xi
are the various values that X can take, and p(xi) is the probability of X taking the value xi.
When each value of X occurs with the same probability, the variance takes on the more
n n n
1
familiar form Var(X) = E[(X-µ)2] = ∑( x
i =1
i − µ ) 2 pi = ∑( x
i =1
i − µ)2 p =
n
∑( x
i =1
i − µ) 2 .
1. Var(aX) = a2Var(X) , a ∈ℜ
2. Var(X+b) =Var(X) , b ∈ℜ
conjunction with the variance is that of covariance. Covariance is a measure of how two
4
random variables move together (how they “co-vary”). It is related to the more well-
or σXY is given by Cov(X,Y) = E[(X-µ)(Y-γ)], where µ = E[X] and γ = E[Y]. Using the
If X and Y both take on n values, then the covariance can also be written as
1 n
Cov(X,Y) = ∑( xi − E[ X ])( yi − E[Y ]) .
n i =1
1. Cov(X,Y) = Cov(Y,X)
Now that the covariance has been defined, the variance of a linear combination of
n n n
5
Admittedly, this looks a bit ugly. When the example quantitative problem is solved, this
summation will be better elucidated. This is one calculation where techniques from
Now that the expectation, variance, and covariance have been thoroughly discussed, the
are essential to VaR calculations. Take the expected value and variance of the portfolio
return characteristics of the portfolio, assuming it adheres to the distribution that was
Thus far, random variables whose set of possible values was finite or countably infinite
function f defined for all real numbers, having the following property:
Function of X. In other words, the probability that X is in the set B can be found by
Since X must always take a value in the reals (ie. X ∈ (-∞,∞)), the following logically
follows:
6
∞
Also, any probability statement about X can be written in terms of f. For example, if X ∈
Recall, in the discrete setting the expected value of X was defined as follows:
n
E[X] = ∑x p( x ) .
i =1
i i
E[X] = ∫ xf ( x)dx .
−∞
∫ ( x − µ)
2
Var(X) = f ( x ) dx , where µ = E[X].
−∞
7
The most well-known distribution is the Gaussian, or Normal Distribution. It is
1
e −( x −µ) 2σ 2
2
Note: Since f(x) is a probability density function, the area under the entire curve is 1.
If X is normally distributed with mean µ and variance σ2, we can create a new variable Z
that is also normally distributed and is termed the standard normal random variable.
X −µ
Z= with expected value 0 and variance 1. The probability density function of
σ
1 2
2 (1) 2 1 2
a −µ
A result of the above is that solving P[a ≤X ≤b] is the same as solving P[ ≤Z ≤
σ
b −µ
]. This process of converting a and b can be thought as a “standardization.”
σ
a −µ b −µ
is the Z-Score for a, and is the Z-Score for b.
σ σ
Finally, the cumulative distribution function for the standard normal random variable
8
a
1 −y
2
Φ(a ) =
∫
−∞ 2π
e 2
dy = P[Z ≤ a]. This can be thought of as the area of the shaded
To illustrate this
idea, consider the
following example:
Question: Suppose X is a normal random variable with mean µ and variance σ2. What is
a −µ b −µ
Solution: First, obtain Z-Scores for a and b: Za= and Zb = . Now apply
σ σ
the cumulative distribution function for the standard normal random variable.
Zb 2
1 −y 2
P[a ≤X ≤b]] = P[Za ≤Z ≤ Zb] = ∫
Za 2π
e dy = Φ( Z b ) - Φ( Z a )
This covers the basic probability theory underlying VaR. Now, two methods from linear
9
As was mentioned on page 3, the expected value of a linear combination of random
variables is the linear combination of the expected values. Suppose we have random
α1 E[ X 1 ]
α 2 E[ X 2 ]
Let K = α 3 and let U = E[ X ] .
3
α E[ X ]
n n
E[ X 1 ]
E[ X 2 ]
Then E[α1X1 + α2X2 +…+ αnXn] = K U = ( α 1 α 2 α3 αn )
T E[ X ]
3
E[ X ]
n
n n
E[ ∑αi X i ] = α1E[X1] + α2E[X2] + α3E[X3] +…+ αnE[αnXn] = ∑α E[ X i i ] , agreeing
i =1 i =1
n
E[ ∑αi X i ] can be thought of as the expected return of a portfolio of financial assets Xi,
i =1
where αi is the proportion of the portfolio invested in asset Xi. Assuming the expected
return of each asset and the proportion of the total portfolio invested in each asset is
known, the expected return of the overall portfolio can be determined. Using matrices is
useful computationally when dealing with a large portfolio of many assets. One simple
10
T
matrix operation (K U) is all that is needed to find the expected return of the total
portfolio.
n n n
As one can imagine for a large portfolio (many Xi) this is a non-trivial calculation. Again,
matrices are usually the best way to proceed. In this case, the matrix used is the
Let the Var(Xi) be denoted σii and Cov(Xi, Xj) = σij . Then the Variance Covariance
σ 11 σ 12 σ 13 σ 1n
σ 21 σ 22 σ 23 σ 2n
Σ = σ 31 σ 32 σ 33 σ 3n .
σ σ nn
n1 σ n 2 σ n 3
T
Since Cov(Xi, Xj) = σij = Cov(Xj, Xi) σji, Σ is symmetric (ie. Σ = Σ ).
α1 σ 11 σ 12 σ 13 σ 1n
n α 2 σ 21 σ 22 σ 23 σ 2n
Var( ∑αi X i ). Let K = α 3 and Σ = σ
31
σ 32 σ 33 σ 3n .
i =1
α σ σ nn
n n1 σ n 2 σ n3
11
n
Then Var( ∑αi X i ) = K ΣK
T
. Since this result is not very obvious, let’s look at
i =1
σ 11 σ 12 σ 13 α1
3
Var( ∑αi X i ) = K ΣK = ( α1 α 2 α3 )
T
σ 21 σ 22 σ 23 α 2 .
i =1 σ σ 33 α 3
31 σ 32
α2α3σ23+ α32σ33
3 3
= ∑α Var (X
i =1
i
2
i ) + 2 ∑∑αiα j Cov ( X i , X j )
i< j
Now that the requisite mathematical topics have been covered, the solution to the
N
invested in Asset i, so the total value of the portfolio is D1+D2+…+DN = ∑D
i =1
i =D
dollars. Assume the one-day return of Asset i is normally distributed with expected value
E[ri] and variance σi2 . Also, the covariance between the 1-day returns of Assets i and j
is given by σij . Given this information, find the 1-day VaR at a confidence level of 5%.
12
Solution: First, determine the expected return and variance of the overall portfolio. The
first step in doing this is to calculate the weighting for each asset. The proportion of the
Di
portfolio expected return attributable to Asset i is αi = . These are
D1 + D2 + ... + DN
α1 E[ r1 ]
α2 E[ r2 ]
Now, let K = α 3 and let U = E[ r ] .
3
We are creating a linear combination of
α E[ r ]
N N
random variables, where the random variables are the expected 1-day returns for each
n n
Taking advantage of the property of expectations that E[ ∑αi X i ] = ∑α E[ X i i ] and
i =1 i =1
the matrix method for finding this expectation, we obtain the following result:
E[ r1 ]
N E[ r2 ] N
E[rPortfolio] = E[ ∑αi ri ] = K U = ( α 1 α 2 α3 α N ) E[ r ] =
∑α E[r ] =
T
i =1
3
i =1
i i
E[ r ]
N
µp .
Next, we must calculate the variance of the total portfolio. In other words, we need to
calculate the variance of the linear combination of random variables. As was discussed
n n n
Var( ∑αi X i ) =
i =1
∑αi2Var (X i ) + 2 ∑∑αiα j Cov ( X i , X j ) .
i =1 i< j
13
We can modify this to the conditions of our stated problem:
N N N
σ2p = Var( ∑αi ri ) = ∑αi2Var (ri ) + 2 ∑∑αiα j Cov (ri , rj )
i =1 i =1 i< j
N N
i =1 i< j
α1 σ 12 σ 12 σ 13 σ 1N
α2 σ 21 σ 22 σ 23 σ 2N
σ σ 3 N .
To actually compute σp , let K = α 3 and Σ = 31 σ 32 σ 3
2 2
α
N σ N1 σ N 2 σ N 3 σ N2
n
As was shown on page 11, we know Var( ∑αi X i ) = K ΣK. Therefore, we obtain that
T
i =1
σ 12 σ 12 σ 13 σ 1 N α1
N
σ 21 σ 22 σ 23 σ 2N α2
σ2p = Var( ∑αi ri ) = KTΣK = ( α1 α 2 αN ) σ σ 3 N α 3 .
31 σ 32 σ 3
2
i =1
σ N1 σ N 2 σ N 3 σ N2 α N
Now that we have an expected value and variance for the overall portfolio return, we can
find the VaR. We assume that the portfolio return is normally distributed with mean
µp and variance σ2p , both of which are numbers we have calculated. Since we want
14
the VaR at a 5% confidence level, we are solving for the return such that a return worse
than this return occurs only 5% of the time. Mathematically, we are solving for r* such
that
r*
1 − ( x − µ p )2 2σ 2p
∫σ
−∞ p 2π
e d x= 0.05.
Many mathematical software programs have a NORMINV function to solve for r*.
Solving for r* analytically is quite involved, and this would not be done in a real-world
r*
1 − ( x − µ p )2 2σ 2p
setting. Therefore, assume we have found r* such that
∫σ
−∞ p 2π
e d x= 0.05
holds.
15
Usually, r* is a small, negative decimal. 100 r* is a percentage and can be thought of as
the one-day percent loss such that, in normal market conditions, the portfolio loses more
confidence level is D r* .
In the unusual event that r* > 0, the VaR is not very useful. Recall, we found r* such
that the portfolio performs worse than r* only 5% of the time. But r* > 0, so essentially
we are stating that only 5% of the time will the portfolio earn us a positive return between
should run a new VaR analysis with a lower confidence level until we obtain an r* < 0.
It is important to note the large amount of data required to undertake a VaR calculation.
In the generalized problem, the expected returns and variances of each asset, as well as
the covariances between the assets were all given. With modern computing power, it is
relatively easy to obtain these values. Normally, a risk manager will have access to
historical return data for each asset, so only a few lines of code are required to calculate
expected returns, variances, and covariances. Still, the point that a great deal of data is
needed before one can even approach calculating a portfolio VaR cannot be stressed
enough.
16
It is also important to note that VaR is a very versatile model. While this paper used a
normal distribution, practically any distribution can be implemented. This gives the risk
manager the ability to tailor a VaR model to the specific characteristics of the portfolio he
Lastly, an interesting trend in risk management has been the movement toward
probability distributions that have “fatter tails” (ie. distributions that give greater
crisis has been that financial returns do not always approximate a normal distribution or
some other benign distribution. Extreme events, often termed “Black Swans,” tend to
occur more frequently than such distributions would predict. Consequently, greater
emphasis has been placed on using distributions with fatter tails that give a larger
References
Benninga, Simon. 2000. Financial Modeling. 2nd Edition. Cambridge, MA: The MIT
17
Press.
Bodie, Zvi, A. Kane, and A.Marcus. 2008. Essentials of Investments. 7th Edition. New
“The Gods Strike Back: A Special Report on Financial Risk.” The Economist. 13
February 2010.
Ross, Sheldon. 2006. A First Course in Probability. 7th Edition. Upper Saddle River,
Wellesley-Cambridge Press.
Taleb, Nicholas Nassim. 2007. The Black Swan. New York: Random House, Inc.
18