%% Test a Time Series for ARCH Effects
% Load the Deutschmark/British pound foreign-exchange rate data set.

load Data_MarkPound

%
% Convert the prices to returns.

returns = price2ret(Data);

%
% Compute the deviations of the return series.

residuals = returns - mean(returns);

%
% Test the return series for ARCH effects using the residuals.

h = archtest(residuals)

% The result h = 1 indicates that you should reject null hypothesis of no conditional heteroscedasticity and conclude that there are significant ARCH effects in the return series.
% Copyright 2015 The MathWorks, Inc.