Interest Rates and ARIMA models

#1
Hello,

My goal is to forecast t-bill/note interest rates to help determine whether it'd be useful to purchase an interest rate swap on a loan (25 year amort. due in 7 years).

I have learned ARIMA models, specifically AR[1] models are useful to forecasting rates.

Please see attached spreadsheet for my work so far.

My questions are:

1. Should I difference the observations from the mean before regression?
2. Once preceding periods stop becoming known (t-1), does the input into the model become the preceding period's forecasted rate?
3. Which of these two models should I select (if either)?
4. In the attached spreadsheet, am I completely doing this wrong?

I did not transform the data, the histogram shows it as fairly normally distributed, but if there is any input on this I'd be really appreciative.

Thank you very much for any help that you can give! I've really been struggling with these concepts.
 

noetsi

Fortran must die
#2
I think the answer to your question is that you should do ARIMA in speciality software that generated PACF and ACF as well as Box-Ljung statistics. Trying to do it in excel through regression is something I don't think will work - certainly I have never seen ARIMA done that way.

For example the answer to your first question normally involves looking at the correolgram to see if the spikes are declining in a way that suggest a trend in your data. I don't think you can do that the way you appear to be doing.
 
#3
Thanks for your input noetsi. i believe the autocorrelation function (ACF) is cov(yt,yt-1)/(sd(y)sd(yt-1)), you can do that in excel, as well as generate the phi(correlation coefficient) for AR models through regression or OLS.


i don't have specialty software other than r, which i can use to generate the correlelogram like you mentioned. however, i am currently more proficient in excel (and my boss would get destroyed by r). that being said i have pretty limited knowledge for ARIMA model techniques and still appreciate anything you got.
 

Englund

TS Contributor
#4
You should really get an appropriate program for this. When I tried to fit a good model for you data, I ended up with an ARIMA(1,1,1) SARIMA(1,0,1,7) with an AIC value of 248. Although, you should find better models since the data seemed to consist of heteroscedasticity in the variance. A GARCH model may be a better way to go than ARIMA, I think.
 

JesperHP

TS Contributor
#5
If you decide to go with R you should use the package RUGARCH in R (this is really good stuff).

This package is well documented - google "rugarch": http://cran.r-project.org/web/packages/rugarch/vignettes/Introduction_to_the_rugarch_package.pdf

If you need help getting started come back - I'm working with this package at the moment.

For forecasting you should go with what Englund says #4: Stylized facts for financial data tells you to expect non-constant variance which is taken into consideration by modelling the conditional variance through among others the GARCH model.

So basically by using Excel you cannot model the variance (this is not strictly true depending on the assumptions you're willing to make) also using OLS presupposes no-autocorrelation in the error-term otherwise OLS will be inconsistent (this again is not strictly true).

As is shown by the residual plot you do not have constant variance in the errorterm (offcourse nothing is certain but the graph indicates ...).
 
Last edited:
#7
thank you all very much for your help.

say i do use r to figure out what type of model to use, and after getting that model's parameters, could i plug that into excel? and if so, what inputs will feed the model for values of significant distance in the future? would it be past predictions?
 

noetsi

Fortran must die
#8
If you mean use excel regression than I am cautious about using it if I have any options, because they are not a statistical company and I am not sure if what they are doing is correct (there is a lot of detail in regression which is important and which I suspect they ignore). You can not use excel to test violations of regression assumptions such as multcolinarity or constant variance.

If you are able to use r for time series you might consider using it for regression as well (I use SAS or SPSS simply because I already know it and it has a GUI).
 

JesperHP

TS Contributor
#9
Yes you can take the paramter estimates and insert them in Excel. Then type in modelformulas and do forecasting. The conditional variance is a function of lagged variables taking on values estimated og observed. Under certain conditions the variancemodel is stabil and the predicted conditional variance will go towards long run unconditional variance as t increases.

But the rugarch package allow you to do forecasting... however I realize it more fun to it manually.


I have downloaded you're data and stored it in a notepad txt so you can read it with R. See attachment. Offcourse you have to alter the path in the code:

Otherwise the code should run smoothly and estimate a ARMA(2,0)-GARCH(1,1)


The AR coefficents are approximately the same as you get...... nut now you also have a variance equation.
Code:
##First load data
data<-read.table("C://users//jesper//desktop//blah.txt",header=FALSE,sep=",")

##only need variable with returns
r<-as.vector(data$V2)

##load rugarch package
library(rugarch)

##Choose model to fit. We call it "supermodel".
supermodel<-ugarchspec(
						variance.model=list(	model="sGARCH",
							garchOrder=c(1,1), 
							submodel = NULL,
							external.regressors =NULL,
							variance.targeting= FALSE),

						mean.model=list(	
									armaOrder=c(2,0),
									include.mean = TRUE, 
									external.regressors=NULL),
									distribution.model="norm"
									)

##We type 'supermodel' just to see R print the modelselection
supermodel


##modellen fittes
m = ugarchfit(spec=supermodel,data=r,out.sample=0)


m

Notice that R does not report the constantterm but instead reports the unconditional mean.