A SEC financial report is input and a well-organized table is output to Google Sheet.
A simple data pipeline that utilizes ETL process to screen companies based on their raw financial reports from Morningstar excel files and then output are a various first-level and second-level indicators to Google Sheet.
Put input files under ~/FinancialData/{ticker}
- Modular ETL Pipeline: A clean separation of concerns between Data Ingestion (Local/API), Transformation (Financial Indicator Calculation), and Loading (Google Sheets/Databases).
- Advanced Financial Analysis: Implements various valuation models and indicators, including DCF, Graham Number, DDM, and more.
- Abstract Factory & Factory Method: Centralized object creation logic in mainFactory and TableAbstractFactory, allowing the system to swap different input sources or indicator sets easily.
- Observer Pattern: Used in the Output module (OutputSubject & OutputObserver). It allows multiple services (like Google Sheets or SQL databases) to subscribe to the processing results without coupling the core logic to specific outputs.
- Command Pattern: Encapsulates API requests (AlphaVantage, Yahoo Finance, etc.) into command objects, decoupling the invoker from the actual API implementation.
- Strategy Pattern: Applied in decision-making tables (e.g., ScoreTableStrategy, BuyDecisionTableStrategy), making it simple to plug in different investment strategies or scoring criteria.
- Builder Pattern: Systematically constructs complex financial tables (ParsTableBuilder, PriceTableBuilder), ensuring that large data structures are built step-by-step with validation.
- Mediator Pattern: Handles complex interactions between various API components through APIMediator, reducing direct dependencies between classes.
- Robust Data Handling: Heavy use of Pandas and NumPy for efficient vectorization and manipulation of large financial datasets.
- Environment Management: Fully integrated with python-dotenv for secure API key management and venv for isolated development environments.
- Extensible Architecture: The use of Abstract Base Classes (ABCs) ensures that new indicators or data sources can be added by simply implementing a predefined interface.
# Create virtual environment
python3 -m venv venv
# Activate virtual environment (macOS/Linux)
source venv/bin/activate
# Activate virtual environment (Windows)
# venv\Scripts\activate# Install project and dependencies in editable mode
pip install -e .financial-report

