In order to estimate the mentioned parameter, it is possible to use the Generalized Method of Moments (GMM). Below, the link to a MATLAB file (.m) provides a code for the GMM estimation of the RRA.
GMMestimationRRA.m
The following files have to be saved in the same working directory as the previous file:
GMM.m
optweighmat.m
The data set spans 50 years (1961-2010) and is provided below:
data1.txt (durables, non-durables, services)
data2.txt (CRSP returns, 10-year bond returns)
Model
- Consumption is the only argument for the utility function of the representative agent
- Gamma ('gam' in the code) is the RRA
- U'(C) = (C)^(-gamma)
- there are two different assets
a) Graph for deflated returns on CRSP and 10-year bonds
b) Estimates of RRA:
Consumption = Durables:
- RRA(monthly frequency) ~ 51
- RRA(quarterly frequency) ~ 66
- RRA(annual frequency) ~ 111
- RRA(5-year frequency) ~ 176
c) Test of overidentification: the p-value for the test statistic, which is distributed as a chi-square (see Hansen (1982)), is remarkably low and close to zero. At a 5% significance level, we may not reject the null hypothesis. Hence, the model is overidentified, i.e. the different restrictions (orthogonality conditions) do not provide a unique solution for the coefficient of RRA.
So nice programming, I am learning from your code.
ReplyDeleteThanks! If you find any flaw, please let me know.
ReplyDeleteciao! vorrei aprire il tuo file ma non lo apre, dice che è stato rimosso..come si può avere?
ReplyDeletegrazie
ciao jacopo, se mi fai avere la tua email ti invio i file.
Delete