What is pp. in the Shooting Algorithm of the Cass-Koopmans Planning Problem?

Cass-Koopmans Planning Problem

Hello everyone,

I hope you are all well.

I’m new to Python and I’m trying to understand the lecture on the Cass-Koopmans Planning Problem. As I am trying to replicate this lecture I do not seem to understand what or where pp is defined. I encounter an unexpected EOF while parsing error when trying to run paths = shooting(pp, 0.2, 0.3, T=10).

Is there something I am missing?

Thank you in advance for your help.

Greetings,
Tomas.

Hi Tomas,

Is this the lecture you’re getting the error in? https://python.quantecon.org/cass_koopmans_1.html

Up the top it says “download notebook”. If you download that and run it in the latest version of Anaconda Python, does it run?

If so, can you start from there, modify as you wish, see if it breaks, and iterate?

As background, this is quite an advanced lecture. The term pp is an argument of the function shooting. It’s actually a class, that contains parameters, constructed in this line: pp = PlanningProblem(). If you’re not yet familiar with these constructions, please read this series first: https://python-programming.quantecon.org/.

Regards, John.

2 Likes

John!

Thank you for your help.

I did not know I could download the notebook. It was a great tip because I was missing the expression where pp was defined: “pp = PlanningProblem()”.

I am trying to replicate the problem but I am also interested in modifying the problem to analyze the rural credit market in developing economies (its my M.Sc in Economic’s dissertation). In addition to capital I add two more intertemporal assets: informal credit and formal credit. I’m relatively new to Python but I have already read the Programming section of Quant Econ. I decided to use Python because it allows me to solve this problem easily. I have already solved it manually but I’m amazed at the efficiency of Python!

Quant Econ has helped me greatly.

Glad to hear it :-)

This section of the lectures has more on planning problems. https://python.quantecon.org/index_savings_growth.html

I think the first few lectures there take you through the programming steps quite slowly, and I hope they help build your understanding. Good luck with your project.

1 Like