Hi, I ran same code from the QuantEcon lecture [55. Default Risk and Income Fluctuations, (Arellano 2008 model)]. The Jupyter notebook showed exactly same result from the lecture, but Visual studio code keep giving an Error.
I’d like to know what is the problem and how to fix it.
Thank you.
The error message is as follows:
“ERROR: type MarkovChain has no field ygrid”
Relevant lines are (italic is the line pointed out having problem) :
function QuantEcon.simulate(ae,
capT = 5000;
y_init = mean(ae.ygrid),
B_init = mean(ae.Bgrid),)
…
using Random
set random seed for consistent result
Random.seed!(348938)
simulate
T = 250
y_vec, B_vec, q_vec, default_vec = simulate(ae, T)