historical prices for bonds

Hi, I'm quite new in this community.

I'm trying to get in python the historical prices of a bond (RIC: "IT451364=", ISIN: "IT0004513641") but I only get historical yields

df = ek.get_timeseries(["IT451364="], 
                       start_date="2016-01-01",  
                       end_date="2016-01-10")

I also tried get_data but I only get the latest price

fields = [ek.TR_Field('TR.BIDPRICE')]
data, err = ek.get_data(["IT451364="],fields)

Is there any way to get the historical prices?

Thank you very much

Best Answer

  • chavalit-jintamalit
    Answer ✓

    Hi @luca.monno

    You can try this code:

    df,e = ek.get_data('IT451364=',['TR.BidPrice.Date','TR.BidPrice'],
                      {'SDate':'20160101','EDate':'20160110','Frq':'D'})
    print(df)


    image