[R-SIG-Finance] RBloomberg warning message

Robert Sams robert at sanctumfi.com
Wed Jul 8 14:36:41 CEST 2009


Sergey, you need to do better than this. 

> Hi, Ana,
> 
> Thank you for answering.
> In each load I download only numerical data (prices), I am 
> not combining different types of data.
> I use retval="zoo", because I find it most useful for my purposes.
> Moreover, I've tried "data.frame" before and there were 
> problems with this setting for retval.
> I cannot provide an example script, firstly because it is 
> proprietary, secondly, because it is very long, and thirdly, 
> because providing something illustrative is difficult as the 
> problem pops up in different places (I call blpGetData many 
> times in the script and at different places) or not at all sometimes!

If your script is proprietary, then rewrite for this list a line or two
of code that replicates a case of the problem. If you can't replicate
the problem and it seems to be an emerging property of your big script,
I'd suggest you rewrite the script in a more modular way so that (1) the
problem goes away or (2) you are able to replicate the problem at least
stochastically with some code you can post here.

> Since I load daily data for last 5 years and for up to 30 
> instruments sometimes, I think the load size may be 
> responsible. But then only partly, because the same problem 
> pops up when I load 4 years of daily data for just one 
> ticker. Also the problem does not always pop up when I load 
> data for 30 tickers at the same time.

Are you aware of Bloomberg's "Extended Rules and Usage Limits"? 

> 
> Maybe it is some kind of function overload? Before I used to 
> connect at the beginning of the script, get some data, 
> process it, output results, get some more data, etc... 
> without disconnecting after each data retreival call. From 
> today I connect-retreive-disconnect-process-connect-...

Did this problem exist when your script was making just one connection
request? Do you have a good reason for making multiple
connect/disconnect calls? I'm sure it's possible to torture the
bloomberg connection control to the point where the API does weird
things.
 
> Basically, I am not sure why the problem pops up from time to time.

Without examples, neither are we.


Robert

> 
> Kind Regards,
> Sergey
> 
> 
> 
> 
> 
> Hi, Sergey,
> A matrix can only handle 1 kind of data. Everything has to be 
> a numeric, or everything has to be a string. Are you trying 
> to combine different types of data?
> It might be better to try retval="data.frame".
> Otherwise, can you provide an example script which reproduces 
> the problem?
> Regards,
> Ana
> 
> On Tue, Jul 7, 2009 at 3:55 PM, Sergey Goriatchev 
> <sergeyg at gmail.com> wrote:
> > Hello, everyone
> >
> > I have this very long script, where I call blpGetData many times (I 
> > get some data, I do some computations, I output results in 
> and Excel 
> > file, I call some other data....)
> >
> > As the code grew, I started to get the same warning message 
> more and 
> > more
> > often:
> >
> > "Warning message:
> > In as.matrix.BlpCOMReturn(x) NAs are introduced by coersion"
> >
> > Basically, blpGetData sometimes does not work!
> >
> > This message comes up in different parts of the code (in different 
> > calls to blpGetData), and since script is very long and runs 
> > considerable amount of time, one such error completely 
> messes up the 
> > end results.
> >
> > Does anyone know why blpGetData sometimes fails to execute?
> >
> > Thanks in advance for help!
> >
> > Best,
> > Sergey
> 
> 
> 
> --
> I'm not young enough to know everything. /Oscar Wilde 
> Experience is one thing you can't get for nothing. /Oscar 
> Wilde When you are finished changing, you're finished. 
> /Benjamin Franklin Tell me and I forget, teach me and I 
> remember, involve me and I learn.
> /Benjamin Franklin
> Luck is where preparation meets opportunity. /George Patten
> 
> _______________________________________________
> 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.
> 



More information about the R-SIG-Finance mailing list