[R-SIG-Finance] RBloomberg - how to extract partial days

Pierre.Lequeux at avivainvestors.com Pierre.Lequeux at avivainvestors.com
Fri Jun 11 11:19:20 CEST 2010



Would the below do what you need ?



require(RBloomberg)
require(xts)
startdate <- "2007-02-28"
barsize  <- 30
conn <- blpConnect()
EUR    <- blp(conn, "EUR Curncy", fields = "LAST_PRICE", start ="2010-04-30 00:00", barsize = barsize , barfields= "LAST_PRICE", retval="zoo")
conn <- blpDisconnect()


Pierre

 

P please don't print this e-mail unless you really need to.


-----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 Ulrich Staudinger
Sent: 11 June 2010 08:26
Cc: r-sig-finance at stat.math.ethz.ch
Subject: Re: [R-SIG-Finance] RBloomberg - how to extract partial days

can't you use some of the xts functions to select a range treat that as some boolean column, which you can then use to get the data?
I'd check the subsetting section in the xts documentation ...

On Thu, Jun 10, 2010 at 9:53 PM, Eugene Tyurin <eugene at tyurin.com> wrote:

> I am trying to extract time series out of RBloomberg that would 
> contain multiple days and certain hours within each day.
>
> Right now I request all of intra-day bars and then remove the parts I 
> don't need. It is not very efficient, to say the least, because I 
> can't figure out a way to vectorize the operation. :-(
>
> Making multiple requests to blpGetData is even less efficient.
>
> I tried to make blpGetData accept a series of start/end points, 
> without
> success:
>
> dd <- seq.dates("6/1/2010","6/9/2010") edc <- blpGetData(conn,"CLN0
>
> Comdty","BEST_BID",start=chron(dd,"10:00:00"),end=chron(dd,"10:30:00")
> ,"OPEN",barsize=2,retval="zoo")
>
> Does anybody know of a _proper_ way to accomplish this?
>
> Thanks in advance!
>
> _______________________________________________
> 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.
>



--
Kind regards,
Ulrich B. Staudinger

	[[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 email transmission and any attachments may contain confidential or legally privileged information that is intended for the addressee(s) only.  Any views or opinions presented are solely those of the author and do not necessarily represent those of Aviva Investors.  If you are not the intended recipient or person responsible for delivering this information to the intended recipient you are hereby notified that any disclosure, copying, distribution or reliance upon the contents of this email is strictly prohibited. If you have received this email transmission in error please notify the sender immediately so that we may arrange for its proper delivery and delete the message from your inbox.

Aviva Investors Global Services Limited, registered in England No. 1151805.  Entered in the Financial Services Authority register, No: 119178.

Aviva Investors Pensions Limited, registered in England No. 1059606.  Entered in the Financial Services Authority register, No:110410. 

Aviva Investors London Limited, registered in England No. 2152949.  Entered in the Financial Services Authority register, No: 448407. 

Registered Office for all companies: No. 1 Poultry, London EC2R 8EJ.  All are authorised and regulated in the UK by the Financial Services Authority.  VAT number: 105 4373 00.

Telephone calls to Aviva Investors may be recorded for training or monitoring purposes.  We may monitor traffic data of both business and personal emails.  By replying to this email, you consent to us monitoring the content of any emails you send to or receive from Aviva Investors. 



More information about the R-SIG-Finance mailing list