
clc; clear;
addpath('ADD_PATH_HERE\Workfiles');
addpath('ADD_PATH_HERE\Scripts');


horizons = [0 1 2 4 6 8];

table = nan(13,7);

%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Generate the figure


clearvars -except table* horizons

table = table;
table_p = table;

%%

load 82_13_preIT_sample

for i = 1:size(horizons,2)

   table(i,1) = horizons(i)
   table(i,2) = ERRORS_STATS.Staff.ly.jump_0.REG_COEFF(1,horizons(i)+1);
   table(i,4) = ERRORS_STATS.Staff.lpcpi.jump_0.REG_COEFF(1,horizons(i)+1);
   table(i,6) = ERRORS_STATS.Staff.bankrate.jump_0.REG_COEFF(1,horizons(i)+1);

   table_p(i,1) = horizons(i)
   table_p(i,2) = ERRORS_STATS.Staff.ly.jump_0.REG_PVAL(1,horizons(i)+1);
   table_p(i,4) = ERRORS_STATS.Staff.lpcpi.jump_0.REG_PVAL(1,horizons(i)+1);
   table_p(i,6) = ERRORS_STATS.Staff.bankrate.jump_0.REG_PVAL(1,horizons(i)+1);

   table(i+7,1) = horizons(i)
   table(i+7,2) = ERRORS_STATS.Staff.ly.jump_0.REG_COEFF_CONST_control(1,horizons(i)+1);
   table(i+7,4) = ERRORS_STATS.Staff.lpcpi.jump_0.REG_COEFF_CONST_control(1,horizons(i)+1);
   table(i+7,6) = ERRORS_STATS.Staff.bankrate.jump_0.REG_COEFF_CONST_control(1,horizons(i)+1);

   table_p(i+7,1) = horizons(i)
   table_p(i+7,2) = ERRORS_STATS.Staff.ly.jump_0.REG_PVAL_control(1,horizons(i)+1);
   table_p(i+7,4) = ERRORS_STATS.Staff.lpcpi.jump_0.REG_PVAL_control(1,horizons(i)+1);
   table_p(i+7,6) = ERRORS_STATS.Staff.bankrate.jump_0.REG_PVAL_control(1,horizons(i)+1);
   
end

%%

load 82_13_IT_sample

for i = 1:size(horizons,2)

   table(i,1) = horizons(i)
   table(i,3) = ERRORS_STATS.Staff.ly.jump_0.REG_COEFF(1,horizons(i)+1);
   table(i,5) = ERRORS_STATS.Staff.lpcpi.jump_0.REG_COEFF(1,horizons(i)+1);
   table(i,7) = ERRORS_STATS.Staff.bankrate.jump_0.REG_COEFF(1,horizons(i)+1);

   table_p(i,1) = horizons(i)
   table_p(i,3) = ERRORS_STATS.Staff.ly.jump_0.REG_PVAL(1,horizons(i)+1);
   table_p(i,5) = ERRORS_STATS.Staff.lpcpi.jump_0.REG_PVAL(1,horizons(i)+1);
   table_p(i,7) = ERRORS_STATS.Staff.bankrate.jump_0.REG_PVAL(1,horizons(i)+1);

   table(i+7,1) = horizons(i)
   table(i+7,3) = ERRORS_STATS.Staff.ly.jump_0.REG_COEFF_CONST_control(1,horizons(i)+1);
   table(i+7,5) = ERRORS_STATS.Staff.lpcpi.jump_0.REG_COEFF_CONST_control(1,horizons(i)+1);
   table(i+7,7) = ERRORS_STATS.Staff.bankrate.jump_0.REG_COEFF_CONST_control(1,horizons(i)+1);

   table_p(i+7,1) = horizons(i)
   table_p(i+7,3) = ERRORS_STATS.Staff.ly.jump_0.REG_PVAL_control(1,horizons(i)+1);
   table_p(i+7,5) = ERRORS_STATS.Staff.lpcpi.jump_0.REG_PVAL_control(1,horizons(i)+1);
   table_p(i+7,7) = ERRORS_STATS.Staff.bankrate.jump_0.REG_PVAL_control(1,horizons(i)+1);
   
end

%%


num2str(table_p,'  %.3f')

num2str(table,'  %.2f')
