Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

gjr

GJR conditional variance time series model

Description

A gjr model object specifies the functional form and stores the parameter values of a Glosten, Jagannathan, and Runkle (GJR) model [1], which is a generalized autoregressive conditional heteroscedastic (GARCH) model generalization. GJR models attempt to address volatility clustering in an innovations process. Volatility clustering occurs when an innovations process does not exhibit significant autocorrelation, but the variance of the process changes with time. GJR models are appropriate when negative shocks contribute more to volatility than positive shocks [2].

The GJR(P,Q) conditional variance model includes:

  • P past conditional variances that compose the GARCH component polynomial

  • Q past squared innovations that compose the ARCH and leverage component polynomials

To create a gjr model object, use gjr. Specify only the GARCH and ARCH (and leverage) polynomial degrees P and Q, respectively, using the shorthand syntax gjr(P,Q). Then, pass the model and time series data to estimate to fit the model to the data. Or, specify the values of some parameters, and then estimate others.

Use a completely specified model (i.e., all parameter values of the model are known) to:

  • Simulate conditional variances or responses using simulate

  • Forecast conditional variances using forecast

Creation

Create gjr models using gjr.

You can specify a gjr model as part of a composition of conditional mean and variance models. For details, see arima.

Properties

Conditional Variance Model PropertiesSpecify conditional variance model functional form and parameter values

Object Functions

estimateFit conditional variance model to data
filterFilter disturbances through conditional variance model
forecastForecast conditional variances from conditional variance models
inferInfer conditional variances of conditional variance models
printDisplay parameter estimation results for conditional variance models
simulateMonte Carlo simulation of conditional variance models

Examples

expand all

Create a gjr model using name-value pair arguments.

Specify a GJR(1,1) model.

Mdl = gjr('GARCHLags',1,'ARCHLags',1,'LeverageLags',1)
Mdl = 
    GJR(1,1) Conditional Variance Model:
    --------------------------------------  
    Distribution: Name = 'Gaussian'
               P: 1
               Q: 1
        Constant: NaN
           GARCH: {NaN} at Lags [1]
            ARCH: {NaN} at Lags [1]
        Leverage: {NaN} at Lags [1]

Mdl is a gjr model object. The software sets all parameters to NaN, except P, Q, Distribution, and Offset (which is 0 by default).

Since Mdl contains NaN values, Mdl is only appropriate for estimation only. Pass Mdl and time-series data to estimate. For a continuation of this example, see Estimate GJR Model.

Create a gjr model object using the shorthand notation gjr(P,Q), where P is the degree of the GARCH polynomial and Q is the degree of the ARCH and leverage polynomials.

Create an GJR(3,2) model.

Mdl = gjr(3,2)
Mdl = 
    GJR(3,2) Conditional Variance Model:
    --------------------------------------  
    Distribution: Name = 'Gaussian'
               P: 3
               Q: 2
        Constant: NaN
           GARCH: {NaN NaN NaN} at Lags [1 2 3]
            ARCH: {NaN NaN} at Lags [1 2]
        Leverage: {NaN NaN} at Lags [1 2]

Mdl is a gjr model object. All properties of Mdl, except P, Q, and Distribution, are NaN values. By default, the software:

  • Includes a conditional variance model constant

  • Excludes a conditional mean model offset (i.e., the offset is 0)

  • Includes all lag terms in the GARCH polynomial up to lags P

  • Includes all lag terms in the ARCH and leverage polynomials up to lag Q

Mdl specifies only the functional form of a GJR model. Because it contains unknown parameter values, you can pass Mdl and time-series data to estimate to estimate the parameters.

Access the properties of a gjr model object using dot notation.

Create a gjr model object.

Mdl = gjr(3,2)
Mdl = 

    GJR(3,2) Conditional Variance Model:
    --------------------------------------  
    Distribution: Name = 'Gaussian'
               P: 3
               Q: 2
        Constant: NaN
           GARCH: {NaN NaN NaN} at Lags [1 2 3]
            ARCH: {NaN NaN} at Lags [1 2]
        Leverage: {NaN NaN} at Lags [1 2]

Remove the second GARCH term from the model. That is, specify that the GARCH coefficient of the second lagged conditional variance is 0.

