-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] Adds Router Path For Economic Surveys (#6498)
* add router path for economic surveys * chicago economic conditions * reference.json * add manufacturing outlook survey for texas * test file name --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
- Loading branch information
1 parent
5ec2db7
commit 6445b97
Showing
21 changed files
with
4,546 additions
and
1 deletion.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
openbb_platform/core/openbb_core/provider/standard_models/manufacturing_outlook_texas.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,55 @@ | ||
"""Manufacturing Outlook - Texas - 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 ManufacturingOutlookTexasQueryParams(QueryParams): | ||
"""Manufacturing Outlook - Texas - 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 ManufacturingOutlookTexasData(Data): | ||
"""Manufacturing Outlook - Texas - Data.""" | ||
|
||
date: dateType = Field(description=DATA_DESCRIPTIONS.get("date", "")) | ||
topic: Optional[str] = Field( | ||
default=None, description="Topic of the survey response." | ||
) | ||
diffusion_index: Optional[float] = Field( | ||
default=None, description="Diffusion Index." | ||
) | ||
percent_reporting_increase: Optional[float] = Field( | ||
default=None, | ||
description="Percent of respondents reporting an increase over the last month.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) | ||
percent_reporting_decrease: Optional[float] = Field( | ||
default=None, | ||
description="Percent of respondents reporting a decrease over the last month.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) | ||
percent_reporting_no_change: Optional[float] = Field( | ||
default=None, | ||
description="Percent of respondents reporting no change over the last month.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) |
39 changes: 39 additions & 0 deletions
39
openbb_platform/core/openbb_core/provider/standard_models/senior_loan_officer_survey.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,39 @@ | ||
"""Senior Loan Officer Opinion Survey 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 SeniorLoanOfficerSurveyQueryParams(QueryParams): | ||
"""Senior Loan Officer Opinion Survey 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 SeniorLoanOfficerSurveyData(Data): | ||
"""Senior Loan Officer Opinion Survey Data.""" | ||
|
||
date: dateType = Field(description=DATA_DESCRIPTIONS.get("date", "")) | ||
symbol: Optional[str] = Field( | ||
default=None, description=DATA_DESCRIPTIONS.get("symbol", "") | ||
) | ||
value: float = Field(description="Survey value.") | ||
title: Optional[str] = Field(description="Survey title.") |
57 changes: 57 additions & 0 deletions
57
...atform/core/openbb_core/provider/standard_models/survey_of_economic_conditions_chicago.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,57 @@ | ||
"""Survey Of Economic Conditions - Chicago - 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 SurveyOfEconomicConditionsChicagoQueryParams(QueryParams): | ||
"""Survey Of Economic Conditions - Chicago - 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 SurveyOfEconomicConditionsChicagoData(Data): | ||
"""Survey Of Economic Conditions - Chicago - Data.""" | ||
|
||
date: dateType = Field(description=DATA_DESCRIPTIONS.get("date", "")) | ||
activity_index: Optional[float] = Field(default=None, description="Activity Index.") | ||
one_year_outlook: Optional[float] = Field( | ||
default=None, description="One Year Outlook Index." | ||
) | ||
manufacturing_activity: Optional[float] = Field( | ||
default=None, description="Manufacturing Activity Index." | ||
) | ||
non_manufacturing_activity: Optional[float] = Field( | ||
default=None, description="Non-Manufacturing Activity Index." | ||
) | ||
capital_expenditures_expectations: Optional[float] = Field( | ||
default=None, description="Capital Expenditures Expectations Index." | ||
) | ||
hiring_expectations: Optional[float] = Field( | ||
default=None, description="Hiring Expectations Index." | ||
) | ||
current_hiring: Optional[float] = Field( | ||
default=None, description="Current Hiring Index." | ||
) | ||
labor_costs: Optional[float] = Field(default=None, description="Labor Costs Index.") | ||
non_labor_costs: Optional[float] = Field( | ||
default=None, description="Non-Labor Costs Index." | ||
) |
44 changes: 44 additions & 0 deletions
44
openbb_platform/core/openbb_core/provider/standard_models/university_of_michigan.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,44 @@ | ||
"""University Of Michigan Survey 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 UofMichiganQueryParams(QueryParams): | ||
"""University Of Michigan Survey 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 UofMichiganData(Data): | ||
"""University Of Michigan Survey Data.""" | ||
|
||
date: dateType = Field(description=DATA_DESCRIPTIONS.get("date", "")) | ||
consumer_sentiment: Optional[float] = Field( | ||
default=None, | ||
description="Index of the results of the University of Michigan's monthly Survey of Consumers," | ||
+ " which is used to estimate future spending and saving. (1966:Q1=100).", | ||
) | ||
inflation_expectation: Optional[float] = Field( | ||
default=None, | ||
description="Median expected price change next 12 months, Surveys of Consumers.", | ||
json_schema_extra={"x-unit_measurement": "percent", "x-frontend_multiply": 100}, | ||
) |
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.