 

Hi, all

 

I wanted to fetch data from Bloomberg for govt bonds, and analyse it
further. 

I am having trouble in getting data as when I use field=PX_LAST, it is
giving the prices but when I use field=CPN, or ISSUE_DT, it is not giving
the results and just bouncing back <NA> for that.

 

This is the piece of code:

 

> library(rJava)

Warning message:

package 'rJava' was built under R version 2.12.1 

> library(RBloomberg)

> k<-as.POSIXct("2010-12-29")

>  field<-c("PX_LAST")

>  ticker<-c("912828JV Govt","912828JY Govt")

>  conn <- blpConnect()

R version 2.12.0 (2010-10-15) 

rJava Version 0.8-8 

RBloomberg Version 0.4-146 

Java environment initialized successfully.

Looking for most recent blpapi3.jar file...

Adding C:\blp\API\APIv3\JavaAPI\v3.3.3.3\lib\blpapi3.jar to Java classpath

Bloomberg API Version 3.3.3.3 

> data<-bdh(conn,ticker,field,k,k)

>  data

         ticker          date          PX_LAST

1 912828JV Govt 2010-12-29 100.0000

2 912828JY Govt 2010-12-29 100.0625

> field<-c("PX_LAST","CPN")

>  data<-bdh(conn,ticker,field,k,k)

>  data

         ticker          date           PX_LAST CPN

1 912828JV Govt 2010-12-29 100.0000 <NA>

2 912828JY Govt 2010-12-29 100.0625 <NA>

> 

 

I am a new R user, I have looked over for a similar problem but dint find
any.

Any suggestions??


	[[alternative HTML version deleted]]

