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 "11/1/2014" or "Dec 31, 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.
To retrieve data for certain stocks, you must add the suffix for the stock exchange where the stock is traded. For example, at the end of symbol, add .CO for stocks on the Copenhagen exchange, or .L for stocks on the London exchange.
Examples |
---|
=STOCKH("AAU", "volume", "Dec 15, 2015") returns 127,700, the number of shares of Almaden Minerals Ltd. Common Stock (AAU) traded (volume) on December 15, 2015. =IFERROR(STOCKH(A9, "low", "May 22, 2017"), "-") returns the lowest trading price on May 22, 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, "5/9/2016"), "No data") returns the highest share price ("high" or 2) of Hang Seng Index stock (^HSI) on 5/9/2016, or "No data" if Hang Seng Index wasn’t traded on that day, or there’s no data available. |