I have a series of 31 portfolio returns and 400 firm level stock returns and I want to estimate the model using OLS model below.
Rit = αj + βetRMt + βeteuroRMDDeurot + βerXRt + βereuroXRDeurot + βitSRt + βiteuroSRDeurot + βltLRt + βlteuroLRDeurot + εt
I also need to use Newey West to adjust the errors to make them HAC. For the diagnostics, I want to display the correlelogram (Q stat and Qstat sq at lag 7 and 21 only) Jarque Bera statistics with skewness and kurtosis, LM for serial on correlation, DW, ARCH test in addition to the usual regression parameters such as R-squared, F stat DW etc.
The dependent variables (Rit) are listed on the attached excel file from aero to travleis.
I have put all the independent variables in a group (indvar) and written a programme to perform the analysis . However when I added a loop to run the regression all at once, I keep getting an error message . Also I want to put al the coefficients and diagnostics on a table but that does not seem to be working either.
equation aerols.ls(n) aero c indvar
aerols.correl(36)
aerols.correlsq(36)
aerols.auto(36)
aerols.archtest(36)
aerols.hettest(type=arch) lags=7
aerols.hist
aerols.results
aerols.output
'To stack up the coeff's.
table(!n,5) tbleaerols
!n=!r-!count
for !i = 1 to !n
tbleaerols(!i,1) = @str(aero!i.@coefs(1))
tbleaerols(!i,2) = @str(aero!i.@coefs(2))
tbleaerols(!i,3) = @str(aero!i.@coefs(3))
tbleaerols(!i,4) = @str(aero!i.@coefs(4))
tbleaerols(!i,5) = @str(aero!i.@coefs(5))
and
%y = " aero"
for %y beverage chemical
equation { %y}trend ls(n) %y c FTALLSH FTALLDUM BOEGBPR GBPRDUM UKTBTND TBTNDUM UKMBRYD BRYDDUM
equation %y.correl(36)
equation %y.correlsq(36)
equation %y.auto(36)
equation %y.archtest(36)
equation %y.hettest(type=arch) lags=7
equation %y.hist
equation %y.results
equation %y.output
next
Also using the same data, I tried estimating an AR(1)EGARCM-M with a t distribution and a dummy variable (eurdum) in the variance equation
equation arc1.arch(1, 1, asy=1, egarch, archm=log, m=1000, tdist ) aero= C(1) + c(2)*aero(-1) +C(3)*ftallsh + C(4)*ftalldum + C(5)*boegbpr + C(6)*gbprdum + C(7)*uktbtnd + C(8)*tbtndum + C(9)*ukmbryd + C(10)*bryddum log @eurdum
archtest(7)
correl(36)
correlsq(36)
archtest(36)
hettest(type=arch) lags=7
hist
results
output
show equation eq1.output
' declare and initialize parameters
' coefs on lagged variance
coef(2) delta
delta(1) = eq1.c(11)
delta(2) = eq1.c(12)
' coefs on lagged resids
coef(2) alpha
alpha(1) = eq1.c(13)
alpha(2) = eq1.c(14)
' coef on asym term
coef(1) chi
chi(1) = eq1.c(6)/eq1.c(5)
When I run this programme, it gives an endless list of syntax errors.
My intention is to get the model working first, then can add loops to run the other dependent series simultaneously and create tables for the results. I am quite new to EVIEWS programming so any assistance on this query will be highly appreciated.
Regards,
MOLUGBODE
ESTIMATING OLS WITH HAC ERRORS AND AR(1)EGARCM-M
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
ESTIMATING OLS WITH HAC ERRORS AND AR(1)EGARCM-M
- Attachments
-
- NONFIN IND FOR SAS ENQUIRY.xlsx
- (689.78 KiB) Downloaded 344 times
Who is online
Users browsing this forum: No registered users and 2 guests
