Skip to main content

Sequence-Space Jacobian (SSJ)

SSJ is a toolkit for analyzing dynamic macroeconomic models with (or without) rich microeconomic heterogeneity.

The conceptual framework is based on our paper Adrien Auclert, Bence Bardóczy, Matthew Rognlie, Ludwig Straub (2021), Using the Sequence-Space Jacobian to Solve and Estimate Heterogeneous-Agent Models, Econometrica 89(5), pp. 2375–2408 [ungated copy].

Requirements and installation

SSJ runs on Python 3.7 or newer, and requires Python's core numerical libraries (NumPy, SciPy, Numba). We recommend that you first install the latest Anaconda distribution. This includes all of the packages and tools that you will need to run our code.

To install SSJ, open a terminal and type

pip install sequence-jacobian

Optional package: There is an optional interface for plotting the directed acyclic graph (DAG) representation of models, which requires Graphviz for Python. With Anaconda, you can install this by typing conda install -c conda-forge python-graphviz.

Using SSJ: introductory notebooks

To learn how to use the toolkit, it's best to work through our introductory Jupyter notebooks, which show how SSJ can be used to represent and solve various models. We recommend working through the notebooks in the order listed below. Click here to download all notebooks as a zip.

  • RBC
    • represent macro models as collections of blocks (DAG)
    • write SimpleBlocks and CombinedBlocks
    • compute linearized and non-linear (perfect-foresight) impulse responses
  • Krusell-Smith
    • write HetBlocks to represent heterogeneous agents
    • construct general-equilibrium Jacobians manually
    • compute the log-likelihood of the model given time-series data
  • One-asset HANK
    • adapt an off-the-shelf HetBlock to any macro environment using helper functions
    • see a more advanced example of calibration
  • Two-asset HANK
    • write SolvedBlocks to represent implicit aggregate equilibrium conditions
    • re-use saved Jacobians
    • fine tune options of block methods
  • Labor search
    • example with multiple exogenous states
    • shocks to transition matrix of exogenous states

Resources

If you'd like to learn more about Python, its numerical libraries, and Jupyter notebooks, the introductory lectures at QuantEcon are a terrific place to start. More advanced tutorials for numerical Python include the SciPy Lecture Notes and the Python Data Science Handbook. There are many other good options as well: thanks to Python's popularity, nearly limitless answers are available via Google, Stack Overflow, and YouTube.

If you have questions or issues specific to this package, consider posting them on our GitHub issue tracker.

For those who used our pre-1.0 toolkit, which had a number of differences relative post-1.0, you can go back to our early toolkit page if needed.

Team

The current development team for SSJ is

  • Bence Bardóczy
  • Michael Cai
  • Matthew Rognlie

with contributions also from Adrien Auclert, Martin Souchier, and Ludwig Straub.

Release files for sequence-jacobian 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sequence-jacobian 1.0.0
File Size Uploaded
sequence-jacobian-1.0.0.tar.gz 74.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sequence-jacobian 1.0.0
File Interpreter ABI Platform
sequence_jacobian-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 164.7 kB

Release files / sequence-jacobian-1.0.0.tar.gz

Download URL sequence-jacobian-1.0.0.tar.gz
Size 74.4 kB
Tags Source
SHA-256 checksum
How to use checksums
28a18025b16ed94fcdde2fcbc1432c8761ea22b30b899f681b85c58b14730e6a
BLAKE2b-256 checksum
How to use checksums
96770a1b6888f7534951d6c147e4243e1a610f9f2c6189c2f2eae3ee44a4d479
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Release files / sequence_jacobian-1.0.0-py3-none-any.whl

Download URL sequence_jacobian-1.0.0-py3-none-any.whl
Size 90.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40715634f6fcf8f695d79687c471bedcecacdeff94522557f5186b630f46ef01
BLAKE2b-256 checksum
How to use checksums
1f61f1a34de4df9f3d062a88b15e8eec278aaf246340ce71f622a98716af71d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page