%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This script uses any Y input series and extends it forward
% for 12 quarters using and out of sample dynamic simulation
% based on an Atkinson-Ohanian random walk with p lags 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Y_extended = Y;

Y_extended(end+1,1) = mean(Y(end-(p-1):end,1));

for h = 2:12
    
    Y_extended(end+1,1) = Y_extended(end,1);
    
end