numerical solution for a problem with closed-form solution

I am trying to solve the following problem numerically: An agnet lives for 10 periods, starts with wealth = 20, there is a constant 3% rate on return on assets, utlity is CRRA with risk aversion coefficient 1.2, intertemporal parameter is 0.9709. I want to get the optinal consumption path. I can solve the problem analitycally and therefore I know the solution is a constant consumption stream of 2.2763. However, I cannot get an accurate solution when solving it numerically with Matlab. IS this the best Matlab can do or am I doing something wrong?

2 个评论

If you post what you have done, people could examine it to see if there is anything wrong with the code.
That you did not get a solution that makes you happy need not be a reflection that MATLAB could not do a better job of solving it, but that you may have written the solution in some inadequate way. MATLAB is just a tool. The workman who blames the tools for poor work may be putting the blame in the wrong place.

请先登录,再进行评论。

回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by