You are on page 1of 16

Measures of Financial Risk

and their usage in Risk Management


Final Project Report
IE590: Financial Engineering
Seongjin Shin | Jish Bhattacharya
Tae Yong Yoon | Luis Zertuche
August 05, 2014
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
Abstract:
Conditional Value at Risk, an extension of Value at Risk, is fnancial mathematical
tool aimed at quantifying and reducing possible investment losses. The purpose of
this project is to study Value at Risk and Conditional Value at Risk as a portfolio risk
metrics in management and asset selection. A practical approach was taken to
understand the topic. First a basket of stocks was selected with diversifcation in
mind: stocks from diferent types of industries, verifed to be negative-to-posively
correlated. For the selected stocks, a statistical validation of the expected return was
preformed based on a two-year data set. On diferent one-year data set for the same
assets, validated by the previous step, a Monte Carlo one-day price simulation was
performed. In order to estimate price fuctuations, the Geometric Brownian Motion
model was used as the Monte Carlo sampled function. Value at Risk and
Conditional Value at Risk were estimated and compared from the simulation data;
these results were used convert the portfolio selection into a linear programming
optimization problem, with the efcient portfolio frontier as the fnal result.
1. Introduction
Events like the great recession of 2008, the dot-com bubble of 2000, a political
upheaval or weather-related disasters are forcing investors to give more attention to risk
management. Many investors do not know exactly what is in their portfolios, and more
important, how those assets work or do not work together by virtue of their
covariance structure. For example, consider all the unintended risk an investor is
incurring when assembling a portfolio composed from a few diferent but correlated
mutual. What the investor may not realize is that all funds contained a considerable
amount of the same stocks. Instead of diversifying risk, the investor has concentrated it.
A key and intuitive way to mitigate risk incurred in investment is by diversifying a
portfolio by including a large number of assets in it, while ensuring that we dont incur
punitive costs of maintaining such a large portfolio. Finding out the proportions of our
budget to invest in each asset can be a daunting problem if not precisely characterized
with the aid of quantitative tools. Another equally important and challenging problem
is how to characterize the risk of such kind of portfolio. The ideas stated above are what
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

1
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
we considered an interesting for an applied project: We were keen on applying any
learned concepts to real data using both quantitative and computational tools.
2. Data Collection
We started by assembling a tentative portfolio with fve technology stocks and four
stocks from energy and soft-drinks sectors, aiming at diversifcation. We verifed such
diversifcation by means of ensuring the correlation coefcients across our 9 stocks
ranged from negative to positive. Daily closing prices were collected for these 9 stocks in
two separate data sets: A two-year data set for statistical parameter validation and, one-
year data set for the simulation and risk optimization; year 2011-2012 and year 2013
respectively. The collected stocks are comprised of: AAPL, INTC, MSFT, SAP, COKE,
WMT, XOM, BRK-A, and DDD.
3. Statistical Validation
The (1 ) * 100% confdence interval estimate for the mean with standard deviation
unknown is: - tn-1 S/(n) + tn+1 S/ (n) where tn-1 is the critical
value of the t distribution with n 1 degrees of freedom for an area of /2 in the
upper tail. Two-sided 95% confdence intervals on the mean daily return for the
portfolio of 9 stocks were computed in Minitab.
As per the Figure 1, the baskets of 9 stocks have a mix of positive and negatively
correlated stocks for a well-balanced portfolio. As noted from the matrix, the tech stocks
are somewhat positively correlated which raises the overall Value at Risk for the
portfolio. Having energy and Retail stocks in the portfolio, hedges the overall risk to
some extent.
From the Figure 2 with 95% confdence, we can conclude that the mean daily
return falls with the 95% Confdence interval and 0 is included in the range. Moreover,
the p-value for all the stocks in t-tests is greater than a value of 0.05 or level of
signifcance. With a sample size of 252, the normality assumption is not overly
restrictive and the use of t distribution is likely to be appropriate. Since the data is
normally distributed, the expected value of sample Standard Deviation follows:
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

+
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
E(s
2
) ~
2
We use the expected return of 9 stocks from this validation and supply as a
parameter to Monte Carlo Simulation program.
Figure 1: Correlation Matrix of the Portfolio (Daily Closing Price 2013)
Figure 2: Sample Data Analysis with 95% Confdence Interval
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

,
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
4. Theoretical Background and Methodology
We established a data processing stream that takes as n number of stocks input for any
time interval and produces an efcient frontier of optimal asset weights for a target rate
of return. Before detailing the implementation steps we will describe the quantitative
tools and concepts that went into the scripting of our data pipeline.
Geometric Brownian Motion for Price Estimates
First conceived in early twentieth-century France by fnancial theory pioneer and
mathematician Louis Bachelier, Geometric Brownian Motion is a formalism that
attempts to model fuctuations in asset prices as a stochastic process, akin to the random
motion of gas particles. In essence the Brownian Motion equation tries to account for
change in price over a given period of time, by mixing what is currently known about
the stock price with a random process. The known or certain component is called drift
(d) and is calculated using the expected value of the stocks price historical data (
data
),
eroded by half of the historical variance (
2
data
):
d =
data

2
data
/2
The random or uncertain component of the price change is modeled as a sample
from a target distribution of prices. What distribution to choose, its implications and
how to properly characterize it, is a whole other topic beyond the scope of this project;
we will briefy touch back on it when we elaborate on some of the limitations of this
model. For this report and data pipeline, we choose to use normally-distributed asset
prices as a working and still-useful assumption. When put together, both the certain and
uncertain components result in the GBM equation for the daily price:
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

4
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
Where is the number of time-steps to be simulated, and the function
generates a pseudo random number sampled from the Standard Normal Distribution.
Value at Risk and Conditional Value at Risk
Value at Risk (VaR) is a metric of the incurred risk of an investment expressed as
the most likely maximum loss of a portfolio or an asset give a confdence interval (CI)
and time horizon. Put in other words, VaR multiplied by the capital in the investment
allows investors to calculate the most probable amount of money they would lose
within the defned time horizon. An intuitive to way to think about VaR is in terms of
its position as in the distribution function of returns; a distribution of rate of returns
serves this purpose too, if we are interested in the negative rate of return instead of the
actual amount of lost dollars. In such scenario of a distribution of prices or rate of
returns, VaR will be the frontier line that delimits the CI expressed as the area under the
curve of the probability density function.
Fig. 1) Value at risk for a Confdence Interval of 95%
It is implied by fgure 1 that if we were to numerically recreate the distribution as
histogram, produced either by a Monte Carlo simulation (as in this report), or from
measured price data, the VaR can be interpreted as the quantile in which the
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

5
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
accumulated histogram area-under-the-curve has reached the CI percentage. This is true
if we approach the VaR line frontier from the right, or if approached from the left, it
corresponds to the (1 CI) value. This kind formulation of the VaR allows for an easy
computation when following a numeric approach; one simply needs to sum the areas of
the extreme histogram bins and stop when this value is equal to either CI or (1 CI).
This is expressed analytically as:
With as probability density function or histogram of the rate of return.
From this VaR defnition of risk one apparent problem becomes obvious: Although the
VaR frontier quintile is the most likely monetary loss or negative rate of return, there are
other less likely scenarios with much higher losses; basically any point to the left of the
VaR frontier falls in such category of less likelihood coupled with higher loss. This
specifc limitation can partially surpassed if somehow we take into account information
about the whole loss tail after the VaR frontier to obtain a measure of risk.
This is what is achieved by the Conditional Value at Risk (CVaR) metric. CVaR can be
conceptualized as the expected value of the portfolio or asset losses given that we have
surpassed the VaR frontier in the distribution. Formally, is the conditional probability
of the expected value of the loosing tail given that we have exceeded the VaR quantile
in the distribution:
Where, r is the portfolio or asset rate of return. From the point of view of the
histogram of the probability function, and relevant to the computational
implementation, CVaR can be seen as the inner product between the vector of number
of elements in each bin of the histogram losing tail, and the matching vector of rate o
returns, converted into probability by dividing over the total number of elements in the
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

-
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
histogram; put another way, CVaR is the weighted sum of rate of returns from the
negative infnity to -VaR, each one weighted by its respective probability.
Consequently, since CVaR takes all the possible losing-scenarios, it is a more
conservative metric than VaR, as illustrated in fgure 2.
Fig. 2) VaR and CVaR for a Confdence Interval of 95%
One can realize intuitively that CVaR is more sensitive to extreme events. For example if
we were computing a distribution with high kurtosis (with fat tails) our CVaR value
would move more and more to the left of the VaR quantile line.
Summary of Data Pipeline
Using the validated statistical parameters for the stock average daily return and
standard deviation, a Monte Carlo simulation was used to estimate daily stock prices.
Using such simulated data, Value at risk and Conditional Value at Risk were estimated
for each stock; subsequently mean-C-VAR was used as objective function in a portfolio
optimization problem to select optimal weights and plot the efcient frontier.
5. Simulation Results
Below we see a comparison between individual-stock Value at Risk and Conditional
Value at Risk as negative rate of returns. Under the VaR and CVaR frontiers we plot the
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

.
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
actual Monte Carlo simulation data condensed in a distribution histogram with 1000
bins as a design parameter.
Figure 3: VaR and C-Var over their respective RR distributions from Monte Carlo
samples of daily prices
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

8
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
Figure 4: Individual Value at Risk vs. Conditional Value at Risk RRs
We then formulated our portfolio weight selection problem as an optimization
scheme that minims -CVaR. We used linear programming over various target portfolio
rate of returns to obtain the efcient frontier of minimum portfolio CVaR. The target
portfolio rate of returns ranged from the minimum to the maximum individual rates of
return for our basket of stocks. Such process is summarized in the following linear
programming in standard form:
minimize [CVaR]
T
w
i
subject to [r
i
]
T
w
i
= r
p-target
w
i
= 1
w
i
0
Where r
p-target
is the portfolio target rate of return, w
i
is the vector of portfolio weights
and ri is the vector of individual rate of returns. Then, using this formula, we repeated
the optimization step varying r
p-target
from min (r
i
) to max (r
i
) to construct an efcient
frontier (Figure 5).
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

9
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
Figure 5: C-VaR Optimization and Efcient Frontier
We learned from reviewing the literaturethat CVaR has superior mathematical
properties versus VAR. C-VAR is a so-called coherent risk measure; for instance, the
C-VAR of a portfolio is a continuous and convex function with respect to positions in
instruments, whereas the VAR may be even a discontinuous function. This is what made
the above optimization step easy and convenient.
6. Discussion
Ways to Improve Statistical Validation
When evaluating parameters such as mean and sigma for estimators, there is still a risk
of over ftting on the test set because the parameters can be tweaked until the estimators
performs optimally. This way the knowledge about the test set can interfere with model
and evaluation metrics. To address this problem, yet another part of dataset can be held
out as validation set; training proceeds on the training set, after which evaluation is
done on the validation set, and when the experiment seems to be successful, fnal
evaluation can be done on the test set.
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

10
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
Cross Validation using k-fold design can solve this problem. The training set is
split into k smaller sets and the following procedure is carried out for each of the k-
folds:
A model is trained using k-1 of the folds as training data
The frst partition of the data is treated as test dataset. The model is ft to all the
remaining partitions.
The resulting model is validated on the remaining partitions of the data.
The performance measure reported by k-fold cross-validation is then the average
of the values computed in the iteration. This approach can be computationally intensive,
but does not waste too much data as it is the case when fxing an arbitrary test set,
which is a major advantage in problems where the number of samples is very small.
Discussion on Portfolio Risk and Measures to Mitigate
The basic principle of portfolio selection is to increase the expected return on
their portfolios and to reduce the standard deviation of the return. A portfolio that gives
the highest expected return for a given standard deviation, or the lowest standard
deviation for a given expected return, is known as an efcient portfolio. To work out
which portfolios are efcient, an investor must be able to state the expected return and
standard deviation of each stock and the degree of correlation between each pair of
stocks.
For any individual stock there are two sources of risk. First is the risk that stems
from the pervasive macroeconomic factors. This cannot be eliminated by diversifcation
which is called as systemic risk. Diversifcation eliminates specifc risk, and diversifed
investors can therefore ignore it when deciding whether to buy or sell a stock. The
expected risk premium on a stock is afected by factor or macroeconomic risk; it is not
afected by specifc risk. The expected risk premium on a stock depends on the expected
risk premium associated with each factor and the stocks sensitivity to each factors (b1,
b2, b3, etc.). Expected risk premium can be expressed as:
r rf = b1(r
factor1
r
f
) + b2(r
factor2
r
f
) + + bn(r
factorn
r
f
)
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

11
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
A diversifed portfolio that is constructed to have zero sensitivity to each
macroeconomic factor is essentially risk-free rate of interest. If the portfolio had a higher
return, investors could make a risk-free proft by borrowing to buy the portfolio. If it
ofered a lower return, one can make an arbitrage proft by selling the diversifed zero-
sensitivity portfolio and invest the proceeds towards T-bills.
In our study, we noticed that some stocks will be more sensitive to a particular
factor than other stocks. Exxon Mobil would be more sensitive to an oil factor than say,
Coco-Cola which is more dependent on underlying corn prices and supplies. If oil factor
picks up unexpected changes in oil prices, will be higher for Exxon Mobil. To mitigate
risk, we diversifed our portfolio initially from technology to energy and soft drink
stocks and noticed that the VaR and average return got adjusted with positive and
negatively correlated stocks. Ideally, it would have been better to add more stocks to the
portfolio from additional sectors such as alternative energy, retail, construction and
automotive sectors as such. However, to keep our study in scope, the portfolio was
restricted to nine stocks.
Distribution Assumptions for VaR and CVaR
From inspecting the histogram plots with VaR and CVaR, its easy to realize that
these measures are very sensitive to the distribution we assume our price data to have.
One can imagine how the kurtosis and skewness of the distribution have considerable
impact, as both would change the amount of area under the tails of our histogram plot.
As the tail-ends of the distribution become larger, we will consistently see our
CVaR increase. This is also a good way to illustrate why investors conceived CVaR over
VaR. Consider the distributions below in which both have the same VaR but diferent
CVaR:
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

1+
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
Figure 6: Same VaR, diferent C-VaR due to nature of distributions.
The most striking implication that follows from such idea is that we might consistently
under estimate or overestimate the risk in our portfolio just by assuming an
inappropriate price distribution.
7. Conclusions
We created a data fow that takes daily stock prices as raw data input and validates
their statistical parameters based on a larger data set for the same stocks. Then we used
the validated parameters to simulate one-day fuctuations in price using a Monte Carlo
simulation, based on the Geometric Brownian Motion model of pricing. From the
Monte Carlo samples, we estimated the future one-day price of our stocks. We also
estimated VaR and CVaR risk metrics and optimized CVaR to obtain portfolios that lie
in an efcient frontier.
We learned about the importance of risk measures as key quantitative information
for any investor. Specifcally about VaR and CVaR, we learned that a striking limitation
of such models is distribution. A valuable insight was the realization that risk metrics
are contingent upon the parameters and data that go into them. Two diferent indicators
might be in disagreement, or be too liberal or too conservative, depending on what
information we feed to the models. Knowing what is inside the black-box of a risk
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

1,
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
metric model is the best way a rational investor can make the most informed decisions
about a portfolio or asset. .
As parallel outcome of this project, we increased our knowledge about robabilistic
reasoning, linear optimization and fnancial computational tools, which are extremely
valuable tools for investors given the enormous growth of information available
nowadays.
8. References
Valdemar Antonio, D. F. Portfolio management Using Value at Risk: A Comparision
Between Genetic Algorithms and Particle Swarm Optimization. Erasmus Universiteit
Rotterdam, 67.
Luenberger, D. G. (1998). Investment science. New York: Oxford University Press.
Shephard, N. Markov chain Monte Carlo methods for stochastic volatility models.
Journal of Econometrics, 281-316.
Uryasev, S. Portfolio optimization by minimizing conditional Value at Risk via
nondiferentiable optimization. Computational Optimization and Applications, 391-415.

