R语言mgarch包的说明_请问如何用R做GARCH-M模型,急求啊···

本文探讨了R语言中mgarch包在GARCH-in-mean模型(GARCH-M)的应用。通过实例展示了GARCH-M过程的实现,指出在小样本下,GARCH-in-mean系数的估计可能不准确,建议至少需要4000个观测值来估计此类模型。讨论了模拟的重要性以及正常渐近分布在有限样本中的适用性问题。
摘要由CSDN通过智能技术生成

Garch-in-mean :: Recursive Estimates

Finance theory suggests that an asset with a higher perceived risk would pay a higher return on average [Caution]. For example, let rt denote the ex post rate of return on some asset minus the return on a safe alternative asset. Suppose that rt is decomposed into a component anticipated by investors at date t-1 (denoted μt) and a component that was unanticipated (denoted ut):

garchblogThen the theory suggests that the mean return (μt) would be related to the variance of the return. The GARCH(1,1)-in-mean, or GARCH(1,1)-M, regression model is characterized by

garchblogg

for ε i.i.d. with zero mean and unit variance. The effect that higher perceived variability of ut has on the level of rt is captured by the parameter γ (see Hamilton's TSA Bible).

A realization (n = 500) of a Garch(1,1)-M process with κ = 0.005, γ = 2, ω = 0.0001, α = 0.1, β = 0.8, and ε ~ N(0,1) looks as follows:

examplegarchm

Unfortunately, I got a GARCH-in-mean effect (γ) of -34 instead of +2 after I estimated the process given above (n=500) with R (R uses the Ox package with "garchOxFit" command to estimate GARCH models. See here for "garchOxFit" installation instructions for Windows OS.) Estimating the GARCH(1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
variance.model = list(model = "sGARCH", garchOrder = c(1, 1),submodel = NULL, external.regressors = NULL, variance.targeting = FALSE) distribution.model = "norm" ugarchfit(spec, datax, out.sample = 0, solver = "solnp", solver.control = list(),fit.control = list(stationarity = 1, fixed.se = 0, scale = 0)) myspec=ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1, 1), submodel = NULL, external.regressors = NULL, variance.targeting = FALSE), mean.model = list(armaOrder = c(1, 1), include.mean = TRUE, archm = FALSE, archpow = 1, arfima = FALSE, external.regressors = NULL, archex = FALSE), distribution.model = "norm") myfit=ugarchfit(myspec,data=datax,solver="solnp") #rugarch模型结果的提取要依靠as.data.frame函数。比如提取模型的拟合值 as.data.frame(myfit,which="fitted") #提取残差序列: as.data.frame(myfit,which=" residuals") #提取方差序列: as.data.frame(myfit,which="sigma") #当然,也可以同时查看所有: as.data.frame(myfit,which=all) #通过plot(myfit)可以对模型结果进行图形诊断: plot(myfit) #如果模型通过检验,可以用ugarchforcast函数对未来进行预测: for<-ugarchforcast(myfit,n.ahead=20) library(zoo) #时间格式预处理 library(xts) #同上 library(timeSeires) #同上 library(urca) #进行单位根检验 library(tseries) #arma模型 library(fUnitRoots) #进行单位根检验 library(FinTS) #调用其中的自回归检验函数 library(fGarch) #GARCH模型 library(nlme) #调用其中的gls函数 library(fArma) #进行拟合和检验
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值