Financial Modeling with Crystal Ball and Excel Chapter 11

pdf
Số trang Financial Modeling with Crystal Ball and Excel Chapter 11 23 Cỡ tệp Financial Modeling with Crystal Ball and Excel Chapter 11 625 KB Lượt tải Financial Modeling with Crystal Ball and Excel Chapter 11 0 Lượt đọc Financial Modeling with Crystal Ball and Excel Chapter 11 1
Đánh giá Financial Modeling with Crystal Ball and Excel Chapter 11
4.3 ( 16 lượt)
Nhấn vào bên dưới để tải tài liệu
Đang xem trước 10 trên tổng 23 trang, để tải xuống xem đầy đủ hãy nhấn vào bên trên
Chủ đề liên quan

Nội dung

CHAPTER 11 Simulating Financial Time Series I n financial modeling, we encounter two main types of time-series data: 1. Observations that appear to be independent and identically distributed (IID). 2. Observations that do not appear to be IID because they follow a trend or some other pattern over time. Financial theory provides a compelling argument—the efficient markets hypothesis—that returns on investments must be independent over time because no one has access to information not already available to someone else. If returns are independent, however, prices will be dependent over time and we will require a way to model that dependence. This chapter presents some models that can be used for projecting future returns, asset prices, and other financial times series in simulation models for risk analysis. WHITE NOISE A white noise process is defined to be one that generates data appearing to be IID. It takes its name from the fact that no specific frequency or pattern dominates in a spectral analysis of the observations, similar to white light, or the noise of static emitted from an AM radio that is not tuned in to a station. The model for a white noise process is Wt = µ + t , (11.1) where µ is a constant, and t is a sequence of uncorrelated random variables identically distributed with mean zero and finite variance for t = 1, . . . , T. The probability distribution of t is not necessarily normal, but if it is the process is said to be Gaussian white noise named after the eighteenth-century mathematician, Carl F. Gauss, who studied the properties of the normal distribution. For example, we can simulate observations from a Gaussian white noise process with Crystal Ball by placing several uncorrelated Normal(0,10) assumptions in a column, adding a constant, say µ = 200, and plotting the results as was done in the file RandomWalk.xls. Figure 11.1 shows the model. In cells B6:B35 are Crystal Ball 147 148 FINANCIAL MODELING WITH CRYSTAL BALL AND EXCEL FIGURE 11.1 Model to compare a white noise process to a random walk. Note that rows 8 through 33 are hidden. normal(0,10) assumptions that we denote as t for t = 1, . . . , 30. A Gaussian white noise process was generated in cells C6:C35 using Expression 11.1, and a time series plot of one realization of the process appears in the center of Figure 11.1. Notice how the independence of the observations in the white noise process is manifested in the choppiness of its plot. For the white noise process, no matter where each 149 Simulating Financial Time Series observation falls, the next observation is equally likely to be above or below the mean of 200. This characteristic causes the choppy look. RANDOM WALK One form of a non-IID process is the additive random walk process defined by Yt = Yt−1 + t (11.2) for t = 1, . . . , T. For example, in RandomWalk.xls, we set T = 30 and Y0 = 200, then generated observations from the process in Expression 11.2 in cells D6:D35, using the values in B6:B35 for t , t = 1, . . . , 30. A time series plot of one realization of the random walk process appears in the lower time series plot in Figure 11.1. Notice how the random walk process exhibits a meandering pattern. The first few points are below the mean, then once the plot goes above the mean, it tends to stay above for a while, then heads down and goes below the mean again before eventually heading back up. Even though the changes in the level of the random walk are independent, the levels themselves are dependent over time. This dependence causes more variability in the levels of the random walk process than is evident in the levels of the white noise process. The aggregate effect of the dependence of the levels of the random walk compared to the white noise process can be seen in Figures 11.2 and 11.3. Because the observations in the white noise process are IID, the forecast chart in Figure 11.2 has a mean of µ = 200 and standard deviation of σ = 10, as do all of the observations FIGURE 11.2 Forecast chart for the observation at time t = 30 for the random process. 150 FINANCIAL MODELING WITH CRYSTAL BALL AND EXCEL FIGURE 11.3 Forecast chart for the observation at time t = 30 for the random walk. Wt in the white noise process for t ≥ 1. The mean of the additive random walk process is also 200 for every observation, but the standard deviation grows larger every time period because we are adding on another random change. It can be shown that each value Yt√of the random walk process has a mean of µ = 200 and a standard deviation of σ t. In Figure 11.3 you can see that the standard deviation √ (10 30 = 54.77) is much greater than the standard deviation (10) of the forecast in Figure 11.2. The scales of the horizontal axes of these two plots were specified to be equal so that the difference in variability between the white noise process and random walk was apparent. However, the scales of the vertical axes in Figures 11.2 and 11.3 are different. Figure 11.4 is another illustration of the differences in these forecasts with an overlay chart for cells C35 and D35. For a dynamic illustration of the difference between white noise and a random walk, see the file RandomWalk.xls. In Run Preferences, set Run Mode to Demo and watch the time series plots to see the difference in behavior when the simulation is running. The white noise process will bounce almost entirely within the 3σ bounds of 170 to 230 at every point in time, while the random walk will exhibit increasing variability as t gets larger. AUTOCORRELATION Chapter 4 showed how to calculate both Pearson and Spearman correlations between two variables with Excel. When checking for independence of a series of values over time, we calculate the autocorrelation, which is the correlation coefficient of the values in the series that are separated by a specific length of time. In this context, Simulating Financial Time Series 151 FIGURE 11.4 Overlay chart to compare the time t = 30 observations from a white noise process and a random walk. the prefix auto–means same, so the autocorrelation is the correlation of the values in a time series with other values within the same series. Sometimes authors refer to autocorrelation by the term serial correlation to emphasize the correlation within a time series. While the correlation coefficients for values separated by two or more time periods are also of interest in time series analysis, for our purposes it is sufficient to think only about first-order autocorrelation, which is the correlation between values in a time series that are separated by one unit of time. Thus, first-order autocorrelation is also called Lag-1 autocorrelation. Unless specified otherwise, the term autocorrelation in this chapter is meant to refer to first-order autocorrelation. It is usually true with financial time series that if the first-order autocorrelation is near zero, then the rest of the autocorrelation coefficients will also be near zero. However, for time series that exhibit seasonality, higher-order autocorrelation could be significant while lag-1 autocorrelation is low. To calculate the first-order autocorrelation coefficient for the white noise process values in cells C5:C35, we entered into cell C3 the Excel formula =CORREL(C5:C34, C6:C35). As shown in Chapter 4, this calculates the Pearson correlation for the two arrays C5:C34 and C6:C35. Likewise, cell D3 holds the Excel formula =CORREL(D5:D34,D6:D35) to find the first-order autocorrelation coefficient for the random walk time series in cells D6:D35. Note that there are other methods to calculate the autocorrelation coefficient having more appeal to purists, but Excel does not yet include these other methods in its arsenal of statistical functions. For more discussion of this point and other methods for calculating autocorrelation coefficients, see pages 330–340 of Priestley (1981), or section 2.2 of Tsay (2002). 152 FINANCIAL MODELING WITH CRYSTAL BALL AND EXCEL Of course, with more work, you can always use Excel to calculate the autocorrelation coefficient by one of the other methods. For example, another way to calculate the first-order autocorrelation coefficient, ρ̂1 , for observed values yt , t = 1, 2, . . . , T is T ρ̂1 = t=2 (yt − y)(yt−1 − T 2 t=1 (yt − y) y) , T where y = t=1 yt /T. This version of the autocorrelation was calculated in cell Q6 for the white noise process in cells C6:C35 of RandomWalk.xls. To see how these autocorrelation coefficients vary during simulation trials, they have been defined as Crystal Ball forecasts. Figure 11.5 shows the forecast chart for cell C3, the autocorrelation coefficient for the white noise process values. By the way these values were generated, we know that they are independent over time, so their true autocorrelation is zero. However, in any given simulation trial the calculated (sample) autocorrelation coefficient can differ from zero simply because of sampling error. It can be shown that the sampling error for the first-order autocorrelation coefficient calculated√for an IID time series of length T has a standard deviation expect the standard deviation of the 10,000 of approximately 1/ T, so we would √ values plotted in Figure 11.5 to be 1/ 30 = 0.183 and roughly 95 percent of the values to fall within the two standard error interval (−0.366, 0.366). Figure 11.5 shows that 95.86 percent of the observations actually fell within that interval during the 10,000 simulation trials, which agrees with what we expect. Furthermore, the FIGURE 11.5 Forecast chart for the autocorrelation coefficient for the random process. Simulating Financial Time Series 153 FIGURE 11.6 Forecast chart for the first-order autocorrelation coefficient for the random walk process. sample standard deviation of the distribution in Figure 11.5 is 0.178, which is also close to its expected value of 0.183. Figure 11.6 shows the autocorrelation for cell D3, the autocorrelation coefficient for the random walk time series. All values of the random walk autocorrelation coefficient were significantly larger than zero, which is what we expect because the levels of the random walk process are not independent over time. To check for a white noise process in practice, you can use the following test statistic. First, calculate the first-order autocorrelation coefficient, ρ̂1 , from the T √ time-series observations. Then find Z = ρ̂1 T. If the absolute value of Z is greater than two (|Z| > 2), conclude that the observations do not come from a white noise process. If you reach this conclusion, then you must decide how best to model the time series if you want to use Crystal Ball to generate potential future values of the time series. The rest of this chapter describes some models for you to consider. There are many models that might be applied, but we show a few of the more popular models for generating future values of financial times series with Crystal Ball. Selected models for simulating financial time series are popular because of some ‘‘stylized facts’’ recognized by finance practitioners, and listed in McNeil, Frey, and Embrechts (2005). For series of daily returns, exchange rates, and commodity prices: ■ ■ ■ ■ ■ Return series are not IID although they show little serial correlation. Conditional expected returns are close to zero. Volatility appears to vary over time. Return series are leptokurtic or heavy-tailed. Extreme returns appear in clusters. 154 FINANCIAL MODELING WITH CRYSTAL BALL AND EXCEL Varying volatility and clustered, leptokurtic returns can be modeled with some type of mixture model. The remainder of this chapter describes some models that can be incorporated in risk analysis spreadsheet models. ADDITIVE RANDOM WALK WITH DRIFT The model for an additive random walk with drift is Yt = µ + Yt−1 + t (11.3) for t = 1, . . . , T, where µ is the mean change per time period and t is an IID sequence of random variables that is not necessarily normally distributed. By subtracting Yt−1 from both sides of Expression 11.3, we get Yt − Yt−1 = µ + t , which means that changes in the levels of a random walk with drift process follow a white noise process. Generating Values from a Scalar Random Walk with Drift Process To simulate potential future values of a time series that you think follows an additive random walk with drift process, take the first differences of the time series and fit a Crystal Ball assumption to them. This is illustrated in Figure 11.7. The values of the time series Yt for t = 1, 2, . . . , 20 in cells B4:B23 of RandomWalkWithDrift.xls are quarterly sales of an industrial product. The first differences are found by entering =B5-B4 in Cell C5 and copying this formula down through cell C23. The autocorrelation coefficient of the first differences is calculated in cell D4 as 0.184, which is smaller than the two-standard-error value of 0.447 calculated in cell D7. This, combined with the apparent statistical stationarity we see in the time series plot of the differences in Figure 11.7 lets us conclude that the differences can be modeled with Crystal Ball as though they are IID. To generate potential future values of the sales time series, we used Crystal Ball’s distribution-fitting procedure to fit a Triangular(-69.54,17.99,100.93) distribution to the values in cells C5:C23 and used that distribution to specify Crystal Ball assumptions in cells C25:C29. The values in B25:B29 are calculated using Expression 11.3. Cell B25 has the formula =B23+C25. Cell B26 has the formula =B25+C26, and this was copied and pasted to cells B27 and B28. You can forecast as many steps ahead as desired using the random walk model, but realize that in doing so you are assuming implicitly that the distribution generating the differences remains stationary over the future period for which you generate values. The adequacy of this assumption depends on the context. It may well be adequate for a few steps ahead, but the variance of the random walk model increases linearly with time, so for prolonged use of the model you will want to update the model by fitting distributions to the new data value changes as you observe them. Simulating Financial Time Series 155 FIGURE 11.7 Crystal Ball model on the ‘‘Scalar Random Walk’’ worksheet of RandomWalkWithDrift.xls for forecasting a time series with a random walk with drift process. Cells C25:C29 are Crystal Ball assumptions, and B25:B29 are Crystal Ball forecasts. Note that rows 8 through 22 are hidden. Forecasting with Vector Random Walk Model You can also use the random walk model to simulate observations from time series that have both autocorrelation and correlation between series. This is illustrated in Figure 11.8 for the sales of three industrial products labeled X, Y, and Z in columns B, C, and D. The procedure for forecasting more than one (that is, a vector) time series is similar to forecasting a single (scalar) time series. However, with a vector random walk model, we take into account the correlation between changes in time series at the same time period as well as using the random walk model to induce autocorrelation among the levels of the time series. 156 FINANCIAL MODELING WITH CRYSTAL BALL AND EXCEL FIGURE 11.8 Crystal Ball model on the ‘‘Vector Random Walk’’ worksheet of RandomWalkWithDrift.xls for forecasting a vector time series with a random walk with drift process. Cells E29:G33 are Crystal Ball assumptions, and B29:D33 are Crystal Ball forecasts. Note that rows 19 through 27 are hidden. In cells E5:G28 of Figure 11.8, we found the first differences of the X, Y, and Z time series in cells B4:B28. The autocorrelations in cells E35:G35 indicate that the differences follow a random process. Using Crystal Ball’s Batch Fit feature, we modeled the changes in X, Y, and Z as Normal distributions with parameters that you will find in the file. Figure 11.9 shows the correlation matrix for the changes in cells M11:O13. Again, you can forecast as many steps ahead as desired using the vector random walk model, but realize that you are assuming implicitly that the random processes generating the differences remain stationary in regard to their distributions and their cross correlations.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.