Bond Indices
Implementation details
Class names
| Model name | Parameters class | Data class |
|---|---|---|
BondIndices | BondIndicesQueryParams | BondIndicesData |
Import Statement
from openbb_core.provider.standard_models.bond_indices import (
BondIndicesData,
BondIndicesQueryParams,
)
Parameters
- standard
- fred
start_date: date | str
Start date of the data, in YYYY-MM-DD format.
end_date: date | str
End date of the data, in YYYY-MM-DD format.
index_type: Literal['yield', 'yield_to_worst', 'total_return', 'oas']
Default: yield
The type of series. OAS is the option-adjusted spread. Default is yield.
start_date: date | str
Start date of the data, in YYYY-MM-DD format.
end_date: date | str
End date of the data, in YYYY-MM-DD format.
index_type: Literal['yield', 'yield_to_worst', 'total_return', 'oas']
Default: yield
The type of series. OAS is the option-adjusted spread. Default is yield.
category: Literal['high_yield', 'us', 'emerging_markets']
Default: us
The type of index category. Used in conjunction with 'index', default is 'us'.
index: str | list[str]
Default: yield_curve
Description
The specific index to query. Used in conjunction with 'category' and 'index_type', default is 'yield_curve'.
Possible values are:
corporate
seasoned_corporate
liquid_corporate
yield_curve
crossover
public_sector
private_sector
non_financial
high_grade
high_yield
liquid_emea
emea
liquid_asia
asia
liquid_latam
latam
liquid_aaa
liquid_bbb
aaa
aa
a
bbb
bb
b
ccc Multiple items allowed for provider(s): fred.
Choices
- a
- aa
- aaa
- asia
- b
- bb
- bbb
- ccc
- corporate
- crossover
- emea
- high_grade
- high_yield
- latam
- liquid_aaa
- liquid_asia
- liquid_bbb
- liquid_corporate
- liquid_emea
- liquid_latam
- non_financial
- private_sector
- public_sector
- seasoned_corporate
- yield_curve
frequency: Literal['a', 'q', 'm', 'w', 'd', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']
Description
Frequency aggregation to convert daily data to lower frequency.
None = No change
a = Annual
q = Quarterly
m = Monthly
w = Weekly
d = Daily
wef = Weekly, Ending Friday
weth = Weekly, Ending Thursday
wew = Weekly, Ending Wednesday
wetu = Weekly, Ending Tuesday
wem = Weekly, Ending Monday
wesu = Weekly, Ending Sunday
wesa = Weekly, Ending Saturday
bwew = Biweekly, Ending Wednesday
bwem = Biweekly, Ending Monday
aggregation_method: Literal['avg', 'sum', 'eop']
Default: avg
Description
A key that indicates the aggregation method used for frequency aggregation.
This parameter has no affect if the frequency parameter is not set, default is 'avg'.
avg = Average
sum = Sum
eop = End of Period
transform: Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']
Description
Transformation type
None = No transformation
chg = Change
ch1 = Change from Year Ago
pch = Percent Change
pc1 = Percent Change from Year Ago
pca = Compounded Annual Rate of Change
cch = Continuously Compounded Rate of Change
cca = Continuously Compounded Annual Rate of Change
log = Natural Log
Data
- standard
- fred
date: date | str
The date of the data.
symbol: str
Symbol representing the entity requested in the data.
value: float
Index values.
date: date | str
The date of the data.
symbol: str
Symbol representing the entity requested in the data.
value: float
Index values.
maturity: str
The maturity range of the bond index. Only applicable when 'index' is 'yield_curve'.
title: str
The title of the index.