Mdl.GARCH{2} = 0
Mdl = 

    GJR(3,2) Conditional Variance Model:
    --------------------------------------  
    Distribution: Name = 'Gaussian'
               P: 3
               Q: 2
        Constant: NaN
           GARCH: {NaN NaN} at Lags [1 3]
            ARCH: {NaN NaN} at Lags [1 2]
        Leverage: {NaN NaN} at Lags [1 2]

The GARCH polynomial has two unknown parameters corresponding to lags 1 and 3.

Display the distribution of the disturbances.

Mdl.Distribution
ans = 

  struct with fields:

    Name: 'Gaussian'

The disturbances are Gaussian with mean 0 and variance 1.

Specify that the underlying disturbances have a t distribution with five degrees of freedom.

Mdl.Distribution = struct('Name','t','DoF',5)
Mdl = 

    GJR(3,2) Conditional Variance Model:
    --------------------------------------  
    Distribution: Name = 't', DoF = 5
               P: 3
               Q: 2
        Constant: NaN
           GARCH: {NaN NaN} at Lags [1 3]
            ARCH: {NaN NaN} at Lags [1 2]
        Leverage: {NaN NaN} at Lags [1 2]

Specify that the ARCH coefficients are 0.2 for the first lag and 0.1 for the second lag.

Mdl.ARCH = {0.2 0.1}
Mdl = 

    GJR(3,2) Conditional Variance Model:
    --------------------------------------  
    Distribution: Name = 't', DoF = 5
               P: 3
               Q: 2
        Constant: NaN
           GARCH: {NaN NaN} at Lags [1 3]
            ARCH: {0.2 0.1} at Lags [1 2]
        Leverage: {NaN NaN} at Lags [1 2]

To estimate the remaining parameters, you can pass Mdl and your data to estimate and use the specified parameters as equality constraints. Or, you can specify the rest of the parameter values, and then simulate or forecast conditional variances from the GARCH model by passing the fully specified model to simulate or forecast, respectively.

Fit a GJR model to an annual time series of stock price index returns from 1861-1970. The example follows from Create GJR Model.

Load the Nelson-Plosser data set. Convert the yearly stock price indices (SP) to returns. Plot the returns.

load Data_NelsonPlosser;
sp = price2ret(DataTable.SP);

figure;
plot(dates(2:end),sp);
hold on;
plot([dates(2) dates(end)],[0 0],'r:'); % Plot y = 0
hold off;
title('Returns');
ylabel('Return (%)');
xlabel('Year');
axis tight;

The return series does not seem to have a conditional mean offset, and seems to exhibit volatility clustering. That is, the variability is smaller for earlier years than it is for later years. For this example, assume that an GJR(1,1) model is appropriate for this series.

Create a GJR(1,1) model. The conditional mean offset is zero by default. The software includes a conditional variance model constant by default.

Mdl = gjr('GARCHLags',1,'ARCHLags',1,'LeverageLags',1);

Fit the GJR(1,1) model to the data.

EstMdl = estimate(Mdl,sp);
 
    GJR(1,1) Conditional Variance Model:
    --------------------------------------
    Conditional Probability Distribution: Gaussian

                                  Standard          t     
     Parameter       Value          Error       Statistic 
    -----------   -----------   ------------   -----------
     Constant     0.00457276    0.00441991        1.03458
     GARCH{1}       0.558076      0.240004        2.32528
      ARCH{1}       0.204606      0.178856        1.14397
  Leverage{1}       0.180658      0.268015       0.674059

EstMdl is a fully specified gjr model object. That is, it does not contain NaN values. You can assess the adequacy of the model by generating residuals using infer, and then analyzing them.

To simulate conditional variances or responses, pass EstMdl to simulate. See Simulate GJR Model Observations and Conditional Variances.

To forecast innovations, pass EstMdl to forecast. See Forecast GJR Model Conditional Variances.

Simulate conditional variance or response paths from a fully specified gjr model object. That is, simulate from an estimated gjr model or a known gjr model in which you specify all parameter values. This example follows from Estimate GJR Model.

Load the Nelson-Plosser data set. Convert the yearly stock price indices to returns.

load Data_NelsonPlosser;
sp = price2ret(DataTable.SP);

Create a GJR(1,1) model. Fit the model to the return series.

