Sunday, 15 February 2009

The Hotelling Rule: An illustration using Excel’s Solver


 

1. A finite horizon depletion problem

 

The problem to solve

Suppose we are now at the start of year t = 0. We believe that the world will end in 20 years time.  Whatever happens after year t = 19 is deemed to be irrelevant to human well-being. An initial stock of 100 (million tons, say) of a non-renewable resource exists. The problem is to decide how this stock is to be used over the 20 years.

 

Other relevant information is as follows (and corresponds to a discrete time and simplified version of the model contained in Perman, Ma, McGilvray and Common, 2nd edition, Chapter 8, pages 190-196. Unless otherwise stated, all notation used here is identical to that used in the textbook).

 

The finite horizon social welfare function (SWF) is

                     (1)

This form of SWF means that this is a so-called cake-eating model. We begin with a fixed-size cake of resources, . Utility - and so social welfare - is derived directly from consuming the resource. Once the cake is fully eaten, no further utility is possible. This is the major simplification relative to the model in the textbook chapter; there, the resource contributes to utility indirectly, through its role as an input to the production process.

 

Note that because of our assumption that nothing matters after t = 19, the cake will be fully eaten by the end of period 19. For if it were not, social welfare over the finite horizon could have been greater.

 

The utility at some point in time, U(R), depends on the amount consumed:

                (2)

where P is the net price of the resource. (See Equation 8.6a, Figure 8.2, and the associated discussion in the textbook for more on this).

 

We assume that the form of the resource demand function, P(R), is that specified in equation 8.8. That is

                         (3)

where K = 100 and a = 0.2. As explained in footnote 10 (page 192), the particular form taken by the SWF given this particular functional form for the resource demand function is (in discrete time):

 

                 (4)

 

So, to summarise, the problem is:

 

 

Choose Rt, t = 0, ..., 19, to

subject to

Rt ³ 0 for t = 0,...,19

 

 

 

The solution: a first try

 

 

Open up the Excel file hotel.xls, and turn to worksheet Main. Rows 4-7 are used to designate parameter values. This way of working is convenient, as by changing the number in any particular cell, all Excel calculations and Charts would be automatically updated, and so it is easy to see the effects of changing parameter values.

 

Row 10 contains the variable labels. Note that the values in column D, labelled as W(t), refer to the magnitude of social welfare in a single period, period t. However, the value in cell D31 is the sum of the values in cells D11 down to D30, and so corresponds to social welfare over the whole horizon, the thing we are trying to maximise. (Check that this is true by pointing to cell D31 and looking at its formula, given in the formula box towards the top of the worksheet).

 

What is contained in the column labelled P(t)? This is the resource net price in each period. We have got Excel to calculate these net prices using a formula that corresponds to equation (3) above. Check this by looking at the formula used to generate the value in cell E11, for example. Later, we will wish to see if the sequence of prices corresponds to one implied by Hotelling’s rule, equation 8.7b in the text. Clearly it does not at the moment, as the price is constant and does not grow at the rate r (0.1) per year.

 

One way of trying to solve this maximisation problem would be to use trial and error. Make an initial guess for the amount of resource used in each period (ensuring that total usage does not exceed the initial total stock of 100). Calculate social welfare (in cell D31) for that guess. Then try out different initial guesses, until the guess that produces the largest possible value of social welfare is obtained.

 

This would clearly be a stupid way to go about solving the problem, but it turns out to be useful to make one initial guess anyway. For want of anything known to be better (and because it is equitable) let us guess that R is 5 in each of the 20 periods. We have put 5 in cell C11 and then filled this value down to cell C30. Note that cell C31 sums up the cells above it, just to check that we have not bust the resource constraint!

 

How are the numbers for S(t) in cells B12 to B30 obtained? To get these, we use Excel’s ability to do recursive calculations. Look at cell B12. Its value is generated from the formula B11 - C11. That is, the resource stock at the start of period 1 is equal to the resource stock at the start of period 0 (cell B11) minus the resource consumed during period 0 (cell C11). This formula is copied down the column. Note that, as you would expect, the stock decreases by 5 each period from 100 to 0.

 

