About the GOOGLEFINANCE Function
Overview of GOOGLEFINANCE
Retrieve Real-Time or Historical Stock DataGoogle Sheets Function | ||
=GOOGLEFINANCE( ticker, [attribute], [start_date], [end_date], [interval] ) Summary The GOOGLEFINANCE function is used to fetch real-time stock prices, currency rates, or historical financial data. |
||
|
When to Use GOOGLEFINANCE
- When you want to check specific stock prices or currency rates in real time.
- When analyzing historical stock data.
- When you need easy access to data for investment analysis or asset management.
How to Use GOOGLEFINANCE
The following table explains the basic usage of the GOOGLEFINANCE function.
Example 1: Retrieve Real-Time Stock Prices
A | B | C | |
---|---|---|---|
1 | Ticker | Price | |
2 | GOOG | =GOOGLEFINANCE(A2, “price”) | |
3 | MSFT | =GOOGLEFINANCE(A3, “price”) |
Result
- When “GOOG” (Google’s ticker) is entered in cell A2, the current stock price for Google is returned.
- When “MSFT” (Microsoft’s ticker) is entered in cell A3, the current stock price for Microsoft is returned.
Example 2: Retrieve Historical Stock Data
This example demonstrates how to retrieve stock data for a specific date range.
A | B | C | D | E | |
---|---|---|---|---|---|
1 | Ticker | Start Date | End Date | Stock Data | |
2 | GOOG | 2024-01-01 | 2024-10-01 | =GOOGLEFINANCE(A2, “price”, B2, C2) |
- In Google Sheets, dates are written according to the international standard (ISO 8601).
Result
- Stock prices for “GOOG” are retrieved for each day from January 1, 2024, to January 10, 2024.
Attribute Examples
Attribute | Description |
---|---|
“price” | Current stock price |
“close” | Previous close price |
“volume” | Trading volume |
“high” | Daily high price |
“low” | Daily low price |
Points to Note
- Real-time data updates every few minutes and is not instantaneous.
- Some tickers or attributes may not provide available data.
- Retrieving historical data requires specifying a date range and interval.
Conclusion
- The GOOGLEFINANCE function is a useful tool for retrieving stock prices and exchange rate data.
- By utilizing real-time and historical data, you can efficiently perform investment analysis or asset management.
- Flexible data retrieval is possible by specifying attributes and date ranges.