The BONDS() function is designed for automatic retrieval of historical government bond data directly from the Yahoo Finance website (finance.yahoo.com) by a specified symbol (for example, TYX - 30-year bonds, TNX - 10-year bonds).
This function allows you to get yield and quotation data for treasury bonds directly in the Excel (LibreOffice Calc) spreadsheet, which is important for analyzing macroeconomic indicators and risks.
=BONDS(Symbol; [Date]; [Indicator])
The BONDS() function makes it easy to track changes in bond yields. You specify the instrument code, and Excel (Calc) imports the data:
=BONDS(Symbol; Date; Indicator)
We will have the following result:
In this example, the following values are used:
In this example, the following values are used:
Corresponding data from the website Yahoo Finance:
The BONDS() function can work both in normal mode and as an array function.
To use it as an array, simply enter the function into any cell, specifying the corresponding parameters. After that, you need to 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
When using a date as text, it must first be converted to a real date, for example:
You can also use ready-made templates to get historical data, financial indicators, or a company profile.
To do this, go to the menu
You can use the function BONDS() by installing the extension YLC Utilities.
After that, this function will be available in all files that will be opened in Excel (LibreOffice Calc).