0

Currently to Fetch Fixed Income Data on the Bloomberg terminal directly I use the SRCH option in the terminal and select Asset Class Governments and corporates. The query that gets executed which I get from Bloomberg is: Prefetch the Government and Corporates bonds using JPY,USD and GBR for Maturtiy upto 20 years And the rating Above BBB I came across this question get data from bloomberg api with python via excel and tried something almost similar however this doesn't work given I'm having a challenge on how to write the query to send to excel.

query = """="BSRCH("Asset Classes=Corporate|Goverments","fields = id_isin|maturity|OAS_Spread_bid|")"""
   

Also, I tried the blapi library but nothing in the docs shows the use of SRCH hence i decided to try the excel route. Anyone with experience on this?

Billy Dan
  • 29
  • 1
  • 8
  • This is a pretty massive universe! Maybe break it down a little. – DS_London Mar 17 '23 at 10:05
  • @DS_London to rephrase this, I want to be able to fetch this data programmatically using python. I know how to do this on the terminal like indicated below. Asset Class, Currency filter, Maturity filter and finally Ratings filter. `Prefetch the Government and Corporates bonds using JPY,USD and GBR for Maturtiy upto 20 years And the rating Above BBB` but now I need to convert this to python, how to achieve this query in python is my challenge. – Billy Dan Mar 17 '23 at 11:35
  • If you look in the terminal where you define a search, there is a button for copying the BQL query. Hence you can use BQL to return saved searches from the Terminal by name. – DS_London Mar 21 '23 at 11:28

0 Answers0