I wanna write a blog post along the lines of "which variables are harder to forecast"...
auto_arma works great:
using FredData;
f = Fred("Personal api_key");
#
d = get_data(f, "GDP"); y=d.df[:,4]
d = get_data(f, "PCEC"); c=d.df[:,4]
d = get_data(f, "GPDI"); i=d.df[:,4]
d = get_data(f, "GCE"); g=d.df[:,4]
d = get_data(f, "NETEXP"); nx=d.df[:,4]
[filter!(x -> ! isnan(x), dd) for dd in [y, c, i, g, nx]]; # REMOVE NaN
using ARCHModels;
auto_arma(df, ic) = selectmodel(ARCH{0}, df, meanspec=ARMA, criterion=ic, minlags=0, maxlags=3);
#
sc_aic=[]
for dd in [y, c, i, g, nx]
a=auto_arma(dd, aic)
push!(sc_aic,(a.spec,a.meanspec,aic(a),bic(a),a))
end
sc_aic
Is there a convenient way to include controls together with ARMA?
y_{t+1} = \mu + \rho_y * y_t + \rho_c * c_t +\rho_i1 * i_{t-1} + \epsilon_{t+1}
I wanna write a blog post along the lines of "which variables are harder to forecast"...
auto_arma
works great:Is there a convenient way to include controls together with ARMA?
y_{t+1} = \mu + \rho_y * y_t + \rho_c * c_t +\rho_i1 * i_{t-1} + \epsilon_{t+1}