




已閱讀5頁,還剩89頁未讀, 繼續(xù)免費閱讀
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
金融時間序列分析 陸貴斌2012年10月 基本思路 作為引入 先搞清楚時間序列 分析時間序列的目的 挖掘背后的規(guī)律 以利于預測未來 內容 第3部分Matlab時間序列分析 Matlab時間序列分析工具箱 統(tǒng)計工具箱Statisticstoolbox計量工具箱Econometrictoolbox金融工具箱Financetoolbox 3 1統(tǒng)計工具箱Statisticstoolbox 單變量隨機分布單變量模擬抽樣多變量隨機分布Copulas模擬 暫時不講 回歸分析 單變量隨機分布 disttool演示各種隨機分布圖 t分布與Z分布 也可直接用程序 呈現(xiàn)隨機分布 x 5 0 1 5 y tpdf x 5 t分布 z normpdf x 0 1 標準正態(tài)分布 plot x y x z 重復抽樣 randtool 可保存隨機數(shù) 后面可用 z1 random Normal 0 1 2 4 2行4列x1 1 16500 0751 0 69650 05910 62680 35161 69611 7971 多變量隨機分布 mu 23 SIGMA 11 5 1 53 協(xié)方差矩陣 r mvnrnd mu SIGMA 100 隨機數(shù)對 plot r 1 r 2 數(shù)據(jù)的隨機擬合 單變量 dfittool 多變量隨機數(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ù) 描述多變量間相關性 描述邊際分布 對于非標準多元隨機分布 一大難題 相互依賴性如 MonteCarlo模擬相關性可能都需要從實際數(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 極值分布來描述缺點 邊際分布都是同一族類的 n 1000 z normrnd 0 1 n 1 hist z 3 75 5 3 75 Copulas的目標 生產多元分布 存在相互依賴 通過一定的轉變方法 將各自的分布 及依賴結構分離出來 Z 標準正態(tài)分布 Z的分布函數(shù)U Unif 0 1 分布 u normcdf z hist u 05 1 95 Copulas核心 將F分布的逆分布函數(shù)應用于 0 1 均勻隨機變量上 仍然是F隨機分布 可以將它轉變?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相互獨立 則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 轉換transform twoincreasingtransformations 為了描述這種一致性 引入rankpairs R S 經(jīng)驗copulas Deheuvels 1979 可以證明 Cn是C的無偏估計量 服從正態(tài)分布 Copulas研究現(xiàn)狀 copulas模型的推斷統(tǒ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 面向對象 類似于結構變量 modelselection amodel adequatelydescribesyourdata 基礎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 響應值 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檢驗 模型檢驗過度擬合法 擬合一個更大模型 應該不顯著 殘差診斷法 殘差序列無線性關系 否則還有模型沒有反映出來的動態(tài)特征 acf pacf Ljung Box法 ARMA模型選擇的信息法則 一開始實際數(shù)據(jù)比較雜亂 acf和pacf的規(guī)律不會非常簡單 直觀 難以選擇模型 信息準則包含 殘差平方和的函數(shù) 由于增加額外參數(shù)所喪失的自由度的懲罰項 增加一個新變量 殘差平方和減少懲罰項增加目標 使信息準則的值最小 最常用的信息準則 赤池AIC更具有有效性階數(shù)較大Schwarz貝葉斯準則SBIC較強一致性漸進遞歸到正確的模型階數(shù)平均波動性較大Hannan Quinn準則HQIC沒有一種準則明顯有優(yōu)勢 各有特點 畫出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 用于檢驗arch效應 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 控制隨機數(shù)生成模式Y 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 沒有自相關性 但是 有相關性 稱為 seriallydependent 金融條件方差模型特征 波動聚集Volatilityclustering原因 波動率的自相關性杠桿效應Leverageeffects非對稱性效應 波動率對大幅下跌的反應強于大幅上升 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)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 大學生思想政治教育與使命感建設的有機融合
- 廣東省深圳市羅湖區(qū)文錦中學2025屆八年級數(shù)學第一學期期末綜合測試試題含解析
- 四川省廣安市代市中學2024年七年級數(shù)學第一學期期末監(jiān)測試題含解析
- 湖北省谷城縣2024年數(shù)學八年級第一學期期末聯(lián)考試題含解析
- 陜西省山陽縣2024年物理八年級第一學期期末教學質量檢測試題含解析
- 山東省青島市超銀中學2025屆八年級數(shù)學第一學期期末考試試題含解析
- 二手房買賣合同含房屋質量及驗收標準
- 特定病種護理技術操作指南與流程
- 智能家居背景下AR家裝設計平臺的機遇與挑戰(zhàn)
- 2025至2030LED產業(yè)產業(yè)運行態(tài)勢及投資規(guī)劃深度研究報告
- 后進生轉化情況記錄表2
- 國際節(jié)能效果測量和驗證規(guī)程
- 可感染人類的高致病性病原微生物菌(毒)種或樣本運輸管理規(guī)定
- DL∕T 2055-2019 輸電線路鋼結構腐蝕安全評估導則
- AUMA澳瑪執(zhí)行器內部培訓課件
- 灌陽地質概況學習教案
- 門式腳手架專項施工方案完成
- 《全家便利店》第二課
- 黃土高原典型生態(tài)區(qū)基礎數(shù)據(jù)庫技術規(guī)范
- 第2章中子活化分析
- 武漢市市級預算單位銀行賬戶和資金管理暫行辦法
評論
0/150
提交評論