Handling models with no exogenous shocks
sbenthall opened this issue · 2 comments
sbenthall commented
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 commented
Add a dummy shock automatically if it's absent from the yaml file?