




已阅读5页,还剩18页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Econometric Modeling A simple model is easier to estimate, forecast, and interpret.1 Specification tests helps you identify one or more model families that could plausibly describe the data generating process.2 Model comparisons help you compare the fit of competing models, with penalties for complexity.3 Goodness-of-fit checks help you assess the in-sample adequacy of your model, verify that all model assumptions hold, and evaluate out-of-sample forecast performance. arima garch egarch gjr(s a variant of the GARCH conditional variance model, named for Glosten, Jagannathan, and Runkle)A model object holds all the information necessary to estimate, simulate, and forecast econometric models. Parametric form of the model Number of model parameters (e.g., the degree of the model) Innovation distribution (Gaussian or Students t) Amount of presample data needed to initialize the modelExample1: AR(2)where the innovations are independent and identically distributed normal random variables with mean 0 and variance 0.2. This is a conditional mean model, so use arima.model = arima(AR,0.8,-0.2,Variance,0.2,Constant,0) Example2: GARCH(1,1) model model = garch(GARCH,NaN,ARCH,NaN)或者model = garch(1,1) Parameters with NaN values need to be estimated or otherwise specified before you can forecast or simulate the model.To display the value of the property AR for the created variable object,model.ARmodel.Distribution = struct(Name,t,DoF,8)Methods are functions that accept model objects as inputs. In Econometrics Toolbox, estimate infer forecast simulateExample3: Fit an ARMA(2,1) model to simulated data1) Simulate 500 data points from the ARMA(2,1) modelsimModel = arima(AR,0.5,-0.3,MA,0.2,Constant,0,Variance,0.1);rng(5);Y = simulate(simModel,500);2) Specify an ARMA(2,1) model with no constant and unknown coefficients and variance.model = arima(2,0,1);model.Constant = 03) Fit the ARMA(2,1) model to Y.fit = estimate(model,Y)Example4: inferload Data_EquityIdxnasdaq = Dataset.NASDAQ;r = price2ret(nasdaq);r0 = r(1:2);rn = r(3:end);Fit a GARCH(1,1) model to the returns, and infer the loglikelihood objective function value.model1 = garch(1,1);fit1 = estimate(model1,rn,E0,r0);,LogL1 = infer(fit1,rn,E0,r0);Wolds theorem: you can write all weakly stationary stochastic processes in the general linear form, Thus, by Wolds theorem, you can model(or closely approximate) every stationary stochastic process asThe conditional mean and variance modelsStationarity tests If your data is not stationary, consider transforming your data. Stationarity is the foundation of many time series models.You can difference a series with a unit root until it is stationary, Or, consider using a nonstationary ARIMA model if there is evidence of a unit root in your data.Seasonal ARIMA models use seasonal differencing to remove seasonal effects. You can also include seasonal lags to model seasonal autocorrelation.Conduct a Ljung-Box Q-test to test autocorrelations at several lags jointly. If autocorrelation is present, consider using a conditional mean model.Looking for autocorrelation in the squared residual series is one way to detect conditionalHeteroscedasticity. To model conditional heteroscedasticity, consider using a conditional variance model.You can use a Students t distribution to model fatter tails than a Gaussian distribution (excesskurtosis).You can compare nested models using misspecification tests, such as the likelihood ratio test, Walds test, or Lagrange multiplier test.The Johansen and Engle-Granger cointegration tests assess evidence of cointegration. Consider using the VEC model for modeling multivariate, cointegrated series. It can introduce spurious regression effects.The example “Specifying Static Time Series Models” explores cointegration in static regressionmodels. Type showdemo Demo_StaticModels.Why Transform? Isolate temporal components of interest. Remove the effect of nuisance components (like seasonality). Make a series stationary. Reduce spurious regression effects. Stabilize variability that grows with the level of the series. Make two or more time series more directly comparable.P207An example of a static conditional mean model is the ordinary linear regression model.A dynamic conditional mean model specifies the evolution of the conditional mean, , Examples:By Wolds decomposition, you can write the conditional mean of any stationary process yt asAnd is the constant unconditional mean of the stationary process.arima(p,D,q): nonseasonal AR terms (p), the order of nonseasonal integration (D), and the number of nonseasonal MA terms (q).When simulating time series models, one draw (or, realization) is an entire sample path of specified length N, y1, y2,.,yN, generate M sample paths, each of length N.Some extensions of Monte Carlo simulation rely on generating dependent random draws, such as Markov Chain Monte Carlo (MCMC). The simulate method in Econometrics Toolbox generates independent realizations. Demonstrating theoretical results Forecasting future events Estimating the probability of future events1) Specifying any required presample data (or use default presample data).2) Generating an uncorrelated innovation series from the specified innovation distribution.3) Generating responses by recursively applying the specified AR and MA polynomial operators. The AR polynomial operator can include differencing. For stationary processes, presample responses are set to the unconditional mean of the process. For nonstationary processes, presample responses are set to zero. Presample innovations are set to zero.Step 1. Specify a model.model = arima(Constant,0.5,AR,0.7,0.25,Variance,.1);Step 2. Generate one sample path.rng(default)Y = simulate(model,50);figure(1)plot(Y)xlim(0,50)title(Simulated AR(2) Process)Step 3. Generate many sample paths.rng(default)Y = simulate(model,50,numPaths,1000);figure(2)subplot(2,1,1)plot(Y,Color,.85,.85,.85)title(Simulated AR(2) Process)hold onh=plot(mean(Y,2),k,LineWidth,2);legend(h,Simulation Mean,Location,NorthWest)hold offsubplot(2,1,2)plot(var(Y,0,2),r,LineWidth,2)title(Process Variance)hold onplot(1:50,.83*ones(50,1),k-,LineWidth,1.5)legend(Simulation,Theoretical,.Location,SouthEast)hold offStep 4. Oversample the process.To reduce transient effects, one option is to oversample the process, simulate paths of length 150, and discard the first 100 observations.Step 1. Generate realizations from a trend-stationary process.t = 1:200;trend = 0.5*t;model = arima(Constant,0,MA,1.4,0.8,Variance,8);rng(default)u = simulate(model,300,numPaths,50);Yt = repmat(trend,1,50) + u(101:300,:);Step 2. Generate realizations from a difference-stationary process.model = arima(Constant,0.5,D,1,MA,1.4,0.8,Variance,8); Volatility clustering. Volatility is the conditional standard deviation of a time series. Autocorrelation in the conditional variance process results in volatility clustering. Leverage effects. The volatility of some time series responds more to large decreases than to large increases. The EGARCH and GJR models have leverage terms to model this asymmetry.GARCH ModelEGARCH ModelStep 1. Load the data.Load the exchange rate data included with the toolbox.load Data_MarkPoundY = Data;N = length(Y);figure(1)plot(Y)set(gca,XTick,1,659,1318,1975);set(gca,XTickLabel,Jan 1984,Jan 1986,Jan 1988,.Jan 1992)ylabel(Exchange Rate)title(Deutschmark/British Pound Foreign Exchange Rate)Step 2. Calculate the returns.Convert the series to returns. This results in the loss of the first observation.r = price2ret(Y);figure(2)plot(2:N,r)set(gca,XTick,1,659,1318,1975);set(gca,XTickLabel,Jan 1984,Jan 1986,Jan 1988,.Jan 1992)ylabel(Returns)title(Deutschmark/British Pound Daily Returns)Step 3. Check for autocorrelation.Check the returns series for autocorrelation. Plot the sample ACF and PACF,and conduct a Ljung-Box Q-test.figure(3)subplot(2,1,1)autocorr(r)subplot(2,1,2)parcorr(r)h,p = lbqtest(r,5 10 15)Step 4. Check for conditional heteroscedasticity.figure(4)subplot(2,1,1)autocorr(r-mean(r).2)subplot(2,1,2)parcorr(r-mean(r).2)h,p = archtest(r-mean(r),lags,2)Step 5. Specify a GARCH(1,1) model.model = garch(Offset,NaN,GARCHLags,1,ARCHLags,1)Step 1. Load the data.Load the Danish nominal stock return data included with the toolbox.load Data_DanishY = Dataset.RN;N = length(Y);figure(1)plot(Y)xlim(0,N)title(Danish Nominal Stock Returns)Step 2. Fit an EGARCH(1,1) model.Specify, and then fit an EGARCH(1,1) model to the nominal stock returnsseries. Include a mean offset, and assume a Gaussian innovation distribution.model = egarch(Offset,NaN,GARCHLags,1,.ARCHLags,1,LeverageLags,1);fit = estimate(model,Y);Step 3. Infer the conditional variances.Infer the conditional variances using the fitted model.V = infer(fit,Y);figure(2)plot(V)xlim(0,N)title(Inferred Conditional Variances)Step 4. Compute the standardized residuals.Compute the standardized residuals for the model fit. Subtract the estimatedmean offset, and divide by the square root of the conditional variance process.res = (Y-fit.Offset)./sqrt(V);figure(3)subplot(2,2,1)plot(res)xlim(0,N)title(Standardized Residuals)subplot(2,2,2)hist(res)subplot(2,2,3)autocorr(res)subplot(2,2,4)parcorr(res)Resampling StatisticsBootstrap Jackknife The bootstrap procedure:each observation is selected separately at random from the original dataset. load lawdataplot(lsat,gpa,+)lslinerhohat = corr(lsat,gpa)though it may seem large, you still do not know if it
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 村委代签补偿协议书范本
- 文化创意产业基地空地租赁与项目合作开发协议
- 申请商标签协议书范本
- 充电桩充电服务及能源供应合同
- 精细化仓储配送与供应链管理合同
- 茶园土地租赁与茶叶种植技术输出合同
- 知名快餐品牌区域代理权及店铺转让合同范本
- 产科医院护士标准聘用合同及母婴护理
- 餐饮品牌股权投资与转让合同
- 企业常年财务顾问与风险控制协议
- 基于人工智能的智慧农业应用案例
- 油藏工程教程-第04章-油气藏压力与温度
- 三伏贴的组方
- 培训讲义职场中的冲突管理
- 浙教版科学七年级上册全册课件
- 道路运输防汛应急演练方案范文
- 道路管线施工地铁保护施工方案
- 财务报表分析作业
- 胆汁性胸膜炎查房
- 南川水江-涪陵白涛天然气管道工程环评报告
- 焊接质量检查表
评论
0/150
提交评论