Forum Discussion
Get historical high with StockHistory function
Thanks for your help. The example works.
but I need to get the price for a list of stocks, so I made this formula
=MAX(STOCKHISTORY(A1.[Exchange abbreviation] & ":" & A1.[Ticker symbol],"1/1/1950",TODAY(),0,0,3))
It works for some stock but not all. Most return #N/A error.
I suspect that was because there was no data on 1950.
Is there a way to get from the earliest date that is available?
To return entire row for the max value you may use something like
=INDEX(SORT(STOCKHISTORY("TSLA",DATE(1950,1,1),TODAY(),,0),2,-1),1)
Here is at the left
STOCKHISTORY() by default takes the earliest date if the range is wider. To illustrated, I took UBER which was listed in mid 2019, range starts from 1950.
Most probably errors are due to some other reasons.
- CALVIN2021Jan 10, 2021Copper Contributor
Thanks Sergei,
I think the MAX() works fine. but it's good to know how to know when was it happened.
I am also thinking about how to calculate its annualized increase in price. getting the price of first-day listing and the current price. Divide them by the amount of time. Sounds like huge work for me.
- SergeiBaklanJan 10, 2021Diamond Contributor
To ignore errors
Simple MAX() will work the same way if you prefer to have only one column.
I am also thinking about how to calculate its annualized increase in price. getting the price of first-day listing and the current price. Divide them by the amount of time.
Afraid didn't catch what the exact idea is. "annualized" price mean price for the each year, another story is how to calculate. However, in next sentence you say about only two dates - start and current.