[R-SIG-Finance] RBloomberg Date

Robert Sams robert at sanctumfi.com
Mon Mar 2 11:47:45 CET 2009


Hi John,

This is a bug in RBloomberg. The work-around is indeed setting retval="raw":

> t2 <- as.chron(unlist(blpGetData(conn, c("HAL Equity"), "DVD_EX_DT", retval="raw")))
> t2
[1] 02/27/09
>  

A fix (among other improvements) is on the way. 

~R


-----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 Paul DeBruicker
Sent: 27 February 2009 01:30
To: John Hawver
Cc: r-sig-finance at stat.math.ethz.ch
Subject: Re: [R-SIG-Finance] RBloomberg Date

Hi John,

Try setting retval="raw" in your blpGetData call which will make it skip the coercion steps and just give you what BBG returns to your terminal in your t2 variable.  From looking at t2 you should be able to figure out how to extract the date.  I'm not at a Bloomberg terminal at the moment so its hard for me to be more specific than that.

t2 <- blpGetData(conn, c("HAL Equity"), "DVD_EX_DT", retval="raw")


Paul




On Thu, Feb 26, 2009 at 6:08 PM, John Hawver <john.hawver at gmail.com> wrote:
> Hi,
>
> I just installed RBloomberg to setup a script that pulls dividend data 
> from bbg.  It works well, except on data that is supposed to be 
> returned as a date.  After talking to bbg, I'm reasonably sure the 
> data IS being returned to R, but it is not being cast correctly.  
> Anyone know how to fix or adapt RBloomberg?
>
> Here are examples:
>> t2 <- blpGetData(conn, c("HAL Equity"), "DVD_EX_DT")
> Warning message:
> In as.matrix.BlpCOMReturn(x) : NAs introduced by coercion
>> t2
>           DVD_EX_DT
> HAL EQUITY      <NA>
>> t3 <- blpGetData(conn, c("HAL Equity"), "DVD_SH_LAST")
>> t3
>           DVD_SH_LAST
> HAL EQUITY        0.09
>
> Thanks,
> John
>
>
> --
> plan the dive, dive the plan
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>

_______________________________________________
R-SIG-Finance at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.



More information about the R-SIG-Finance mailing list