[R-SIG-Finance] Retrieving Historical Intraday Data with RBloomberg

davidr at rhotrading.com davidr at rhotrading.com
Mon Feb 8 16:55:03 CET 2010


I agree with Sarbo that you should use the higher level function.

But there was data at that time, and I can get it through Excel
and the Bloomberg History Tool.

I'm confused by your seeming necessity to insert a space in the
barfield.

(In the documentation for bar data from Bloomberg in the data wizard,
it looks as if the field should be what they call "Market events"
(Trade, Bid, Ask) and the barfield should be what they call Interval
fields (Open, High, Low, Close, Tick count, Volume).
However the RBloomberg code may wrap these for you.)
You may also want to specify the fill action and value for intervals
with no activity.
(I cannot run RBloomberg to check at this moment.)

David L. Reiner, PhD
Head Quant
XR Trading, LLC


-----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 Kanin
Kaninski
Sent: Saturday, February 06, 2010 6:14 PM
To: r-sig-finance at stat.math.ethz.ch
Subject: [R-SIG-Finance] Retrieving Historical Intraday Data with
RBloomberg

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.


This e-mail and any materials attached hereto, including, without limitation, all content hereof and thereof (collectively, "XR Content") are confidential and proprietary to XR Trading, LLC ("XR") and/or its affiliates, and are protected by intellectual property laws.  Without the prior written consent of XR, the XR Content may not (i) be disclosed to any third party or (ii) be reproduced or otherwise used by anyone other than current employees of XR or its affiliates, on behalf of XR or its affiliates.

THE XR CONTENT IS PROVIDED AS IS, WITHOUT REPRESENTATIONS OR WARRANTIES OF ANY KIND.  TO THE MAXIMUM EXTENT PERMISSIBLE UNDER APPLICABLE LAW, XR HEREBY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS AND IMPLIED, RELATING TO THE XR CONTENT, AND NEITHER XR NOR ANY OF ITS AFFILIATES SHALL IN ANY EVENT BE LIABLE FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, CONSEQUENTIAL, SPECIAL AND PUNITIVE DAMAGES, LOSS OF PROFITS AND TRADING LOSSES, RESULTING FROM ANY PERSON'S USE OR RELIANCE UPON, OR INABILITY TO USE, ANY XR CONTENT, EVEN IF XR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF SUCH DAMAGES WERE FORESEEABLE.



More information about the R-SIG-Finance mailing list