Hi there, I'm trying to test the Robust CAPM but have trouble setting the alpha and beta to 0 and 1, respectively. What would the codes be for these commands? Thanks heaps in advance.
@logl logf
y = r_cba - rate_365
x = r_all_ordinaries - rate_365
u = y - c(1) - c(2)*x
sig2 = c(3)^2
nu = c(4)
@param c(1) 0.001 c(2) 0.001 c(3) 0.001 c(4) 5
pi = 3.14159
logf = log(@gamma((nu+1)/2)) - log(@gamma(nu/2)) - 0.5*log(pi) - 0.5*log(nu-2) - 0.5*log(sig2) - ((nu+1)/2)*log(1+u^2/((nu-2)*sig2))
Testing Robust CAPM using Likelihood ratio test
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Re: Testing Robust CAPM using Likelihood ratio test
Build and estimate the restricted version of the ML model:
Then the following will give you the likelihood ratio statistic along with its associated p-value:
Code: Select all
@logl logf0
...
u = y - x
...Code: Select all
scalar lr_stat = -2*(logf0.@logl - logf.@logl)
scalar lr_pval = 1-@cchisq(lr_stat,2)Who is online
Users browsing this forum: No registered users and 2 guests
