shade-econ / sequence-jacobian

A unified framework to solve and analyze heterogeneous-agent macro models.
MIT License
229 stars 142 forks source link

Transition from Shade econ (older version) to SSJ revised version #7

Open AtanasPekanov opened 2 years ago

AtanasPekanov commented 2 years ago

Dear all,

Thank you for delivering a new and improved version of the wonderful SHADE econ toolbox! I was a user of this great toolbox for a while since it came in 2019 and was working on learning it, by writing some better known papers into the sequence space format (many of them without an HA structure - e.g. Nakamura-Steinsson – “Fiscal Stimulus in a Monetary Union” and Farhi – Werning – “Fiscal Unions”). I have however taken a one year gap away academia since I was serving in a government position and I am trying to get myself informed now on the latest development and the new overhaul from SHADE to SSJ.

I was therefore wondering how will you advise me to pursue? Should I just download the new version of the whole toolbox and write over the old one by directly downloading it from PyPi in Python (I use Spyder)? From my first very fast reading, I see some really nice new features such as drawdag (this is extremely helpful to see some failures in my thinking when wondering about some models I have written which resulted in cyclicalities).

However some of the utils have changed it seems to me, which would make my old codes unusable? From a first and very fast glance over the new notebooks – I see there are new features such as ss.internals, household_sim, three generic HetBlocks (needless to say this is amazingly useful) and hh_labor.py (or at least I don’t remember some of those features being there in the previous versions ). I was wondering whether there is a log/document, describing all the changes between the old and the new version. And if not – would it be helpful for me to make such notes along the line now and send it to you in case they are of some use?

Best regards and thank you so much for developing this important tool further, Atanas Pekanov https://sites.google.com/view/atanaspekanov/

bbardoczy commented 2 years ago

Dear Atanas,

Thanks for being an early adopter!

First, the new version 1.0.0 is indeed incompatible with the old code. We understand that this creates some cost of transition for long-time users (ourselves included!), but we decided that it's necessary to achieve a more logical and unified interface. The main methods that every block has are

And each of these has a solved_ version as well, which always refers to figuring out some unknowns given targets. We intend to stick to this interface for the foreseeable future.

Second, updating your existing notebooks to run with the new version is probably the best way of learning it. While you work on this, you may find it useful to have both version of the toolkit installed in two different Python environments. (Here's a guide managing environments.)

Third, unfortunately, we don't have a comprehensive change log or documentation yet. If you end up making notes, we'd very much appreciate your sharing with us! That could be a helpful reference for other users right away, and also for us when finally get around writing more documentation.

Best, Bence

AtanasPekanov commented 2 years ago

Dear Bence,

Thanks for your rapid and very helpful answer. All clear. I will pursue as proposed - I will install the new version of the toolkit on another instance of Python and start working with it and in the process compare the changes. I will try to keep track of a diary of changes I see and are worth noting, and will send it to you at the end. I have some older notes as well on writing the system in terms of unknowns and targets and common mental errors one can make when formulating other models in the SHADE block format (the most common one for me has always been that I write the model in a way that confuses the topological sorting and creates some kind of cyclicality). When I have everything together, I will get back to you.

Best regards, Atanas Pekanov