question

Upvotes
Accepted
7 2 1 2

Getting price data from beginning to end

I'm trying to get price data in excel for a stock without much history. If there are 30 years of data I would like to see 30 years of price close. If there are 30 days of data I would like to see only 30 days. The method I use below would include 29 years of null for a stock that had 1 year of data. How would I simply ask for "all" available data for a time series?

=TR("UBER.K","TR.PriceClose","SDate=0 EDate=-7499 CH=Fd RH=IN",AS2)

Thanks!

Robby

eikoneikon-data-apieikon-com-api
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.

Upvotes
Accepted
39.4k 77 11 27

There's no parameter that instructs the system to return all available history, but if you remove the instrument from the row header, in my experience the returned dataset will not be padded with NULLs. Try

=TR("UBER.K","TR.PriceClose","SDate=0 EDate=-50Y CH=Fd RH:Date")
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.

Upvotes
7 2 1 2

Alex. Thank you. That's quite curious. My understanding of CH= and RH= were nil. Thanks for explaining. I see they are Column Header and Row Header now.

I got around it by looking at TR.FirstTradeDate then looking back just a few more quarters. I like your method better.

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.