ARCH模型和GARCH模型_第1页
ARCH模型和GARCH模型_第2页
ARCH模型和GARCH模型_第3页
ARCH模型和GARCH模型_第4页
ARCH模型和GARCH模型_第5页
已阅读5页,还剩48页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、第7章、ARCH模型和GARCH模型研究内容:研究随时间而变化的风险。(回忆:Markowitz均值方差投资组合选择模型怎样度量资产的风险)本章模型与以前所学的异方差的不同之处:随机扰动项的无条件方差虽然是常数,但是条件方差是按规律变动的量。波动率的聚类性(volatility clustering):一段时间内,随机扰动项的波动的幅度较大,而另外一定时间内,波动的幅度较小。如图,§1、ARCH模型1、条件方差多元线性回归模型:条件方差或者波动率(Condition variance,volatility)定义为其中是信息集。2、ARCH模型的定义Engle(1982)提出ARCH模

2、型(autoregressive conditional heteroskedasticity,自回归条件异方差)。ARCH(q)模型: (1)的无条件方差是常数,但是其条件分布为 (2)其中是信息集。方程(1)是均值方程(mean equation)ü :条件方差,含义是基于过去信息的一期预测方差方程(2)是条件方差方程(conditional variance equation),由二项组成ü 常数ü ARCH项:滞后的残差平方习题: 方程(2)给出了的条件方差,请计算的无条件方差。证明:利用方差分解公式:Var(X) = VarYE(X|Y) + EYVar

3、(X|Y)由于,所以条件均值为0,条件方差为。那么,推出,说明3、ARCH模型的平稳性条件在ARCH(1)模型中,观察参数的含义:当时,当时,退化为传统情形,ARCH模型的平稳性条件:(这样才得到有限的方差)4、ARCH效应检验ARCH LM Test:拉格朗日乘数检验建立辅助回归方程此处是回归残差。原假设:H0:序列不存在ARCH效应即H0:可以证明:若H0为真,则此处,m为辅助回归方程的样本个数。R2为辅助回归方程的确定系数。Eviews操作:先实施多元线性回归view/residual/Tests/ARCH LM Test§2、GARCH模型的实证分析从收盘价,得到收益率数据序

