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.

114

Figure 10.10: Realisation of MA(1) Model, with β 1 = 0.6 and Associated Correlogram

> x.ma <- arima(x, order=c(0, 0, 1))

> x.ma

Call:

arima(x = x, order = c(0, 0, 1))

Coefficients:

ma1 intercept

0.6023 0.1681

s.e. 0.0827 0.1424

sigma^2 estimated as 0.7958: log likelihood = -130.7, aic = 267.39

We receive some useful output from the arima command. Firstly, we can see that the

parameter has been estimated as ˆβ 1 = 0.602, which is very close to the true value of β 1 =

0.6. Secondly, the standard errors are already calculated for us, making it straightforward to

calculate confidence intervals. Thirdly, we receive an estimated variance, log-likelihood and

Akaike Information Criterion (necessary for model comparison).

The major difference between arima and ar is that arima estimates an intercept term because

it does not subtract the mean value of the series. Hence we need to be careful when carrying out

predictions using the arima command. We will return to this point later.

As a quick check we are going to calculate confidence intervals for ˆβ 1 :

> 0.6023 + c(-1.96, 1.96)*0.0827

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

Saved successfully!

Ooh no, something went wrong!