Fetch multiple Bond Yield curves in single Fetch from Bloomberg with XBBG

319 views Asked by At

I need to fetch multiple Bond Yield curves (1 month, 1 year, 5 year, etc) from different countries using Bloomberg API.

Searching for F476XXy Index at the terminal gives a list of generic tickers, like F47603M Index for the 3 month MXN Bond Yield.

Is there a generic way to reference all these Bonds and fetch it on a single blp.bdh (XBBG function) query or other pythonic way?

1

There are 1 answers

0
Beast Legend Tank On

First you need to get the curve ticker from bloomberg.

  1. Type CRVF and click on the curve you want. Ex. the MXN curve. I251

  2. type GC I251 in your terminal which will plot the entire curve.

in the right hand side, under plot curves hover over the curve name and it'll have a ticker ID.

from xbbg import blp

data = blp.bds('YCGT0251 Index', 'CURVE_TENOR_RATES')
data

enter image description here

If you want the history

history = blp.bdh(data['tenor_ticker'], 'px_last', '2022-01-01','2023-09-20')
history

enter image description here