<< arburg | FOSSEE_Signal_Processing_Toolbox | arch_rnd >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > arch_fit

# arch_fit

Fit an ARCH regression model to the time series y using the scoring algorithm in Engle’s original ARCH paper.

### Syntax

    [a, b] = arch_fit(y, x, p)
    [a, b] = arch_fit(y, x, p, iter, gamma, a0, b0)

### Parameters

y:

  A time-series data vector up to time t-1.

x:

  A matrix of (ordinary) regressors x up to t.

p:

  The order of the regression of the residual variance.

iter:

  Number of iterations (optional).

gamma:

  Updating factor (optional).

a0:

  Initial values for the scoring algorithm (optional).

b0:

  Initial values for the scoring algorithm (optional).

### Description

Function arch_fit() fits an ARCH regression model to the time series `y` using the scoring algorithm in Engle’s original ARCH paper. The model is: y(t) = b(1) * x(t,1) + … + b(k) * x(t,k) + e(t), h(t) = a(1) + a(2) * e(t-1)^2 + … + a(p+1) * e(t-p)^2 where `e(t)` is N(0, h(t)). The function allows specifying the number of iterations, updating factor, and initial values for the scoring algorithm.

### Examples

    // Fit an ARCH regression model to a time series

    // Define the time series data (y) and regressors (x)
    y = [1.2, 2.3, 1.8, 2.5, 3.1, 2.9, 3.5, 3.8, 4.2, 4.5] // Time-series data
    x = [1, 2; 2, 3; 3, 4; 4, 5; 5, 6; 6, 7; 7, 8; 8, 9; 9, 10; 10, 11] // Regressors

    // Define the order of the regression of the residual variance
    p = 2

    // Fit the ARCH model
    [a, b] = arch_fit(y, x, p)

### See also

- autoreg_matrix — Generate a regressor matrix for autoregressions from a time series.

Report an issue
<< arburg | FOSSEE_Signal_Processing_Toolbox | arch_rnd >>