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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
6 0 2 2

Excess returns in Eikon python API

Hi -

I'm looking to compute some notion of excess returns (either the return experienced relative to holding cash or alternatively, the return of an unfunded equity position so total return - a borrowing cost - either one would do for now although at some point it would be good to differentiate). As a cut through I wanted to pull in a short-term cash rate (for instance Fed funds overnight rate or some such similar - was looking at USRRP=ECI field ECONOMIC.Value), but it looks like the codes I am finding in the Eikon data browser aren't pulling through in the API. Is there anything in-scope of the current API that would accomplish this goal, or some other creative way to compute an excess return?

Thanks.

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.

Upvotes
Accepted
58 0 2 4

Hi @574c708d-6b25-445f-8303-2b495473ec99,

df = ek.get_timeseries('USRRP=ECI')

should deliver the required output. This is what I get for df.tail(5)

USRRP=ECI VALUE

Date

2018-12-03 2.0

2018-12-04 2.0

2018-12-06 2.0

2018-12-07 2.0

2018-12-10 2.0

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.

Thanks (and also to @Wan Po.Lee for the answer w get_data - looks like I had pulled the wrong field name from my XL browser). Seems like computing myself is the best way forward so will go that route. Cheers.

Upvote
339 3 4 6

Hello, this may not be a complete answer to your question, but for the short-term US Fed O/N REPO rate (as a benchmark or borrowing cost) you wanted to obtain should be available in Eikon API. As of now the Actual (N/A) rate is 2.00%, and I can see this value “2” from the Python API call:

import eikon as ek
ek.set_app_key('xxxxxxxxxx')
res = ek.get_data(['USRRP=ECI'], ['ECON_ACT'])
print(res) 

I got:

( Instrument ECON_ACT
0 USRRP=ECI 2, None) 

I believe once you got your benchmark return, you can derive the excessive returns easily.

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