The YFINANCE() function is designed for automatically getting historical data directly from the Yahoo Finance website (finance.yahoo.com) by a specified stock symbol (e.g., AAPL, NVDA) for a defined period.
This function allows you to analyze market trends directly in Excel (LibreOffice Calc) spreadsheets and is an indispensable tool for financial modeling and in-depth market analysis.
=YFINANCE(Symbol; [StartDate]; [EndDate]; [Interval]; [Header]; [Calendar])
The YFINANCE() function allows you to download an array of historical data. You specify the stock symbol and time range, and Excel (Calc) imports the corresponding data:
=YFINANCE(Symbol; StartDate; EndDate)
We will get the following result:
The following values are used in this example:
Corresponding data from the Yahoo Finance website:
The following values are used in this example:
Corresponding data from the Yahoo Finance website:
Simply enter the YFINANCE() function into any cell, specifying the symbol and date range. After that, press Ctrl+Shift+Enter to enter the array formula and LO Calc will automatically return a table with data.
To select all cells associated with the array formula, simply select any cell in the array and press Ctrl+/.
If you need to convert an array formula to values - select the entire array and in the menu
When using a date as text, it must first be converted to a real date, e.g.:
You can also use ready-made templates to get historical data, financial indicators, or company profile.
To do this, go to the menu
You can use the YFINANCE() function by installing the YLC Utilities extension.
After that, this function will be available in all files opened in Excel (LibreOffice Calc).