Closed ezgioz closed 7 years ago
Thank you @ezgioz ! This is a welcome addition.
Here are a few comments (1/ is the main one):
1/ you should keep the older method of perfect_foresight
which takes argument exo::AbstractMatrix{Float64};
. What you need to is define a new method perfect_foresight(..., exo::Dict{Symbol, Array}, ...
. This new method would construct the exogenous matrix of size T_e
and pass it the the existing one.
2/ we don't have to assume that all shocks have the same have same length: exo = Dict(:z => [0.00, 0.01, 0.02, 0.03, 0.04], :xi => [0, 0.1, 0])
should work. The method would construct a matrix with size T_e=5. (unrelated: backticks in markdown to quote simple pieces of code) 3/ you could send an error if
T_e>T`
Instead of defining a matrix "exo" for shocks (order of shocks/size is important)
exo = Dict(:z => [0.00, 0.01, 0.02, 0.03, 0.04], :xi => [0, 0, 0, 0, 0, 0])