[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-finance
Subject:    [R-SIG-Finance] Rbbg (formerly RBloomberg) -- Pulling portfolio data
From:       "Sarran, Paul" <psarran () mesirowfinancial ! com>
Date:       2014-05-22 23:01:50
Message-ID: 755A902DD501F5468B7A64CD3FAA3DE90887A44E () chwnexchg2 ! mesirow ! net
[Download RAW message or body]

Hi - I have portfolios set up with Bloomberg. I can pull various portfolio data into \
Excel using the Bloomberg API (ie the formula =BDS("U12345567-00 \
Client","PORTFOLIO_DATA") pulls a list of tickers, position size, market value, etc \
into Excel).

I'm trying to find a way to pull the same data into R using the RBbg, but can't find \
a way to make it work. The package seems to be working, and I'm just not sure if \
there's a way to pull the data I want.

Does anyone have experience with this?

Thanks in advance.

- Paul

Example:

library(Rbbg)
conn <- blpConnect()

bds(conn, "AAPL US Equity", "DVD_HIST")[1:3, ]

bds(conn, "U1392424-30 CLIENT", "PORTFOLIO_DATA")

blpDisconnect(conn)

Gives the output:


> library(Rbbg)
> conn <- blpConnect()
R version 3.1.0 (2014-04-10)
rJava Version 0.9-6
Rbbg Version 0.5.1
Java environment initialized successfully.
Looking for most recent blpapi3.jar file...
Adding C:\blp\API\APIv3\JavaAPI\v3.7.1.1\lib\blpapi3.jar to Java classpath
Bloomberg API Version 3.7.1.1
> 
> bds(conn, "AAPL US Equity", "DVD_HIST")[1:3, ]
  Declared Date    Ex-Date Record Date Payable Date Dividend Amount Dividend \
Frequency 1    2014-04-23 2014-05-08  2014-05-12   2014-05-15            3.29         \
Quarter 2    2014-01-27 2014-02-06  2014-02-10   2014-02-13            3.05           \
Quarter 3    2013-10-28 2013-11-06  2013-11-11   2013-11-14            3.05           \
Quarter  Dividend Type
1  Regular Cash
2  Regular Cash
3  Regular Cash
> 
> bds(conn, "U1392424-30 CLIENT", "PORTFOLIO_DATA")
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  :
  org.findata.blpwrapper.WrapperException: unknown field error type \
NOT_APPLICABLE_TO_PORT_DATA
> 
> blpDisconnect(conn)
          used (Mb) gc trigger (Mb) max used  (Mb)
Ncells  531868 28.5     899071 48.1   871205  46.6
Vcells 1643056 12.6   10353599 79.0 39467884 301.2



Paul Sarran
Research Analyst
US Value Equity

Mesirow Financial
353 North Clark Street
Chicago, Illinois 60654
office: (312) 595-6921
email: psarran@mesirowfinancial.com

Visit us on the Web at mesirowfinancial.com

This communication may contain privileged and/or confidential information. It is \
intended solely for the use of the addressee. If you are not the intended recipient, \
you are strictly prohibited from disclosing, copying, distributing or using any of \
this information. If you received this communication in error, please contact the \
sender immediately and destroy the material in its entirety, whether electronic or \
hard copy. Confidential, proprietary or time-sensitive communications should not be \
transmitted via the Internet, as there can be no assurance of actual or timely \
delivery, receipt and/or confidentiality. This is not an offer, or solicitation of \
any offer to buy or sell any security, investment or other product.

	[[alternative HTML version deleted]]

_______________________________________________
R-SIG-Finance@r-project.org 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.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic