Skip to content

where to obtain T-bill 3 month rate?

5 messages · Michael, Eric Zivot, Dirk Eddelbuettel +2 more

#
2 good sources of info are

1. FRED database at the Federal Reserve bank of Kansas City. 
2. www.economagic.com. They have a nice collection of free financial and
economic data.

-----Original Message-----
From: r-sig-finance-bounces at stat.math.ethz.ch
[mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Michael
Sent: Tuesday, November 14, 2006 6:12 PM
To: r-sig-finance at stat.math.ethz.ch
Subject: [R-SIG-Finance] where to obtain T-bill 3 month rate?

Hi all,

In playing with the empirical finance models, we need the risk-free rate. I
am thinking of T-bill 3 month rate.

I've looked at a few webpages, e.g.

http://mortgage-x.com/general/indexes/t-bill_index_faq.asp

But they look complicated... is there a popular place that I can simply
download the T-bill 3 month historical data?

Is there a program in R that can automatically/streamingly pull stock and
T-bill rate data from popular website?

Thanks a lot!


_______________________________________________
R-SIG-Finance at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
#
On 14 November 2006 at 19:27, Eric Zivot wrote:
| 2 good sources of info are
| 
| 1. FRED database at the Federal Reserve bank of Kansas City. 
| 2. www.economagic.com. They have a nice collection of free financial and
| economic data.

And IIRC Rmetrics has a function to access both:

TimeSeriesImport          package:fCalendar          R Documentation

Import Market Data from the Internet

Description:

     A collection and description of functions to import  financial and
     economic market data from the Internet. Download functions are
     available for economic and financial market data from
     Economagic's, from  Yahoo's, from the Federal Reserve's, and from
     the the forecasts.org Internet sites. 

     The functions are:

       'economagicImport'  Economic series from Economagic's Web site,
       'yahooImport'       daily stock market data from Yahoo's Web site,
       'yahooSeries'       easy to use download from Yahoo,
       'keystatsImport'    key statistics from Yahoo's Web site,
       'fredImport'        time series from St. Louis FRED Web site,
       'forecastsImport'   monthly data from the Financial Forecast Center.


Hth, Dirk
#
Michael,
I use the US-fed site to get US-data from there:

library(zoo)

usfedyields<-function(mat) {
  ##from: http://www.federalreserve.gov/releases/h15/data.htm
  url<-paste("http://www.federalreserve.gov/releases/h15/data/Business_day/H15_TCMNOM_",mat,".txt",sep="")
  raw<-read.csv(file=url,skip=7,colClasses=c("character","character"))
  date<-as.Date(raw[,1],format="%m/%d/%Y")
  yield<-as.numeric(raw[,2])
  return(zoo(yield,date))
}

y3 <-usfedyields("M3")

A more theoretical question:
Do you use the 3-month rate as the short rate? I don't know what model
you use, but if you use vasicek, CIR, some parametric model (Svensson,
...) the 3 month rate will differ from the short rate by a well
defined quantity. How do you deal with this? What do others use as
short rate?
Just tell me more! I am curious on literature as well; I just now
http://ideas.repec.org/p/wpa/wuwpfi/9808004.html

Best,
Thomas
#
You could also use read.zoo.   With the same url as in the function below:

   read.zoo(url, skip = 7, header = TRUE, sep = ",", format = "%m/%d/%Y")
On 11/15/06, Thomas Steiner <finbref.2006 at gmail.com> wrote: