Hi, I'm Sergei welcome to week two of the course of modelling risk and realities. This week we will look at the scenario approach to modeling uncertainty that will allow us to use the optimization toolkit in high uncertainty settings. We'll start with an example that models future price of a share of a hypothetical stock and discuss the notions of reward and risk as applied to this setting. Week 2 will have three class sessions. In session 1, we're going to look at the so-called scenario approach for modeling future uncertainty and see how we can come up with measures of reward and risk using scenarios. In session 2, we will use scenario approach to go over an important concept of correlation between random variables. In particular, we will see how correlation can be used for risk reduction. In session 3, we will bring back solver to help us make best decisions in settings with high uncertainty. Let's start at our session 1. Just as a reminder. In week 1 our focus was on deterministic settings. In other words, our approach was to represent any data input as a number and hope that the recommendations we come up with are still applicable as long as the actual uncertainty in the input values is not too high. This assumption gives us power to deal with large models. But what if uncertainty is the key feature of the environment we're trying to model? Let's look at the example of prices for a share of a hypothetical stock. We have created an Excel template with closing prices for a stock, we call stock A on 40 consecutive trading days. For example, the closing price for stock A on day one was $35.79, and the closing price on the second day was $36.96, and the closing price on the last day was $43.70. We're considering a hypothetical stock, but if you want to get historical prices for your favorite stock you can try for example, Yahoo Finance. In order to describe uncertainty in the future stock prices, the returns on prices that is percentages of change in price values are often used. For example, first the return on day two was around 3.3%. That is by how much the price has increased between days 1 and 2? On day 3, the price dropped by about 2.2 percentage points, so the return was negative. And on day 40, the price increased by about 1.1%. So let's look at an investor who purchases stock A at the end of day 40 at the price of $43.70. If we look one day ahead, how would this investment change in value tomorrow? In other words, how do we model the tomorrow's return on stock A? First, a couple of general comments and word of caution. Of course, modeling the future is a very tough task and this task often combines a careful analysis of historical data and subjective estimates. It is hard to over estimate the role of experience in making decisions about the future and in a particular business context. Experience of making repeated decisions helps us gauge which methods work best in a particular setting. And testing competing approaches to modeling future outcomes is very important. If different approaches prescribe similar actions then we can be more confident in our decisions. Here's a model of future uncertainty that we will be using in our analysis. We'll look at the past realizations of the returns on stock A, and use the last 20 values as our description of the future. In other words, we assume that one of the return values we saw in the past 20 days will repeat itself tomorrow. And each of the past 20 values has equal chance of being repeated. Each value that we use as a possible future realization of the random quantity that we're modeling is called scenario, hence the name for this approach. Clearly the choice for 20 scenarios is not the only possibility. That is hard to come up with general rule that determines the precise number of scenarios to use. On the one hand, using too few historical scenarios can limit the predictive power of the model. On the other hand, using too many past realizations of the random quantity can lead to inclusion of scenarios that happened a long time ago, and have limited applicability to the present time and the near future. One can try for example, using several different numbers of scenarios to check the robustness of the modeling predictions and recommendations. A couple of other things to keep in mind about scenario approach. If scenarios that one uses to model the future include only past historical values, then a model built on such scenarios will not be able to predict anything that has not been seen in the past. So one can consider extending the set of scenarios by including expert subjective projections of what can happen in the future although it has not been seen in the recent past. In a similar session experts may find that some of the scenarios observed in the past are more likely to be repeated than some other scenarios observed in the past. So the probability associated with scenarios may be adjusted away from historical values to reflect such opinions. To summarize, the essential feature of the scenario approach to modeling the distribution of random quantity of quantities is a finite number of possible realizations of that random quantity say, 20 as in our example. In coming up with scenarios and the probabilities attached to them, one can start with historical realizations and then make adjustments based on expert projections. Again, there are no general rules for those adjustments and experience in a particular business setting is an important guide here. In our example, we will just stick with historical scenarios. The pricing data are located in the file stock A. Let's go to this file and have a quick look at the daily return values for stock prices from the past 40 days. Here's the Excel file stock a that contains among other things, closing prices for stock A on quote unquote last 40 trading days. The closing prices allocated in column B in cells B2 through B41. Now in column C, we're calculating the returns on daily closing prices for stock A. In other words, the percentages of changes in daily closing prices. For example in the cell C3, we're calculating the daily return for stock A on day 2, we're comparing the closing price on day 2 to the closing price on day 1, then we calculate percentage of change. And we do it for all other trading days. So for 40 closing prices we have 39 return values, and they're stored in C3 through C41. We copy the last 20 of those returns that we will use to model the return on stock A tomorrow, and we place those copies in cells A46 through A65. Now let's return to our slides. So here are the last 20 daily returns on stock A. We will use these value scenarios for the random value of the daily return quote, unquote tomorrow. For example, under the first scenario the value of the return on stock A tomorrow will be- 0.042%. And that scenario will happen tomorrow with a probability of 1 over 20 or 5%. Under scenario number 20, the return on stock A tomorrow, will be about 1.13%, also happening with probability 1 over 20 or 5%. This 40 numbers, 20 possible return values and 20 probability values completely describe according to assumptions the future of the random return tomorrow. Note that I'm saying 20 probability values allowing for the probabilities with 20 scenarios to be different. In case a decision maker wants to use expert projections to adjust the historical probability values. Well 40 numbers are a lot to take in. Maybe we can summarize this probability distribution using a smaller number of quantities. We can start by calculating the expected value of this distribution. The expected value tells us what kind of average value we would obtain, if we draw infinite number of random values from this distribution. The way we calculate the expected value is by multiplying each scenario value by it's probability and adding the results. In Excel, we can use a sum product of scenario values and the probability values to calculate the expectation. Let's go back to Excel for a second and see how this is implemented in our file. Here again, is our Excel file stock A, here we have 20 scenarios for the return of stock A and 20 corresponding probabilities, and those values are stored in the cells A46 through B65. The expected value of the return of stock A tomorrow is calculated in the cell B67 by using a sum product formula. It's a sum product of the cells B46, B65, which are probability values, and A46, A65 which are scenario values for return on stock A tomorrow. The resulting expected return is around 0.35%. Now we're returning back to our slides. In our example, we'll get the expected return of about 0.35%. Of course tomorrow, we will not be able to observe this value, but we'll see according to our model one of those 20 return values. So the actual return can be anywhere from -2.3%, the smallest among the 20 possible values to positive 3.6%, the largest among the possible 20 values. That's quite a spread. And the way to quantify it is by calculating the variance and the standard deviation of the returns. The variance is the weighted sum of the square divisions of the returns from the expected value, and the weights are the probabilities of each scenario. The standard deviation, is a square root of variance. In Excel, the SUMPRODUCT() function can be used to calculate the variance. Let's go back to our Excel file and check how the variance in this standard deviation of the returns are calculated. We're back at our file stock A. In order to calculate the variance in the standard deviation of the returns, we first need to calculate squared deviations of the returns from the expected values for each scenario. We calculate those values in cell C46 through C65. For example, C46 contains the formula to this square deviation of the return under scenario one from the expected value stored in the cell B67. We'll do it for all 20 scenarios we're considering, and then we're going to the cell B68, and calculate the variance of the returns. The variance as a sum product of the probabilities for each scenario and the correspondence squared deviation values. After that we're just calculating the score root of variance, and store the result in the cell B69. That's our standard deviation of the returns. Now we're going back to the slides again. So as the value of the standard deviation indicates, the actual realizations of the return are on average about 1.8% away from the expected value. So the expected value tells us what kind of return we should be getting on average? The standard deviation on the other hand, indicates how far away from that expected value the actual return maybe tomorrow on average. So the standard deviation tells us roughly how uncertain the return can be tomorrow? If a decision maker is adverse to uncertainty, he or she would like to have that standard deviation value to be as low as possible. Now, standard deviation accounts for both above the average and below the average returns. But many people would not mind having above average returns. And they would try to avoid below the average returns. Risk can be defined as the likelihood and or the magnitude of events that a decision maker is trying to avoid. So risk and uncertainty are not always the same thing. What is considered risky depends on the decision maker, and there could be many different coexisting risk measures. Some decision makers do not like uncertainty at all. Those decision makers may indeed use the standard deviation as the risk measure they are trying to control. Others may display different preferences in terms of what they define as risky. For example, some decision makers would like to avoid loss that is they would like to avoid negative return values. The likelihood of a negative return under the scenario distribution is 45%. Yet others may require a return of for example, 1.5% or above. And the likelihood of not achieving this goal under the scenario distribution is 70%. Risk and reward are the key notions in describing decision making process under uncertainty. A decision maker can use for example expected return as a measure of reward. And the standard deviation or probability of loss or some other quantity or multiple quantities as measures of risk. Once the reward and risk measures are defined, the choice of the best alternative can be focused for example, on maximizing reward, while keeping all risk measures under control. In session one of the second week of our course, we have looked at a way of describing an uncertain future using a probability distribution involving a limited number of scenarios. We also have studied reward and risk measures that one can associate with such probability distribution. Next, we're going to look at an important notion of correlation between random variables and its connection to control and risk.