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
Best Answer
-
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.
0
Answers
-
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'})0 -
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!
0 -
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!
0 -
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.
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 33 Data Model Discovery
- 682 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.8K Refinitiv Data Platform
- 625 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 83 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