Skip to content

Accessing Bloomberg historic data for invalid codes with RBloomberg

3 messages · gordon.morrison at hsbcib.com, Ana Nelson, Ben Hurh

#
Can anyone shed any light into what I am doing wrong
Loading required package: rJava
R version 2.13.1 (2011-07-08)
rJava Version 0.8-8
RBloomberg Version 0.4-149
Java environment initialized successfully.
Looking for most recent blpapi3.jar file...
Adding C:\blp\API\APIv3\JavaAPI\v3.4.3.2\lib\blpapi3.jar to Java classpath
Bloomberg API Version 3.4.3.2
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  :
  org.findata.blpwrapper.WrapperException: invalid security 123456 XX
Equity
NAME PX_LAST     TIME  SETTLE_DT
AMZN US Equity       AMAZON.COM INC  202.30 15:49:42 2011-08-18
OCN US Equity  OCWEN FINANCIAL CORP   13.03 15:49:43 2011-08-18
ticker       date  VOLUME
1  AMZN US Equity 2011-08-10 8757585
2  AMZN US Equity 2011-08-11 7404618
3  AMZN US Equity 2011-08-12 5620580
4  AMZN US Equity 2011-08-13      NA
5  AMZN US Equity 2011-08-14      NA
6   OCN US Equity 2011-08-10 1874309
7   OCN US Equity 2011-08-11 1257872
8   OCN US Equity 2011-08-12 1430524
9   OCN US Equity 2011-08-13      NA
10  OCN US Equity 2011-08-14      NA
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  :
  org.findata.blpwrapper.WrapperException: invalid security 123456 XX
Equity
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 241304  6.5     407500 10.9   350000  9.4
Vcells 124164  1.0     786432  6.0   458087  3.5
R version 2.13.1 (2011-07-08)
rJava Version 0.8-8
RBloomberg Version 0.4-149
Java environment initialized successfully.
Looking for most recent blpapi3.jar file...
Adding C:\blp\API\APIv3\JavaAPI\v3.4.3.2\lib\blpapi3.jar to Java classpath
Bloomberg API Version 3.4.3.2
NAME PX_LAST     TIME  SETTLE_DT
AMZN US Equity       AMAZON.COM INC  202.42 15:51:52 2011-08-18
OCN US Equity  OCWEN FINANCIAL CORP   13.03 15:51:30 2011-08-18
NAME PX_LAST     TIME  SETTLE_DT
AMZN US Equity         AMAZON.COM INC  202.42 15:52:02 2011-08-18
OCN US Equity    OCWEN FINANCIAL CORP   13.03 15:51:30 2011-08-18
123456 XX Equity                 <NA>      NA     <NA>       <NA>
ticker       date  VOLUME
1  AMZN US Equity 2011-08-10 8757585
2  AMZN US Equity 2011-08-11 7404618
3  AMZN US Equity 2011-08-12 5620580
4  AMZN US Equity 2011-08-13      NA
5  AMZN US Equity 2011-08-14      NA
6   OCN US Equity 2011-08-10 1874309
7   OCN US Equity 2011-08-11 1257872
8   OCN US Equity 2011-08-12 1430524
9   OCN US Equity 2011-08-13      NA
10  OCN US Equity 2011-08-14      NA
Error in rep(security, dim(matrix.data)[1]) : invalid 'times' argument
I was expecting the last call to return NAs for the invalid security rather
than an error.

Regards


Gordon M Morrison

************************************************************
HSBC Bank plc may be solicited in the course of its placement efforts for a
new issue, by investment clients of the firm for whom the Bank as a firm
already provides other services. It may equally decide to allocate to its
own proprietary book or with an associate of HSBC Group. This represents a
potential conflict of interest. HSBC Bank plc has internal arrangements
designed to ensure that the firm would give unbiased and full advice to the
corporate finance client about the valuation and pricing of the offering as
well as internal systems, controls and procedures to identify and manage
conflicts of interest.

HSBC Bank plc
Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom
Registered in England - Number 14259
Authorised and regulated by the Financial Services Authority.
************************************************************

-----------------------------------------
SAVE PAPER - THINK BEFORE YOU PRINT!

This transmission has been issued by a member of the HSBC Group
"HSBC" for the information of the addressee only and should not be
reproduced and/or distributed to any other person. Each page
attached hereto must be read in conjunction with any disclaimer
which forms part of it. Unless otherwise stated, this transmission
is neither an offer nor the solicitation of an offer to sell or
purchase any investment. Its contents are based on information
obtained from sources believed to be reliable but HSBC makes no
representation and accepts no responsibility or liability as to its
completeness or accuracy.
#
Hi, Gordon,

It looks like the error is a different one. So the data is being
returned but then something is going wrong in the post-processing.

Thanks for sending a reproducible example. I'll try to take a look at this.

-Ana
On Mon, Aug 15, 2011 at 4:19 PM, <gordon.morrison at hsbcib.com> wrote: