-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Enhancement] Fixed Income Enhancements (#6490)
* improve effr and move sofr to fixedincome.rate * federal_reserve default start date * fred cassette * commercial paper * cp series map * update sofr and add federal_reserve to endpoint * examples * update ameribor * maturity_dict * add overnight bank funding rate * add federal reserve to obfr * pop footnoteId * central bank holdings descriptions * move moody's bond indices to the bond_indices endpoint * add it to the INDEX_CHOICES * improve hqm * handle none * add treasury minus fed funds to yield curve * static assets * estr * description * missed file in commit * second return statement
- Loading branch information
1 parent
d465f22
commit 1a990ba
Showing
62 changed files
with
7,604 additions
and
3,527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 0 additions & 33 deletions
33
openbb_platform/core/openbb_core/provider/standard_models/estr_rates.py
This file was deleted.
Oops, something went wrong.
67 changes: 67 additions & 0 deletions
67
openbb_platform/core/openbb_core/provider/standard_models/euro_short_term_rate.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
"""Euro Short Term Rate Standard Model.""" | ||
|
||
from datetime import date as dateType | ||
from typing import Optional | ||
|
||
from pydantic import Field | ||
|
||
from openbb_core.provider.abstract.data import Data | ||
from openbb_core.provider.abstract.query_params import QueryParams | ||
from openbb_core.provider.utils.descriptions import ( | ||
DATA_DESCRIPTIONS, | ||
QUERY_DESCRIPTIONS, | ||
) | ||
|
||
|
||
class EuroShortTermRateQueryParams(QueryParams): | ||
"""Euro Short Term Rate Query.""" | ||
|
||
start_date: Optional[dateType] = Field( | ||
default=None, | ||
description=QUERY_DESCRIPTIONS.get("start_date", ""), | ||
) | ||
end_date: Optional[dateType] = Field( | ||
default=None, | ||
description=QUERY_DESCRIPTIONS.get("end_date", ""), | ||
) | ||
|
||
|
||
class EuroShortTermRateData(Data): | ||
"""Euro Short Term Rate Data.""" | ||
|
||
date: dateType = Field(description=DATA_DESCRIPTIONS.get("date", "")) | ||
rate: float = Field( | ||
description="Volume-weighted trimmed mean rate.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) | ||
percentile_25: Optional[float] = Field( | ||
default=None, | ||
description="Rate at 25th percentile of volume.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) | ||
percentile_75: Optional[float] = Field( | ||
default=None, | ||
description="Rate at 75th percentile of volume.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) | ||
volume: Optional[float] = Field( | ||
default=None, | ||
description=DATA_DESCRIPTIONS.get("volume", "")+ " (Millions of €EUR).", | ||
json_schema_extra={ | ||
"x-unit_measurement": "currency", | ||
"x-frontend_multiply": 1e6, | ||
}, | ||
) | ||
transactions: Optional[int] = Field( | ||
default=None, | ||
description="Number of transactions.", | ||
) | ||
number_of_banks: Optional[int] = Field( | ||
default=None, | ||
description="Number of active banks.", | ||
) | ||
large_bank_share_of_volume: Optional[float] = Field( | ||
default=None, | ||
description="The percent of volume attributable to the 5 largest active banks.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) |
33 changes: 0 additions & 33 deletions
33
openbb_platform/core/openbb_core/provider/standard_models/fed_rates.py
This file was deleted.
Oops, something went wrong.
75 changes: 75 additions & 0 deletions
75
openbb_platform/core/openbb_core/provider/standard_models/federal_funds_rate.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
"""Federal Funds Rate Standard Model.""" | ||
|
||
from datetime import date as dateType | ||
from typing import Optional | ||
|
||
from pydantic import Field | ||
|
||
from openbb_core.provider.abstract.data import Data | ||
from openbb_core.provider.abstract.query_params import QueryParams | ||
from openbb_core.provider.utils.descriptions import ( | ||
DATA_DESCRIPTIONS, | ||
QUERY_DESCRIPTIONS, | ||
) | ||
|
||
|
||
class FederalFundsRateQueryParams(QueryParams): | ||
"""Federal Funds Rate Query.""" | ||
|
||
start_date: Optional[dateType] = Field( | ||
default=None, | ||
description=QUERY_DESCRIPTIONS.get("start_date", ""), | ||
) | ||
end_date: Optional[dateType] = Field( | ||
default=None, | ||
description=QUERY_DESCRIPTIONS.get("end_date", ""), | ||
) | ||
|
||
|
||
class FederalFundsRateData(Data): | ||
"""Federal Funds Rate Data.""" | ||
|
||
date: dateType = Field(description=DATA_DESCRIPTIONS.get("date", "")) | ||
rate: float = Field( | ||
description="Effective federal funds rate.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) | ||
target_range_upper: Optional[float] = Field( | ||
default=None, | ||
description="Upper bound of the target range.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) | ||
target_range_lower: Optional[float] = Field( | ||
default=None, | ||
description="Lower bound of the target range.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) | ||
percentile_1: Optional[float] = Field( | ||
default=None, | ||
description="1st percentile of the distribution.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) | ||
percentile_25: Optional[float] = Field( | ||
default=None, | ||
description="25th percentile of the distribution.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) | ||
percentile_75: Optional[float] = Field( | ||
default=None, | ||
description="75th percentile of the distribution.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) | ||
percentile_99: Optional[float] = Field( | ||
default=None, | ||
description="99th percentile of the distribution.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) | ||
volume: Optional[float] = Field( | ||
default=None, | ||
description=DATA_DESCRIPTIONS.get("volume", "") | ||
+ "The notional volume of transactions (Billions of $).", | ||
json_schema_extra={ | ||
"x-unit_measurement": "currency", | ||
"x-frontend_multiply": 1e9, | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.