[R-SIG-Finance] [SPAM] - Re: [SPAM] - Re: 1 minute time interval in Bloomberg - Email found in subject - Email found in subject
David Reiner
David.Reiner at xrtrading.com
Mon May 14 21:43:49 CEST 2012
Sorry for the noise and wrong page number.
It would have seemed that the parameter to set would be "gapFillInitialBar", but this fills only the first bar (if empty) with the previous values (and 0 volume).
So I guess Bloomberg doesn't provide this through the 3.x API; however, it is available through the Excel API. Go figure.
-- David
-----Original Message-----
From: r-sig-finance-bounces at r-project.org [mailto:r-sig-finance-bounces at r-project.org] On Behalf Of David Reiner
Sent: Monday, May 14, 2012 2:11 PM
To: John Laing; krisan haria
Cc: r-sig-finance at r-project.org
Subject: [SPAM] - Re: [R-SIG-Finance] [SPAM] - Re: 1 minute time interval in Bloomberg - Email found in subject - Email found in subject
My workaround would be similar to this, but the OP perhaps knows of the optional arguments available in the Bloomberg API
that allow one to specify how empty periods should be treated (e.g., previous value, nil.)
See pp. 115-116 in the API Version 3.x Developer's Guide (2041121.pdf).
It would be nice if these optional arguments were exposed in RBloomberg.
(If they are in fact exposed somewhere but not in the bars() function, perhaps a pointer to the relevant place would be helpful.)
HTH,
-- David
-----Original Message-----
From: r-sig-finance-bounces at r-project.org [mailto:r-sig-finance-bounces at r-project.org] On Behalf Of John Laing
Sent: Monday, May 14, 2012 12:18 PM
To: krisan haria
Cc: r-sig-finance at r-project.org
Subject: [SPAM] - Re: [R-SIG-Finance] 1 minute time interval in Bloomberg - Email found in subject
Krisan,
I'm not aware of a way to get time periods back that have no data
associated. But this makes sense: what would you expect Bloomberg to
show you for OHLC in minutes when there were no trades?
You could get the set of all dates and diff it with the dates you
actually got back:
all.mins <- seq(as.POSIXct("2012-03-21 09:00:00"),
as.POSIXct("2012-03-21 15:00:00"), "1 min")
data.mins <- as.POSIXct(t_bar1$time, format = "%Y-%m-%dT%H:%M:%S")
missing.mins <- as.POSIXct(setdiff(all.mins, data.mins), origin =
as.Date("1970-01-01"))
What you do from there is up to you.
John
On Mon, May 14, 2012 at 5:12 AM, krisan haria <krisanharia at gmail.com> wrote:
> Hi
>
> I am trying to get data (open,high,low close) in 1 minute time intervals
> from Bloomberg.
>
> Currently I have the following
>
> library(RBloomberg)
> conn=blpConnect()
> t_bar1= bar(conn, "IUSA IM Equity", "TRADE", "2012-03-21 09:00:00.000",
> "2012-03-21 15:00:00.000", "1")
>
> head(t_ob1)
> time open high low
> close numEvents volume
> 2012-03-21T09:01:00.000 2012-03-21T09:01:00.000 10.5825 10.5875 10.5825
> 10.5875 2 295
> 2012-03-21T09:05:00.000 2012-03-21T09:05:00.000 10.5850 10.5850 10.5850
> 10.5850 1 3000
> 2012-03-21T09:07:00.000 2012-03-21T09:07:00.000 10.5850 10.5850 10.5850
> 10.5850 1 1352
> 2012-03-21T09:11:00.000 2012-03-21T09:11:00.000 10.5875 10.5875 10.5875
> 10.5875 1 3465
> 2012-03-21T09:18:00.000 2012-03-21T09:18:00.000 10.5850 10.5850 10.5850
> 10.5850 1 1314
> 2012-03-21T09:23:00.000 2012-03-21T09:23:00.000 10.5800 10.5800 10.5800
> 10.5800 1 400
>
>
> As you can see, it only seems to get the data for when there was a trade.
> How do I get this data for the whole day inlcuding the 1 minute intervals
> when there were no trades
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at r-project.org 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.
_______________________________________________
R-SIG-Finance at r-project.org 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.
_______________________________________________
R-SIG-Finance at r-project.org 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