FIN285a: Computer Simulations and Risk Management Midterm Exam: Wednesday, October 30th. Fall 2013 Professor B. LeBaron Directions: Answer all questions. You have 1 hour and 30 minutes. Point weightings are listed next to each problem. There are 100 points total. Answer what you know first, and then go back to other problems. Stay calm, and good luck. Part I: Interpreting matlab code: In the following problems you will be asked to interpret some example matlab programs. 1. (3 points each part) What is the output of the following matlab programs: a.) y = [2:2:8]; x = sum( 2*y ) 40 b.) y = [-2:2]; mean(y([1 3 5])) 0 c.) x = -1:2; sum( 2.^(x(x~=0))) (2^-1 + 2 + 2^2) 6.5 d.) rng(10); x = rand(1,5); rng(10); y = rand(1,5); y.^2 - x.*y Same set of random numbers (same seed) [0 0 0 0 0] (exactly and a vector) Fin285a Page 1 of 8 Midterm Exam: Fall 2013
2. (15 points) For this problem, consider the following matlab code load../data/dow.dat % daily Dow price levels p = dow(:,2); pb = dow(1:10:end,2); reta = p(2:end)./p(1:end-1)-1; retb = pb(2:end)./pb(1:end-1)-1; nsamp = length(ret1); v3 = 100*(1+retb)-100; v1 = -quantile(v3,0.01); nboot = 100000; for i = 1:nboot! rc = sample(reta,10);! pc = 100*prod(1+rc);! vc(i) = pc-100; end v2 = -quantile(vc,0.01); display( measure 1 ) v1 display( measure 2 ) v2 a.) Which risk measure is this program estimating? Report the name of the measure, and the probability level (p), and the horizon if relevant. Var, p = 0.01, h = 10 day b.) Which assumptions is the measure v1 making about the data? Does it assume a distribution? Are the returns assumed to be independent? No assumption on distribution, no assumption on independence c.) Which assumptions is the measure v2 making about the data? Does it assume a distribution? Are the returns assumed to be independent? No assumption on distribution, but returns are assumed to be independent. Fin285a Page 2 of 8 Midterm Exam: Fall 2013
3. (15 points) For this problem, consider the following matlab code. % reta = set of returns for a specific stock nsamp = length(reta); rf = 0.03; sharpe = (mean(reta) - rf)/std(reta); nboot = 100000; sharpes = zeros(nboot,1); for i = 1:nboot! retb = sample(reta,nsamp);! sharpes(i) = (mean(retb)-rf)/std(retb); end b = quantile(sharpes,[0.05, 0.95]); p = proportion(abs(sharpes-sharpe) > abs(sharpe-0.8)) [b(1) sharpe b(2)] a.) Is this a bootstrap or a monte-carlo? Bootstrap b.) What is the last line reporting? In particular what are b(1) and b(2)? 90 percent confidence bounds, percentile method c.) If you were looking for an investment with a Sharpe ratio of at least 0.75, and b(1)=0.5, and b(2)=0.65, does this stock look likely to meet your criterion? No, since the value you want is outside the conf. bands, it is unlikely to be true. d.) What null hypothesis is the second to last line testing? E(Sharpe) = 0.8 e.) If p = 0.02, do you have enough information to estimate the probability of a Type I error? If so, what is it? Yes, if you decide to reject the null hypothesis at the current estimated Sharpe ratio, the your probability of the null being true would be 0.02. Fin285a Page 3 of 8 Midterm Exam: Fall 2013
4. (12 points) For this problem, consider the following matlab code. ret1 = retus(:,2); n = length(ret1); % length of data vx = 0.005; port1day = 100*(1+ret1); porta = quantile(port1day,vx); portb = mean ( port1day(port1day <= porta)); v2 = 100 - portb; xx = 100; for i = 1:xx! ret3 = sample(ret1,n); portc = 100*(1+ret3);! p1 = quantile(portc,vx);! p2 = mean( portc(portc <= p1));! v(i) = 100 - p2; end s = std(v); c1 = norminv(0.025,0,1);c2=norminv(0.975,0,1); [s*c1 v2 s*c2] a.) Which risk measure is this program estimating? ES, p = 0.005, 1 day b.) Which type of estimation method is it using? (delta-normal, historical, monte-carlo) historical c.) What does the confidence band printed on the last line assume about the distribution of the estimated value, v2? Normal d.) What does the variable xx represent? Would it be useful to make it larger if you could? Number of bootstraps. Yes, would be good to be as large as possible. Fin285a Page 4 of 8 Midterm Exam: Fall 2013
Part II. Multiple choice (2 points each): Circle the one best answer from the choices. 5. The market risk capital formula in Basel II (and probably Basel III) requires firms to hold larger reserves when >a.) recent levels of VaR are larger. b.) the yield curve is steeper. c.) systemic risk is larger. d.) they are located farther from Basel, Switzerland. 6. A confidence interval represents a.) a range of values that you are confident about. >b.) a range of values which contains the true value with high probability. c.) a range of values which represents your own judgement about the true value. d.) a range of values which include a range of all risk management analysts at a firm. 7. One advantage of expected shortfall over VaR as a risk measure is that a.) it is easier to explain. >b.) it is more sensitive to small changes in the shape and location of the left tail of return distributions. c.) it is easier to calculate. d.) it can be used to estimate liquidity risk. 8. Risk measures that are not subadditive may encourage firms to a.) overweight the expected return. b.) avoid monte-carlo simulations. c.) underweight the impact of fat tails. >d.) split firm components into multiple parts. 9. A QQ plot is a useful tool for determining >a.) whether a set of data comes from a normal distribution. b.) when returns are independent over time. c.) when volatility has increased. d.) when a mean has significantly increased. 10. An investor s portfolio contains 1 share of stock only. Today s price is 100, and known. Tomorrow s price follows a given distribution for which you know the 0.05 quantile. To calculate the p = 0.05, 1 day VaR you >a.) have all the information you need. b.) need to also know the mean and variance for this distribution. c.) need to know the distribution of future prices, or historic return information. d.) need to use the bootstrap to estimate VaR. Fin285a Page 5 of 8 Midterm Exam: Fall 2013
11.One advantage of the historical VaR approach that Finger mentions in his article is a.) that it doesn t need much data. b.) can be done by hand with normal tables. c.) requires zero assumptions. >d.) that specific data points have names, and one can look at history for further information. 12.To do a monte-carlo analysis you a.) don t need to make any assumptions. >b.) need to assume a distribution, and values for its parameters. c.) need to first do a bootstrap to see if a monte-carlo is necessary. d.) need lots of data. 13.The student-t distribution appears to be a better approximation for daily stock returns because a.) it is more volatile than a normal distribution. b.) its mean is more unstable than a normal distribution. >c.) it has fatter tails than a normal distribution. d.) it is more skewed than a normal distribution. 14. During which decade was VaR invented? a.) 1930 s b.) 1960 s >c.) 1980 s d.) 2000 s 15. The internal models philosophy of capital requirements >a.) shifted much of the burden of assessing risk to financial institutions. b.) made the central bank the only one in charge of estimating risk. c.) set up a new class of models with an internal bootstrap rather than an external bootstrap. d.) says that investors should average all the internal models that they keep in their head. Fin285a Page 6 of 8 Midterm Exam: Fall 2013
Part III. Very short answer. Answer the following with numbers or a few words. 16.) (15 points) A portfolio profit and loss values follow the following discrete distribution. Value Probability -100 0.01-50 0.05-5 0.05 0 0.25 10 0.64 a.) What is the VaR for p = 0.005, 0.05? VaR(0.005) = 100 VaR(0.05) = 50 b.) What is the expected shortfall for p = 0.005, 0.05? ES(0.005) = 100 ES(0.05) = (1/5)100 + (4/5)50 = 60 c.) Now assume the worst outcome is revised from -100 to -200. The probabilities all remain the same, and all the other outcomes also remain the same. Recalculate the p=0.05 VaR and ES for this case. VaR(0.05) = 50 ES(0.05) = (1/5)200 + (4/5)50 = 80 Fin285a Page 7 of 8 Midterm Exam: Fall 2013
17.) (4 points) The probability of a return being smaller than -0.05 is 0.2. The probability that it is less than -0.10 is 0.01. What is the conditional probability of the return being less than -0.10 conditional on it being less than -0.05? (Do you have enough information to answer this?) Prob(R<-0.10 and R<-0.05)/Prob(R<-0.05) = 0.01/0.2 = 0.05 18.) (5 points) You know that returns in the extreme left tail of a distribution follow a power-law like relationship where, Pr(R < x) = A x α,α = 2 You know that the probability of getting a return less than 5 percent is 0.01. What is the probability of getting a return less than 10 percent (do you have enough information to tell)? Prob(R<2x) = A 2x ^(-2) = (1/4)A x ^(-2) = (1/4)Prob(R<x) Prob(R<-0.10) = (1/4) Prob(R<-0.05) = 0.0025 Fin285a Page 8 of 8 Midterm Exam: Fall 2013