lec213經(jīng)典教材《金融時間序列分析》RueyS.Tsay英文第三版高清教材以及最新2013年高清講義_第1頁
lec213經(jīng)典教材《金融時間序列分析》RueyS.Tsay英文第三版高清教材以及最新2013年高清講義_第2頁
lec213經(jīng)典教材《金融時間序列分析》RueyS.Tsay英文第三版高清教材以及最新2013年高清講義_第3頁
lec213經(jīng)典教材《金融時間序列分析》RueyS.Tsay英文第三版高清教材以及最新2013年高清講義_第4頁
lec213經(jīng)典教材《金融時間序列分析》RueyS.Tsay英文第三版高清教材以及最新2013年高清講義_第5頁
已閱讀5頁,還剩22頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、 # LectureNotesofBus41202(Spring2013)AnalysisofFinancialTimeSeriesRueyS.TsaySimpleARmodels:(Regressionwithlaggedvariables.)Motivatingexample:ThegrowthrateofU.S.quarterlyrealGNPfrom1947to1991.Recallthatthemodeldiscussedbeforeisrt=0.005+0.35r/_i+0.18心_20.14幾_3+%aa=0.01.ThisiscalledanAR(3)modelbecauset

2、hegrowthrate門dependsonthegrowthratesofthepastthreequarters.Howdowespecifythismodelfromthedata?Isitadequateforthedata?Whataretheimplicationsofthemodel?Thesearethequestionsweshalladdressinthislecture.Anotherexample:U.S.monthlyunemploymentrate.AR(1)model:Form:幾=+01門_1+%where0and機arerealnumbers,whichare

3、referredtoasparameters(tobeestimatedfromthedatainanapplication).Forexample,rt=0.005+0.2n_i+atStationarity:necessaryandsufficientcondition|0i|2.Stochasticbusinesscycle:if+4020,then幾showschar-ncteristicsofbusinesscycleswithaveragelength.27Twherethecosineinverseisstatedinradian.Ifwedenotethesolutionsof

4、thepolynomialasbi,wherei=/T5thenwehave0i=2aand02=(以+以)sothat27TInRorS-Plus,onecanobtain/a2+b2usingthecommandMod.Forecasts:SimilartoAR(1)modelsSimulationinR:Usethecommandarima.simyl=arimasim(model=list(ar=c(13,一.4),1000)y2=arimasim(model=list(ar=c(8,一.7),1000)ChecktheACFandPACFoftheabovetwosimulateds

5、eries.Discussion:(Referenceonly)AnAR(2)modelcanbewrittenasanAR(1)modelifoneexpandsthedimension.Specifically,wehave4=0i(n_i“)+血(幾2“)+心rt-i=rt-i4(anidentity.)Now,puttingthetwoequationstogether,wehave幾一“.n-i一“010210rt-i-“atThisisa2-dimensionalAR(1)model.SeveralpropertiesoftheAR(2)modelcanbeobtainedfrom

6、theexpandedAR(1)model.BuildinganARmodelOrderspecificationPartialACF:(naive,buteffective)UseconsecutivefittingsSeeText(p.40)fordetailsKeyfeature:PACFcutsoffatlagpforanAR(p)model.Illustration:SeethePACFoftheU.S.quarterlygrowthrateofGNP.Akaikeinformationcriterion2/4W)=ln()+foranAR()model,where進istheMLE

7、ofresidualvariance.FindtheARorderwithminimumAICfor60,P.BICcriterion:BIC)=ln&)+轡1Series:dgnpcooCMoLLonames(ml)1rder116Hn.used1111series*11ar11order.max”frequency11Hvar.pred1x-mean11aic11Hpartialacf11resid11methodcallasy.var.coefplot(ml$resid,type=;1;)%Plotresidualsofthefittedmodel(notshown)Box.test(m

8、l$resid,lag=10,type=;Ljungy)%ModelcheckingBox-Ljungtestdata:ml$residX-squared=7.0808,df=10,p-value=0.7178m2=arima(x,order=c(3,0,0)%Anotherapproachwithordergiven.m2Call:Coefficients:arlar2ar3034800.1793-0.1423s.e.0.07450.077800745arima(x=x,order=c(3,0,0)intercept%Fittedmodelis0.0077%y(t)=0.348y(t-1)+

9、0.179y(t-2)0.0012%-0142y(t-3)+a(t),%wherey(t)=x(t)-0.0077sigma*2estimatedas9427e-05:loglikelihood=565.84,aic=-1121.68names(m2)1Hcoef”sigma2var.coef11maskloglik11aic117,armaresiduals11call11series11code11Hn.condH13modelBoxtest(m2$residuals,lag=10,type=Ljung)Box-Ljungtestdata:m2$residualsX-squared=7.0

10、169,df=10,p-value=0.7239plot(m2$residuals,type=J1J)%Residualplottsdiag(m2)%obtain3plotsofmodelchecking(notshowninhandout)pl=c(l,-m2$coef1:3)%Furtheranalysisofthefittedmodelroots=polyroot(pl)roots11.590253+1.063882e+00i-1.920152-3530887e-17i1.590253-1.063882e+00iMod(roots)11.9133081.9201521.913308k=2

11、*pi/acos(1.590253/1.913308)k110.65638predict(m2,8)%Predictionl-stepto8-stepahead$predTimeSeries:Start=177End=184Frequency=110.0012362540.0045555190.0074549060.00795851850.0081814420.0079368450.0078200460.007703826$seTimeSeries:Start=177End=184Frequency=110.0097093220.0102805100.0106863050.0106889945

12、0.0106897330.0106947710.0106955110.010696190Anotherexample:IVIonthlyUSunemploymentTatefromJanuary1948toFebruary2013.Demonstration:inclass,includingtheRscriptsfore,foreplot:andbacktest.require(quantmod)getSymbols(NRATE,src=,FREDu)rate=as.numeric(UNRATE$UNRATE)unrate=ts(rate,frequency=12,start=c(1948,

13、1)plot(unrate)head(UNRATE)UNRATE1948-01-013.41948-02-013.81948-06-013.6acf(rate)acf(diff(rate)par(mfcol=c(2,l)acf(rate)acf(diff(rate)ml=ar(diff(rate),method=Hmleu)varp:redHpartialacfncallx.mean11aic11resid11method11asy.var.coef11names(ml)1,ordernar6Hnused11order.max111series1frequencyml$order112ml=a

14、rima(rate,order=c(12,1,0)mlCall:Coefficients:arlar2ar3ar4ar5ar6ar7ar8ar90.02330.21940.15310.08890.1239-0.0059-0.02490.0166-0.0014s.e.0.03560.03560.03630.03690.03700.0373003730.03710.03700)arima(x=rate,order=c(12,1,arlOarilarl2-0.09550.0350-0.12820.03650.03570.0358sigma*2estimatedas0.03778:loglikelih

15、ood=17075,aic=-3155tsdiag(ml,gof=24)m2=arima(rate,order=c(2,1,1),seasonal=list(order=c(l,0,1),period=12)m2Call:arima(x=rate,order=c(2,1,1),seasonal=list(order=c(l,0,1),period=12)Coefficients:sigma*2estimatedas0.0363:loglikelihood=185.07,aic=-358.13tsdiag(m2,gof=24)#useforecastoriginatt=770.arlar20.5

16、9820.2300s.e.0.06250.0391malsarismal-0.59020.5515-0.81350.05770.07100.0521source(fore.R11)fore(ml,rate,770,12)TimeSeries:Start=771End=782Frequency=118.2155248.1151508.0808518.0106707.9903777.9635257.9560297.95121897.9905477.9899618.0290948.041167TimeSeries:Start=771End=782Frequency=110.19522650.2793

17、9620.37015620.46097550.55196690.64942920.741492780.83073920.91916381.00459921.08094941.1574140rate771:78218.28.18.28.28.28.17.87.97.87.87.97.7p2=fore(m2,rate,770,12)source(foreplot.R)foreplot(p2,rate,770,750)%Noshowninthehandoutsource(backtest.R)backtest(ml,rate,760,1)1HRMSEofout-of-sampleforecasts1

18、110.1288231111Meanabsoluteerrorofout-of-sampleforecasts1110.1029483backtest(m2,rate,760,1)1HRMSEofout-of-sampleforecasts1110.1156268111Meanabsoluteerrorofout-of-sampleforecasts10.09050361Moving-average(MA)modelModelwithfinitememory!SomedailystockreturnshaveminorserialcorrelationsandcanbemodeledasMAo

19、rARmodels.MA(1)modelForm:rt=“+9at_iStationarity:alwaysstationary.Mean(orexpectation):E(心)=“Variance:Var(n)=(1+的代.Autocovariance:Lag1:Cov(幾”_i)=一吠Lag0:Cov(n,=0for1.Thus,rtisnotrelatedto化_2,幾一3:ACF:pi=磊,pg=0for1.Finitememory!MA(1)modelsdonotrememberwhathappentwotimeperiodsago.Forecast(atorigint=n):14

20、1-stepahead:rn,(l)=“一Oan.Why?Becauseattimen,anisknown,butan+iisnot.1-stepaheadforecasterror:en(l)=aniwithvarianceMulti-stepahead:=“for01.Thus,foranMA(1)model,themulti-stepaheadforecastsarejustthemeanoftheseries.Why?Becausethemodelhasmemoryof1timeperiod.Multi-stepaheadforecasterror:Varianceofmulti-st

21、epaheadforecasterror:(1+02)必=varianceofn.Invertibility:Concept:rtisaproperlinearcombinationofatandthepastobservationsn_i?心_2,.Whyisitimportant?Itprovidesasimplewaytoobtaintheshockat,F(xiàn)oraninvertiblemodel,thedependenceofrton化_0convergestozeroas0increases.Condition:62.Forecastsgothethemeanafter2periods

22、.BuildinganMAmodelSpecification:UsesampleACFSampleACFsareallsmallafterlagqforanMA(g)series.(SeetestofACF.)Constantterm?Checkthesamplemean.Estimation:usemaximumlikelihoodmethodConditional:Assumeat=0for0Exact:Treata/with1,butpi=01-況/Var(77)豐0i.ThisisthedifferencebetweenAR(1)andARMA(1,1)models.PACF:doe

23、snotcutoffatfinitelags.BuildinganARMA(1,1)modelSpecification:useEACForAICWhatisEACF?Howtouseit?Seetext.Estimation:cond.orexnctlikelihoodmethodModelchecking:asbeforeForecast:MA(1)affectsthe1-stepaheadforecast.OthersaresimilartothoseofAR(1)models.Threemodelrepresentations:ARMAform:compact.,usefulinest

24、imationandforecastingARrepresentation:(bylongdivision)rt=(/)()+at+7Tin_i+7T2心_2+Ittellshowrtdependsonitspastvalues.MArepresentation:(bylongdivision)rt=/i+at+妙g_i+妙2他_2TIttellshowrtdependsonthepastshocks.Forastationaryseries,血convergestozeroasiToo.Thus,theeffectofanyshockistransitory.TheMArepresentat

25、ionisparticularlyusefulincomputingvariancesofforecasterrors.Fora-st.epaheadforecast,theforecasterrorisen()=an+e+血+仇_1術(shù)+1ThevarianceofforecasterrorisVar%(0)=(1+悄卜詭_1)龍.Unit-rootNonstationarityRandomwalkFormpt=pt-i+atUnitroot?ItisanAR(1)modelwithcoefficient0i=1.Nonstationary:Why?Becausethevarianceof幾d

26、ivergestoinfinityastincreases.Strongmemory:sampleACFapproaches1foranyfinitelag.RepeatedsubstitutionshowsTOC o 1-5 h zooooPt=工=工i=0i=0where冊=1foralli.Thus,血doesnotconvergetozero.Theeffectofanyshockispermanent.RandomwalkwithdriftForm:pt=M+Pt-i+g“豐0.HasaunitrootNonstationarvzStrongmemoryHasatimetrendwi

27、thslopeWhy?differencing1stdifference:rt=PtPt-iIfptisthelogprice,thenthe1stdifferenceissimplythelogreturn.Typically,1stdifferencemeansthechange:or*incre-mentoftheoriginalseries.Seasonaldifference:yt=Pt.Pt-s.wheresistheperiodicity,e.g.s=4forquarterlyseriesands=12formonthlyseries.Ifptdenotesquarterlyea

28、rnings,thenytisthechangeinearningfromthesamequarteroneyearbefore.MeaningoftheconstantterminamodelMAmodel:meanARmodel:relatedtomean1stdifferenced:timeslope,etc.PracticalimplicationinfinancialtimeseriesExample:MonthlylogreturnsofGeneralElectrics(GE)from1926to1999(74years)Samplemean:1.04%,std(/z)=0.26V

29、erysignificant!isabout12.45%ayear$1investmentinthebeginningof1926isworthannualcompoundedpayment:$5907quarterlycompoundedpayment:$8720monthlycompoundedpayment:$9570Continuouslycompounded?Unit-roottestLetptbethelogpriceofanasset.Totestthatptisnotpredictable(i.e.hasaunitroot),twomodelsarecommonlyemploy

30、ed:Pt=01仇1+etPt=00+血仇_1+勺Thehypothesisofinterestis耳:0i=1vsHa:0ida=read.table(rq-gdpc96.txt,header=T)gdp=log(da,4)adfTest(gdp,lag=4,type=c(11cH)#AssumeanAR(4)modelfortheseriesTitle:AugmentedDickey-FullerTestTestResults:PARAMETER:LagOrder:4STATISTIC:Dickey-Fuller:-1.7433PVALUE:0.4076#cannotrejectthenu

31、llhypothesisofaunitroot*Amorecarefulanalysisx=diff(gdp)ord=ar(x)#identifyanARmodelforthedifferencedseriesordCall:ar(x=x)Coefficients:1230.34290.1238-0.1226Orderselected3sigma*2estimatedas8.522e-05#AnAR(3)forthedifferenceddataisconfirmed#OurpreviousanalysisisjustifiedDiscussion:ThecommandarimaonR.Dealingwiththeconstantterm.Ifthereisanydifferencing,noconstantisused.Thesubcommandinclude.mean=Tinthearimacommand.Fixingsomeparameters.Usesubcommandfixedinarima.Useunemploymentrateseriesasanexample.RDemonstration:Handlingoutliersrl=ml

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論