Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling models with no exogenous shocks #176

Open
sbenthall opened this issue Jan 28, 2020 · 2 comments
Open

Handling models with no exogenous shocks #176

sbenthall opened this issue Jan 28, 2020 · 2 comments

Comments

@sbenthall
Copy link
Contributor

Currently, if you want to specify a model with no exogenous shocks, it's required to have an empty exogenous list in the symbols section of the markup:

symbols:
  states: [m,p]
  controls: [c]
  parameters: [β, ρ, R, Γ]
  exogenous: []

Or else the following error will be raised:

>>> model
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sb/projects/econ-ark/dolo/dolo/compiler/model.py", line 410, in __repr__
    return self.__str__()
  File "/home/sb/projects/econ-ark/dolo/dolo/compiler/model.py", line 369, in __str__
    res = self.residuals()
  File "/home/sb/projects/econ-ark/dolo/dolo/compiler/model.py", line 499, in residuals
    return residuals(self, calib)
  File "/home/sb/projects/econ-ark/dolo/dolo/algos/steady_state.py", line 15, in residuals
    m = calib['exogenous']
  File "/home/sb/projects/econ-ark/dolo/dolo/compiler/misc.py", line 82, in __getitem__
    return self.flat[p]
KeyError: 'exogenous'

It would be nice if the empty list was not necessary in these situations.

@sbenthall
Copy link
Contributor Author

#31

@sbenthall
Copy link
Contributor Author

Add a dummy shock automatically if it's absent from the yaml file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant