Presentation is loading. Please wait.

Presentation is loading. Please wait.

597 APPLICATIONS OF PARAMETERIZATION OF VARIABLES FOR MONTE-CARLO RISK ANALYSIS Teaching Note (MS-Excel)

Similar presentations


Presentation on theme: "597 APPLICATIONS OF PARAMETERIZATION OF VARIABLES FOR MONTE-CARLO RISK ANALYSIS Teaching Note (MS-Excel)"— Presentation transcript:

1 597 APPLICATIONS OF PARAMETERIZATION OF VARIABLES FOR MONTE-CARLO RISK ANALYSIS Teaching Note (MS-Excel)

2 598 WHY ? Monte-Carlo risk analysis requires having a defined probability distribution for each risk variable In most cases the probability distribution is not readily available Need to derive an appropriate distribution from raw data

3 599 STEPS TO FOLLOW: 1.Identify the risk variable and nature of risk 2.Obtain historical data on the variable 3.Transfer raw data into spreadsheet 4.Convert nominal values into real values 5.Calculate correlations among variables, if needed 6.Run a regression to identify a trend over years 7.Obtain residuals from regression 8.Express residuals as a percentage deviation from the trend 9.Rank the percentage deviations 10.Group percentage deviations into ranges 11.Specify frequency of occurrence for each range 12.Calculate the expected value 13.Make adjustments to frequencies, so that the expected value equals to the deterministic value of risk variable (check for the adjusted expected value) 14.Transfer the derived probability distribution into risk analysis software

4 600 1. IDENTIFY THE RISK VARIABLE AND NATURE OF RISK A financial/economic model of the project has to be complete Sensitivity analysis suggests candidates to be included as “risk variables” A “risk variable” must be both risky (have a great impact on the project) and uncertain (not predictable) Sensitivity analysis helps to identify the risky variables It is the task of analyst to understand the underlying reasons for uncertainty of variable

5 601 QUESTIONS TO UNDERSTAND RISK What are the fundamental reasons for movements of the variable over time? Can the causes of risk be predicted? Are there any related variables, which move in the same or opposite direction at the same time? Is it possible to avoid the risk or reduce it somehow?

6 602 2.OBTAIN HISTORICAL DATA ON THE VARIABLE Once the risk variable is identified and justified to be included into risk analysis Need to obtain a reliable set of data on the variable over time As many observations as possible If data on the variable itself is not available – use data on a related variable (fluctuations in the price of natural gas can be reasonably approximated by movements of the oil prices)

7 603 EXAMPLE: DERIVATION OF A PROBABILITY DISTRIBUTION FOR NATURAL GAS PRICE Natural gas is the major input for production of urea in a fertilizer plant project Price of input was identified as a very risky variable, having a strong impact on the project’s returns Project purchases natural gas as a price-taker Natural gas prices follow the international gas prices Prices can not be fully predicted – risk analysis is needed

8 604 Data on the domestic and international gas prices were not available It is believed that the crude oil prices can be used as a proxy for fluctuations in the prices of natural gas Historic records of the crude oil prices supplied by the OPEC were obtained from “OPEC Annual Statistical Bulletin 2000” {www.opec.org} Crude oil prices are expressed in nominal US dollar

9 605 3. TRANSFER RAW DATA INTO SPREADSHEET All data records must be transferred into an electronic form Data is on the crude oil prices in nominal terms, 1976–1999 ($/barrel) There are 24 observations Prices are annual averages The prices are nominal, inclusive of inflation The relevant inflation is the us dollar inflation Inflation effect must be removed Year Nominal Oil Price, $/barrel 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 11.5 12.4 12.7 17.3 28.6 32.5 32.4 29.0 28.2 27.0 13.5 17.7 14.2 17.3 22.3 18.6 18.4 16.3 15.5 16.9 20.3 18.7 12.3 17.5

