Shubha Vishwanath Karanth
2007-Sep-18 06:08 UTC
[R] Problem in extracting EQY_DVD_HIST from Bloomberg
Hi R, Again the problem in Bloomberg, I give the below code,> con blpConnect(show.days="trading",na.action="previous.days",periodicity="daily")# connecting Bloomberg> div <- blpGetData(con,"IBM USEquity","EQY_DVD_HIST",start=as.chron(as.Date("01/01/2005", "%m/%d/%Y")),end=as.chron(Sys.Date()))> blpDisconnect(con)used (Mb) gc trigger (Mb) max used (Mb) Ncells 480141 12.9 818163 21.9 818163 21.9 Vcells 798590 6.1 1445757 11.1 1441593 11.0> divEQY_DVD_HIST (09/17/07 19:34:49) NA I get all NA data. What could be the problem? I have the corresponding data in Bloomberg....but not able to extract the data from R.... Thanks in advance, Shubha [[alternative HTML version deleted]]
davidr at rhotrading.com
2007-Sep-18 16:18 UTC
[R] Problem in extracting EQY_DVD_HIST from Bloomberg
I'd guess start and end are confusing the bulk data call (it doesn't take those params). This works for me: div <- blpGetData(con, "IBM Equity", "EQY_DVD_HIST", retval="raw") You need the "raw" retval when anything is not numeric; then you need to extract the bits you want from the nested list returned. HTH, David David L. Reiner Rho Trading Securities, LLC -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Shubha Vishwanath Karanth Sent: Tuesday, September 18, 2007 1:08 AM To: R-SIG-Finance at stat.math.ethz.ch; r-help at stat.math.ethz.ch Subject: [R] Problem in extracting EQY_DVD_HIST from Bloomberg Hi R, Again the problem in Bloomberg, I give the below code,> con blpConnect(show.days="trading",na.action="previous.days",periodicity="daily")# connecting Bloomberg> div <- blpGetData(con,"IBM USEquity","EQY_DVD_HIST",start=as.chron(as.Date("01/01/2005", "%m/%d/%Y")),end=as.chron(Sys.Date()))> blpDisconnect(con)used (Mb) gc trigger (Mb) max used (Mb) Ncells 480141 12.9 818163 21.9 818163 21.9 Vcells 798590 6.1 1445757 11.1 1441593 11.0> divEQY_DVD_HIST (09/17/07 19:34:49) NA I get all NA data. What could be the problem? I have the corresponding data in Bloomberg....but not able to extract the data from R.... Thanks in advance, Shubha [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.