[R-SIG-Finance] Spread Libor-Fed Fund Rate: ARIMA(1,1,1)
Andreas Klein
klein82517 at yahoo.de
Tue Feb 10 14:25:11 CET 2009
Hello.
I have 246 realizations of the spread of the 3 Month Libor (L3M) and the Fed Fund Rate (FFR) from January 1985 to June 2005. I took the logarithms of L3M and FFR and calculated the difference. At last I obtain my 246 observations.
With the SBC or BIC criterion I identified an ARIMA(1,1,1)-process.
The estimation gives the folllowing results:
> x <- log(L3M)-log(FFR)
> arima(x,order=c(1,1,1),method="ML",include.mean=FALSE)
Call:
arima(x = x, order = c(1, 1, 1), include.mean = FALSE, method = "ML")
Coefficients:
ar1 ma1
0.6890 -0.9185
s.e. 0.1374 0.0917
sigma^2 estimated as 0.002002: log likelihood = 413.25, aic = -820.5
Now I try the model based bootstrap to test for significance of the coefficients:
model <- arima(x,order=c(1,1,1),method="ML",include.mean=FALSE)
ar1 <- as.numeric(model$coef[1])
ma1 <- as.numeric(model$coef[2])
res <- model$res[3:246]-mean(model$res[3:246])
ar1_boot <- numeric(10000)
ma1_boot <- numeric(10000)
for (i in 1:10000) {
res_boot <- sample(res,replace=TRUE)
bootseries <- numeric(243)
for (t in 4:246) {
bootseries[t-3] <- (1+ar1)*ifelse(t<=4,x[t-1],bootseries[t-4])-ar1*ifelse(t<=5,x[t-2],bootseries[t-5])+res_boot[t-2]+ma1*res_boot[t-3]
}
model_boot <- arima(bootseries,order=c(1,1,1),method="ML",include.mean=FALSE)
ar1_boot[i] <- as.numeric(model_boot$coef[1])
ma1_boot[i] <- as.numeric(model_boot$coef[2])
}
When I try to run the code, R interrupts with the following message:
Failure in solve.default(res$hessian * n.used) :
Lapackroutine dgesv: System is singular
What is wrong???
Please help me!
Regards,
Andreas.
More information about the R-SIG-Finance
mailing list