10 606 4.CONVERT NOMINAL VALUES INTO REAL VALUES Since the oil prices are quoted in us dollar, use the us inflation index The relevant inflation measure is the us producer price index, base 1995=100 Data on the US producer price index were obtained from “IMF Financial Statistics Yearbook 2000”. Year 197649.0 197752.0 197856.0 197963.1 198072.0 198178.6 198280.1 198381.1 198483.1 198582.7 198680.3 198782.4 198885.7 198990.0 199093.2 199193.4 199293.9 199395.3 199496.5 1995100.0 1996102.3 1997102.3 199899.7 1999100.6 Producer Price Index, USA,1995=100

11 607 23.5 23.8 22.7 27.3 39.8 41.4 40.4 35.8 33.9 32.7 16.8 21.5 16.6 19.2 23.9 19.9 19.6 17.1 16.1 16.9 19.8 18.3 12.3 17.4 Real Oil Price, $/barrel REAL PRICE NOMINAL PRICE PRICE INDEX x 100 = Year Nominal Oil Price, $/barrel 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 49.0 52.0 56.0 63.1 72.0 78.6 80.1 81.1 83.1 82.7 80.3 82.4 85.7 90.0 93.2 93.4 93.9 95.3 96.5 100.0 102.3 99.7 100.6 Producer Price Index, USA, 1995=100 11.5 12.4 12.7 17.3 28.6 32.5 32.4 29.0 28.2 27.0 13.5 17.7 14.2 17.3 22.3 18.6 18.4 16.3 15.5 16.9 20.3 18.7 12.3 17.5

12 608 5.CALCULATE CORRELATIONS BETWEEN VARIABLES If variables tend to move together over time – there is a correlation Coefficient of correlation can be easily estimated from two sets of data Both data sets must be expressed in real terms Example: correlation between the price of crude oil (input) and price of urea fertilizer (output) Real price of urea was obtained from nominal price in the same manner as real oil price

13 609 CORRELATION BETWEEN THE PRICE OF CRUDE OIL AND PRICE OF UREA FERTILIZER Use ms-excel formula “CORREL“ to estimate the correlation coefficient between two sets of data: 234.7 269.2 267.9 296.4 326.4 225.2 177.9 172.6 219.6 129.4 87.5 120.2 153.4 101.4 167.7 154.2 122.3 115.4 180.6 207.2 164.6 91.8 67.9 68.8 Real Urea Price, $/Mt =CORREL(OIL,UREA) = 0.544 23.5 23.8 22.7 27.3 39.8 41.4 40.4 35.8 33.9 32.7 16.8 21.5 16.6 19.2 23.9 19.9 19.6 17.1 16.1 16.9 19.8 18.3 12.3 17.4 Real Oil Price, $/barrel

14 610 6.RUN A REGRESSION TO IDENTIFY A TREND OVER YEARS There is a trend in the real price of oil Generally, trend can be increasing, decreasing or constant over years If plotted, the trend can be seen visually on the chart Trend represents “predicted” values The difference between the actual price and predicted price is called “residual” value, which is not explained by trend Residuals represent the random factors affecting the real price of oil Residuals represent the risk

15 611 REAL PRICE OF CRUDE OIL: ACTUAL VS. PREDICTED PREDICTED RESIDUAL ACTUAL REAL PRICE IN 1984 TREND RANDOM FACTORS RESIDUAL = ACTUAL – PREDICTED CALCULATED FOR EVERY YEAR

16 612 Regression is needed Running a regression is easy Use an “add-in” in excel, called “data analysis” To start: TOOLS=> DATA ANALYSIS => REGRESSION

17 613 Fill in the required fields in the regression box and press “OK” The regression will estimate the predicted values and residuals for every year SELECT “REGRESSION” AND PRESS “OK”

18 614 YEARS, 1976-99 NEW WORKSHEET PLY [OIL] RESIDUALS Fill-in the regression box as shown above Do not change other settings When done, a new worksheet called “oil” will appear REAL PRICE OF OIL, 1976-99

