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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
38 0 2 4

get_data TR.HIGHPRICE output problems

The request

fields = ek.TR_Field('TR.HIGHPRICE(SDate=0,EDate=-23,Frq=M,Curn=Native,Adjusted=1,CALCMETHOD=HIGH)')

TSMonthlyHis, err = ek.get_data(WLList,fields)

# (WLList is a List of RICs; with the formula I want to get the monthly highs of all RICs during the last 24 months)

leads to some problematic output:

1) no data is returned for LSE AIM stocks (it seems to work for stocks on the main board of LSE)

2) the data is forcibly sorted by price, i.e. the output is like

AAPL.O 100

AAPL.O 102

....

In excel, this function will be put out in chronological order.

Since there is no date information included with it, I do not know how to deal with it

This leads to the next problem

3) ek.TR_Field('TR.HIGHPRICE(SDate=0,EDate=-23,Frq=M,Curn=Native,Adjusted=1,CALCMETHOD=HIGH).date') or .timestamp does not work

It appears as if besides output=value, no other output options are supported. Is that correct?

4) -----> how do I get this data in chronological order or with a date field attached to it so that I know what is what?

Thank you

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
39.2k 75 11 27

Thank you @vlscout
To your point about not being able to retrieve high date into Excel, for fundamental and reference data Eikon Python API and Eikon Excel use the same backend. The data available through both is identical. The following Excel worksheet function returns the same data as the request in my previous reply:
=TR("IBM.N;AAPL.O;CVRC.L","TR.HighPrice.date;TR.HighPrice","Sdate=0 Edate=-23 Frq=M CalcMethod=High RH:In")

Now on to your questions.

a) I'm not exactly an expert on this data set. I think it would be best to direct this question to Thomson Reuters Helpdesk. Since the same choices are available through Excel and the behavior is easily reproduced using Excel, it should be easy enough to explain your question to first level support.

b) Again I'd recommend raising it to Thomson Reuters Helpdesk. You can ask why
=TR("BVXP.L;CALL.L","TR.HighPrice.date;TR.HighPrice","Sdate=0 Edate=-23 Frq=M CalcMethod=High RH:In")
Excel worksheet function returns no data for BVXP.L and partial data for CALL.L while Eikon chart retrieves the entire timeseries.
In the meantime you could use the timeseries interface to retrieve this data:

ek.get_timeseries(["BVXP.L"], fields=["High"], start_date = "2016-03-01", 
                            interval="monthly")

The drawback is that you lose the high date and only get the end of the month date.

c) Yes, Curn=Native is the default for both Eikon Python API, Eikon Excel and DEX2, since they use the same backend.

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.

FWIW to everyone and @Alex Putkov.

As you suggested I asked the helpdesk, and this is the reply:

The TR.HighPrice function to pull monthly high prices is still under development. Regarding your question on the frequencies, M and CM are the same (calendar month), AM means actual month from the latest trading day (i.e. -1am means May-12-2017 as of today). Unfortunately, AM doesn’t work yet for the monthly high price series yet. As you can see, for IBM.N and AAPL.O, only calendar monthly data can be pulled. The missing data for LSE stocks is related to the function still under development.

Thank you Alex! You are right, the issues / questions here are more general and not specific to the Eikon Scripting API. I apologise for bringing them up here. Keep up the good work!

Upvote
39.2k 75 11 27

Hi @vlscout

Use the following request, which addresses the first part of your query by including an LSE AIM stock:

ek.get_data(['IBM.N', 'AAPL.O', 'CVRC.L'],
['TR.HighPrice.date', 'TR.HighPrice'], {'SDate':0, 'EDate':-23, 'Frq':'M', 'CalcMethod':'High'})
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
38 0 2 4

Alex,

let me first say this: I really appreciate your and your colleagues’ work here. this Eikon Proxy is what I always wanted - a thin client from which you can automatically request the data you want. And it works quite well. It also runs well in non-interactive mode if you schedule it with task manager for example.

So my very detailed questions come from the fact that I have already decided to build my production system on the Proxy (with fallback functionality to Dex2 in case you need to take it offline again). It’s a challenge because I am new to python, but I am starting to see some light.

The example you posted works even better than I expected, as it actually outputs the high dates of the month (and not just the beginning or end date of the month in which the high lies - as it does with Eikon GUI or Excel, if they put out any useful data for this function). So it gives me some additional useful info I did not even expect.

However,

—> a) The output seems to be always based on the calendar month, regardless whether I request Frq=M or Frq=AM (actual month) or Frq=CM (calendar month). Shouldn’t Frq=M mean, when I request the data today on the 7th of June - last closing price data 6th of June - that the ‚M‘ periods go from the 7th to the 6th of the following month?

—> b) Unfortunately, there’s still no output for many AIM or LSE stocks. For all stocks outside AIM/LSE, it seems to work fine.

Please check this:

ek.get_data(['BVXP.L','CALL.L','DOTD.L','EUSPP.L','KMK.L','PIM.L','W7L.L','AAPL.OQ'], ['TR.HighPrice.date', 'TR.HighPrice'], {'SDate':0, 'EDate':-23, 'Frq':'M', 'CalcMethod':'High'})

This is your function replaced with some of my RICs.

I have added Apple to show how a correct output would look like. As you can see, for CALL.L it returns some of the months, for the others it returns nothing.

—> c) It appears that Curn=Native is the default with the Proxy, is that correct? If so, you made a great design choice. In Eikon Screener GUI for example, native currency cannot be selected by default.

Thank you!

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