[R-SIG-Finance] sudden problem with RBloomberg

Ana Nelson nelson.ana at gmail.com
Tue Apr 13 14:42:16 CEST 2010


Sergey,

Please read this before you post to this list again:
http://www.catb.org/~esr/faqs/smart-questions.html

Please try adding blpDisconnect(conn) as below. And please check the
log file for error messages as I asked you to in my previous email.


conn <- blpConnect(show.days="week", na.action="previous.days",
periodicity="daily")
bldata <- blpGetData(conn, .tickers, "PX_LAST", start=start.date,
end=end.date, retval="zoo")
blpDisconnect(conn)

conn <- blpConnect(show.days="trading"
, na.action="previous.days",
periodicity="daily")


Regards,
Ana



On Tue, Apr 13, 2010 at 10:21 AM, Sergey Goriatchev <sergeyg at gmail.com> wrote:
>
> Hi, Ana
>
> Thank you for your help.
> 1) I have same RDCOMClient installed on 2.10 and on 2.7.2, the one
> that is available on RDCOMClient web page (don't remember version
> number and do not know how to find it out in R)
> 2) I cannot install this version of RBloomberg where I am at, due to
> IT restrictions. I need to do it at home and then transport the whole
> thing here (do not ask why). And I cannot install any Java.
> 3) The code has been running fine before. Surely, there were glitches
> from time to time, especially when there were calls for a lot of data,
> but on rerun the code eventually worked. Until today.
> Today I get this exception no matter what I do, I restarted PC, I
> restarted R, I ran different versions of R, I ran code line by line
> (once it worked, but then it started throwing off errors again). That
> is really strange.
> 4) With contract sizes I can simply set values by hand, without calls
> to Bloomberg, but I wanted it all connected to Bloomberg.
> 5) I cannot live without zoo objects. There is a lot of code and it
> all is written around zoo objects.
>
> I will try manually some more and see if I can find some acceptable
> solution, but the code worked fine till today...
>
> Kind Regards,
> Sergey
>
> On Tue, Apr 13, 2010 at 10:44, Ana Nelson <nelson.ana at gmail.com> wrote:
> > Do you somehow have RDCOMClient installed on R 2.10? Or are you running this
> > on R 2.7.2?
> >
> > Can you try installing this version of RBloomberg:
> > install.packages("RBloomberg", repos="http://R-Forge.R-project.org")
> >
> > Have you been able to run this code before, and it just suddenly stopped
> > working this morning?
> >
> > You might try an explicit blpDisconnect before you connect a second time,
> > and look for error messages in the log files in C:\blp\api.
> >
> > Also, try running a version of this script which just calls blpGetData with
> > retval="raw" and without doing anything with the result. You are doing other
> > things as well as talking to RBloomberg in this code, for example your
> > subsetting might be causing the exception, and asking for a zoo might be
> > part of the problem further below.
> >
> >
> > On Tue, Apr 13, 2010 at 8:30 AM, Sergey Goriatchev <sergeyg at gmail.com>
> > wrote:
> >>
> >> Hello everyone
> >>
> >> I run R 2.10 (also, R 2.7.2) with RBloomberg 0.1-10
> >> I cannot run new java-based RBloomberg due to local restrictions.
> >>
> >> This morning I get a sudden problem with RBloomberg:
> >>
> >> ------------------------
> >> > conn <- blpConnect(show.days="week", na.action="previous.days",
> >> > periodicity="daily")
> >>
> >> > bldata <- blpGetData(conn, signal.tickers, "PX_LAST", start=start.date,
> >> > end=end.date, retval="zoo")
> >>
> >> > conn <- blpConnect(show.days="trading", na.action="previous.days",
> >> > periodicity="daily")
> >>
> >> > ty1.csize <- blpGetData(conn,  "TY1 Comdty", "FUT_CONT_SIZE",
> >> > retval="raw")[[1]][[1]] #USD
> >>
> >> Error: Exception occurred.
> >>
> >> > gc1.cvalue <- blpGetData(conn, "GC1 Comdty", "CONTRACT_VALUE",
> >> > start=as.chron(Sys.Date()-5), end=as.chron(Sys.Date()), retval="zoo")
> >>
> >> Warning message:
> >> In as.matrix.BlpCOMReturn(x) : NAs introduced by coercion
> >>
> >> > gi1.cvalue <- blpGetData(conn, "GI1 Index",  "CONTRACT_VALUE",
> >> > start=as.chron(Sys.Date()-5), end=as.chron(Sys.Date()), retval="zoo")
> >>
> >> Warning message:
> >> In as.matrix.BlpCOMReturn(x) : NAs introduced by coercion
> >>
> >> > es1.cvalue <- blpGetData(conn, "ES1 Index",  "CONTRACT_VALUE",
> >> > start=as.chron(Sys.Date()-5), end=as.chron(Sys.Date()), retval="zoo")
> >> Warning message:
> >> In as.matrix.BlpCOMReturn(x) : NAs introduced by coercion
> >>
> >> > blpDisconnect(conn)
> >> ---------------------------
> >>
> >> I don't know what is going on, in particular the first "Error:
> >> Exception occured" is new to me. I tried restart R, different versions
> >> of R, feeding line by line, nothing helps.
> >>
> >> Anyone has an inkling what the problem is caused by?
> >>
> >> Best,
> >> Sergey
> >>
> >> --
> >> Simplicity is the last step of art./Bruce Lee
> >>
> >> _______________________________________________
> >> 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.
> >
> >
>
>
>
> --
> Simplicity is the last step of art./Bruce Lee
> The more you know, the more you know you don't know. /Myself
>
> 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
> Luck is where preparation meets opportunity. /George Patten
>
> Kniven skärpes bara mot stenen.



More information about the R-SIG-Finance mailing list