for x, y in zip(bbg_strings, mkt_px):
bquery.bdp(x,['YLD_CNV_BID'], overrides=['PX_BID'], y)
# Your code here, this should be a minimal reproducible example, see https://stackoverflow.com/help/mcve
Problem description
I am new to python and trying to figure out how to pass a list of fixed income securities to the query along with a list of the prices of those securities as overrides to calculate the yield of those securities. This code returns a value error: too many values to unpack.
Expected Output
a dataframe with the yields for the list of securities
Code Sample, a copy-pastable example if possible
bbg_strings = list(df.bbgstring.unique()) mkt_px = list(df.mkt_price)
bquery = blp.BlpQuery().start()
for x, y in zip(bbg_strings, mkt_px): bquery.bdp(x,['YLD_CNV_BID'], overrides=['PX_BID'], y)
Problem description
I am new to python and trying to figure out how to pass a list of fixed income securities to the query along with a list of the prices of those securities as overrides to calculate the yield of those securities. This code returns a value error: too many values to unpack.
Expected Output
a dataframe with the yields for the list of securities