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
- standard
- ecb
- econdb
- federal_reserve
- fmp
- fred
Name | Type | Description | Default | Optional |
---|---|---|---|---|
date | Union[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. | None | True |
Name | Type | Description | Default | Optional |
---|---|---|---|---|
date | Union[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. | None | True |
rating | Literal['aaa', 'all_ratings'] | The rating type, either 'aaa' or 'all_ratings'. | aaa | True |
yield_curve_type | Literal['spot_rate', 'instantaneous_forward', 'par_yield'] | The yield curve type. | spot_rate | True |
use_cache | bool | If true, cache the request for four hours. | True | True |
Name | Type | Description | Default | Optional |
---|---|---|---|---|
date | Union[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. | None | True |
country | Union[str, List[str]] | The country to get data. New Zealand, Mexico, Singapore, and Thailand have only monthly data. The nearest date to the requested one will be used. Multiple items allowed for provider(s): econdb. | united_states | True |
use_cache | bool | If true, cache the request for four hours. | True | True |
Name | Type | Description | Default | Optional |
---|---|---|---|---|
date | Union[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. | None | True |
Name | Type | Description | Default | Optional |
---|---|---|---|---|
date | Union[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. | None | True |
Name | Type | Description | Default | Optional |
---|---|---|---|---|
date | Union[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. | None | True |
yield_curve_type | Literal['nominal', 'real', 'breakeven', 'treasury_minus_fed_funds', 'corporate_spot', 'corporate_par'] | Yield curve type. Nominal and Real Rates are available daily, others are monthly. The closest date to the requested date will be returned. | nominal | True |
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
- standard
- ecb
- econdb
- federal_reserve
- fmp
- fred
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
maturity | str | Maturity length of the security. |
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
maturity | str | Maturity length of the security. |
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
maturity | str | Maturity length of the security. |
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
maturity | str | Maturity length of the security. |
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
maturity | str | Maturity length of the security. |
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
maturity | str | Maturity length of the security. |