19 615 New worksheet “oil” will contain the regression statistics and residual output Residuals are estimated in the units of variable, $/barrel Need to express residuals as a percentage deviation from the trend (from predicted value) RESIDUAL OUTPUT ObservationPredicted YResiduals 133.1-9.6 232.3-8.5 331.5-8.8 430.7-3.4 529.99.8 629.112.2 728.412.1 827.68.2 926.87.1 1026.06.7 1125.2-8.4 1224.4-2.9 1323.6-7.0 1422.9-3.6 1522.11.8 1621.3-1.3 1720.5-0.9 1819.7-2.6 1918.9-2.8 2018.1-1.3 2117.42.5 2216.61.7 2315.8-3.5 2415.02.4 7.OBTAIN RESIDUALS FROM REGRESSION

20 616 8.EXPRESS RESIDUALS AS A PERCENTAGE DEVIATION FROM THE TREND USE A SIMPLE FORMULA: =RESIDUAL/(PREDICTED/100)/100 For example (1 st observation ): = -9.6/33.1 = -0.2898 Express the result as a percentage Percentage represents a deviation from the trend Predicted YResiduals 33.1-9.6 32.3-8.5 31.5-8.8 30.7-3.4 29.99.8 29.112.2 28.412.1 27.68.2 26.87.1 26.06.7 25.2-8.4 24.4-2.9 23.6-7.0 22.9-3.6 22.11.8 21.3-1.3 20.5-0.9 19.7-2.6 18.9-2.8 18.1-1.3 17.42.5 16.61.7 15.8-3.5 15.02.4 % Deviation from Trend -28.98% -26.20% -28.01% -11.00% 32.91% 41.92% 42.55% 29.87% 26.69% 25.62% -33.17% -11.92% -29.72% -15.85% 8.22% -6.34% -4.20% -13.07% -14.97% -7.06% 14.29% 10.21% -21.96% 15.80%

21 617 9. RANK THE PERCENTAGE DEVIATIONS Residuals in percentage form represent the deviations from the trend The percentage deviations must be ranked from the lowest to highest Use a built-in “sort” function in excel: 1.Highlight all percentage deviations 2.Open “DATA” => “SORT…” 3.Fill-in the sorting box

22 618 Fill-in as follows: SORT BY: % DEVIATION FROM TREND ASCENDING HEADER ROW When done, press “OK”

23 619 Ranked percentage deviations show the minimum and maximum deviations from trend over the years They can be grouped into ranges, for simplicity In each range, there will be a few observations 10. GROUP PERCENTAGE DEVIATIONS INTO RANGES Ranked % Deviation -33.17% -29.72% -28.98% -28.01% -26.20% -21.96% -15.85% -14.97% -13.07% -11.92% -11.00% -7.06% -6.34% -4.20% 8.22% 10.21% 14.29% 15.80% 25.62% 26.69% 29.87% 32.91% 41.92% 42.55% -35% to -30% -30% to -20% -20% to -10% -10% to 0% 0% to 10% 10% to 20% 20% to 30% 30% to 40% 40% to 45%

24 620 11. SPECIFY FREQUENCY OF OCCURRENCE FOR EACH RANGE Frequency of occurrence is the number of observations in each range Total number of observations must be 24 Express frequencies as probability of occurrence Total probability must be always 100% Probability of occurrence – is really the derived probability distribution If the expected value of this distribution is equal zero – then, probability distribution is ready for use If the expected value of this distribution is equal zero – then, further adjustments must be made

25 621 Ranked % Deviation -33.17% -29.72% -28.98% -28.01% -26.20% -21.96% -15.85% -14.97% -13.07% -11.92% -11.00% -7.06% -6.34% -4.20% 8.22% 10.21% 14.29% 15.80% 25.62% 26.69% 29.87% 32.91% 41.92% 42.55% -35% to -30%14.17% -30% to -20%520.83% -20% to -10%5 20.83% -10% to 0%312.50% 0% to 10%14.17% 10% to 20%3 12.50% 20% to 30%3 12.50% 30% to 40%14.17% 40% to 45% 28.33% Frequency % Occurrence Total: 24 100%

