Skip to main content

ycrv

Gets yield curve data from FRED.

Source Code: [link]

openbb.fixedincome.ycrv(date: str = "", return_date: bool = False, inflation_adjusted: bool = False, spot_or_par: Optional[str] = None)

Parameters

NameTypeDescriptionDefaultOptional
datestrDate to get curve for. If empty, gets most recent date (format yyyy-mm-dd)True
return_dateboolIf True, returns date of yield curveFalseTrue

Returns

TypeDescription
Tuple[pd.DataFrame, str]Dataframe of yields and maturities,
Date for which the yield curve is obtained

Examples

from openbb_terminal.sdk import openbb
ycrv_df = openbb.fixedincome.ycrv()
Since there is a delay with the data, the most recent date is returned and can be accessed with return_date=True
ycrv_df, ycrv_date = openbb.fixedincome.ycrv(return_date=True)