Mdl = gjr(1,1);
EstMdl = estimate(Mdl,sp);
 
    GJR(1,1) Conditional Variance Model:
    --------------------------------------
    Conditional Probability Distribution: Gaussian

                                  Standard          t     
     Parameter       Value          Error       Statistic 
    -----------   -----------   ------------   -----------
     Constant     0.00457276    0.00441991        1.03458
     GARCH{1}       0.558076      0.240004        2.32528
      ARCH{1}       0.204606      0.178856        1.14397
  Leverage{1}       0.180658      0.268015       0.674059

Simulate 100 paths of conditional variances and responses from the estimated GJR model.

numObs = numel(sp); % Sample size (T)
numPaths = 100;     % Number of paths to simulate
rng(1);             % For reproducibility
[VSim,YSim] = simulate(EstMdl,numObs,'NumPaths',numPaths);

VSim and YSim are T-by- numPaths matrices. Rows correspond to a sample period, and columns correspond to a simulated path.

Plot the average and the 97.5% and 2.5% percentiles of the simulated paths. Compare the simulation statistics to the original data.

dates = dates(2:end);
VSimBar = mean(VSim,2);
VSimCI = quantile(VSim,[0.025 0.975],2);
YSimBar = mean(YSim,2);
YSimCI = quantile(YSim,[0.025 0.975],2);

figure;
subplot(2,1,1);
h1 = plot(dates,VSim,'Color',0.8*ones(1,3));
hold on;
h2 = plot(dates,VSimBar,'k--','LineWidth',2);
h3 = plot(dates,VSimCI,'r--','LineWidth',2);
hold off;
title('Simulated Conditional Variances');
ylabel('Cond. var.');
xlabel('Year');
axis tight;

subplot(2,1,2);
h1 = plot(dates,YSim,'Color',0.8*ones(1,3));
hold on;
h2 = plot(dates,YSimBar,'k--','LineWidth',2);
h3 = plot(dates,YSimCI,'r--','LineWidth',2);
hold off;
title('Simulated Nominal Returns');
ylabel('Nominal return (%)');
xlabel('Year');
axis tight;
legend([h1(1) h2 h3(1)],{'Simulated path' 'Mean' 'Confidence bounds'},...
    'FontSize',7,'Location','NorthWest');

Forecast conditional variances from a fully specified gjr model object. That is, forecast from an estimated gjr model or a known gjr model in which you specify all parameter values. This example follows from Estimate GJR Model.

Load the Nelson-Plosser data set. Convert the yearly stock price indices (SP) to returns.

load Data_NelsonPlosser;
sp = price2ret(DataTable.SP);

Create a GJR(1,1) model and fit it to the return series.

Mdl = gjr('GARCHLags',1,'ARCHLags',1,'LeverageLags',1);
EstMdl = estimate(Mdl,sp);
 
    GJR(1,1) Conditional Variance Model:
    --------------------------------------
    Conditional Probability Distribution: Gaussian

                                  Standard          t     
     Parameter       Value          Error       Statistic 
    -----------   -----------   ------------   -----------
     Constant     0.00457276    0.00441991        1.03458
     GARCH{1}       0.558076      0.240004        2.32528
      ARCH{1}       0.204606      0.178856        1.14397
  Leverage{1}       0.180658      0.268015       0.674059

Forecast the conditional variance of the nominal return series 10 years into the future using the estimated GJR model. Specify the entire return series as presample observations. The software infers presample conditional variances using the presample observations and the model.

numPeriods = 10;
vF = forecast(EstMdl,numPeriods,'Y0',sp);

Plot the forecasted conditional variances of the nominal returns. Compare the forecasts to the observed conditional variances.

v = infer(EstMdl,sp);
nV = size(v,1);
dates = dates((end - nV + 1):end);

figure;
plot(dates,v,'k:','LineWidth',2);
hold on;
plot(dates(end):dates(end) + 10,[v(end);vF],'r','LineWidth',2);
title('Forecasted Conditional Variances of Returns');
ylabel('Conditional variances');
xlabel('Year');
axis tight;
legend({'Estimation Sample Cond. Var.','Forecasted Cond. var.'},...
    'Location','NorthWest');

Introduced in R2012a

Was this topic helpful?