GOOGLEFINANCE Function
The GOOGLEFINANCE function in Google Sheets is used to retrieve financial data for a given stock ticker or other market information.
Syntax
GOOGLEFINANCE(ticker, [attribute], [start_date], [end_date|num_days], [interval])
ticker
: The stock ticker symbol for which to retrieve data. This is a required parameter.attribute
: (Optional) The type of financial data to retrieve, such as “price” or “volume”.start_date
: (Optional) The start date for the data retrieval.end_date
ornum_days
: (Optional) The end date or the number of days from the start date for which to retrieve data.interval
: (Optional) The frequency of the data, such as “DAILY” or “WEEKLY”.
Example
- Retrieve Stock Price
Get the current stock price for Google:
=GOOGLEFINANCE("GOOG", "price")
This will output the current price of Google’s stock.
Notes
- The function can retrieve historical data as well as current data.
Related Functions
- SPARKLINE: Create a mini-chart within a cell using stock data.