Quantcast

RBloomberg - limit on size of return array?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

RBloomberg - limit on size of return array?

philjoubert

Hi

I'm using RBloomberg to download timeseries data, but I'm getting an error.

vsTickers <- unlist(blpGetData(oBbgConn, sIndex, "INDX_MEMBERS", retval="raw"))
vsTickers <- paste(vsTickers, "Equity")
dtStart <- chron("31/12/1998", format="d/m/y")
dtEnd <- chron("31/12/2008", format="d/m/y")
vdPrices <- blpGetData(oBbgConn, vsTickers, "PX_LAST", dtStart, dtEnd)

I expect this code to get the TS of the FTSE components over the last 10 years. Instead I get a zoo object with the correct number of columns, but no data, and the warning "In as.matrix.BlpCOMReturn(x) : NAs introduced by coercion".

I suspect the problem is the size of the return array. If I try to get a subset of the data (e.g. vsTickers[1:40] or [40:79], or smaller time frame) I have no problem. If I set retval="raw" the first element is "Error : Exception occurred.\n".

Any ideas? I've tried the same extraction via the VBA, but it just hangs.

thanks
Phil

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: RBloomberg - limit on size of return array?

Paul DeBruicker
Hi,


What's the problem with doing it in two requests and gluing it
together with a rbind() or cbind()?

Also, you might benefit from specifying the two letter exchange code
before the word "Equity" in your paste() statement.  So make it "LN
Equity" or whatever it should be.



Paul



On Wed, Apr 29, 2009 at 6:27 AM, Phil Joubert <[hidden email]> wrote:

>
> Hi
>
> I'm using RBloomberg to download timeseries data, but I'm getting an error.
>
> vsTickers <- unlist(blpGetData(oBbgConn, sIndex, "INDX_MEMBERS", retval="raw"))
> vsTickers <- paste(vsTickers, "Equity")
> dtStart <- chron("31/12/1998", format="d/m/y")
> dtEnd <- chron("31/12/2008", format="d/m/y")
> vdPrices <- blpGetData(oBbgConn, vsTickers, "PX_LAST", dtStart, dtEnd)
>
> I expect this code to get the TS of the FTSE components over the last 10 years. Instead I get a zoo object with the correct number of columns, but no data, and the warning "In as.matrix.BlpCOMReturn(x) : NAs introduced by coercion".
>
> I suspect the problem is the size of the return array. If I try to get a subset of the data (e.g. vsTickers[1:40] or [40:79], or smaller time frame) I have no problem. If I set retval="raw" the first element is "Error : Exception occurred.\n".
>
> Any ideas? I've tried the same extraction via the VBA, but it just hangs.
>
> thanks
> Phil
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: RBloomberg - limit on size of return array?

philjoubert
In reply to this post by philjoubert

No problem with the workaround you suggest - thats what I've done. I just think it would be cleaner to be able to do the call as originally suggested.

INDX_MEMB returns the full ticker including country / market code - eg first value is "AAL LN".

thanks
Phil

--- On Fri, 5/1/09, Paul DeBruicker <[hidden email]> wrote:

> From: Paul DeBruicker <[hidden email]>
> Subject: Re: [R-SIG-Finance] RBloomberg - limit on size of return array?
> To: "Phil Joubert" <[hidden email]>
> Cc: [hidden email]
> Date: Friday, May 1, 2009, 6:22 PM
> Hi,
>
>
> What's the problem with doing it in two requests and gluing
> it
> together with a rbind() or cbind()?
>
> Also, you might benefit from specifying the two letter
> exchange code
> before the word "Equity" in your paste() statement. 
> So make it "LN
> Equity" or whatever it should be.
>
>
>
> Paul
>
>
>
> On Wed, Apr 29, 2009 at 6:27 AM, Phil Joubert <[hidden email]>
> wrote:
> >
> > Hi
> >
> > I'm using RBloomberg to download timeseries data, but
> I'm getting an error.
> >
> > vsTickers <- unlist(blpGetData(oBbgConn, sIndex,
> "INDX_MEMBERS", retval="raw"))
> > vsTickers <- paste(vsTickers, "Equity")
> > dtStart <- chron("31/12/1998", format="d/m/y")
> > dtEnd <- chron("31/12/2008", format="d/m/y")
> > vdPrices <- blpGetData(oBbgConn, vsTickers,
> "PX_LAST", dtStart, dtEnd)
> >
> > I expect this code to get the TS of the FTSE
> components over the last 10 years. Instead I get a zoo
> object with the correct number of columns, but no data, and
> the warning "In as.matrix.BlpCOMReturn(x) : NAs introduced
> by coercion".
> >
> > I suspect the problem is the size of the return array.
> If I try to get a subset of the data (e.g. vsTickers[1:40]
> or [40:79], or smaller time frame) I have no problem. If I
> set retval="raw" the first element is "Error : Exception
> occurred.\n".
> >
> > Any ideas? I've tried the same extraction via the VBA,
> but it just hangs.
> >
> > thanks
> > Phil
> >
> > _______________________________________________
> > [hidden email]
> mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only.
> > -- If you want to post, subscribe first.
> >
>




_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Loading...