Estimating And Simulating A Model For Mean Reversion
Total Page:16
File Type:pdf, Size:1020Kb
Estimating and Simulating a Model for Mean Reversion
As indicated in class, most commodity prices and some interest rates follow a mean reverting process in the sense that if the price is above the long run mean supply increases and demand declines bringing the price down, while if the price is below the long run mean, supply decreases and demand increases raising the price. The simple standard discrete time model of a mean reverting process is
Xt+1= X t +k( m - X t) + e t + 1 , (1)
m where X t is the current value of the process (at date t ), is the long run mean value of
the process, k is the speed of adjustment coefficient, and et+1 is the value of a random
shock that is independent of X t . The amount (m - X t ) is the correction toward the long
run mean. The random shocks ,et , e t+1 , are independent, normally distributed, mean zero, constant variance (square of the standard deviation).
As a consequence of this simple model, the major disadvantage is that the prices
X t can be negative. This can be avoided while preserving the mean reverting behavior, but involves complicating the model beyond the scope of what we want to do here. We will just note that the extent to which prices are negative is something to keep in the back of our minds.
One thing we want to do is estimate a version of one using historical data. There are three parameters that need to be estimated, the long run mean m , the speed of adjustment k , and the standard deviation of the random shock s . This is easy to do in
Excel using the regression function. Subtracting X t from both sides of (1) we get Xt+1- X t =km - k X t + e t + 1 . (2)
This is just like a regression with dependent variable Xt+1 - X t and independent variable
km X t with intercept = and slope = -k . So in Excel regressing the price changes
Xt+1 - X t on the price level X t will produce estimates of the intercept and slope coefficients. If the estimated slope coefficient -kˆ is positive, there is no mean reversion and we need to change the specification. If the slope coefficient -kˆ is negative, then kˆ is positive indicating the presence of mean reversion. Test for the statistical significance of this coefficient by looking at its t-statistic. The rule of thumb is that if the absolute value of this t-statistic is greater than 2, then it is statistically significant(ly different from zero). For a large enough sample size, if the absolute value exceeds 1.645, the statistic is significant.
Finally, if the estimate of kˆ is statistically significantly positive and if the intercept coefficient is statistically significant, we then estimate the long run mean by solving mˆ = intercept/kˆ , and we estimate the standard deviation assˆ = standard error of the regression. Hence the simple use of the regression function in Excel gives us an estimate of the simple model of mean reversion.
We turn now to simulating the estimated model of mean reversion
Xt+1= X t +kˆ( m ˆ - X t) + e t + 1 , (3)
where the error term of random shock et+1 is normally distributed with mean zero and standard deviation sˆ . To do this we need a starting value for the price level X and a way to generate independent normally distributed error values for the possible values of the et+1 . Typically the starting value of the price level is some (latest) historical observation.
The way to generate independent error values is as described in class for the spreadsheet Copy of Arith Asian.xls. In Excel the function RAND( ) generates (pseudo) random numbers uniformly distributed between 0 and 1. These numbers can be converted to numbers that are normally distributed with mean zero and standard deviations one by using the function NORMSINV. If RAND( ) is uniformly distributed between 0 and 1, then NORMSINV(RAND( )) is normally distributed with mean zero and standard deviation one. To obtain a number that is normally distributed with mean m and standard deviation s , simply multiply by s and add m . In our case we simply multiply
NORMSINV(RAND( )) by our estimate sˆ .
Assume that we have decided on an initial value of X 0 . Assume also we wish to simulate a price path of 100 observations. Select 101 columns (or rows) and two rows (or
columns) in an Excel spreadsheet. Enter the number X 0 in the first column second row.
In the first row columns 2 through 100 enter = NORMSINV(RAND( )). In the second column, second row enter = same row previous column + kˆ ( mˆ - same row previous column) + sˆ (same column previous row). This is the formula (3). Fill across to column
101. Each time you recalculate a different price path is determined.
Here is a numerical example. X 0 = 100, mˆ = 85, sˆ = .90, and kˆ = .50. See the spreadsheet Simulating Mean Reversion.xls at the course website. This example has a simulated price path of only 25 observations.