For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 1 4

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


eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvote
Accepted
9.5k 10 5 7

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:

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:


dib.png (35.8 KiB)
output.png (2.4 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea