Sie sind auf Seite 1von 41

Likelihood of Loss and the Value at Risk

Module Author Saurav Roychoudhury Assistant Professor of Finance School of Management Capital University sroychou@capital.edu 614-236-7230 Year: 2010 Funding Source: NSF (DUE 0618252)

Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author and do not necessarily reflect the views of the National Science Foundation.

Module Prerequisites
The module covers topics in finance, statistics and economics. Students should have basic knowledge of probability and statistics and know the basic properties of Normal and Lognormal distributions and have done preliminary hypothesis testing. A background in economics and finance is helpful but not necessary. A course in computational science (Computational Science I) is beneficial in giving students the background in modeling techniques prior to beginning this module. It is expected that the students are familiar with working with Excel 2007. Required math level and Science Level: Intermediate.

Overview
Financial loss impairs our ability to invest, save, consume, borrow, retire and sustain our well-being. It is possible to model, at least within a reasonable bound, the likelihood of loss and the maximum loss that can befall an investment. The mathematical models can be solved by applying statistical techniques, using historical data, and Monte-Carlo simulations. This module uses mathematical models to estimate the probability or likelihood of a given loss and the maximum potential loss to an investment over a defined period of time. The module uses common statistical techniques to industry standard Value-at-Risk models.

This module is designed primarily for undergraduate students in finance, economics, and statistics. However the module can also cater to undergraduate students in mathematics, physics, computer science, engineering and geology who wish to take a course in computational finance. The module can be used as an integrated part of a computational finance course, a stand-alone component or an add-on to a typical investments or a risk management course in finance. The module can be taught in both the classroom and the computer lab. For advanced students, the module has a section which uses matrix algebra. For more details on using matrix algebra to construct portfolios in excel, refer to the

computational finance module Allocation of investment portfolios along the efficient frontier.

Keywords
Value-at-Risk, VaR, Likelihood of Loss, Monte Carlo Simulation, Lognormal returns, Portfolio hedging.

Introduction
There is a saying in life that there is no gain without pain. It is very true in financial markets, In order to get a higher return than a return on a government bond or a bank certificate of deposit, an investor will have to put money in risky securities which can range from a highly rated municipal bond to stocks and the riskiest of options. Financial loss matters as it affects everyone and one of the most important and profound question that confronts any investor is what is the worst that can happen? An investor can be a person saving for retirement or on the down payment on a house or both; investor can be a commercial bank, an insurance company, the government, a large corporation, a small business or simply a speculator. An investor could face bankruptcy; financial traders who trade with huge amounts of borrowed money can face financial ruin if they fail to exit their position beyond a limit, a bank can have its equity wiped out if its assets drop below a certain amount.

Problem Statement
Given the risks, the questions which an investor may typically ask can be: What is the most I can lose on this investment? What is the likelihood that I may lose half of my investment in a given year? How much money do I have to set aside so that my equity is not wiped out? Am I saving enough for my retirement?

This module will attempt to provide answer to these questions within the framework of mathematical models.

But first things first, we need to know some basic background material before we can start answering these questions.

Background Information
Returns
Simple Periodic Returns Rates of return are the building blocks of quantitative finance. A simple periodic rate of return, on any investment can be calculated by using the general formula

Example 1: If an investment of $100 grows to $115 in year 1 and $125 in year 2, what are the 1 period simple periodic returns for years 1 & 2. Solution: Using the above equation for simple periodic return, Simple Investment Periodic Year Value Return 0 $ 100.00 1 $ 115.00 15.00% <--=(115/100) -1 2 $ 120.00 4.35% <--=(120/115) - 1 Stock returns are one of the most widely used financial returns. The data on stocks prices are also easily available. When investors invest in a company stock they expect return in the form of dividends1 and capital gains. The stock return in any time period t, is simply the ratio of the sum of the dividends, Dt , plus the capital gains2 to the stock price at time t-1. Algebraically, the simple periodic return is given as

Some companies like CSCO have never paid a dividend. Investors buy non-dividend paying stocks because they tend to compensate the investors with higher stock prices. 2 Capital gains or loss from a stock at time t is the difference between the stock price at time t and price at time t-1 i.e., ( Pt Pt 1 ) .

There are several good websites from where students can download price information. Some of them are MSN money, NASDAQ.com, Bloomberg.com. Yahoo! Finance has a wealth of financial information in the website. It is well structured and it automatically adjusts the price data to account for dividends and stock splits3. So, the periodic return formula using Yahoo! Finance data reduces to:

(1)

For details on how to download stock price data from Yahoo and compute the monthly stock returns, refer to the sub-section Downloading Stock data from Yahoo! Finance and calculating the daily stock returns using Excel under the section Empirical Data.

Continuous Returns If the periodic return is and our initial investment is $1 then the end of period value or ). It is convenient to convert the periodic returns to

simple gross return is $1 (

continuous returns as the statistical properties of continuous returns are more tractable. We can convert any periodic return into its compounded return by taking the logarithm of 1 plus the periodic return. The continuously compounded return is given as

(2)

For example, if convert back from to

the continuous return

) = 9.53%. It is easy to

. If we compound continuously for one year by 9.53%, the .

periodic return for the year equals


3

Companies may decide to split their stock in to two or more parts. For example, if Microsoft price is $40, and the company announces a 2:1 stock split, then each stock of $40 would be now counted as 2 stocks of $20 each. A company may also wish to do a reverse split usually when they think their stock value is too low. A 1:2 reverse split would bundle two unit stocks into a single unit. If Microsoft goes for a reverse split in our example, then 2 stocks of $40 would be bundled into a single stock of $80. Yahoo! Finance takes into account the effect of any such stock splits using a split adjustment factor.

When we wish to emphasize the distinction between the simple return. Continuously compounded return, simple periodic return

and

we shall refer to

as

, enjoy some advantages over

. If we would like to find multi-period continuously

compounded returns, it is simply the sum of the continuously compounded one-period returns. Compounding, a multiplicative operation, is converted to an additive operation by taking logarithms. ( ) ( ) ( ) ( ) ( )

Example 2: If an investment of $100 grows to $115 in year 1 and $125 in year 2. What are the continuous returns for each of the years 1 & 2. Also, show that the continuously compounded 2 year return is the sum of continuous returns from year 1 and year 2. Solution: Compute the continuously compounded returns for years 1 and 2 using equation (2). Adding both the 1 period returns will give us 18.23%. This is similar to the 2-year continuous return using equation (2).
Investment Continuous Value Return $ 100.00 $ 115.00 13.98% <--=LN(115/100) $ 120.00 4.26% <--=LN(120/115) 18.23% <--=13.98% + 4.26% 18.23% <--=LN(120/100)

Year 0 1 2

Sum of 1 Period Returns 2-year Continuous Returns

Note: The sum of two 1 period simple periodic returns will not be equal to the 2 year simple return (Try this as an exercise). Analysis of Returns Data In order to quantify the risk, it is important to analyze the returns data. Let us start with the data on the US stock market returns from 1927 to 2008. The data is in the Excel file NSFII-01.xlsx and has been compiled from the data available at Kenneth Frenchs

website.4 The returns data was computed from the data on all NYSE, AMEX, and NASDAQ5 firms in the database maintained by the Center for Research in Equity Prices (CRSP). In order to visually analyze raw data, a histogram is often used. In excel, the Data analysis ToolPaks histogram tool calculates the frequency distribution of a range of data to produce a bar chart that shows the distribution graphically. 1. Choose Data/Data Analysis/Histogram. 2. The Histogram dialog asks for an Input Range and a Bin Range. In our example, the input range is the data under Stock returns and the bin range will be the data under Return Intervals (%). For each number in the bin range, the histogram counts the number of observations that are greater than or equal to the bin value, and less than the next highest bin value.

3. Figure below shows the dialog box already filled in. Use the output options group to select the location of the output. In our example we choose the output to be displayed in a New Worksheet.
4

The data is available at http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/Data_Library/ff_factors.html


5

NASDAQ data is only available from 1971 onwards.

4. The next step is to select what kind of options you want to use for the frequency distribution. If you choose Chart Output, Excel automatically generates a chart for the frequency distribution as shown in figure.

Frequency distribution of the US Stock Returns: 1927-2008


18 16 14 12 10 8 6 4 2 0

Frequency

Frequency

Return Intervals in %

The frequency distribution of historical stock market annual returns shows that there was one year where the return was less than -40%, two returns were between -40% and -30%, three returns between -30% and -20% and seven returns between -20% and -10%. Out of 8

82 years of data, the US stock market returned less than -10% in 13 of the years. A very simple way to estimate the likelihood of a return of less than -10% would be to divide 13 by 82, which is 15.9%. This approach becomes more precise as we increase the number of observations and data can be described using a distribution. There are two major advantages of presenting the data in a distribution. Firstly, we can summarize even the largest data sets into one distribution and get a measure of what values occur most frequently and the range of high and low values. Secondly, if we have large number of returns that are independent of each other and from the same population, then the return distribution can be approximated by a normal distribution6. A normal distribution has convenient properties which makes it amenable to mathematical modeling. The entire distribution can be described (and generated) by the first two moments; that is by mean and standard deviation. The observations are distributed symmetrically around the mean. The area under the normal distribution defined by one standard deviation on either side of the mean comprises 68% of all observations. A two standard deviation distance from the mean covers approximately 95% and three standard deviations covers about 98% of the data.

In our dataset, the population mean and population standard deviation of the US stocks returns from 1927-2008 is 11.39% and 20.62% respectively. If we assume the returns are
6

This is the basis for the Central Limit theorem.

normally distributed as shown in the figure below, then from the properties of normal distribution, 68% of the returns will lie approximately between -9.23% (i.e., 11.39% 20.62%) and 32.01 % (i.e., 11.39% + 20.62%). 95% of the stock market annual returns will lie between -29.85 percent and 52.63 percent (i.e., 11.39% 220.62%).

Model
Likelihood of Loss
How does the Normal distribution relate to likelihood of Loss? Suppose we wish to estimate the likelihood that an investment in the US stock market will produce a loss of 10% or more in a single year based on the historical mean and standard deviation. We begin converting the periodic annual returns into their continuous counterparts by adding one to the returns and taking the natural logarithms of these values. We estimate the mean of these continuous returns as 11.39% and the standard deviation as 20.62%. Next step is to convert our target return of -10% to its continuous equivalent, which equals -10.54%

10

[i.e., ln(1-0.10)]. We then create what is called a standard normal variable by standardizing the difference between the target return ( ) and the mean ( ) by dividing it by the standard deviation ( ). ( )

The standard normal distribution is a special case of the normal distribution where it rescales the actual mean and standard deviation to a normal distribution with a mean zero and a standard deviation of one. It shares all the properties of a normal distribution (see figure below). Standard Normal Distribution

In our example, the standardized difference z equals -1.06 [i.e., (-10.54-11.39)/20.62]. The standardized value, -1.06, is also called the normal deviate or the standardized variable. It measures how many standard deviations away from the mean is the target return. By properties of a normal distribution, a normal deviate of -1 standard deviation is 34% below the mean. Thus, there is a 16 percent (50%-34%) chance of experiencing a return that is one standard deviation or further below the mean. Therefore, a probability of return that is -1.064 standard deviation units below the mean will be little less than 16%. If we look in the Standard Normal Distribution table under -1.06, it will show a

11

value of 14.38%.7 We can also use the excel function NORMSDIST(z) where z =-1.06 to come up with the same result8. Problem 1: The large company stocks have a historical mean of 13 percent and a standard deviation of 20 percent. If the returns on large company stocks are normally distributed, what will be the likelihood that large company stocks will have a return of -25 percent or lower next year? Problem 2: An investor has a $100 million portfolio. The million dollar portfolio has a mean of 15% and a standard deviation of 45%. The investor wants that his end of year investment should not fall below $900,000. What is the likelihood that the investment will be less than the cutoff value of $900,00? So far we have based our analysis on the assumption that the return distribution is normal. The normal distribution is the most frequently used model to teach Value-atRisk. For any distribution, the mean and the standard deviation are the first two moments, the third moment measures the skewness (which measures both the direction and the magnitude of any asymmetry) and the fourth moment is described by the kurtosis which measures the fatness of the tails of the distribution. For a normal distribution, the kurtosis has a value of 3 and the skewness has a value of zero implying perfect symmetry. Sample estimates of skewness for US stock returns tend to be negative for stock indices but close to zero or positive for individual stocks. As evident from the figure below, our dataset is clearly not symmetric, the first four moments of our dataset is shown as below along with a histogram line plot9. The distribution is negatively skewed and platykurtotic (negative excess kurtosis).

In the standard normal distribution table, we look down the left column to -1.0 and across the top row to 0.06. The intersection shows a z value of -1.06 corresponds to a probability of 14.46%.
8

You can create your own standard normal distribution table by using the NORMSDIST function in Excel. NORMSDIST(Z) return the area under the standard normal distribution curve from a negative infinity to the Z value for a normal distribution with a mean of 0 and standard deviation of 1.0. See NSFII_05.xlsx.
9

You can find the moments by using Excels Data/Data Analysis/Descriptive Statistics. See NSFII_05.xlsx.

12

In real world, the investment returns in general are not precisely normally distributed, even theoretically. First, most financial assets like stocks have limited liability, so that the largest loss an investor can realize is his total investment and no more. This implies that the return will never be less than -100%. But since the normal distribution constitute the entire real line, the lower bound of -100% is clearly violated by normality. Second, if one-period returns are assumed to be normal then multiperiod returns cannot also be normal as they are products of the single period returns. For example, consider a 15% return compounded over two consecutive years. The cumulative two-year return equals 32.25 % [(1+0.15) (1+0.15) -1 = 0.3225)]. However, if we consider a -15% return compounded over two consecutive years, the cumulative two-year return equals -27.75 percent [(1-0.15) (1-0.15) -1 = -0.2775)]. This asymmetry that results from compounding is captured precisely by the lognormal distribution which is often considered to be an alternative for normal distribution. In the lognormal model, the natural logarithm of gross asset return, ( is assumed to be normally distributed, which is distributed as lognormal variate (i.e.,

implies that single period gross simple return,

)). The lognormal distribution is skewed to the right. Also, if gross

returns are lognormally distributed, the gross returns cannot fall below negative 100

13

percent. These properties of the lognormal distribution make it a more realistic characterization of the behavior of market returns than the normal distribution.

Value at Risk
Value at Risk (VaR) describes the quintile of the projected distribution of losses (or gains) over a target time horizon. In other words, it estimates the worst loss over a time horizon with a given level of confidence. VaR can be measured both in percentage terms or currency terms though currency terms are more heavily used as it is more intuitive to understand. The generic VaR statistic is defined as a one-sided confidence interval on portfolio losses [ where ( ( ) ]

) is the change in the market value of the portfolio, expressed as a and the vector changes in the random variable(s) .

function of the forecast horizon

The interpretation is that, over a specified number of trading days, the value of the portfolio will decline by no more than VaR at % of time. For example, if the VaR on a

portfolio is $ 10 million at a one-week, 99% confidence level, there is a only a 1% ( %) chance that the value of the portfolio will drop more than $ 10 million over any given week. The VaR can be reported as a dollar value or in percentage terms. The choice of % depends on the risk tolerance of the investor, securities trader, fund manager, hedge fund or the bank. Typical values of range from 1% to 15%.

There are three broad methods of calculating VaR, and there are numerous variations within each method. VaR can be estimated by running hypothetical portfolios through historical data or can be computed analytically by making assumptions about return distribution and risks, or from Monte Carlo simulations. We describe the three methods in this section using 3 months of daily returns of Microsoft stock10.

10

The daily returns of Microsoft stock from April 1, 2010 to July 1, 2010 is in the Excel file NSFII_02_msft.xslx

14

1. Historical Simulation
Historical simulation represents the simplest way of estimating the VaR. It is a nonparametric approach where the returns are not assumed to be based on any statistical distribution. The VaR for a portfolio is estimated by using actual historical returns data to create a hypothetical time series of returns on that portfolio. The approach is based on the nave assumption that history repeats itself, with the period used providing a full and complete picture of the risks to the portfolio. This method puts an equal weight to the time series data when it comes to measuring the VaR, that is, it treats the change in portfolio from today to tomorrow as similar to it was in the past. In its simplest form, the VaR is calculated by looking at the percentiles of the data. It is defined as the percentile of the potential losses that can occur within a given portfolio during a specified time period. For example, if the dataset has 100 daily time series observations, then the daily VaR at 5% will be the 5th lowest observation in the dataset.

The historical approach suffers from some obvious problems because it assumes that past prices are a good predictor of future prices and it uses single sample paths of prices to compute VaR which may not correctly reflect the future. Also, if the sample period does not include periods of high volatility it is likely to underestimate the VaR.

Historical Simulation method: 1 Risky Asset Example 3: Calculate VaR at 1%, 5%, 10% and 15% for a 1 day horizon for Microsoft stock. Solution: Step 1: We use three months of Microsoft stock returns to calculate the daily VaR. Step 2: Find the value that corresponds to the appropriate VaR. Excels PERCENTILE function returns the percentile of values in an array. For example, if 5% is ). To

percentile, then 95% of the values in the array would be greater than the value returned by the PERCENTILE function. The EXCEL syntax is =PERCENTILE(

15

create an array for Microsoft returns, see the appendix A2 on How to create an Array Name. To calculate the daily VaR at 10% for Microsoft stock, the formula is =PERCENTILE( ). This returns -3.96% which implies that based on the data there is a 95% confidence that the worst loss wont exceed -3.96%. In other words, only one out of twenty times you would expect Microsoft stock to fall by more than or equal to -3.96% in any given trading day. The detailed solution is provided in the Historical tab in the excel workbook NSFII_02_Msft.xlsx.

The historical simulation method is heavily dependent on the time series of returns. If Microsoft returns were from a period when there was very high volatility (as in later half of 2008), the VaR numbers would have a higher negative value. Problem 3: Compute the daily VaR at 1%,5% and 10% using the Historical Simulation Method for Microsoft stock using there months data from September 2008 to November 2008. Are the numbers similar to the example? Why or why not?

2 Risky Assets One of the primary objectives of creating a multi- asset portfolio is reducing or containing risk through diversification. The risk depends on the number of risky assets and how diverse the risky assets are. More the number of stocks in a stock portfolio, the lower would be the portfolio risk. For example, an S&P index portfolio will typically have a lower risk than a portfolio of 10 random stocks. Similarly, more diverse are the stocks in the portfolio (indicated by low or negative covariance between the assets) the higher is the benefit from reducing risk. A portfolio of auto or technology stocks will have a higher risk than a portfolio which has a more diverse composition- multi-sector, international, young and old firms etc.

Example 4: The excel file NSFII_2 VaR.xlsx contains time series monthly stock price data on risky assets A and B from January 2002 to December 2006. A minimum

16

variance portfolio suggests that the portfolio weights on A and B to be 43% and 57% respectively. Given the information, find the monthly VaR for the portfolio. Solution: Step 1: Find the historical portfolio returns from January 2002 to December 2006 assuming the portfolio weights to remain constant. Step 2: Use Excels PERCENTILE function to find the cut-off points from the historical portfolio returns corresponding to the VaR of 1%, 5%, 10% & 15%.

2. Delta Normal VaR


One of the popular analytical methods of estimating the Value at Risk is by using a parametric method. In its purest form the Delta Normal method assumes that the returns of the risky asset or portfolio are assumed to follow a normal distribution. The lognormal distribution is also used as a possible alternative. The Delta Normal method follows directly from the discussion on the Likelihood of Loss section. The VaR statistic is defined as a one-sided confidence interval on portfolio losses when returns are distributed as normal or lognormal.

Delta Normal method: 1 Risky Asset

(3)

Example 5: Calculate VaR at 1%, 5%, 10% and 15% for a 1 day horizon for Microsoft stock using the Delta Normal method. Solution: Step 1: We use three months of Microsoft stock returns to calculate the mean standard deviation of daily returns. value corresponding to the . The NORMSINV returns the and

Step 2 : Calculate the

inverse of the standard normal cumulative distribution for probability ( ) corresponding

17

to the normal distribution with standard deviation . The standard deviations away from the mean is the .

value tells us how many

For = 5%, the at 5% will be [

value is -1.645 standard deviations to the left of the mean. The VaR ( ) ] which implies that there is a

95% confidence that the worst daily return will not exceed -3.22%. The detailed solution is provided in Delta Normal tab in the excel workbook NSFII_02_Msft.xlsx. Problem 4: A portfolio has a mean of 15% and a standard deviation of 45%. What is the annual VaR at 1%? With 1 percent probability what is the maximum loss at the end of the year. Assume normal distribution. Problem 5*: A hedge fund has a $100 million portfolio. The hedge portfolio has a mean of 15% and a standard deviation of 45%. What will be the VaR if the returns follow a lognormal distribution? Also calculate the daily VaR at 5%. 2 Risky Assets Finding the risk for a 2 Asset portfolio The portfolio risk is measured by portfolio standard deviation. A single asset standard deviation can be easily obtained by using the excel formula STDEVP, however for a portfolio it is a bit more complicated. Let us assume that there are only 2 risky assets, A and B, available for consideration in an investment portfolio. The expected portfolio return is given by (4) where, and are the average returns and and are the respective portfolio

weights of the two assets A and B. We also assume that the portfolio weights should add up to 1 (i.e., that they are non negative ( The portfolio variance is given by ( ) ) ) and

18

and the standard deviation ( ) ( ) (5)

Note: The Covariance between A and B can also be expressed as where is the correlation coefficient between assets A and B.

Example 6: Find the Delta Normal VaR for the 2 stock portfolio using the data in NSFII_2 VaR.xlsx. Solution: Step 1: Find the portfolio return and standard deviation using equations (4) & (5). Step 2: Find the Z values corresponding to 1%, 5%, 10% and 15% using NORMSINV function. Step 3: Find the respective VaRs corresponding to 1%, 5%, 10% and 15% using equation (3)

Monte-Carlo method
One of the most important characteristic of asset returns is their randomness. The return of Microsoft stock over the next day is unknown today, the best guess of tomorrows price will be todays price. A single point like an average may not be the best estimate for a group of data points. However, if we have thousands and thousands of points to consider, we greatly expand our horizon of possible outcomes. One way to do is by generating random numbers to reveal possible outcomes in an uncertain environment and simultaneously attach probabilities to each outcome. This technique was named after the town of Monte Carlo in Monaco, where the primary casino attractions are games of chance such as roulette wheels, dice, and slot machines. When we roll a die, we know that a 1, 2, 3, 4, 5, or 6 will come up (given a fair die!), but we don't know which number will appear for any particular roll. Thats randomness, and the random behavior in dice is similar to how Monte Carlo simulation works. One of the earliest applications of Monte Carlo simulation occurred in the late 1940s, when scientists at the Manhattan Project at Los Alamos National Laboratory used the method to predict the range of possible nuclear

19

fission results. While most spreadsheet analysts are not rocket scientists, the principles of how to forecast results with uncertainty are almost exactly the same. Steps for Monte Carlo Simulation
Step 1: Generate a Random Number (between 0 and 1) and also select the appropraie distributions

Step 4: Record the simulation output(s) from the trial

Step 2: Convert Random Number to Sampled Value of Input using the selected distribution

Step 3: Sampled Value is used in this trial of spreadsheet model for calculation

We can use Excels

() in step 1 to generate random numbers between 0 and 1.

However, there is no way to record the results from the simulated trials as Excel will recalculate every time the Excel sheet is refreshed or used. There are commercially available products like @Risk and Crystal ball which allows us to perform Monte Carlo simulations within the Excel framework but they are expensive. Dr. Roger Myerson who is a professor of Economics at the University of Chicago has developed an excel add-in called SIMTOOLS which can be used to conduct Monte-Carlo simulations in excel. The add-in is available free of cost at his website. For instructions on how to install and use SIMTOOLS, refer to the Appendix A3 on How to use Simtools.

In the following example, we will show how to use Monte Carlo method using the SIMTOOLS add-in.

20

Monte-Carlo method: 1 Risky Asset Example 7: Calculate VaR at 1%, 5%, 10% and 15% for a 1 day horizon for Microsoft stock using the Monte Carlo method. Solution: Step 1: Select a specific distribution for Microsoft asset returns and estimate the parameters of that distribution. As a simple case we use a normal distribution with parameters similar to the delta normal method (mean = -0.36% and standard deviation= 1.74%). We use Excels () which generates an evenly distributed random real

number between 0 and 1. Once the distribution has been selected we use a pseudorandom number generator that will generate N hypothetical outcomes. Step 2: To convert random numbers to sample values of the input we use Excels NORMINV(Probability, Mean, Standard Deviation) function which returns the inverse of the normal cumulative distribution for the specified mean and standard deviation with the random probability value generated by RAND(). However, the mean values calculated will give a different output every time the worksheet is refreshed or by pressing F9. Step 4: In order to store the results for each number of trials we use SIMTOOLS. For example, we want to create a table which will store results from 3000 trials. We start by selecting a counter column which will be the leftmost column for our simulation. In the figure below the Counter column starts from Simtools in cell B7. The cell on the right (C7) would be the formula reference cell for the value we want to simulate (D5). Once both the cells (B7 and C7) are highlighted we write B7:C3007 on the name tab and press Shift and Enter simultaneously to highlight the entire range.

21

Once the column is highlighted, go to the ribbon item Add-ins and select Simtools/Simulation table.11 This will populate the columns B8:C3007 with 3000 simulated results of msft daily stock returns. To find the 5% VaR, simply select the 5% percentile value using the PERCENTILE function (as in the Historical simulation method). If there are 3000 observations, it will select the 150th smallest observation. This gives a VaR value of -3.15%.The detailed solution is provided in the Monte Carlo tab in the excel workbook NSFII_02_Msft.xlsx.

11

For some Excel 2007 features refer to Appendix A1- Ribbon feature in Excel 2007

22

Here is a summary of the results of the three methods to find the daily VaR for Microsoft stock returns.

A Comparison of 3 methods to Estimate VaR


1% 5% 10% 15% Delta Normal -4.40% -3.22% -2.58% -2.16% Historical Simulation -4.17% -3.96% -2.35% -1.89% Monte-Carlo method -4.31% -3.15% -2.54% -2.17%

23

Here is a summary of the results of the three methods to find the daily VaR for Microsoft stock returns. Problem 6: Compute the daily VaR at 1%, 5% and 10% using the Delta Normal and Monte Carlo method (assume Normal distribution) for Microsoft stock using three months data from September 2008 to November 2008. Are the numbers similar to the example? Why or why not? 2 Risky Assets Example 8: Find the VaR by Monte Carlo approach for the 2 stock portfolio using the data in NSFII_2 VaR.xlsx. Assume returns are normally distributed. Solution: We use the same basic framework from the Delta Normal method. We assume the portfolio returns to follow a normal distribution with an expected portfolio return of and standard deviation of . ( () ) Step 1: Generate random portfolio return by using Excels

Step 2: Do 5000 iterations of step 1 using the SIMTOOLS to create a simtable. Step 3: Find the respective cutoff points corresponding to the VaR of 1%,5%,10% & 15% using Excels PERENTILE function to come up with estimates of VaR. Lognormal distribution is often used as an alternative to Normal distribution as discussed earlier in this module. In the lognormal model, the natural logarithm of gross asset return is assumed to be normally distributed, which implies that single period gross simple return is distributed as a lognormal variate.

Example 9: Find the VaR by Monte Carlo approach for the 2 stock portfolio using the data in NSFII_2 VaR.xlsx. Assume lognormal distribution.

Solution: Step 1: Convert the mean and standard deviation to the lognormal equivalent we apply the following formula

Step 2: Generate random portfolio return by using the Simtools formula ( ) () . The one is added at the end to convert the gross portfolio return to net portfolio return. Repeat Steps 2 & 3 from the normal distribution example to arrive at the required VaR numbers.

3 Risky Assets It is easy to modify the mean and standard deviation of a 2 asset portfolio to a three asset portfolio (A, B and C). The average portfolio return can be written as (6) With the condition and And the portfolio standard deviation can be written as
( ) ( ) ( )

(7) But as the number of assets in a portfolio increases, the calculation of portfolio standard deviation becomes quite tedious. We can resort to matrix algebra to solve this problem. The example below is on 3 risky assets but the formula can be generalized to include any number of risky assets.

Matrix method The expected return, =[ ] and [ and portfolio weights ] are both column vectors

25

The expected return on the portfolio is given by the matrix multiplication (8) Where is the transpose of the vector .

Note, the above equation is equivalent to equation (6) in the 3 asset case. For the portfolio variance (and standard deviation), we have to first define the variancecovariance matrix , where element) (example, And ( ) (example, ) ( ) ) | | ( is the row element and is the column

For a 3 asset case, the variance covariance matrix is the shaded area is the matrix. Asset A Asset B Asset C Asset A Asset B ( ) Asset C ( ) ( ) The portfolio variance is given as (9)

Example 10: a) Jack has a portfolio consisting of three assets A,B, and C with expected average returns of 17%, 6% and 12% and standard deviations of 30%, 25% and 45% , respectively. The variance-covariance matrix for the three assets is shown below Asset A 0.37 -0.07 0.05 Asset B 0.1 -0.01 Asset C

Asset A Asset B Asset C

0.25

Find the VaR (at 1%, 5%, 10% and 15%) in percentage terms for the 3 assets using the Delta Normal as well as the Monte Carlo Method.

26

Solution: See NSFII_04.xlsx for details. Delta Normal method.

Monte Carlo Method

b)What is the maximum amount that Jack can lose in a year with VaR at 1%, 5%, 10% and 15% if he had a $100,000 of initial investment. See NSFII_04.xlsx for details.

27

Problem 7: The file NSFII_03.xlsx has stock returns data on 13 stocks from June 2001 to June 2007. Create a portfolio on JPM, ORCL and HAL stocks with the portfolio weights of 33%, 33% and 34%, respectively. Calculate the VaR at 1%, 5%, 10% and 15% using the Delta Normal and Monte Carlo method. Assume normal distribution.

Assessment of the model


As past stock market data is readily available, it would be easy to assess how efficient are the models in forecasting the potential loss. An interesting exercise would be to create a weekly or monthly VaR of a portfolio and see how many times the VaR would fall within the prescribed limit during a semester.

Empirical Data
Historical data on stocks and bonds are widely available on a host of financial websites. My recommendation is Yahoo finance! at http://finance.yahoo.com/. The historical data on stock indices which go back till 1926 is available free at Kenneth Frenchs website at http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/Data_Library/f-f_factors.html All the data that has been used in the module is available in the provided excel workbooks. Downloading Stock data from Yahoo! Finance and calculating the daily stock returns using Excel. Step 1: Type the url http://finance.yahoo.com on the address bar of your web browser and click on Finance.

28

Step 2: It would open a page similar to as shown above. In the Get Quotes box, type the ticker symbol for the stock you want to look up. If you do not know or remember the ticker symbol of a particular stock you can always click on the Symbol Lookup button which would assist you finding the correct symbol. When you have entered your stock symbol (in our example it MSFT for Microsoft), press enter or click on Get Quotes.

29

Step 3: It would take you to a page similar to as shown above. You can choose Historical Prices to get Microsofts price history or you can click on the picture of the price chart and then scroll down to arrive at Historical Prices.

Step 4: Indicate the time period and frequency for the data we want. We have chosen a three month time frame from April 1 to July 1, 2010. We chose the Daily option to download daily price data.

30

Step 5: If we scroll down the webpage it gives us an option to download the data in Excel spreadsheet format. Yahoo allows you to save the spreadsheet file as Table.csv which is a comma separated value file and can be opened directly by Excel. We changed the name to msft.csv to save it in our computer.

31

Step 6: To compute monthly returns we keep only the columns date and Adj. Close. The adjusted closing stock price in yahoo accounts for any dividends and stock splits which may have occurred during our sample period. The date is tabulated in descending order and we need to sort it in ascending order in order to calculate returns. We use the Excel sort function to sort the date in ascending order. At this point it is preferable to save it as a Microsoft Excel workbook file instead of a Comma separated value file as the Excel workbook file preserves any formulas we work on while the .csv file does not.

Step 7:The stock returns can be calculated using the formula for continuous periodic returns ( ). In our example Microsoft daily stock return corresponding to

4/5/2010 is given by typing the Excel formula =LN ( B3 / B2) in cell C3. Here Pt Price on 4/5/2010 and Pt 1 Price on 4/5/2010. Copying the formula from cell C3 to the end of your date range will give you the time series data on Microsoft stock returns. There is a simple way to copy the returns without having to drag the cell C3. Put the cursor on the bottom right of cell C3 till the plus sign appears (as shown in the figure).

32

Then double-click on the plus sign and the column would populate itself. This method works only if there is a non-empty column on the left.

Problem Solutions
1. Assuming Normality, a return of -25 percent is [-25 (-13)]/20 = -1.9 standard deviations below the mean. If we look up the cumulative probability distribution table of a normal distribution or use the excel function NORMSDIST(z), this will give us a value of 2.87%. In other words, the likelihood that a portfolio of large company stocks will fall by 25 percent or more next year is 2.87 percent. 2. The likelihood that the portfolio will fall below $900,000 is 28.9 percent. See NSFII_01.xlsx [tab LOL] for solution.

33

3. The VaR for Microsoft returns using the data from 2008 will be higher because of high volatility during that period.

4. We have

(1%) =-2.33. Using Equation 3, we get VaR (@1% = -89.68%.

Maximum loss = $100 89.68% = $89.68 million Here is an alternate way to calculate the VaR using the Delta Normal method using Solver. We first find the cut-off value by setting the target cell equal to . The target cell gives the probability that the normal variate is worth less than the cut-off. The solution is available at NSFII_01.xlsx [tab VaR]

34

Once we have the cut-off value, we find VaR by subtracting it from the investment, as shown below.

5. Use () function to find the inverse of a lognormal distribution. See file NSFII_01.xlsx [tab Lognormal Distribution] for complete solution. 6. The VaR for 2008 will be higher because of high volatility during that period. 7. See file NSFII_03.xlsx for a detailed solution.

Suggestions to Instructors
It is important that the students learn about the significance of quantifying risk. Give examples of different areas where the concept of VaR and the likelihood of loss can be applied in real life. The students should be able to distinguish between the three methods and use their own value judgment to choose the appropriate method. The module can be done over three weeks if the students have the necessary background in probability and statistics or they have already done the module on portfolio analysis (similar to my Computational finance module Allocation of investment portfolios along the efficient frontier). There are 10 solved examples in this module. The problems are shown as Problem and typed in red with an Arial Narrow font. There are seven problems in the module and the

35

detailed solutions are provided. The challenging problems are denoted with an asterix. The examples and the problems are all available in the multiple Excel files supplied with this teaching module.

References
Das, Sanjiv and Lynagh, Stephen, Value at Risk, HBS Number: 9-297-069 Type: Case (Gen Exp) Publication Date: 1/31/1997, Harvard Business Publishing. Damodaran, Aswath, Strategic Risk Taking, Wharton School Publishing, October 2009, ISBN-10: 0-13-704377-5. Duffie, D. and J. Pan, An Overview of Value at Risk, Working Paper, Stanford University, 1997 J.P. Morgan RiskMetrics Monitor, Second Quarter 1996. RiskMetrics Technical Document, J.P. Morgan, December 17, 1996;

36

APPENDIX A1. Ribbon feature in Excel 2007. Excel 2007 features a new Ribbon feature which groups small icons for common tasks rather than the old drop down menu style. For instance, if we want to change the formatting of a cell or increase or decrease the number of decimal spaces, it can be done with just a click.

To learn more about the new features in Excel 2007, refer to the Computer Worldi article on Excel.

A2. How to create an Array Name It is very convenient to name a series of data in a column or a row as an array in excel. An array can be a single row (called a one-dimensional horizontal array), a column (a one-dimensional vertical array), or multiple rows and columns (a two-dimensional array). Instead of selecting the whole row or column we can use the array name in the formula. You can create the array name by selecting the data and right click to choose Name a Range or you can highlight the data and then type the preferred name in the Name Box as shown below for Microsoft daily returns data (array name= msft).

37

How to use Simtools Simtools is an excel add-in developed to conduct Monte-Carlo simulations in excel. The add-in was developed by Dr. Roger Myerson who is a professor of Economics at the University of Chicago. The Simtools add-in is available as free software and can be downloaded from http://home.uchicago.edu/~rmyerson/addins.htm#simt The add-in needs to be saved in one of system directories. It can be either copied to ..\Program Files\Microsoft Office\Office12\Library directory or the ..\Documents and Settings\.\Application Data\Microsoft\AddIns directory or to the Excel MacroLibrary folder (in a Macintosh). You can then can add Simtools in excel by the Tools>Add-Ins command, checking the SimulationTools box. For more details on how to select add-ins, here is a step-by-step tutorial at http://peltiertech.com/WordPress/installing-an-add-in-in-excel-2007/ Normal Distribution There are two Excel functions that are heavily used with Simtools. They are RAND and NORMINV. Every RAND() takes a random value drawn from a uniform distribution on the interval between 0 and 1 such each variable is independent. New random values of

38

the RANDs are drawn every time the spreadsheet is recalculated. The NORMINV(probability, mean, standard deviation) function can be used to make random variables that have a normal distribution. By putting a RAND() value in the place of the probability parameter generates a normal random variable which has an approximately two-thirds of being between one standard deviation from the mean. For example, if we enter the formula =NORMINV(RAND(),10,5) into any cell, then its value becomes a normal random variable with mean 10 and standard deviation 5, and the variables lie between 5 and 15 about two-thirds of the time.

Lognormal Distribution LNORMINV(probability, mean, stdevn) returns the inverse cumulative distribution for a lognormal random variable, parameterized by its mean and standard deviation. So the formula =LNORMINV(RAND(),10,5) generates a lognormal random variable that has mean 10 and standard deviation 5. The value of a lognormal random variable can be any nonnegative number.

Triangular Distribution

TRIANINV(probability, lowerbound, mostlikely, upperbound) returns the inverse cumulative for a triangular probability density on the interval from the lowerbound to the upperbound, with mode at the mostlikely value. So =TRIANINV(RAND(),5,10,20) yields a random variable that takes values between 5 and 20, with a probability density that is highest at 10.

Some useful functions CORAND(correlarray, randsource) returns a vector of uniform 0-to-1 random variables (individually like RANDs) that are correlated appropriately to serve as seeds for constructing random variables with the given correlations. CORAND is an array function, designed to return values simultaneously to a selected range of cells in a row, when entered with CTRL-SHIFT-ENTER.

39

The

correlation array should be symmetric and must have 1s on the diagonal from

top-left to bottom-right. For a non-symmetric array, CORAND only looks at the portion on and below the diagonal.) The correlarray parameter can also be a single number, in which case CORAND functions as if the correlarray parameter were an returning two random values with the given correlation. array,

CORRELPR(values1, values2, probabilities). For a probability distribution with corresponding values of two random variables, CORRELPR returns the correlation coefficient of the random variables. The first two parameters (values1, values2) are ranges which contain one cell for each possible combination of values of the two random variables, listing possible values of the first variable in the values1 range and the second variable in the values2 range. The third parameter (probabilities) is a range containing the corresponding probabilities of these value pairs. The cells in the probabilities range must contain nonnegative numbers that sum to 1. The values1 and values2 ranges must each have the same number of rows and the same number of columns as the probabilities range. COVARPR(values1, values2, probabilities). For a probability distribution with corresponding values of two random variables, COVARPR returns the covariance of the random variables. The first two parameters (values1, values2) are ranges which contain one cell for each possible combination of values of the two random variables, listing possible values of the first variable in the values1 range and the second variable in the values2 range. The third parameter (probabilities) is a range containing the corresponding probabilities of these value pairs. The cells in the probabilities range must contain nonnegative numbers that sum to 1. The values1 and values2 ranges must each have the same number of rows and the same number of columns as the probabilities range.

PRODS(values) multiplies each pair of values in the given range and returns the products as a square array. The values must be given in one row or one column. To illustrate the use of this function, suppose that a range named "correls" lists the

40

correlations of the random returns per share of various stocks, a range named "stdevns" lists the standard deviations of these stock returns, and a range named "shares" lists the numbers of shares of these stocks in some investment portfolio; then the standard deviation of the total returns of the portfolio is SUMPRODUCT(PRODS(shares),PRODS(stdevns),correls)^0.5

Simulation Table The Simulation Table tabulates output from repeated MonteCarlo simulations of a spreadsheet model with random variables. To use SimulationTable, Excel's Calculation property must be set to Automatic (see Tools>Options>Calculation). Before using the SimulationTable macro, a range must be selected in which the output to be tabulated is in the top row, but not in the top-left cell. The output from repeated recalculations of the model then fills the lower rows of the selected range below these output cells. The leftmost column of the selected range is filled with fractile numbers, indicating (in each row of the simulation table) what fraction of the simulation data is above this row. SimulationTable stores the output data as values that are not recalculated whenever the spreadsheet changes.

http://www.computerworld.com/s/article/9028228/Excel_2007_Cheat_Sheet

41

Das könnte Ihnen auch gefallen