Upgrade from Eikon -> Workspace. Learn about programming differences.

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

# question

Accepted
31 3 6 1

## Are "Price Returns" available in Eikon?

Hello,

Is something like Price Returns available as TR formula in Eikon? I know Total Return takes dividends into account but I couldn't find anything in the Item Data Browser regarding to Price Returns.

Does anyone here knows if something like this is available? Thanks for your time!

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

· Write an Answer
Upvote
Accepted
4.6k 26 7 22

@22ca8780-99e4-42fa-9ca2-b27abad3c0c4 all the price performance fields can be found under Price & Volume > Price Performance as shown here:

screenshot-2018-10-10-at-125450.png

The easiest way to build a price return is to see percent change between two dates:

`=TR("AAPL.O","PERCENT_CHG(TR.Close(0d),TR.Close(2018-01-01))")`

Or use one of the standard period fields, like TR.PricePctChgYTD

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

Thanks @Zhenya Kovalyov!

I wanted to implement this in Python but didn't find this on the Item Data Browser. Is there a way to implement this and get a time-series?
I saw TR.PricePctChg1D but is a snapshot, not a time-series.

Upvote
39.4k 77 11 27

If you're looking to get timeseries of price returns in Python I think the easiest thing you can do is retrieve the timeseries of price history and calculate any returns you need using dataframe capabilities. E.g.

```>>> df, err = ek.get_data('TRI.N',['TR.PriceClose.date','TR.PriceClose'],{'SDate':'-20D','EDate':'0'})>>> df['Pct Chg'] = df['Price Close'].pct_change()>>> df   Instrument                  Date  Price Close   Pct Chg
0       TRI.N  2018-09-11T00:00:00Z        44.57       NaN
1       TRI.N  2018-09-12T00:00:00Z        45.22  0.014584
2       TRI.N  2018-09-13T00:00:00Z        45.64  0.009288
3       TRI.N  2018-09-14T00:00:00Z        45.52 -0.002629
4       TRI.N  2018-09-17T00:00:00Z        45.51 -0.000220
5       TRI.N  2018-09-18T00:00:00Z        45.62  0.002417
6       TRI.N  2018-09-19T00:00:00Z        45.40 -0.004822
7       TRI.N  2018-09-20T00:00:00Z        45.51  0.002423
8       TRI.N  2018-09-21T00:00:00Z        45.37 -0.003076
9       TRI.N  2018-09-24T00:00:00Z        45.44  0.001543
10      TRI.N  2018-09-25T00:00:00Z        45.70  0.005722
11      TRI.N  2018-09-26T00:00:00Z        45.45 -0.005470
12      TRI.N  2018-09-27T00:00:00Z        45.72  0.005941
13      TRI.N  2018-09-28T00:00:00Z        45.68 -0.000875
14      TRI.N  2018-10-01T00:00:00Z        45.33 -0.007662
15      TRI.N  2018-10-02T00:00:00Z        44.74 -0.013016
16      TRI.N  2018-10-03T00:00:00Z        47.24  0.055878
17      TRI.N  2018-10-04T00:00:00Z        46.74 -0.010584
18      TRI.N  2018-10-05T00:00:00Z        46.69 -0.001070
19      TRI.N  2018-10-08T00:00:00Z        46.36 -0.007068
20      TRI.N  2018-10-09T00:00:00Z        46.33 -0.000647```

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

### Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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