Nick
Nick

Reputation: 101

Pulling Portfolio Data From Bloomberg using R Package "Rblpapi”

I am trying to pull portfolio data from Bloomberg using command getPortfolio(My Portfolio,"Portfolio_Data"). Is it Possible to indicate reference date in the command?

When using excel it is possible to extract a portfolio at a certain point in time using BDS(My Portfolio,"Portfolio_Data","reference date = date") function. I wonder if this is possible in R.

BDS command returns NULL when requesting portfolio data in R. It seems like getPortfolio() should be the right solution, however I cannot figure out how to incorporate date into the function.

Upvotes: 3

Views: 493

Answers (1)

Nick
Nick

Reputation: 101

Figured out the correct syntax. The way to incorporate reference date into getPortfolio() function should look like the following:

overrides = c("REFERENCE_DATE" = '20181010')
getPortfolio("My Portfolio","Portfolio_Data", overrides = overrides)

"My Portfolio" should be portfolio ID from BBG's PRTU function with "client" appended (should look like this: "U1234567-8 Client")

Upvotes: 2

Related Questions