alpha-xone / xbbg

An intuitive Bloomberg API
https://xbbg.readthedocs.io/
Apache License 2.0
244 stars 51 forks source link

Risk data not showing #67

Closed mleirner closed 1 year ago

mleirner commented 2 years ago

Hi team,

Thanks a lot for the project! it has been immensely helpful.

I've been trying to get some risk data for interest rate swap contracts with BDP. Mainly using fields SW566 and SW031 (pv01 and dv01) and KEY_RATE_RISK in multiple risk points (ex. KEY_RATE_RISK_3M). The problem is that the bdp function sometimes gets the data accurately and sometimes returns an empty data frame instead using the same tickers and fields. Any idea why this is happening?

alpha-xone commented 2 years ago

No idea. Maybe due to connectivity. One suggestion is to cache the result somewhere and use the latest available value when bdp returns none.