9. Appendix
Appendix A: Data Pipeline MATLAB script with commentary:
%Simulation Parameters
stockNames= {'AAPL' 'INTC' 'MSFT' 'SAP' 'COKE' 'MT' '!OM' '"#K$A' '%%%'&
loa' 'ata(mat
nsim=)****+ %num,er o- simulations
.con-=*(/0 %con-i'ence 1alue 2* 34
n,ins=3*** % num,er o- ,ins -or simulation 5isto6ram
%com.ute co1ariance matri7 an' 1ector o- st' 'e1iations
co1Prices= co18'ail9Prices:+
1arPrices = 8'ia68co1Prices::+
%com.ute a1era6e 'ail9 return
-or i=3;si<e8'ail9Prices=):
-or >=3; len6t58'ail9Prices:$3
'ail9##8>=i:=8'ail9Prices8>?3=i:$'ail9Prices8>=i: : @'ail9Prices8>=i:+
en'
en'
%com.ute a1era6e 'ail9## rate o- return 1ector
e7.##=mean8'ail9##:+
% constant 'ri-tA1ector = mu $ 1ar@) B5ere mu is E7.( 1alue o- 9earl9 rate o- return
% an' 1ar is t5e 1ariance on ##
'ri-tCec=e7.## $ st'##(D)@)+
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

14
Measures of Financial Risk and their usage in Risk Management
Team 14
08/05/14
IE590 Financial Engineering
% 6enerate 3*k sam.les o- a 'ail9 .rice -or t5e / stocks
-or i=3;nsim
simPrices8i=;:='ail9Prices8en'=;:(Ee7.8'ri-tCec?st'##(Eran'n83=/::+
en'
%simulate' rate o- return -or simPrices
-or i=3;nsim
sim##8i=;:=8'ail9Prices8en'=;: $ simPrices8i=;::(@'ail9Prices8en'=;:+
en'
%.lots simulate' .rices= omitte'
-or i=3;len6t58e7.##:
2nelem8i=;:= centers8i=;:4=5ist8sim##8;=i:=n,ins:+
en'
%-in' CA# -or 'esire' con-i'ence inter1al
.1al=3$.con-+
.Area=*+ k=*+
-or i=3;len6t58e7.##:
,inLen6t5=a,s8centers8i=3:$centers8i=)::+
totArea=nsimE,inLen6t5+
B5ile .AreaF.1al %start -rom t5e le-tmost ,in an' a'' u. area until ci% is reac5e'
k=k?3+
.Area=sum8nelem8i=3;k::E,inLen6t5 @totArea+
en'
%k is t5e in'e7 o- t5e last "in ##
%com.ute cCar as t5e E7.ecte' 1alue o- t5e GCA# <oneG un'er t5e cur1e
%eac5 5isto6ram ## 8centers8::= is Bei65et ,9 its .ro,a,ilt9 an' a''e'
rrCCar8i:= centers8i=3;k: E 8nelem8i=3;k:'@sum8nelem8i=3;k:::+ % t5is .er-orms t5e Bei65te' sum
rrCar8i:=centers8i=k:+ %5ere Be sim.l9 use K to retrie1e t5e 7 a7is 1alue= -or t5e CA# rate o- return
k=*+ .Area=*+ %reset B5ile con'itions
en'
% noB .lot Car Line -or CI= omitte'
%c5oose .ort-olio Bei65ts t5at minimi<e CCar
A=$e9e8len6t58e7.##::+
,=<eros83=len6t58e7.##::+
rtar6et=2min8e7.##:;8ma78e7.##:$min8e7.##::@H*;ma78e7.##:4
AeI=2e7.##+ ones83=len6t58e7.##::4+
co1##=co18'ail9##:+
-or i=3;len6t58rtar6et:
,eI=2rtar6et8i: 34+
B8i=;:=lin.ro68$rrCCar=A=,=AeI=,eI:+
r.8i:=B8i=;:Ee7.##'+
.CCar8i:=B8i=;:E$rrCCar'+
si6maP8i:=B8i=;:Eco1##EB8i=;:'
en'
% .lot e--icient -rontier= omitte'
!"#$$% $F I&'(!TRI)% E&*I&EERI&*

15

You might also like