Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 4 years ago

EconJohn gravatar image

The Cake Eating Problem in Sage

Im interested in running a basic cake eating problem in sage. In its recursive formulation we have to solve the following bellman equations: v(kt)=ln(ktkt+1)+βv(kt+1),   β(0,1) The algorithm for solving this problem is as follows:

Step 1: Take an initial guess of v(kt+1)=0
Step 2: Solve for the maximum of v(kt) (in the first iteration this is v(kt)=ln(ktkt+1))
Step 3: Using our maximum for v(kt) iterate it forward and update our bellman (in this case we have v(kt)=ln(ktkt+1)+β[ln(kt+1kt+2)])
Step 4: Maximize this updated equation and repeat until convergence.

Any help is appreciated.

The Cake Eating Problem in Sage

Im interested in running a basic cake eating problem in sage. In its recursive formulation we have to solve the following bellman equations: v(kt)=ln(ktkt+1)+βv(kt+1),   β(0,1) The algorithm for solving this problem is as follows:

Step 1: Take an initial guess of v(kt+1)=0
Step 2: Solve for the maximum of v(kt) (in the first iteration this is v(kt)=ln(ktkt+1))v(kt)=ln(ktkt+1), the maximum here is simply where kt+1=0 thus v(k)=ln(kt) )
Step 3: Using our maximum for v(kt) iterate it forward and update our bellman (in this case we have $v(k_t)=ln(k_t-k_{t+1})+\beta [ln(k_{t+1}-k_{t+2})]$)[ln(k_{t+1}]$)
Step 4: Maximize this updated equation and repeat until convergence.

Any help is appreciated.

The Cake Eating Problem in Sage

Im interested in running a basic cake eating problem in sage. In its recursive formulation we have to solve the following bellman equations: v(kt)=ln(ktkt+1)+βv(kt+1),   β(0,1) The algorithm for solving this problem is as follows:

Step 1: Take an initial guess of v(kt+1)=0
Step 2: Solve for the maximum of v(kt) (in the first iteration this is v(kt)=ln(ktkt+1), the maximum here is simply where kt+1=0 thus v(k)=ln(kt) v(kt)=ln(kt) )
Step 3: Using our maximum for v(kt) iterate it forward and update our bellman (in this case we have v(kt)=ln(ktkt+1)+β[ln(kt+1])
Step 4: Maximize this updated equation and repeat until convergence.

Any help is appreciated.