Dynamic CAPM with the Gibbs Sampler
Posted: Fri Mar 13, 2015 11:42 am
Dear TomDoan,
I'am trying to estimate a Dynamic CAPM (dynamic beta) with the Gibbs Sampler. My code, so far, is just a variation around "Lutkepohl, New Introduction, example 18.5 from pp 637-639". I was wondering if you can take a quick look at it, and maybe run it as well, to tell me what you think. Since i 'am still new to Bayesian Methods i might misunderstood something. This is the best estimation i can get by "playing" with the initial values. Indeed i really don't want something too much volatile.
I think a good way to improve the model would be to have a full variance-covariance matrix of the shocks, so i assume i need something like:
dec frml[sym] sigmab
frml sigmab = 0.5*(%XXSYS)
and remove the %diag in the dlm function. However variances would follow inv.Wishart and i don't know how to change that in the code.
I've attached my code and the data.
Thank you very much
Manty
I'am trying to estimate a Dynamic CAPM (dynamic beta) with the Gibbs Sampler. My code, so far, is just a variation around "Lutkepohl, New Introduction, example 18.5 from pp 637-639". I was wondering if you can take a quick look at it, and maybe run it as well, to tell me what you think. Since i 'am still new to Bayesian Methods i might misunderstood something. This is the best estimation i can get by "playing" with the initial values. Indeed i really don't want something too much volatile.
I think a good way to improve the model would be to have a full variance-covariance matrix of the shocks, so i assume i need something like:
dec frml[sym] sigmab
frml sigmab = 0.5*(%XXSYS)
and remove the %diag in the dlm function. However variances would follow inv.Wishart and i don't know how to change that in the code.
I've attached my code and the data.
Thank you very much
Manty