-
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.
- Loading branch information
1 parent
58b252c
commit b161e50
Showing
6 changed files
with
1,315 additions
and
479 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
openbb_platform/core/openbb_core/provider/standard_models/management_discussion_analysis.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,45 @@ | ||
"""Management Discussion & Analysis Standard Model.""" | ||
|
||
from datetime import date as dateType | ||
from typing import Optional | ||
|
||
from openbb_core.provider.abstract.data import Data | ||
from openbb_core.provider.abstract.query_params import QueryParams | ||
from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS | ||
from pydantic import Field, field_validator | ||
|
||
|
||
class ManagementDiscussionAnalysisQueryParams(QueryParams): | ||
symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", "")) | ||
calendar_year: Optional[int] = Field( | ||
default=None, | ||
description="Calendar year of the report. By default, is the current year." | ||
+ " If the calendar period is not provided, but the calendar year is, it will return the annual report.", | ||
) | ||
calendar_period: Optional[int] = Field( | ||
gt=0, | ||
le=4, | ||
default=None, | ||
description="Calendar period of the report. By default, is the most recent report available for the symbol." | ||
+ " If no calendar year and no calendar period are provided, it will return the most recent report.", | ||
) | ||
|
||
@field_validator("symbol", mode="before", check_fields=False) | ||
@classmethod | ||
def to_upper(cls, v: str): | ||
"""Convert field to uppercase.""" | ||
return v.upper() | ||
|
||
|
||
class ManagementDiscussionAnalysisData(Data): | ||
"""Management Discussion & Analysis Data.""" | ||
|
||
symbol: str = Field(description="The symbol of the company.") | ||
calendar_year: int = Field(description="The calendar year of the report.") | ||
calendar_period: int = Field(description="The calendar period of the report.") | ||
period_ending: Optional[dateType] = Field( | ||
description="The end date of the reporting period.", default=None | ||
) | ||
content: str = Field( | ||
description="The content of the management discussion and analysis." | ||
) |
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
Oops, something went wrong.