26 622 Expected value is a weighted average of mid-point of all ranges and their probability of occurrence To calculate: 1.Find the mid-point of each range 2.Multiply each mid-point by its probability of occurrence 3.Sum up the results The expected value of probability distribution must be equal zero, to remain unbiased If the estimated expected value is not zero, further adjustments are needed 12. CALCULATE THE EXPECTED VALUE

27 623 Expected value is simply a weighted average of mid-point of all ranges and their probability of occurrence Expected value here is not equal to zero FromToMid-point Frequency % Occurrence Mid-point X % Occurrence -35.0%-30.0%-32.5%14.17% -1.35% -30.0%-20.0%-25.0%520.83% -5.21% -20.0%-10.0%-15.0%520.83% -3.13% -10.0%0.0%-5.0%312.50% -0.63% 0.0%10.0%5.0%14.17% 0.21% 10.0%20.0%15.0%312.50% 1.88% 20.0%30.0%25.0%312.50% 3.13% 30.0%40.0%35.0%14.17% 1.46% 40.0%45.0%42.5%28.3% 3.54% Total: 24100.00% Expected Value (weighted average):-0.1042%

28 624 13. MAKE ADJUSTMENTS TO FREQUENCIES To adjust the expected value of probability distribution to zero, use Excel’s “SOLVER” add-in To start: “TOOLS” => “SOLVER…”

29 625 Subject to constraints: press “ADD” And take cell with total frequencies and set this cell = 24 SET TARGET CELL = EXPECTED VALUE CELL EQUAL TO: VALUE OF 0 BY CHANGING CELLS: (ALL FREQUENCIES) Frequency 1 5 5 3 1 3 3 1 2 Total: 24 When completed, press “SOLVE”

30 626 Expected value is equal to zero Probability distribution is ready Total: Frequency % Occurrence Mid-point X % Occurrence 0.953.97% -1.29% 5.0020.84% -5.21% 5.0020.84% -3.13% 3.0012.52% -0.63% 1.014.19% 0.21% 3.0112.53% 1.88% 3.0112.53% 3.13% 1.014.21% 1.47% 2.018.38% 3.56% 24100.0% Expected Value (weighted average): 0.0% FromToMid-point -35.0%-30.0%-32.5% -30.0%-20.0%-25.0% -20.0%-10.0%-15.0% -10.0%0.0%-5.0% 0.0%10.0%5.0% 10.0%20.0%15.0% 20.0%30.0%25.0% 30.0%40.0%35.0% 40.0%45.0%42.5%

31 627 14.Transfer the derived probability distribution into risk analysis software We have obtained the following “step” distribution for the disturbance to the real price of crude oil: % Occurrence 3.97% 20.84% 12.52% 4.19% 12.53% 4.21% 8.38% 100.0% FromTo -35.0%-30.0% -20.0% -10.0% 0.0% 10.0% 20.0% 30.0% 40.0% 45.0%

32 628 Using the “Crystal Ball” risk analysis software will depict this probability distribution as:

33 629 FINAL NOTE In most cases, probability distribution is applied not on the value of a variable itself Probability distribution is applied on the disturbance to this variable Disturbance, on the average, is expected to be zero Spreadsheet may need to be modified to include the disturbance

34 630 CORRECT WAY TO MODEL ANNUAL DISTURBANCE: Disturbance to REAL Price of urea EXPORTS 0.0% REAL Price of urea EXPORTS (D$/ton) Adjusted 120 NOMINAL Price of urea EXPORTS (D$/ton) 120123127130 = Real Price YearX (Unadj.) * (1+Disturbance YearX ) = 120 * (1 + 0.0%) = Real Price YearX (Adj.) * Domestic Inflation Index YearX 127 = 120 * 1.075 [for Year 2] YEARYear 0Year 1 Year 2 Year 3 Domestic Price Index 1.0001.037 1.075 1.115 REAL Price of urea EXPORTS (D$/ton) Unadjusted 120 = Link to Parameter (120D$/ton, assumed to remain constant)


Download ppt "597 APPLICATIONS OF PARAMETERIZATION OF VARIABLES FOR MONTE-CARLO RISK ANALYSIS Teaching Note (MS-Excel)"

Similar presentations


Ads by Google