計量經濟學講義(人大 陳彥斌)--第7章、ARCH模型和GARCH模型_第1頁
計量經濟學講義(人大 陳彥斌)--第7章、ARCH模型和GARCH模型_第2頁
計量經濟學講義(人大 陳彥斌)--第7章、ARCH模型和GARCH模型_第3頁
計量經濟學講義(人大 陳彥斌)--第7章、ARCH模型和GARCH模型_第4頁
計量經濟學講義(人大 陳彥斌)--第7章、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

提交評論