summaryrefslogtreecommitdiffstats
path: root/openbb_platform/core/openbb_core/provider/standard_models/forward_eps_estimates.py
diff options
context:
space:
mode:
Diffstat (limited to 'openbb_platform/core/openbb_core/provider/standard_models/forward_eps_estimates.py')
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/forward_eps_estimates.py67
1 files changed, 67 insertions, 0 deletions
diff --git a/openbb_platform/core/openbb_core/provider/standard_models/forward_eps_estimates.py b/openbb_platform/core/openbb_core/provider/standard_models/forward_eps_estimates.py
new file mode 100644
index 00000000000..e0f95d9c8a1
--- /dev/null
+++ b/openbb_platform/core/openbb_core/provider/standard_models/forward_eps_estimates.py
@@ -0,0 +1,67 @@
+"""Forward EPS Estimates Standard Model."""
+
+from datetime import date as dateType
+from typing import Optional
+
+from pydantic import Field, field_validator
+
+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 ForwardEpsEstimatesQueryParams(QueryParams):
+ """Forward EPS Estimates Query Parameters."""
+
+ symbol: Optional[str] = Field(
+ default=None,
+ description=QUERY_DESCRIPTIONS["symbol"],
+ )
+
+ @field_validator("symbol", mode="before", check_fields=False)
+ @classmethod
+ def to_upper(cls, v):
+ """Convert field to uppercase."""
+ return v.upper() if v else None
+
+
+class ForwardEpsEstimatesData(Data):
+ """Forward EPS Estimates Data."""
+
+ symbol: str = Field(description=DATA_DESCRIPTIONS.get("symbol", ""))
+ name: Optional[str] = Field(default=None, description="Name of the entity.")
+ date: dateType = Field(description=DATA_DESCRIPTIONS.get("date", ""))
+ fiscal_year: Optional[int] = Field(
+ default=None, description="Fiscal year for the estimate."
+ )
+ fiscal_period: Optional[str] = Field(
+ default=None, description="Fiscal quarter for the estimate."
+ )
+ calendar_year: Optional[int] = Field(
+ default=None, description="Calendar year for the estimate."
+ )
+ calendar_period: Optional[str] = Field(
+ default=None, description="Calendar quarter for the estimate."
+ )
+ low_estimate: Optional[float] = Field(
+ default=None, description="Estimated EPS low for the period."
+ )
+ high_estimate: Optional[float] = Field(
+ default=None, description="Estimated EPS high for the period."
+ )
+ mean: Optional[float] = Field(
+ default=None, description="Estimated EPS mean for the period."
+ )
+ median: Optional[float] = Field(
+ default=None, description="Estimated EPS median for the period."
+ )
+ standard_deviation: Optional[float] = Field(
+ default=None, description="Estimated EPS standard deviation for the period."
+ )
+ number_of_analysts: Optional[int] = Field(
+ default=None,
+ description="Number of analysts providing estimates for the period.",
+ )