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?
df = ek.get_timeseries('USRRP=ECI')
should deliver the required output. This is what I get for df.tail(5)
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)
( Instrument ECON_ACT 0 USRRP=ECI 2, None)
I believe once you got your benchmark return, you can derive the excessive returns easily.