Finally, how is social welfare obtained? This also comes from a recursive set of calculations. Point to cell D11 and look at its formula. The formula looks complicated at first sight, but is simply the term to the right of the summation operator on the right-hand side of equation (4) above. As we stated earlier, the value in cell D31 is the whole summed expression in (4).

 

Using Solver to get the optimal solution

 

Make a copy of the worksheet Main. Call it Main (2). Then do the following tasks in that copied sheet.

Point to cell D31. Then go to Tools and click on Solver. After a few moments, a dialogue box should open up. The various boxes in it should be filled in so that the Solver parameter box looks like this:


 



Although you will see that dollar signs are attached to all cell references (to make them absolute), they are not actually required in any of these entries. The target cell is set to D31 the value of social welfare over the whole horizon. Beneath that the Max box has been ticked. So we are asking solver to maximise the value of the number in cell D31, social welfare.

The next box down tells Solver that it is allowed to change numbers in cells C11 through to C30 in searching for a maximum. Those cells correspond to values of resource use in each of the 20 periods. Finally, Solver needs to be told of what constraints, if any, it must satisfy. There are two here. The first states that R must be greater than or equal to zero in each period from 0 to 19. The second states that the sum of all resource use (cell C31) cannot exceed 100.

 

Look back to the shaded and boxed statement of the problem printed earlier in this document. Satisfy yourself that we are asking Solver to do exactly what this problem specifies.

 

Click on OK to get Solver to do the optimisation. When it has completed the task, the values in your spreadsheet should have changed to their optimal values, as shown in sheet Main (2) of our Excel file. Note, by comparing cell D31 in Main and Main (2) that social welfare has risen from 2959.9 to 3194.9. This latter value is the highest possible, obtained by a dynamic programming algorithm built into Solver.

 

Now plot two charts: the resource net price and the resource usage, over the relevant time periods. For convenience, we have inserted these in the spreadsheet file. The resource net price does seem to obey Hotelling’s rule: it appears to be increasing at a fixed rate exponentially. To verify this visual impression, calculate the price growth rate in a new column as (P(t) – P(t-1))/P(t-1). You should find that there is a fixed growth rate of 0.1, equal to the utility discount rate, r.

 

More advanced material: another way of deriving the resource net price

 

Note: This optional material is a little more advanced than the previous parts of this exercise.

 

We can obtain the time path of the resource net price another way, by exploiting the fact that this price is a shadow price that emerges form the optimisation exercise.

 

To do this, note first that the Lagrangian for the problem can be written as:

 

where d = 1/(1+r).

 

A first order necessary condition for a social welfare maximum (assuming an interior solution in which R is always positive) is

which implies that

 

This formula can be used to calculate the resource net price, as l = p. In the worksheet Main (3), we have inserted another column labelled lambda(t) which calculates the price using this method for period t = 1 onwards. It is clear that this method gives identical results to the method making direct use of the demand equation.

 

Finally, note that if when using Solver you had ticked the box for Sensitivity Report, the additional output would also have given some relevant information. Specifically, the value of l for period t = 0 is outputted (and called the Lagrange Multiplier of the constraint). The value corresponds exactly with that we calculated earlier, 14.876. This is the amount by which maximised social welfare would have risen if we had 101 (rather than 100) units of the resource initially.

 

 

Further questions

 

1.      Change the social utility discount rate. What happens and why?

Note: Changing a parameter value in one of the boxes at the top of the worksheet will not update the Solver calculations. You will need to run Solver again after changing a parameter value.

 

Next step: There are many limitations of the approach we have used. For example, how do we handle infinite time horizons? This – together with some other matters - is explored in the “next” Excel file, hotext.xls.

 

 

No comments:

Post a Comment