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

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
39 2 5 6

Looking for historical data for 52 week highs

Hi, Using the Eikon API, I'm trying to use ek.get_data to get historical data for a stock index (0#.SPX) in order able to calculate how each index component's closed on each day compared to its 52 week high as of that same day. However, it appears that "TR.Price52WeekHigh" does not include historical data, only a stock's 52 week high as of right now.

Am I missing something? Is there a smart/simple way to get a stock's 52 week high as of a date in the past without also getting its entire closing price history for 52 weeks previous to that date and calculating the 52 week high myself? Doing that for hundreds of components of an index over years of trading seems inefficient.

I'm a journalist and my overall goal is to be able to say, "Today, ? number of S&P 500 stocks were trading down 20% or more from their 52 week highs, the highest number since xx date."

Many thanks!

eikon-data-apiprice-history
icon clock
10 |1500

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

1 Answer

· Write an Answer
Upvotes
Accepted
78.6k 248 52 74

@noel.randewich

Yes, TR.Price52WeekHigh provides the current data. It doesn't support historical data.

1663235106871.png

Therefore, with Eikon Data API, you need to get historical data and then calculate the 52-week high.

Otherwise, you may contact your Refinitiv account team to verify if there are other products that can provide this data.


1663235106871.png (49.0 KiB)
icon clock
10 |1500

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.