[R] Problem in using bdh function for Govt tickers
David.Reiner at xrtrading.com
Wed Jan 19 16:24:16 CET 2011
That's a Bloomberg issue, not RBloomberg:
use bdp() (point) instead of bdh() (history) or bds() (set)
912828JV Govt NA 0.875
912828JY Govt 100.0234 0.875
David L. Reiner
XR Trading LLC
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of nikhil
Sent: Wednesday, January 19, 2011 3:11 AM
To: r-help at r-project.org
Subject: [R] Problem in using bdh function for Govt tickers
I wanted to fetch data from Bloomberg for govt bonds, and analyse it
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:
package 'rJava' was built under R version 2.12.1
> 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\v184.108.40.206\lib\blpapi3.jar to Java classpath
Bloomberg API Version 220.127.116.11
ticker date PX_LAST
1 912828JV Govt 2010-12-29 100.0000
2 912828JY Govt 2010-12-29 100.0625
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
[[alternative HTML version deleted]]
R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
This e-mail and any materials attached hereto, including, without limitation, all content hereof and thereof (collectively, "XR Content") are confidential and proprietary to XR Trading, LLC ("XR") and/or its affiliates, and are protected by intellectual property laws. Without the prior written consent of XR, the XR Content may not (i) be disclosed to any third party or (ii) be reproduced or otherwise used by anyone other than current employees of XR or its affiliates, on behalf of XR or its affiliates.
THE XR CONTENT IS PROVIDED AS IS, WITHOUT REPRESENTATIONS OR WARRANTIES OF ANY KIND. TO THE MAXIMUM EXTENT PERMISSIBLE UNDER APPLICABLE LAW, XR HEREBY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS AND IMPLIED, RELATING TO THE XR CONTENT, AND NEITHER XR NOR ANY OF ITS AFFILIATES SHALL IN ANY EVENT BE LIABLE FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, CONSEQUENTIAL, SPECIAL AND PUNITIVE DAMAGES, LOSS OF PROFITS AND TRADING LOSSES, RESULTING FROM ANY PERSON'S USE OR RELIANCE UPON, OR INABILITY TO USE, ANY XR CONTENT, EVEN IF XR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF SUCH DAMAGES WERE FORESEEABLE.
More information about the R-help