TOP

Bonds Function

BONDS() Description

The BONDS() function is designed to automatically obtain historical data on government bonds directly from the Yahoo Finance website (finance.yahoo.com) using the specified symbol (for example, TYX - 30-year bonds, TNX - 10-year bonds).

This function allows you to receive data on the yield and quotes of treasury bonds directly in the Excel (LibreOffice Calc) table, which is important for analyzing macroeconomic indicators and risks.


Main Characteristics of the BONDS Function

Syntax:

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

Parameters:

Usage Example

Example 1

The BONDS() function allows you to easily 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 Yahoo Finance website:

BONDS formula usage

How It Works?

The BONDS() function can work both in normal mode and as an array function.

To use it as an array, simply enter the function in any cell, specifying the appropriate parameters. After that, you need to press Ctrl+Shift+Enter to enter the array formula, and LO Calc will automatically return a table with the data.

To select all cells related to the array formula, simply select any cell in the array and press Ctrl+/.

If you need to convert an array formula into values - select the entire array and in the Data > Calculate menu select Formula to Value.


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

Download Extension

You can use the BONDS() function by installing the YLC Utilities extension.

After that, this function will be available in all files 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