Question: Hi, I need help with the following problem about optimazations. You can do it by hand but it would be really helpful if you could

Hi, I need help with the following problem about optimazations. You can do it by hand but it would be really helpful if you could do it in code prefarably in Julia but can be in any language.

Hi, I need help with the following problem about optimazations. You can

Problem 1: Interpolation, optimization and root-finding As you noticed, forcing the agent to choose aA leads to some inaccuracies. We will study some remedies in this exercise. Let us condsider a single optimization step: vt(a)a=amaxu((1+r)a+ya)+vt+1(a)a We will compare three different approaches of solving it. Suppose we create a finite grid A with aA. We know vt+1(a) only for aA. 1. Simply find aA that maximizes 1 (as we did in our code). Call that maximizer at1(a). Define vt1(a) as u((1+r)a+yat1(a))+ vt+1(at1(a)) 2. Find aa that maximizes 1 by using a constrained optimization routine. 1 The difference here is that we allow a to be any real 'You will need to take a look at, for number greater or equal to a. It does not have to belong to A Call that maximizer at2(a). Define vt2(a) as u((1+r)a+yat2(a))+youachoiceofmanyoptimizationalgorithms.Feelfreetoexperiment vt+1(at2(a)) with them, but do not forget to mention which one you used in your write-up. 3. Find a that satisfies Be careful: optimization routines are usually set up in a way that assumes u((1+r)a+ya)=vt+1(a) you are solving a mintimization problem. by using a nonlinear solver. 2 Here a can be any real number. 'Roots. jl should be enough. Once If the solution exceeds a, set at3(a) to be equal to it. Otherwise set again, there many possible choices. at3(a)=a. Define vt3(a) as u((1+r)a+yat3(a))+vt+1(at3(a)). Let u(c)={1c11logc=1=1 Let vt+1(a) be vt+1(a)={F1a11+GFloga+G=1=1 Problem 1: Interpolation, optimization and root-finding As you noticed, forcing the agent to choose aA leads to some inaccuracies. We will study some remedies in this exercise. Let us condsider a single optimization step: vt(a)a=amaxu((1+r)a+ya)+vt+1(a)a We will compare three different approaches of solving it. Suppose we create a finite grid A with aA. We know vt+1(a) only for aA. 1. Simply find aA that maximizes 1 (as we did in our code). Call that maximizer at1(a). Define vt1(a) as u((1+r)a+yat1(a))+ vt+1(at1(a)) 2. Find aa that maximizes 1 by using a constrained optimization routine. 1 The difference here is that we allow a to be any real 'You will need to take a look at, for number greater or equal to a. It does not have to belong to A Call that maximizer at2(a). Define vt2(a) as u((1+r)a+yat2(a))+youachoiceofmanyoptimizationalgorithms.Feelfreetoexperiment vt+1(at2(a)) with them, but do not forget to mention which one you used in your write-up. 3. Find a that satisfies Be careful: optimization routines are usually set up in a way that assumes u((1+r)a+ya)=vt+1(a) you are solving a mintimization problem. by using a nonlinear solver. 2 Here a can be any real number. 'Roots. jl should be enough. Once If the solution exceeds a, set at3(a) to be equal to it. Otherwise set again, there many possible choices. at3(a)=a. Define vt3(a) as u((1+r)a+yat3(a))+vt+1(at3(a)). Let u(c)={1c11logc=1=1 Let vt+1(a) be vt+1(a)={F1a11+GFloga+G=1=1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!