全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
1914 0
2016-07-18
悬赏 50 个论坛币 未解决
各位大神
主要有两个问题:
1、用r做的GARCH拟合值与用eviews做出的GARCH拟合值不同是什么原因,一些默认方法不同?
2、代码的结果好像和想得到的结果不太一样,想要通过迭代得出最后一个GARCH拟合值组成的序列
部分代码:
library("timeDate")
library("timeSeries")
library("fBasics")
library("fGarch")
local_1_500=c()
for (i in 2:(length(e)-499)){
fm=garchFit(~arma(1,0)+garch(1,1),data=e[i:(i+499)],cond.dist="norm")
local_1_500[(i+499),]=summary(fm)$fitted[,1]   
}
得出部分结果:
--- END OF TRACE ---

Time to Estimate Parameters:
Time difference of 0.1404002 secs
Title:
GARCH Modelling
Call:
garchFit(formula = ~arma(1, 0) + garch(1, 1), data = e[i:(i +
    499)], cond.dist = "norm")
Mean and Variance Equation:
data ~ arma(1, 0) + garch(1, 1)
<environment: 0x04d03350>
[data = e[i:(i + 499)]]
Conditional Distribution:
norm
Coefficient(s):
        mu         ar1       omega      alpha1       beta1  
3.6900e-03  1.0000e+00  2.3229e-05  2.2057e-01  7.8901e-01  
Std. Errors:
based on Hessian
Error Analysis:
        Estimate  Std. Error  t value Pr(>|t|)   
mu     3.690e-03   1.212e-03    3.043  0.00234 **
ar1    1.000e+00   2.633e-03  379.834  < 2e-16 ***
omega  2.323e-05          NA       NA       NA   
alpha1 2.206e-01   3.569e-03   61.799  < 2e-16 ***
beta1  7.890e-01   9.204e-03   85.722  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Log Likelihood:
956.6536    normalized:  1.913307
Description:
Mon Jul 18 15:33:09 2016 by user: Administrator

Standardised Residuals Tests:
                                Statistic p-Value     
Jarque-Bera Test   R    Chi^2  23.92063  6.392936e-06
Shapiro-Wilk Test  R    W      0.989324  0.001058274
Ljung-Box Test     R    Q(10)  34.19756  0.0001709915
Ljung-Box Test     R    Q(15)  41.11331  0.0003073162
Ljung-Box Test     R    Q(20)  43.61511  0.001694057
Ljung-Box Test     R^2  Q(10)  9.093494  0.5232543   
Ljung-Box Test     R^2  Q(15)  16.19706  0.3690775   
Ljung-Box Test     R^2  Q(20)  21.46418  0.3702786   
LM Arch Test       R    TR^2   10.47235  0.5745945   
Information Criterion Statistics:
      AIC       BIC       SIC      HQIC
-3.806614 -3.764468 -3.806812 -3.790076

Series Initialization:
ARMA Model:                arma
Formula Mean:              ~ arma(1, 0)
GARCH Model:               garch
Formula Variance:          ~ garch(1, 1)
ARMA Order:                1 0
Max ARMA Order:            1
GARCH Order:               1 1
Max GARCH Order:           1
Maximum Order:             1
Conditional Dist:          norm
h.start:                   2
llh.start:                 1
Length of Series:          500
Recursion Init:            mci
Series Scale:              0.5386348
错误于arima(.series$x, order = c(u, 0, v), include.mean = include.mean) :
  non-stationary AR part from CSS
此外: 共有44个警告 (用warnings()来显示)




二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群