Main Content

使用计量经济学建模器应用程序比较条件差异模型拟合统计数据

此示例显示了如何使用计量经济学建模器应用程序指定和拟合GARCH,EGARCH和GJR模型。然后,示例通过比较拟合统计信息来确定适合数据最佳的模型。数据集存储在data_fxrates。mat,,,,contains foreign exchange rates measured daily from 1979–1998.

考虑为瑞士法郎创建预测模型,达到美元汇率(瑞士法郎)。

将数据进口到计量经济学建模者

在命令行,加载data_fxrates。mat数据集。

加载data_fxrates

转换表数据词至a timetable:

  1. 清除行名称数据词

  2. Convert the sampling times to adatetimevector.

  3. 通过将行与采样时间相关联,将表转换为时间表日期

datatable.properties.rownames = {};dates = dateTime(日期,'ConvertFrom',,,,'datenum',,,,...'格式',,,,'ddMMMyyyy',,,,“地方”,,,,'en_us'); DataTable = table2timetable(DataTable,'RowTimes',日期);

At the command line, open the计量经济学建模者应用程序。

计量经济学

或者,从应用程序画廊打开应用程序(请参阅计量经济学建模者)。

进口数据词into the app:

  1. 计量经济学建模者tab, in the进口部分,单击

  2. In the导入数据对话框,在进口?column, select the check box for the数据词多变的。

  3. 点击进口

所有时间序列变量数据词出现在Time Seriespane, and a time series plot of all the series appears in the时间序列图(AUD)图形窗口。

绘制系列

Plot the Swiss franc exchange rates by double-clicking the瑞士法郎time series in theTime Seriespane.

突出衰退时期:

  1. In theTime Series Plot(CHF)图形窗口,右键单击图。

  2. 在上下文菜单中,选择Show Recessions

瑞士法郎series appears to have a stochastic trend.

稳定系列

Stabilize the Swiss franc exchange rates by applying the first difference to瑞士法郎

  1. In theTime Series窗格,选择瑞士法郎

  2. 计量经济学建模者tab, in the变换部分,单击区别

  3. 突出衰退时期:

    1. In the时间序列图(CHFDIFF)图形窗口,右键单击图。

    2. 在上下文菜单中,选择Show Recessions

    一个命名的变量章鱼,,,,representing the differenced series, appears in theTime Series窗格,其价值出现在Previewpane, and its time series plot appears in the时间序列图(CHFDIFF)图形窗口。

该系列似乎是稳定的,但表现出波动性聚类。

Assess Presence of Conditional Heteroscedasticity

Test the stable Swiss franc exchange rate series for conditional heteroscedasticity by conducting Engle's ARCH test. Run the test assuming an ARCH(1) alternative model, then run the test again assuming an ARCH(2) alternative model. Maintain an overall significance level of 0.05 by decreasing the significance level of each test to 0.05/2 = 0.025.

  1. In theTime Series窗格,选择章鱼

  2. 计量经济学建模者tab, in the测试部分,单击新测试>Engle's ARCH Test

  3. tab, in the参数section, set滞后数of1

  4. 显着性水平0.025

  5. In the测试部分,单击Run Test

  6. Repeat steps 3 through 5, but set滞后数2反而。

测试结果出现在Results拱门(Chfdiff)文档。

测试拒绝对替代模型的无弓效应的无效假设。该结果表明为有条件的方差模型指定章鱼至少包含两个拱形滞后。带有两个拱门滞后的条件差异模型在本地等同于具有一个拱门和一个Garch滞后的模型。考虑Garch(1,1),Egarch(1,1)和GJR(1,1)模型章鱼

估计GARCH模型

Specify a GARCH(1,1) model and fit it to the章鱼系列。

  1. In theTime Series窗格,选择章鱼时间序列。

  2. 点击the计量经济学建模者标签。这n, in the楷模部分,单击the arrow to display the models gallery.

  3. 在模型中吉利莲y, in theGarch楷模部分,单击Garch

  4. In theGARCH模型参数对话框,在Lag Ordertab:

    1. Garch学位1

    2. 拱门学位1

    3. 点击估计

模型变量garch_chfdiff出现在楷模窗格,其价值出现在Previewpane, and its estimation summary appears in the模型摘要(GARCH_CHFDIFF)文档。

Specify and Estimate EGARCH Model

指定一个在第一个滞后处包含杠杆项的egarch(1,1)模型,并将模型拟合到章鱼系列。

  1. In theTime Series窗格,选择章鱼时间序列。

  2. 计量经济学建模者tab, in the楷模部分,单击the arrow to display the models gallery.

  3. 在模型中吉利莲y, in theGarch楷模部分,单击埃加奇

  4. In theEgarch模型参数对话框,在Lag Ordertab:

    1. Garch学位1

    2. 拱门学位1。因此,该应用程序包括相应的杠杆滞后。您可以删除或调整杠杆作用滞后滞后矢量标签。

  5. 点击估计

模型变量egarch_chfdiff出现在楷模窗格,其价值出现在Previewpane, and its estimation summary appears in the型号摘要(egarch_chfdiff)文档。

指定和估计GJR模型

Specify a GJR(1,1) model containing a leverage term at the first lag, and fit the model to the章鱼系列。

  1. In theTime Series窗格,选择章鱼时间序列。

  2. 计量经济学建模者tab, in the楷模部分,单击the arrow to display the models gallery.

  3. 在模型中吉利莲y, in theGarch楷模部分,单击GJR

  4. In theGJR Model Parameters对话框,在Lag Ordertab:

    1. Garch学位1

    2. 拱门学位1。因此,该应用程序包括相应的杠杆滞后。您可以删除或调整杠杆作用滞后滞后矢量标签。

    3. 点击估计

模型变量GJR_CHFDiff出现在楷模窗格,其价值出现在Previewpane, and its estimation summary appears in the型号摘要(gjr_chfdiff)文档。

选择型号

选择具有最佳类似样本拟合的模型。将您的决定基于产生最小Akaike信息标准(AIC)的模型。该表显示了估计模型的AIC拟合统计数据,如健康的好处每个模型的估计摘要部分。

Model AIC
Garch(1,1) -28730
埃加奇(1,1) -28726
GJR(1,1) -28737

GJR(1,1)模型得出最小的BIC值。因此,它具有所有估计模型的最佳样本中拟合。

也可以看看

应用

对象

功能

Related Topics