[R-SIG-Finance] sudden problem with RBloomberg

Sergey Goriatchev sergeyg at gmail.com
Tue Apr 13 11:57:39 CEST 2010


#I tried to shuffle the lines to the following:

start.date      <- as.chron("2006-01-01")
end.date        <- as.chron(Sys.Date())

.tickers <- c("TY1 Comdty", "SP1 Index", "SPGSCIP Index", "GC1 Comdty")

conn <- blpConnect(show.days="week", na.action="previous.days",
periodicity="daily")

bldata <- blpGetData(conn, .tickers, "PX_LAST", start=start.date,
end=end.date, retval="zoo")

ty1.csize <- blpGetData(conn,  "TY1 Comdty", "FUT_CONT_SIZE",
retval="raw")[[1]][[1]] #USD

conn <- blpConnect(show.days="trading", na.action="previous.days",
periodicity="daily")

gc1.cvalue <- blpGetData(conn, "GC1 Comdty", "CONTRACT_VALUE",
start=as.chron(Sys.Date()-5), end=as.chron(Sys.Date()), retval="zoo")

gi1.cvalue <- blpGetData(conn, "GI1 Index",  "CONTRACT_VALUE",
start=as.chron(Sys.Date()-5), end=as.chron(Sys.Date()), retval="zoo")

es1.cvalue <- blpGetData(conn, "ES1 Index",  "CONTRACT_VALUE",
start=as.chron(Sys.Date()-5), end=as.chron(Sys.Date()), retval="zoo")

blpDisconnect(conn)

#that runs without problems, so the problem is creating conns.



More information about the R-SIG-Finance mailing list