The covariance of consumption(C) and Output is negative

Dear all, I am quite a green hand to dynare. I am using dynare to calculate the covarinace of consumption (C) and output(Y).
I save the 200-500 manipulated log(Y) and log(C) after running dynare. Named as Dynare_1116.xlsx.
The corvariance of the model is calcualted by Dataread.m, measured by cy1, diagonal to the right.
From calculating the data in real world, we can get the coravriance of consumption and output as positive. The corvariance of the real world data is calcualted by Dataread.m, measured by cy, diagonal to the right. I don’t know if I change the value of parameters can fix this problem. Dynare_1116.xlsx (35.6 KB)
China_realdata.xlsx (18.9 KB)DataRead.m (1.6 KB)

The first question is , I feel quiet uncertain whether my way to caluculate the size of covariance is correct. And the second question is I don’t know why the input data of consumption and output get from dynare estimation are all positive, but end up derived a negative coefficience. Or maybe it’s owning to my missetting of model. I really hope to fix the cofficient to positive to match with the real world data. :worried:

Any help is appreciated, thank you in advance!

You should first have a look at the theoretical correlations displayed for the model by Dynare. Do they have the right sign?

Dear professor,
The results displayed by dynare reveals the same symbol as the the covariance derived by the simulated variables. Maybe this is root in the missetting of parameters or equations in my model. Please give me some time to check my model in case the basic mistakes. :sweat_smile:
Many much thanks for the help! :grinning:
Best reguards