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.

Specify Conditional Variance Model For Exchange Rates

This example shows how to specify a conditional variance model for daily Deutschmark/British pound foreign exchange rates observed from January 1984 to December 1991.

Load the Data.

Load the exchange rate data included with the toolbox.

load Data_MarkPound
y = Data;
T = length(y);

h = gca;
h.XTick = [1 659 1318 1975];
h.XTickLabel = {'Jan 1984','Jan 1986','Jan 1988',...
     'Jan 1992'};
ylabel 'Exchange Rate';
title 'Deutschmark/British Pound Foreign Exchange Rate';

The exchange rate looks nonstationary (it does not appear to fluctuate around a fixed level).

Calculate the Returns.

Convert the series to returns. This results in the loss of the first observation.

r = price2ret(y);

h2 = gca;
h2.XTick = [1 659 1318 1975];
h2.XTickLabel = {'Jan 1984','Jan 1986','Jan 1988',...
     'Jan 1992'};
ylabel 'Returns';
title 'Deutschmark/British Pound Daily Returns';

The returns series fluctuates around a common level, but exhibits volatility clustering. Large changes in the returns tend to cluster together, and small changes tend to cluster together. That is, the series exhibits conditional heteroscedasticity.

The returns are of relatively high frequency. Therefore, the daily changes can be small. For numerical stability, it is good practice to scale such data. In this case, scale the returns to percentage returns.

r = 100*r;

Check for Autocorrelation.

Check the returns series for autocorrelation. Plot the sample ACF and PACF, and conduct a Ljung-Box Q-test.


[h,p] = lbqtest(r,[5 10 15])
h =

  1x3 logical array

   0   0   0

p =

    0.3982    0.7278    0.2109

The sample ACF and PACF show virtually no significant autocorrelation. The Ljung-Box Q-test null hypothesis that all autocorrelations up to the tested lags are zero is not rejected for tests at lags 5, 10, and 15. This suggests that a conditional mean model is not needed for this returns series.

Check for Conditional Heteroscedasticity.

Check the return series for conditional heteroscedasticity. Plot the sample ACF and PACF of the squared returns series (after centering). Conduct Engle's ARCH test with a two-lag ARCH model alternative.


[h,p] = archtest(r-mean(r),'lags',2)
h =



p =


The sample ACF and PACF of the squared returns show significant autocorrelation. This suggests a GARCH model with lagged variances and lagged squared innovations might be appropriate for modeling this series. Engle's ARCH test rejects the null hypothesis (h = 1) of no ARCH effects in favor of the alternative ARCH model with two lagged squared innovations. An ARCH model with two lagged innovations is locally equivalent to a GARCH(1,1) model.

Specify a GARCH(1,1) Model.

Based on the autocorrelation and conditional heteroscedasticity specification testing, specify the GARCH(1,1) model with a mean offset:

with and

Assume a Gaussian innovation distribution.

Mdl = garch('Offset',NaN,'GARCHLags',1,'ARCHLags',1)
Mdl = 

    GARCH(1,1) Conditional Variance Model with Offset:
    Distribution: Name = 'Gaussian'
               P: 1
               Q: 1
        Constant: NaN
           GARCH: {NaN} at Lags [1]
            ARCH: {NaN} at Lags [1]
          Offset: NaN

The created model, Mdl, has NaN values for all unknown parameters in the specified GARCH(1,1) model.

You can pass the GARCH model Mdl and r into estimate to estimate the parameters.

See Also

| | | |

Related Examples

More About

Was this topic helpful?