Rblp / Rblpapi

R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
Other
167 stars 75 forks source link

Downloading Credit Default Swaps (CDS) #385

Closed Sandro54 closed 9 months ago

Sandro54 commented 10 months ago

I want to download CDS data. The ticker of the CDS are quite special, f.ex. "SWISS CDS USD SR 5Y D14 Corp"

If I use: Var_Code <- c("SWISS CDS USD SR 5Y D14 Corp") BL_data <- bdp(Var_Code, c("PX_LAST","CRNCY")) I get only the currency, but no PX_LAST value.

BL_data <- bdh(Var_Code, c("PX_LAST"), start.date=Sys.Date()-31) With this command, I get no values.

klin333 commented 10 months ago

Does it work in Excel? Chances are your terminal does not have permissions to download the price data via API (excel or R).

From experience, most single name CDS price sources require additional subscription charges. The free ones (BGN, MSG1) are very bad for single name CDS.

Sandro54 commented 10 months ago

You are right, it is not working in Excel. As it looks, I have no permissions to download the data. Many thanks for your quick answer!!

klin333 commented 9 months ago

No prob, please close the issue.

as a general rule, if it doesn’t work in r, first try make it work in excel, where helpdesk is obliged to help you. Getting it to work in excel is a neccesary but not sufficient condition for something to work in R.

eddelbuettel commented 9 months ago

Thanks for the help here, @klin333 -- it is much appreciated.