QuantEcon / QuantEcon.py

A community based Python library for quantitative economics
https://quantecon.org/quantecon-py/
MIT License
1.94k stars 2.25k forks source link

Solow and Ramsey models? #14

Open davidrpugh opened 10 years ago

davidrpugh commented 10 years ago

All,

I have a good bit of code for solving, simulating, and calibrating continuous time versions of the Solow and Ramsey/Cass/Koopmans growth models. I use the code primarily to teach grad students how to solve IVPs and BVPs.

Would there be interest in incorporating these models into quant-econ? I would need to refactor the code a bit (and write some tests) before submitting a pull request.

sglyon commented 10 years ago

Ping... Can anyone comment on this.

I think this sounds good, but what do others think?

davidrpugh commented 10 years ago

All,

I have been refactoring code for both the Solow and Ramsey growth models whilst also pushing to finish my PR for the IVP solver. Probably the best way to increase the user base for QuantEcon is to make it attractive and easy for lecturers to use it in the classroom.

As soon as my original PR is merged, I will submit a new PR for the Solow model followed by a third PR for the Ramsey model.

davidrpugh commented 10 years ago

I am starting a list of continuous time models that we would like to have incorporated into quantecon.

davidrpugh commented 10 years ago

Related to #72 , now that ivp.py has been merged I would like to contribute the code base that I developed for solving, simulating, calibrating, and estimating Solow, Ramsey, and Romer models of economic growth. All three have depend on/derive from the quantecon.ivp class.

There are two ways that I could do this:

  1. Contribute the work in the way that I have done for quantecon.ivp class as sub modules of quantecon.models.
  2. Maintain a separate repository for these models and have it included in quantecon as a git submodule of quantecon or quantecon.models.

I have a slight preference for option 2, but would like others, particularly @albop as he has probably thought about 1 vs 2 with respect to dolo, to provide an opinion before moving forward.

jstac commented 10 years ago

@davidrpugh Thanks for these suggestions. Here are my thoughts:

I think at this stage option 1 would be better for QuantEcon since it's more straightforward.

If you strongly prefer to go down the second route then it would probably have to involve a considerably larger amount of code. I'm open to discussing that option if you want to hold the code back and keep working on it.

Whatever path you choose I think the right place for the kind of material you are talking about is quantecon.models. (I don't suppose we would find it hard to add such contributions to the namespace of quantecon.models even if we're including your work via a git submodule.)

davidrpugh commented 10 years ago

@jstac

My primary objective is to get the code included into QuantEcon as soon as possible. I really think/hope that others might get a lot of pedagogical use out of the code that I have written. In my experience these models serve as a nice entry point to numerical methods for many students.

My secondary objective is to build my academic CV ahead of going on the job market next year. For this purpose I like the idea of being able to link a DOI to a particular repository in a way that it can be picked up by citation tracking algorithms. However this approach does add an extra layer of git complexity.

I have already started adding the code into a branch of my local fork with the intention of submitting a PR later this week for the Solow model. Perhaps the thing to do is include the bulk of the code in QuantEcon, keep the longer class-room ready versions of the notebooks in a separate repo with the DOI, and not bother with the git sub-module approach.

jstac commented 10 years ago

@davidrpugh That sounds like a sensible path. If it suits you better you can take back the notebook that you've already contributed and put it in your separate repo with DOI. We'll just link to it from the QuantEcon website that we're putting up over the next couple of weeks.

davidrpugh commented 10 years ago

@jstac

No I don't want the the notebook back. It should live in examples/quantecon as part of the docs. I was referring to the more heavy duty teaching materials that I have written. I will keep these in a separate repo. I suspect that these notebooks would be a bit excessive for examples/quantecon anyway.

We can always provide links from the light-weight example notebooks to the more in depth materials as we see fit.

mmcky commented 9 years ago

Hi @davidrpugh. Just running through the open issues list. I see that part of this issue has been implemented (i.e. Solow is merged) and part is an open wishlist for future implementation. I will add a wishlist label to the issue.

llorracc commented 5 years ago

@mmcky, @davidrpugh: Is there any particular reason you want these models in continuous time? I have a student who has implemented a python version of this discrete-time version of the Abel-Hayashi q model, and am thinking of asking him to adapt it to the QuantEcon way of doing things ...

jstac commented 5 years ago

That's a very nice analysis @llorracc. I would love to see it submitted to https://notes.quantecon.org/.