4、列。series r=log(p)-log(p(-1)点击序列p,然后view/line graph1、检验是否有ARCH现象。首先回归。取2000到2254的样本。输入ls r c,得到Dependent Variable: RMethod: Least SquaresDate: 10/21/04 Time: 21:26Sample: 2000 2254Included observations: 255VariableCoefficientStd. Errort-StatisticProb. C0.0004320.0010870.3971300.6916R-squared0.000000

5、Mean dependent var0.000432Adjusted R-squared0.000000 S.D. dependent var0.017364S.E. of regression0.017364 Akaike info criterion-5.264978Sum squared resid0.076579 Schwarz criterion-5.251091Log likelihood672.2847 Durbin-Watson stat2.049819问题:这样进行回归的含义是什么?其次,view/residual tests/ARCH LM test,得到ARCH Test

6、:F-statistic5.220573 Probability0.000001Obs*R-squared44.68954 Probability0.000002Test Equation:Dependent Variable: RESID2Method: Least SquaresDate: 10/21/04 Time: 21:27Sample(adjusted): 2010 2254Included observations: 245 after adjusting endpointsVariableCoefficientStd. Errort-StatisticProb. C0.0001

7、105.34E-052.0601380.0405RESID2(-1)0.1415490.0652372.1697760.0310RESID2(-2)0.0550130.0658230.8357660.4041RESID2(-3)0.3377880.0655685.1516970.0000RESID2(-4)0.0261430.0691800.3778930.7059RESID2(-5)-0.0411040.069052-0.5952600.5522RESID2(-6)-0.0693880.069053-1.0048540.3160RESID2(-7)0.0056170.0691780.0811

8、930.9354RESID2(-8)0.1022380.0655451.5598060.1202RESID2(-9)0.0112240.0657850.1706190.8647RESID2(-10)0.0644150.0651570.9886130.3239R-squared0.182406 Mean dependent var0.000305Adjusted R-squared0.147466 S.D. dependent var0.000679S.E. of regression0.000627 Akaike info criterion-11.86836Sum squared resid

9、9.19E-05 Schwarz criterion-11.71116Log likelihood1464.875 F-statistic5.220573Durbin-Watson stat2.004802 Prob(F-statistic)0.000001得到什么结论?2、模型定阶:如何确定q实施ARCH LM test时,取较大的q,观察滞后残差平方的t统计量的pvalue即可。此处选取q3。因此,可以对残差建立ARCH(3)模型。3、ARCH模型的参数估计参数估计采用最大似然估计。具体方法在GARCH一节中讲解。如何实施ARCH过程:由于存在ARCH效应,所以点击estimate,在me

10、thod中选取ARCH得到如下结果Dependent Variable: RMethod: ML - ARCHDate: 10/21/04 Time: 21:48Sample: 2000 2254Included observations: 255Convergence achieved after 13 iterationsCoefficientStd. Errorz-StatisticProb. C-0.0006400.000750-0.8528880.3937 Variance EquationC9.24E-051.66E-055.5693370.0000ARCH(1)0.2447930

11、.0826402.9621420.0031ARCH(2)0.0814250.0774281.0516240.2930ARCH(3)0.4578830.1096984.1740430.0000R-squared-0.003823 Mean dependent var0.000432Adjusted R-squared-0.019884 S.D. dependent var0.017364S.E. of regression0.017535 Akaike info criterion-5.495982Sum squared resid0.076872 Schwarz criterion-5.426

12、545Log likelihood705.7377 Durbin-Watson stat2.042013为了比较,观察将q放大对系数估计的影响Dependent Variable: RMethod: ML - ARCHDate: 10/21/04 Time: 21:54Sample: 2000 2254Included observations: 255Convergence achieved after 16 iterationsCoefficientStd. Errorz-StatisticProb. C-0.0006010.000751-0.7999090.4238 Variance E

13、quationC9.38E-051.60E-055.8807410.0000ARCH(1)0.2620090.0902562.9029590.0037ARCH(2)0.0419300.0705180.5945960.5521ARCH(3)0.4521870.1084884.1680760.0000ARCH(4)-0.0219200.050982-0.4299560.6672ARCH(5)0.0376200.0443940.8474080.3968R-squared-0.003550 Mean dependent var0.000432Adjusted R-squared-0.027830 S.

14、D. dependent var0.017364S.E. of regression0.017603 Akaike info criterion-5.483292Sum squared resid0.076851 Schwarz criterion-5.386081Log likelihood706.1198 Durbin-Watson stat2.042568观察:说明q选取为3确实比较恰当。4、ARCH模型是对的吗?如果ARCH模型选取正确,即回归残差的条件方差是按规律变化的,那么标准化残差就会服从标准正态分布,即不会有ARCH效应了。为什么?请思考。对q为3的ARCH模型做LM test

15、,发现没有了ARCH效应。注意,虽然是同一个检验名称,但是ARCH过程后是对标准化残差进行检验。注意观察被解释变量或者依赖变量是什么?ARCH Test:F-statistic0.238360 Probability0.992099Obs*R-squared2.470480 Probability0.991299Test Equation:Dependent Variable: STD_RESID2Method: Least SquaresDate: 10/21/04 Time: 21:56Sample(adjusted): 2010 2254Included observations: 24

16、5 after adjusting endpointsVariableCoefficientStd. Errort-StatisticProb. C1.1023710.2649904.1600430.0000STD_RESID2(-1)-0.0385450.065360-0.5897410.5559STD_RESID2(-2)-0.0038040.065308-0.0582520.9536STD_RESID2(-3)-0.0573130.065303-0.8776490.3810STD_RESID2(-4)-0.0103250.065277-0.1581690.8745STD_RESID2(-

17、5)0.0035370.0652800.0541850.9568STD_RESID2(-6)-0.0074200.065274-0.1136700.9096STD_RESID2(-7)0.0633170.0652640.9701650.3330STD_RESID2(-8)-0.0121670.065293-0.1863400.8523STD_RESID2(-9)-0.0106530.065278-0.1631940.8705STD_RESID2(-10)-0.0202110.065228-0.3098450.7570R-squared0.010084 Mean dependent var1.0

18、07544Adjusted R-squared-0.032221 S.D. dependent var2.112747S.E. of regression2.146514 Akaike info criterion4.409426Sum squared resid1078.160 Schwarz criterion4.566625Log likelihood-529.1546 F-statistic0.238360Durbin-Watson stat2.000071 Prob(F-statistic)0.992099方程整体是不显著的。还可以观察标准化残差ARCH建模以后,procs/make

19、 residual series/可以产生残差和标准化残差,以分别下是残差和标准化残差。可以看出没有了集群现象。还可以观察波动率(条件方差)的图形。对比r和残差的图形,发现条件方差的起伏与波动率的大小一致。ARCH建模以后,procs/make garch variance series/ 得到结论:ARCH模型确实很好描述了股票市场收益率的波动性。可以观察系数之和小于1,满足平稳性条件。§3、GARCH模型当q较大时,采用Bollerslov(1986)提出的GARCH模型(Generalized ARCH)1、模型定义条件方差方程ü 均值üü :过去

20、的条件方差(也即预测方差,forecast variance)注意:均值方程中若没有解释变量(即只有常数,如R C),则R2没有直观定义了,因此可为负)2、GARCH(p, q) 模型的稳定性条件计算扰动项的无条件方差:GARCH是协方差稳定的,因此是经典回归。3、GARCH模型的参数估计采用极大似然估计GARCH模型的参数。下面以GARCH(1, 1)为例。由GARCH(1, 1)模型可以得到yt的分布为由正态分布的定义公式,得到yt的pdf为第t个观察样本的对数似然函数值为其中注意yi和yj之间不相关,因而是独立的。似然函数为取对数就得到了所有样本的对数似然函数。其中条件方差项以非线性方式

