The STOCK() function is designed for automatic retrieval of stock prices directly from the Yahoo Finance website (finance.yahoo.com) by the specified stock symbol (e.g., AAPL, TSLA) and selected date. It supports both historical quotes and real-time current values.
This function is convenient for creating stock trackers in Excel (LibreOffice Calc) spreadsheets and will be useful for investors, traders, and financial analysts.
=STOCK(Ticker; [Date]; [Indicator])
The STOCK() function is simple to use. You just need to specify the cell with the stock code, and Excel (Calc) will automatically import its price for the specified date:
=STOCK(Ticker; Date)
We will have the following result:
In this example, the following values are used:
Corresponding data from the Yahoo Finance website:
You can use the STOCK() function by installing the YLC Utilities extension.
After this, this function will be available in all files that will be opened in Excel (LibreOffice Calc).