Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ECON 475

Economics of Growth

Fall 2022

Problem Set 5

Dynamic Programming: The Finite-Horizon Cake-Eating Problem

Solving the neoclassical growth model using dynamic programming tools can be somewhat daunting the irst time around. Instead, we will get things under way with a simpler problem, the so-called“cake-eating problem”.  What exactly is that? Well, imagine the following scenario.

An individual receives an exogenous endowment of cake, denoted S0, at time t = 0. You know that this individual lives for T periods and has a low prefer- ence u(ct ), where ct is the size of the slice of cake she consumes. In other words,

consuming a piece of cake of size ct generates u(ct ) utils at time t. The problem of this individual is to maximize her lifetime utility:

max {ct}

T

βt u(ct ),

t=0

(1)

where β ∈ (0, 1) is the factor by which she discounts future utility streams, i.e. she is impatient.

The cake doesn’t shrink or grow while it is in the fridge. The only change in the size of the cake is due to consumption. The law of motion for St is therefore:

St+1  = St  — ct .                                                  (2)

Without loss of generality, we can normalize the initial size of the cake to S0  = 1.  One interpretation of this normalization is that you start with a whole cake, i.e. you have 100 percent of the cake at the beginning. If the cake has size 0.8 one period later, this means that you consumed 1 — 0.8 = 0.2 = 20% between t = 0 and t = 1. If the size drops to 0.7 after that, you consumed 0.8 — 0.7 = 0.1 = 10% of the original size of the cake in the second period.

To simplify the problem further, we impose the restriction that the size of the cake slices is in increments of 0.01. This implies that at every point in time t ∈ {0, . . . ,T}, the size of the cake can be described as a (full) percentile of the original cake.

Finally, we will assume that u(ct ) = ln ct and β = 0.96.

Now we have all the ingredients to set up and solve the dynamic program asso- ciated with this cake-eating problem.

1. Open a spreadsheet and deine the state space of the problem for the current

and the next period, i.e. write down all possible values of S ∈ {0, 0.01, 0.02, . . . , 0.99, 1} in the second row of the irst tab and the same values in the irst column of

the tab. You should be able to simply“recycle”the layout we used in class. To begin with, calculate the value of having a cake of size ST  at the start of the inal period T:

VT (ST ) = maxcT  ln cT + βVT+1(ST+1)                           (3)

such that

ST    cT    0                                               (4)

Since this is the inal period T, the value of having any cake in the fridge at time T + 1 is zero: VT+1(ST+1) = 0.  There is no incentive to keep any left-overs. You eat whatever amount of cake you have at the beginning of period T, i.e. cT  = ST . Expressed in utils, the value of having a cake of size ST is VT (ST ) = ln ST .

Importantly, you still have to compute the value of all possible combina- tions of ST    ST+1   = cT   > 0.  The low utility from a negative consump- tion stream is, of course, not deined.  To deal with this, you need to as- sign a negative value to all cT        0.   One way to handle this is to use u (ST       ST+1) = ln (max{ST       ST+1 , 10 −100}). [2 points]

Now you know how valuable it is to have a cake of any size in the inal period of the model and the inal step is to identify the optimal choice of ST+1 for each possible ST . For each column (ST ), select the row (ST+1) with the highest value. [2 points]

2. Next, you need to calculate a few more things such that your VT ( · ) is ready for the next iteration.  In particular, calculate the optimal C = S  S′  for each S (i.e. for each column). This is a little trickier since you need to work with row indices. There are various ways to do this. One of them proceeds in two steps (which you can collapse into a single long nested formula, if you want to save space):

(a) Identify which row of VT  is the optimal choice of S′  by inserting cell with the formula =match(max(V(S)),V(S),0), where V (S) is the column of V corresponding to state S. This cell now contains the row index we need in the next step. [6 points]

 

Figure 1: Excel Sample: Screen Shot

(b) Compute the optimal C = S — S/ for each column S. You know which row you need to select for S/  (for each column S). Put differently, in- sert the formula =S-INDEX(S’,row index)in the row immediately below your row indices. [6 points]

(c) Instead of using a separate tab for each Vt, I would recommend that you now copy and paste the array of values, row indices, consump- tion,. . . below the original array in the same tab.  You’ll need to up- date the notation from VT  to  .  When you calculate the values VT−1(S,S/ ), you’ll need the optimal VT (S/ ) for each S/ . A simple way to do this is to use the =TRANSPOSE(...)function to copy and trans- pose the values in the VT (S) row. The result is highlighted by the blue shaded column next to VT−1(S,S/ ) in Figure 1. Using this function is a more elegant solution than the copy and“Paste Special”method we used in class. [4 points]

(d) Compute VT−1(S,S/ ) for each combination of S and S/ where you take into account VT (S/ ) (the continuation value). [2 points]

(e) Compute the value associated with the optimal choice of S/ for each S. [4 points]

In these calculations, be careful to use the $ symbol to create absolute (rather than relative) cell references!

(f) You want to set up the second array such that you can copy and paste it repeatedly without the need to make any manual adjustments (except for the labeling). [4 points]

(g) Now that you know how to iterate on this recursion, let’s do this for a 6-period problem, i.e. T = 6. Since you already have calculated VT  = V6 and  = V5, you just have to copy and paste four more times for

V4, V3, V2, and V1 . [8 points or 2 points per period]

3. Next, you will plot and discuss a few results.

(a) Plot the evolution of the size of the cake over the 6 periods. Label your axis clearly. [4 points]

(b) Plot the ratio CS  over the 6 periods. Again, label your axis clearly.  [4 points]

(c) Is the ratio constant over time? Discuss why or why not. [2 points]

4. (Bonus Question 1)

Imagine you tried to characterize the solution for the ininite horizon ver- sion of this cake eating problem. In essence, think how you would go about eating this cake with a inite size over ininitely many periods.

The solution to this problem would be characterized by the limiting VT −τ as τ  → ∞ .  You can approximate this solution numerically by repeating the copy and paste step from question 1.(g) a few more times.  Can you recognize a pattern of consumption relative to the size of the cake?  Can you describe this solution and the economic intuition behind it? [5 points]

5. (Bonus Question 2)

The value function iteration method in this assignment has some limita- tions in terms of how accurate the numerical results are. This limitation is particularly striking in the the limiting case as τ → ∞ .  Can you identify it? Can you think of a possible remedy or solution (there maybe more than one)? [3 points]