Python API - Fi Option Adjusted Spread (get data)

Hi,

I'm trying to pull the Option Adjusted Spread (FiOptionAdjustedSpread) for a specific bond on a specific date. Can anyone help me with the python code for that? Thank you!


image

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • James.Perkins
    Answer ✓

    If you want to reference OAS via the get_timeseries() function you would reference "OAS" as the field (which is pulling from TR.OPTIONADJUSTEDSPREADBID) ; there are some slight differences required at times when using get_data() vs. get_timeseries() to pull hisotrical values since there are multiple databases for some data types.

    oas_hist = ek.get_timeseries('075887BX6=',['Bid','Bid_yield','OAS'], start_date = "2019-08-06", end_date = "'2019-09-06", interval="taq")

    image

Answers

  • The field TR.OPTIONADJUSTEDSPREAD does not appear to have a value available for 075887BX6=FINR . I recommend using TR.OPTIONADJUSTEDSPREADBID or TR.OASAnalytics;

    ek.get_data('075887BX6=FINR','TR.OASAnalytics(ValuationDate=20190719)')

    image

  • Thanks for your answer. I am trying to pull FiOptionAdjustedSpread specifically since I need the spread based on the Treasury rates. I don't know how normal OptionAdjustedSpread function or OASAnalytics function are calculated but those values are different from what I'm looking for... is there a way to pull FiOptionAdjustedSpread? if not for this bond, other bonds?

  • Tkanks Nate; to be honest TR.OPTIONADJUSTEDSPREAD is a legacy analytics field. TR.OASAnalytics is a more modern analytic field and there are more details provided on methodology (see below). If you need/want more details on calc methodology feel free to email me at james.perkins@refinitiv.com .

    image

  • Just wondering if these spreads can also be retrieved over time using ek.get_timeseries()

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.