Skip to main content

yield_curve

Get yield curve data by country and date.

Examples

from openbb import obb
obb.fixedincome.government.yield_curve(provider='federal_reserve')
obb.fixedincome.government.yield_curve(date='2023-05-01,2024-05-01', provider='fmp')
obb.fixedincome.government.yield_curve(date='2023-05-01', country=united_kingdom, provider='econdb')
obb.fixedincome.government.yield_curve(provider='ecb', yield_curve_type=par_yield)
obb.fixedincome.government.yield_curve(provider='fred', yield_curve_type=real, date='2023-05-01,2024-05-01')

Parameters

NameTypeDescriptionDefaultOptional
dateUnion[Union[date, str], List[Union[date, str]]]A specific date to get data for. By default is the current data. Multiple items allowed for provider(s): ecb, econdb, federal_reserve, fmp, fred.NoneTrue

Returns

OBBject
results : List[YieldCurve]
Serializable results.

provider : Optional[Literal['ecb', 'econdb', 'federal_reserve', 'fmp', 'fred']]
Provider name.

warnings : Optional[List[Warning_]]
List of warnings.

chart : Optional[Chart]
Chart object.

extra : Dict[str, Any]
Extra info.

Data

NameTypeDescription
dateUnion[date, str]The date of the data.
maturitystrMaturity length of the security.