13.08.2022 Views

advanced-algorithmic-trading

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

125

10.6.1 Bayesian Information Criterion

In the previous section we looked at the Akaike Information Criterion (AIC) as a means of helping

us choose between separate "best" time series models.

A closely related tool is the Bayesian Information Criterion (BIC). Essentially it has

similar behaviour to the AIC in that it penalises models for having too many parameters. This

may lead to overfitting. The difference between the BIC and AIC is that the BIC is more stringent

with its penalisation of additional parameters.

Definition 10.6.1. Bayesian Information Criterion. If we take the likelihood function for a

statistical model, which has k parameters, and L maximises the likelihood, then the Bayesian

Information Criterion is given by:

BIC = −2log(L) + klog(n) (10.16)

Where n is the number of data points in the time series.

We will be using the AIC and BIC below when choosing appropriate ARMA(p,q) models.

10.6.2 Ljung-Box Test

The Ljung-Box test is a classical (in a statistical sense) hypothesis test that is designed to test

whether a set of autocorrelations of a fitted time series model differ significantly from zero. The

test does not test each individual lag for randomness, but rather tests the randomness over a

group of lags. Formally:

Definition 10.6.2. Ljung-Box Test. We define the null hypothesis H 0 as: The time series data

at each lag are independent and identically distributed (i.i.d.), that is, the correlations between

the population series values are zero.

We define the alternate hypothesis H a as: The time series data are not i.i.d. and possess

serial correlation.

We calculate the following test statistic, Q:

Q = n(n + 2)

h∑

k=1

ˆρ 2 k

n − k

(10.17)

Where n is the length of the time series sample, ˆρ k is the sample autocorrelation at lag k and

h is the number of lags under the test.

The decision rule as to whether to reject the null hypothesis H 0 is to check whether Q > χ 2 α,h ,

for a chi-squared distribution with h degrees of freedom at the 100(1 − α)th percentile.

While the details of the test may seem slightly complex we can simply use R to calculate the

test for us.

Now that we have discussed the BIC and the Ljung-Box test we are ready to discuss our first

mixed model–the Autoregressive Moving Average of order p, q, or ARMA(p,q).

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

Saved successfully!

Ooh no, something went wrong!