TOP

Bonds Function

BONDS() Description

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.


An internet connection is required for this function to work.

Main Characteristics of the BONDS Function

Syntax:

=BONDS(Symbol; [Date]; [Indicator])

Parameters:

Usage Example

Example 1

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:

Example of using the BONDS() function
Example of using the BONDS() function

In this example, the following values are used:

Example 2

Example of using the BONDS() function
Example of using the BONDS() function

In this example, the following values are used:

Corresponding data from the website Yahoo Finance:

BONDS formula usage

How Does It Work?

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 Data > Calculate menu select Formula to Value.

When using a date as text, it must first be converted to a real date, for example: DATEVALUE("2026-01-25").


If you need to get historical data for a long period of time, we recommend using the function YFINANCE to avoid delays.

Ready-made templates

You can also use ready-made templates to get historical data, financial indicators, or a company profile.

To do this, go to the menu YLC Utilities > Template > Company screener and select one of the following reports:

Download extension

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).


This function is available in the following extensions: YLC FunctionsYLC Utilities

The YLC Utilities menu in LO Calc

The YLC Utilities menu in LO Calc

The YLC Utilities menu in Excel

The YLC Utilities menu in Excel