Replies: 3 comments
-
Technical Analysis of EntityFacts EPS Getter and 8-K HTML ParsingThank you @amcamc92 for these thoughtful feature proposals! Both suggestions align well with EdgarTools' core principles of simplifying financial data access while maintaining accuracy. Let me provide technical analysis for each proposal and gather community input. 1. Standardized EPS Getter MethodTechnical AssessmentThis is an excellent addition to our existing standardized getter pattern. Looking at the codebase, we already have standardized getters like:
An Implementation ConsiderationsEPS Concept Variations Found in Codebase:
Proposed API Design: def get_eps(self, period: Optional[str] = None,
unit: Optional[str] = None,
diluted: bool = True) -> Optional[float]:
"""
Get standardized Earnings Per Share value across all companies.
Args:
period: Optional period in format "YYYY-QN" or "YYYY-FY"
unit: Optional unit filter (defaults to USD/shares)
diluted: If True, prefer diluted EPS; if False, prefer basic EPS
Returns:
EPS value as float, or None if not available
"""Backwards Compatibility: ✅ This would be a pure addition with no breaking changes. Unit Handling: The codebase shows EPS uses 2. 8-K HTML Financial Exhibit ParsingTechnical AssessmentThis is a more complex but valuable enhancement. The codebase shows we already have:
Implementation ConsiderationsCurrent 8-K Capabilities:
Enhancement Opportunities:
Proposed API Design: # Access through existing EightK class
eightk = filing.obj() # 8-K filing object
exhibits = eightk.financial_exhibits() # New method
# Or through EntityFacts integration
facts = company.get_facts(include_8k_exhibits=True)Complexity Considerations:
Community QuestionsFor EPS Getter:
For 8-K HTML Parsing:
Example Usage ScenariosEPS Getter: company = Company("AAPL")
facts = company.get_facts()
# Get latest diluted EPS
eps = facts.get_eps()
# Get basic EPS for specific period
eps_basic = facts.get_eps(period="2023-FY", diluted=False)
# Compare across periods
for period in ["2021-FY", "2022-FY", "2023-FY"]:
eps = facts.get_eps(period=period)
print(f"{period}: ${eps:.2f}")8-K Exhibit Integration: # Get recent 8-K with financial exhibits
filings = company.get_filings(form="8-K").latest(5)
for filing in filings:
eightk = filing.obj()
if financial_tables := eightk.financial_exhibits():
print(f"Found {len(financial_tables)} financial tables")Next StepsFor EPS Getter (Ready for Implementation):
For 8-K HTML Parsing (Requires Planning):
Both features would enhance EdgarTools' goal of making financial data more accessible while maintaining our focus on accuracy and user experience. Community: Please share your thoughts on API design preferences and use case priorities! |
Beta Was this translation helpful? Give feedback.
-
|
Sorry, I had one of my agents research the approach I will put these on the feature backlog and see if they can be done in an upcoming release |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, Dwight! A few thoughts after reviewing your agent’s research:
On the HTML tables parser: in my experience, the formats and structures of exhibits vary widely. This would require a careful study of patterns and enough flexibility in the approach to build something truly robust. Hope this helps, and thanks again! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
First of all, thank you for the outstanding work on EntityFacts. The addition of standardized getter methods has been a game-changer for consistent financial data access.
I’d like to propose two potential enhancements that could add significant value:
1. Standardized Getter for EPS:
A unified method such as get_eps() could normalize Earnings Per Share retrieval. Companies use varying tags (e.g., basic vs. diluted EPS), making it difficult to automate consistent access. Having a standardized getter would greatly simplify financial modeling and screening.
2. Parsing of 8-K HTML Financial Exhibits:
Many companies release key financials (including Q4 data) in HTML exhibits attached to 8-Ks.
These datasets are often more up to date than 10-K/10-Q filings. Enabling structured extraction of these tables would provide a richer, more timely dataset for analysis.
Both features would complement the existing design philosophy of EntityFacts by making financial data retrieval more consistent and comprehensive.
Are those potential improvements something that could be considered?
Thanks again!
Beta Was this translation helpful? Give feedback.
All reactions