[R-SIG-Finance] Retrieving Historical Intraday Data with RBloomberg
Sarbo
cmdr_rogue at hotmail.com
Mon Feb 8 02:18:51 CET 2010
1) You don't really need to include "LAST_PRICE" as the argument for
"barfields". Actually, you don't really need to specify anything there
at all.
2) It's probably because there was no data available for 2009-12-15
00:00. You're looking at 5-minute intervals of data. My guess is that
either Bloomberg's servers didn't record the data between 2009-12-14
23:00 and 2009-12-15 00:00. It's not that big a deal unless you're
actually planning to trade using that data.
You'd probably be better off using the blpGetData function instead. It's
a wrapper function and more generic to boot.
On Sat, 2010-02-06 at 16:14 -0800, Kanin Kaninski wrote:
> As a total newbie in
> R, I am struggling to make a few things work. I am wondering if anyone
> has experience using RBloomberg to download intraday data.
>
> I am using the following lines and get funky output:
>
> ======================================
> library(RBloomberg)
> conn <- blpConnect()
>
> # Loading currencies
> AUD
> <- blp(conn, "AUD Curncy", fields = "LAST_PRICE", start ="2009-12-15
> 00:00", end = "2010-01-18 23:59", barsize=5, barfields= " LAST_PRICE",
> retval="zoo")
>
> ========================================
>
> > head(AUD)
> LAST_PRICE. LAST_PRICE
> 2009-12-14 23:00:00 0.915447
> 2009-12-15 00:05:00 0.916005
> 2009-12-15 00:10:00 0.916167
> 2009-12-15 00:15:00 0.916200
> 2009-12-15 00:20:00 0.916188
> 2009-12-15 00:25:00 0.916265
>
> (1) First question is why I need a space before LAST
>
> in barfields= " LAST_PRICE"
>
> Took me an hour to debug and still don't understand why this is the solution
>
> (2)
> more
> worrisome, why doesn't it start at 2009-12-15 00:00:00 as
> instructed but at 2009-12-14 23:00:00. I am not sure the value returned
> there belong to this time stamp (i.e I think the value might belong to
> 2009-12-15 00:00:00 even though the timestamp says 2009-12-14 23:00:00).
>
> Anyone had similar experience? What am I doing wrong here?
>
> Thank you very much in advance.
>
> (This request was also posted on NP)
>
>
>
> [[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.
> -- Also note that this is not the r-help list where general R questions should go.
>
More information about the R-SIG-Finance
mailing list