Perfect foresight model - What variables predetermined and forward looking?

For starters, run


% print states
if M_.maximum_endo_lag~=0
    lag_index=find(M_.lead_lag_incidence(1,:));
    fprintf('\nThe following variables appear with a lag and are therefore states:\n')
    for var_iter=1:length(lag_index)
       fprintf('%s\n',M_.endo_names{lag_index(var_iter)})
    end    
else
    lag_index=[];
end

%print forward-looking variables
if M_.maximum_endo_lead~=0
    lead_index = find(M_.lead_lag_incidence(M_.maximum_lag+2,:));
    fprintf('\nThe following variables appear with a lead and are therefore forward-looking variables:\n')
    for var_iter=1:length(lead_index)
       fprintf('%s\n',M_.endo_names{lead_index(var_iter)})
    end  
else
    lead_index=[];
end

%print purely static ones
static_index = setdiff(1:M_.endo_nbr,union(lag_index,lead_index));
if ~isempty(static_index)
    fprintf('\nThe following variables do not appear with a lead or lag and are therefore purely static variables:\n')
    for var_iter=1:length(static_index)
       fprintf('%s\n',M_.endo_names{static_index(var_iter)})
    end    
end
1 Like