Using Reuters Pricing Formula in Python

Hi everyone


I am using the python function ek.get_data to source data from eikon and I am interesting in the field TR.DV01Analytics or TR.DurationAnalytics. If I use the following formula, I only get the latest value and no time series.

ek.get_data('US500769CG75','TR.DurationAnalytics',parameters={'SDate':'2018-10-02', 'EDate':'2018-10-07'})

Does anyone know how to incorporate different valuation and settlement dates, such that I get a time series of DV01 / Duration?

Thanks

Jurij


Best Answer

  • Hello @jurij.reichenecker

    You can use Data item browser in Eikon or Refinitive workspace to check TR.DurationAnalytics field's parameters e.g. 'ValuationDate' and 'SettlementDate' as shown below:

    image

    The example source code:

    import pandas as pd 
    import eikon as ek
    #set app key to identify the application on Eikon, Eikon Proxy or Refinitiv Platform
    ek.set_app_key(<the app key>)
    df = ek.get_data('US500769CG75','TR.DurationAnalytics', parameters={'ValuationDate':'2018-10-02','SettlementDate':'2018-10-07'})
    df

    The example output:

    image