13.08.2022 Views

advanced-algorithmic-trading

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

100

10.4.1 Rationale

In the previous chapter we considered the random walk model, where each term, x t is dependent

solely upon the previous term, x t−1 and a stochastic white noise term, w t :

x t = x t−1 + w t (10.2)

The autoregressive model is simply an extension of the random walk that includes terms

further back in time. The structure of the model is linear, that is the model depends linearly on

the previous terms, with coefficients for each term. This is where the "regressive" comes from in

"autoregressive". It is essentially a regression model where the previous terms are the predictors.

Definition 10.4.1. Autoregressive Model of order p. A time series model, {x t }, is an autoregressive

model of order p, AR(p), if:

x t = α 1 x t−1 + . . . + α p x t−p + w t (10.3)

p∑

= α i x t−i + w t (10.4)

i=1

Where {w t } is white noise and α i ∈ R, with α p ≠ 0 for a p-order autoregressive process.

If we consider the Backward Shift Operator, B, then we can rewrite the above as a function

θ of B:

θ p (B)x t = (1 − α 1 B − α 2 B 2 − . . . − α p B)x t = w t (10.5)

Perhaps the first thing to notice about the AR(p) model is that a random walk is simply

AR(1) with α 1 equal to unity. As we stated above, the autogressive model is an extension of the

random walk, so this makes sense.

It is straightforward to make predictions with the AR(p) model for any time t. Once the α i

coefficients are determined the estimate simply becomes:

ˆx t = α 1 x t−1 + . . . + α p x t−p (10.6)

Hence we can make n-step ahead forecasts by producing ˆx t , ˆx t+1 , ˆx t+2 , . . . up to ˆx t+n . In fact,

once we consider the ARMA models later in the chapter, we will use the R predict function to

create forecasts (along with standard error confidence interval bands) that will help us produce

trading signals.

10.4.2 Stationarity for Autoregressive Processes

One of the most important aspects of the AR(p) model is that it is not always stationary. Indeed

the stationarity of a particular model depends upon the parameters. I have touched on this before

in my other book, Successful Algorithmic Trading.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!