21、进入似然函数,所以不得不使用迭代算法求解。4、模型的选择两条原则:1) 若ARCH(q)中q太大,比如q大于7时,则选择GARCH(p, q)2) 使用AIC和SC准则,选择最优的GARCH模型3) 对于金融时间序列,一般选择GARCH(1, 1)就够了。回顾AIC和SC定义:1)AIC准则(Akaike information criterion)AIC越小越好,结合如下两者:K(自变量个数)减少,模型简洁LnL增加,模型精确2)SC准则(Schwaz criterion)习题1:通货膨胀率有ARCH效应吗?Greene P572点击数据文件usinf_greene_p572。进行回归ls

22、inflation c inflation(-1)Dependent Variable: INFLATIONMethod: Least SquaresDate: 11/19/04 Time: 10:37Sample(adjusted): 1941 1985Included observations: 45 after adjusting endpointsVariableCoefficientStd. Errort-StatisticProb. C2.4328590.8163452.9801840.0047INFLATION(-1)0.4932130.1311573.7604660.0005R

23、-squared0.247477 Mean dependent var4.740000Adjusted R-squared0.229976 S.D. dependent var4.116784S.E. of regression3.612519 Akaike info criterion5.450114Sum squared resid561.1625 Schwarz criterion5.530410Log likelihood-120.6276 F-statistic14.14110Durbin-Watson stat1.612442 Prob(F-statistic)0.000507检验

24、ARCH效应ARCH Test:F-statistic0.215950 Probability0.953308Obs*R-squared1.231192 Probability0.941850Test Equation:Dependent Variable: RESID2Method: Least SquaresDate: 11/19/04 Time: 10:46Sample(adjusted): 1946 1985Included observations: 40 after adjusting endpointsVariableCoefficientStd. Errort-Statisti

25、cProb. C9.2705227.4255671.2484600.2204RESID2(-1)-0.0311620.170116-0.1831840.8557RESID2(-2)-0.0068860.170151-0.0404690.9680RESID2(-3)0.1162610.1695050.6858880.4974RESID2(-4)0.0185450.1706200.1086940.9141RESID2(-5)0.1279060.1686430.7584390.4534R-squared0.030780 Mean dependent var12.28323Adjusted R-squ

26、ared-0.111753 S.D. dependent var34.15088S.E. of regression36.00858 Akaike info criterion10.14287Sum squared resid44085.00 Schwarz criterion10.39620Log likelihood-196.8574 F-statistic0.215950Durbin-Watson stat1.034796 Prob(F-statistic)0.953308习题2:通货膨胀率有ARCH效应吗?Lin的数据集 点击usinf文件series dp=100*D(log(p)l

27、s dp c dp(-1) dp(-2) dp(-3)Dependent Variable: DPMethod: Least SquaresDate: 11/19/04 Time: 10:10Sample(adjusted): 1951:1 1983:4Included observations: 132 after adjusting endpointsVariableCoefficientStd. Errort-StatisticProb. C0.1099070.0634051.7334100.0854DP(-1)0.3935830.0844324.6615360.0000DP(-2)0.

28、2030930.0894522.2704050.0249DP(-3)0.3020730.0841853.5882140.0005R-squared0.696825 Mean dependent var1.021373Adjusted R-squared0.689719 S.D. dependent var0.711412S.E. of regression0.396277 Akaike info criterion1.016428Sum squared resid20.10054 Schwarz criterion1.103785Log likelihood-63.08423 F-statis

29、tic98.06599Durbin-Watson stat1.970959 Prob(F-statistic)0.000000ARCH Test:F-statistic0.969524 Probability0.439318Obs*R-squared4.892009 Probability0.429201Test Equation:Dependent Variable: RESID2Method: Least SquaresDate: 11/19/04 Time: 10:13Sample(adjusted): 1952:2 1983:4Included observations: 127 af

30、ter adjusting endpointsVariableCoefficientStd. Errort-StatisticProb. C0.1081900.0353023.0646480.0027RESID2(-1)-0.0808320.090353-0.8946190.3728RESID2(-2)0.1079060.0884931.2193650.2251RESID2(-3)0.0811910.0888310.9139960.3625RESID2(-4)0.1107450.0884331.2522990.2129RESID2(-5)0.0312480.0887380.3521340.72

31、54R-squared0.038520 Mean dependent var0.147634Adjusted R-squared-0.001211 S.D. dependent var0.236307S.E. of regression0.236450 Akaike info criterion-7.13E-05Sum squared resid6.764921 Schwarz criterion0.134300Log likelihood6.004525 F-statistic0.969524Durbin-Watson stat1.990016 Prob(F-statistic)0.4393

32、18Dependent Variable: DPMethod: ML - ARCHDate: 11/19/04 Time: 10:16Sample(adjusted): 1951:1 1983:4Included observations: 132 after adjusting endpointsConvergence achieved after 25 iterationsCoefficientStd. Errorz-StatisticProb. C0.1113020.0645121.7252820.0845DP(-1)0.3783170.0961983.9326910.0001DP(-2

33、)0.1883850.0862412.1844010.0289DP(-3)0.3237310.0983453.2917880.0010 Variance EquationC0.2924650.0491875.9459390.0000ARCH(1)-0.0297610.047805-0.6225630.5336GARCH(1)-0.8733240.267371-3.2663330.0011R-squared0.696453 Mean dependent var1.021373Adjusted R-squared0.681883 S.D. dependent var0.711412S.E. of

34、regression0.401250 Akaike info criterion1.051145Sum squared resid20.12519 Schwarz criterion1.204021Log likelihood-62.37558 F-statistic47.79960Durbin-Watson stat1.938286 Prob(F-statistic)0.000000附录:Matlab的GARCH工具箱ARMAX(R,M,Nx)/GARCH(P,Q)模型: / 1.=资产的收益率序列 =冲击过程 =的条件方差:2. GARCH(0,Q)óARCH(Q)3.is th

35、e forecast of the next periods variance, given the past sequence of variance forecastsand past realizations of the variance itself. The Default Model: / 对金融收益率时序,(1)带漂移的随机游走足够了(2)GARCH(1,1),GARCH(2,1), GARCH(1,2)足够了结构接口Spec = garchset('Parameter1', Value1, 'Parameter2', Value2, .) 创建

36、Spec = garchset(OldSpec, 'Parameter1', Value1, .) 修正OldSpec例:spec=garchset; spec=garchset(spec, 'C', 0, 'AR', 0.6 0.2, 'MA', 0.4);GARCH建模1. 收益率时序的ARMAX/GARCH参数估计Coeff,Errors,LLF,Innovations,Sigma,Summary=garchfit(Spec, Series)/(Spec, Series, X) Series-收益率序列y, 最后为最新数据

37、Spec-结构描述, garchsetX-多种资产的收益率回归矩阵,每列为一回归解释变量,最后一行为最新数据Coeff-估计系数, Errors-系数的标准差, LLF-log-likelihood函数值,Innovations-, Sigma-2. SigmaForecast,MeanForecast,SigmaTotal,MeanRMSE=garchpred(Spec,Series,NumPeriods)NumPeriods-预测步数. *SigmaForecast-的预测值. *MeanForecast-的预测值.SigmaTotal-对为 MeanRMSE-预测的标准误差.3. GAR

38、CH过程模拟 Innovations,Sigma,Series=garchsim(Spec)/(Spec,NS,NP,Seed,X)NS-样本个数default 100. NP-样本路径的个数default 1. Seed-随机数种子default 0 Innovations-NS*NP冲击矩阵. Sigma- Series-NS*NP收益率矩阵, 每列为单独的实现y.例co,er,L,in,si=garchfit(xyz); e,s,y=garchsim(co,800); garchplot(e,s,y)GARCH冲击推断从推断与:Innovations,Sigma,LogLikelihoo

39、d=garchinfer(Spec,Series)/(Spec,Series,X)例eInferred, sInferred = garchinfer(coeff, y); Statistics and Tests1. Akaike Bayesian信息准则AIC,BIC=aicbic(LogLikelihood,NumParams,NumObs)NumParams-参数个数 NumObs-收益率时序长度AIC=-2*LogLikelihood+2*NumParams BIC=-2*LogLikelihood+NumParams*Log(NumObs)例n21=garchcount(coeff

40、21); n11=garchcount(coeff11)=4; %参数个数AIC,BIC=aicbic(LLF21,n21,2000);AIC,BIC=aicbic(LLF11,n11,2000);%AIC, BIC没有显著增加, 说明GARCH(1,1)足够了6. Likelihood ratio hypothesis test.H, pValue, Ratio, CriticalValue=lratiotest(BaseLLF, NullLLF, DoF, Alpha)例spec11=garchset('P',1,'Q',1);co11,er11,LLF11

41、,in11,si11,su11=garchfit(spec11,xyz);spec21=garchset('P',2,'Q',1);co21,er21,LLF21,in21,si21,su21=garchfit(spec21,xyz);%LLF21越大越好H,p,St,CV=lratiotest(LLF21,LLF11, 1, 0.05); %H=0说明GARCH(1,1)足够了*此不对,要对spec11给初值。2. H, pValue, ARCHstat, CriticalValue = archtest(Residuals)/(Residuals, Lags

42、, Alpha)H0: 样本余差时序为i.i.d.正态冲击(i.e.无ARCH/GARCH效应).Residuals比如来自回归的余差 Lags-default is 1即ARCH(1). H=0 接受H0 如residuals=randn(100,1);H,P,Stat,CV=archtest(residuals,1 2 4',0.10)Create synthetic residuals, 检验1 2 4阶ARCH效应. %注意GARCH(P,Q)基本相当于ARCH(P+Q)7. 偏自相关PartialACF, Lags, Bounds=parcorr(Series)/(Serie

43、s , nLags , R , nSTDs)Series最后一数据为最新 nLags偏ACF的个数,默认为minimum20 , length(Series)-1.R若为AR(R)过程, lags>R时偏ACF为0. nSTDs-default is nSTDs = 2 (i.e.95%置信区间).Bounds-AR(R)过程的边界.如: randn('state',0) x = randn(1000,1); y = filter(1,1 -0.6 0.08,x); % Create a stationary AR(2) process. parcorr(y , , 2)

44、 % Inspect the P-ACF with 95% confidence.3.自相关 ACF, Lags, Bounds = autocorr(Series)/(Series , nLags , M , nSTDs)M - MA(M)过程, lags > M, ACF为0.Example: randn('state',0) x = randn(1000,1); y = filter(1 -1 1 , 1 , x); % Create an MA(2) process. autocorr(y , , 2) % Inspect the ACF with 95% con

45、fidence.4. 交叉自相关XCF, Lags, Bounds = crosscorr(Series1 , Series2)/(Series1 , Series2 , nLags , nSTDs)Bounds2个序列完全不相关的XCF 的上下界.如: randn('state',100) x=randn(100,1); y=lagmatrix(x , 4); % Delay it by 4 samples. y(isnan(y) = 0; % Replace NaN's with zeros. crosscorr(x,y) % It should peak at t

46、he 4th lag.5. Ljung-Box-Pierce Q-检验H0: 模型后的innovations(i.e. residuals)没有序列相关, QChi-Square分布 L 2 Q = N(N+2)Sum(r(k)/(N-k) k=1 N=样本长度, r2(k)样本自相关. H, pValue, Qstat, CriticalValue = lbqtest(Series)/(Series , Lags , Alpha)Series-is either the sample residuals derived from fitting a model to an observed time series, or the standardized residuals obtained by dividing the sample residuals by the conditional standard deviations.Lagsdefault minimum20 ,

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论