STOCKH
The STOCKH function returns historical price information about a stock for a given date, retrieved remotely via the Internet.
STOCKH(symbol, close, date)
symbol: An abbreviation that uniquely identifies publicly traded shares of a stock on a particular stock market. symbol is a string enclosed in quotes. symbol can also be a reference to a cell containing a stock symbol.
close: An optional modal value specifying the stock attribute to be returned.
“close“ (0 or omitted): The price of the stock at the close of trading on the specified date.
“open” (1): The opening price at which the stock traded at the opening of trading on the specified date.
“high” (2): The highest price at which the stock traded on the specified date.
“low” (3): The lowest price at which the stock traded on the specified date.
“volume” (4): The number of shares of the stock that changed hands on the specified date.
date: The date for which you want the historical stock price information. date can be a valid past date string enclosed in quotes (for example “01/11/2014” or “31 Dec 2015”), a formula that returns a past date, or a reference to a cell containing a valid past date or data formula.
Notes
If you enter a formula with STOCKH when the Internet is unavailable, STOCKH returns no value. However, when the Internet becomes available, the formula updates with a value returned by STOCKH.
The currency shown in this function result depends on your Language & Region settings (in System Preferences in macOS and in Settings in iOS and iPadOS), or on your Time Zone & Region settings in iCloud Settings.
Examples |
---|
=STOCKH(“AAU”, “volume”, “15 Dec 2015”) returns 127,700, the number of shares of Almaden Minerals Ltd. Common Stock (AAU) traded (volume) on 15 December 2015. =IFERROR(STOCKH(A9, “low”, “22 May 2017”), “-”) returns the lowest trading price on 22 May 2017 of the stock whose symbol is in cell A9 (if the stock symbol and the formula are valid), or “-” if there’s an error in the formula or the data can’t be retrieved. =IFERROR(STOCKH(“^HSI”, 2, "09/05/2016”), “No data”) returns the highest share price (“high” or 2) of Hang Seng Index stock (^HSI) on 09/05/2016, or “No data” if the Hang Seng Index wasn’t traded on that day or there’s no data available. |