




已閱讀5頁,還剩89頁未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
金融時間序列分析 陸貴斌2012年10月 基本思路 作為引入 先搞清楚時間序列 分析時間序列的目的 挖掘背后的規(guī)律 以利于預(yù)測未來 內(nèi)容 第3部分Matlab時間序列分析 Matlab時間序列分析工具箱 統(tǒng)計工具箱Statisticstoolbox計量工具箱Econometrictoolbox金融工具箱Financetoolbox 3 1統(tǒng)計工具箱Statisticstoolbox 單變量隨機(jī)分布單變量模擬抽樣多變量隨機(jī)分布Copulas模擬 暫時不講 回歸分析 單變量隨機(jī)分布 disttool演示各種隨機(jī)分布圖 t分布與Z分布 也可直接用程序 呈現(xiàn)隨機(jī)分布 x 5 0 1 5 y tpdf x 5 t分布 z normpdf x 0 1 標(biāo)準(zhǔn)正態(tài)分布 plot x y x z 重復(fù)抽樣 randtool 可保存隨機(jī)數(shù) 后面可用 z1 random Normal 0 1 2 4 2行4列x1 1 16500 0751 0 69650 05910 62680 35161 69611 7971 多變量隨機(jī)分布 mu 23 SIGMA 11 5 1 53 協(xié)方差矩陣 r mvnrnd mu SIGMA 100 隨機(jī)數(shù)對 plot r 1 r 2 數(shù)據(jù)的隨機(jī)擬合 單變量 dfittool 多變量隨機(jī)數(shù)模擬 MU 12 3 5 SIGMA cat 3 20 0 5 10 01 p ones 1 2 2 obj gmdistribution MU SIGMA p Y random obj 1000 scatter Y 1 Y 2 10 Copulas模擬 Copulas函數(shù) 描述多變量間相關(guān)性 描述邊際分布 對于非標(biāo)準(zhǔn)多元隨機(jī)分布 一大難題 相互依賴性如 MonteCarlo模擬相關(guān)性可能都需要從實(shí)際數(shù)據(jù)中獲取 rho 7 SigmaDep sigma 2 1rho rho1 ZDep mvnrnd 00 SigmaDep n XDep exp ZDep lot XDep 1 XDep 2 axis 0505 axisequalxlabel X1 ylabel X2 傳統(tǒng)模型 用多元正態(tài) Gamma 極值分布來描述缺點(diǎn) 邊際分布都是同一族類的 n 1000 z normrnd 0 1 n 1 hist z 3 75 5 3 75 Copulas的目標(biāo) 生產(chǎn)多元分布 存在相互依賴 通過一定的轉(zhuǎn)變方法 將各自的分布 及依賴結(jié)構(gòu)分離出來 Z 標(biāo)準(zhǔn)正態(tài)分布 Z的分布函數(shù)U Unif 0 1 分布 u normcdf z hist u 05 1 95 Copulas核心 將F分布的逆分布函數(shù)應(yīng)用于 0 1 均勻隨機(jī)變量上 仍然是F隨機(jī)分布 可以將它轉(zhuǎn)變?yōu)間amma 2 1 分布 x gaminv u 2 1 hist x 25 5 9 75 n 1000 rho 7 Z mvnrnd 00 1rho rho1 n U normcdf Z X gaminv U 1 2 1 tinv U 2 5 scatterhist X 1 X 2 Direction out Copulas重要理解 Sklar 1959 定理 對于多元分布H F G為邊際分布 則C函數(shù)存在 且唯一 C u v u F x v G y u v 0 1 2 C 0 1 Farlie Gumbel Morgensternfamilycopulas 若X Y相互獨(dú)立 則C uv若Y是X的確定函數(shù) 則Fr chet Hoeffdingbounds遞減型 W u v max 0 u v 1 遞增型 M u v min u v W u v C u v M u v 轉(zhuǎn)換transform twoincreasingtransformations 為了描述這種一致性 引入rankpairs R S 經(jīng)驗(yàn)copulas Deheuvels 1979 可以證明 Cn是C的無偏估計量 服從正態(tài)分布 Copulas研究現(xiàn)狀 copulas模型的推斷統(tǒng)計仍有待深入 面向終端用戶的應(yīng)用太少 不夠直觀 金融方面 FreesandValdez1998 Cherubinietal 2004 StatisticsToolboxfunctionscompute Probabilitydensityfunctions copulapdf thecumulativedistributionfunctions copulacdf forGaussiancopulasRankcorrelationsfromlinearcorrelations copulastat andviceversa copulaparam Randomvectors copularnd Parametersforcopulasfittodata copulafit ProbabilityDistributionsUsedforMultivariateModeling Copulas GenerateCorrelatedSamplesDeterminingDependenceBetweenSimulationInputsConstructingDependentBivariateDistributionsUsingRankCorrelationCoefficientsUsingBivariateCopulasHigherDimensionCopulasArchimedeanCopulasSimulatingDependentMultivariateDataUsingCopulasExample FittingCopulastoData 回歸分析 robustdemo 3 2計量工具箱Econometrictoolbox amodel 面向?qū)ο?類似于結(jié)構(gòu)變量 modelselection amodel adequatelydescribesyourdata 基礎(chǔ)for regressioninference forecasting andMonteCarlosimulation Specificationtests identifydatageneratingprocess Modelcomparisonsthefitofcompetingmodels withpenaltiesforcomplexity Goodness of fitchecksassessthein sampleadequacy assumptionshold out of sampleforecastperformance ModelObjects Properties andMethods ModelObjectsarimagarchegarchgjrModelPropertiesParametricformofthemodelNumberofmodelparameters e g thedegreeofthemodel Innovationdistribution GaussianorStudent st Amountofpresampledataneededtoinitializethemodel Astaticconditionalmeanmodel theordinarylinearregressionmodel Adynamicconditionalmeanmodel p207 arimaclass modelobjectsforstationary orunit rootnonstationarylineartimeseriesmodels includesmovingaverage MA autoregressive AR mixedautoregressiveandmovingaverage ARMA integrated ARIMA multiplicativeseasonalmodels SpecifyConditionalMeanModelsUsingarima arima p D q seasonal ARIMAmodelp257stationaryARMAmodelp283 MA模型modelMA arima Constant 0 MA 0 8 0 5 0 1 impulse modelMA 30 響應(yīng)值 2012a版出錯 47 可編輯 ARMAModel modelARMA arima AR 0 6 0 3 MA 0 4 Methods estimate EstimateARIMAmodelparametersinfer InferGJRmodelconditionalvariancesforecastsimulate 1 Simulate500datapointsfromtheARMA 2 1 model simModel arima AR 0 5 0 3 MA 0 2 Constant 0 Variance 0 1 rng 5 Y simulate simModel 500 2 SpecifyanARMA 2 1 modelwithnoconstantandunknowncoefficientsandvariance model arima 2 0 1 model Constant 03 FittheARMA 2 1 modeltoY fit estimate model Y DataTransform WhyTransform Isolatetemporalcomponentsofinterest Removetheeffectofnuisancecomponents likeseasonality Makeaseriesstationary Reducespuriousregressioneffects Stabilizevariabilitythatgrowswiththeleveloftheseries Maketwoormoretimeseriesmoredirectlycomparable p122 afive stepprocessforidentifying selecting andassessingconditionalmeanmodels fordiscrete univariatetimeseriesdata ARMAEstablishthestationarityofyourtimeseries ACF PACFIdentifya stationary conditionalmeanmodelforyourdata Specifythemodel andestimatethemodelparameters Conductgoodness of fitcheckstoensurethemodeldescribesyourdataadequately usethemodeltoforecastorgenerateMonteCarlosimulations 步驟1識別 決定模型的階數(shù) 數(shù)據(jù)的動態(tài)特征數(shù)據(jù)時間圖 acf pacf步驟2估計 參數(shù)估計 OLS 極大似然估計 步驟3檢驗(yàn) 模型檢驗(yàn)過度擬合法 擬合一個更大模型 應(yīng)該不顯著 殘差診斷法 殘差序列無線性關(guān)系 否則還有模型沒有反映出來的動態(tài)特征 acf pacf Ljung Box法 ARMA模型選擇的信息法則 一開始實(shí)際數(shù)據(jù)比較雜亂 acf和pacf的規(guī)律不會非常簡單 直觀 難以選擇模型 信息準(zhǔn)則包含 殘差平方和的函數(shù) 由于增加額外參數(shù)所喪失的自由度的懲罰項 增加一個新變量 殘差平方和減少懲罰項增加目標(biāo) 使信息準(zhǔn)則的值最小 最常用的信息準(zhǔn)則 赤池AIC更具有有效性階數(shù)較大Schwarz貝葉斯準(zhǔn)則SBIC較強(qiáng)一致性漸進(jìn)遞歸到正確的模型階數(shù)平均波動性較大Hannan Quinn準(zhǔn)則HQIC沒有一種準(zhǔn)則明顯有優(yōu)勢 各有特點(diǎn) 畫出ACF PACF loadData JAustralian Y Dataset PAU N length Y figure 1 plot Y figure 2 subplot 2 1 1 autocorr Y subplot 2 1 2 parcorr Y Differencethedata ACF線性遞減 顯著 非平穩(wěn) dY diff Y 差分后序列ACF快速衰減 PACF2階截斷 表現(xiàn)與AR 2 類似 SpecifyandfitanARIMA 2 1 0 model model arima 2 1 0 fit estimate model Y coefficientsaresignificantatthe0 05significancelevel Infertheresidualsfromthefittedmodel Checkthattheresidualsarenormallydistributedanduncorrelated res infer fit Y plot res sqrt fit Variance qqplot res 正態(tài)分布對比 autocorr res parcorr res Generateforecastsandapproximate95 forecastintervals Yf YMSE forecast fit 16 Y0 Y UB Yf 1 96 sqrt YMSE LB Yf 1 96 sqrt YMSE h1 plot Y Color 75 75 75 holdon h2 plot 78 93 Yf r LineWidth 2 h3 plot 78 93 UB k LineWidth 1 5 plot 78 93 LB k LineWidth 1 5 Ljung BoxQ Test P136totestforautocorrelationatmultiplelagsjointly loadData Overshort Y Data N length Y h p Qstat crit lbqtest Y Lags 5 10 15 h 111significantautocorrelation 用于檢驗(yàn)arch效應(yīng) loadData EquityIdx Y Dataset NASDAQ r price2ret Y N length r e r mean r figure 2 subplot 2 1 1 autocorr e 2 subplot 2 1 2 parcorr e 2 h p lbqtest e 2 Lags 5 10 MaximumLikelihoodEstimationforConditionalMeanModelsp292EstimateConditionalMeanandVarianceModelp307 SpecifyingStaticTimeSeriesModels Demo StaticModels m SpecifyingStaticTimeSeriesModels pdf Box JenkinsDifferencingvs ARIMAEstimation p288 generateMsamplepaths eachoflengthNMarkovChainMonteCarlo MCMC generatedependentrandomdraws ThesimulatemethodinEconometricsToolboxgeneratesindependentrealizations DemonstratingtheoreticalresultsForecastingfutureeventsEstimatingtheprobabilityoffutureevents Step1 Specifyamodel model arima Constant 0 5 AR 0 7 0 25 Variance 1 Step2 Generateonesamplepathrng default 控制隨機(jī)數(shù)生成模式Y(jié) simulate model 50 Step3 Generatemanysamplepaths Y simulate model 50 numPaths 1000 Step4 Oversampletheprocess Toreducetransienteffects 短暫的 simulatepathsoflength150 anddiscardthefirst100observations TransientEffects stationaryprocesses theimpulseresponsefunctiondecaystozeroovertime thestartingpointofthesimulationiseventuallyforgotten Oversample generatesamplepathslongerthanneeded anddiscardthebeginningsamplesthatshowtransienteffects Recycle useafirstsimulationtogeneratepresampledataforasecondsimulation nonstationaryprocessesthestartingpointofthesimulationisneverforgotten default beginwith0 specifyyourownpresampledata 沒有自相關(guān)性 但是 有相關(guān)性 稱為 seriallydependent 金融條件方差模型特征 波動聚集Volatilityclustering原因 波動率的自相關(guān)性杠桿效應(yīng)Leverageeffects非對稱性效應(yīng) 波動率對大幅下跌的反應(yīng)強(qiáng)于大幅上升 EGARCH GJR 多元時間序列分析 3 3金融工具箱Financetoolbox HotTip HowdoIincorporatemylogotoaslidethatwillapplytoalltheotherslides Onthe View menu pointto Master andthenclick SlideMaster or NotesMaster Changeimagestotheoneyoulike thenitwillapplytoalltheotherslides Youcanbrieflyaddoutlineofthisslidepageinthistextbox Diagram Youcanbrieflyaddoutlineofthisslidepageinthistextbox Diagram Youcanbrieflyaddoutlineofthisslidepageinthistextbox CycleDiagram Youcanbrieflyaddoutlineofthisslidepageinthistextbox Diagram Youcanbrieflyaddoutlineofthisslidepageinthis
溫馨提示
- 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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 王夫之與譚嗣同認(rèn)識論比較研究
- 基于細(xì)粒含量和塑性指數(shù)的砂黏混合物小應(yīng)變動力特性研究
- 社區(qū)消防知識教育
- 護(hù)理實(shí)習(xí)生疑難病例報告撰寫指南
- 盧梭公民教育理論
- 營養(yǎng)健康知識講座
- 車輛落戶流程
- 領(lǐng)獎禮儀班會課課件
- 《智能網(wǎng)聯(lián)整車綜合測試》課件-交叉路口通行場景測試評價
- 預(yù)防近視知識課件圖片
- 后進(jìn)生轉(zhuǎn)化情況記錄表2
- 國際節(jié)能效果測量和驗(yàn)證規(guī)程
- 可感染人類的高致病性病原微生物菌(毒)種或樣本運(yùn)輸管理規(guī)定
- DL∕T 2055-2019 輸電線路鋼結(jié)構(gòu)腐蝕安全評估導(dǎo)則
- AUMA澳瑪執(zhí)行器內(nèi)部培訓(xùn)課件
- 灌陽地質(zhì)概況學(xué)習(xí)教案
- 門式腳手架專項施工方案完成
- 《全家便利店》第二課
- 黃土高原典型生態(tài)區(qū)基礎(chǔ)數(shù)據(jù)庫技術(shù)規(guī)范
- 第2章中子活化分析
- 武漢市市級預(yù)算單位銀行賬戶和資金管理暫行辦法
評論
0/150
提交評論