%Reading data
%C，Y，I,R; from CMF database with quarter frequency，with log terms；inflation index from WIND with monthly frequency，we transit it to the monthly frequency,with log terms。
C = xlsread('China_realdata.xlsx',1,'A2:A105');
y = xlsread('China_realdata.xlsx',1,'B2:B105');
logR = xlsread('China_realdata.xlsx',1,'D2:D105');
logpi = xlsread('China_realdata.xlsx',1,'E33:E105');
I = xlsread('China_realdata.xlsx',1,'F14:F101');
%PI missing，so we cut off the size of output series to match it
YPI= xlsread('China_realdata.xlsx',1,'E33:E105');
%I missing，so we cut off the size of output series to match it
YI= xlsread('China_realdata.xlsx',1,'B14:B101');
logG= xlsread('China_realdata.xlsx',1,'G14:G101');

%Calculate the coefficinet of AR(1) process
py=autocorr(y);

%The covariance of Output with other variables
cy=cov(C,y);
ylogR=cov(y,logR);
yi= cov(YI,I);
ypi= cov(YPI,logpi);
yg= cov(YI,logG);
%------------------------------------------------------------------------------------------------
%Reading data
%These data from the estimation results from Dynare，they are all log terms,we pick the order form 300-500。
C1= xlsread('Dynare_1116.xlsx',1,'C2:C302');
y1= xlsread('Dynare_1116.xlsx',1,'B2:B302');
pi1= xlsread('Dynare_1116.xlsx',1,'A2:A302');
G1= xlsread('Dynare_1116.xlsx',1,'D2:D302');
I1= xlsread('Dynare_1116.xlsx',1,'E2:E302');
R1= xlsread('Dynare_1116.xlsx',1,'F2:F302');

%Calculate the coefficinet of AR(1) process
py1=autocorr(y1);

%The covariance of Output with other variables
cy1=cov(C1,y1);
y1R1=cov(y1,R1);
y1I1= cov(y1,I1);
y1pi1= cov(y1,pi1);
y1G1= cov(y1,G1);