Skip to content

DanielLin9406/worker-financialReportScreenr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A financial report screener data pipeline for SEC

image

image

image

A SEC financial report is input and a well-organized table is output to Google Sheet.

What is this project?

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}

Key Features

  • 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.

Design Patterns Showcase

  • 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.

Technical Highlights

  • 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.

Start Project

1. Create and Activate Virtual Environment

# Create virtual environment
python3 -m venv venv

# Activate virtual environment (macOS/Linux)
source venv/bin/activate

# Activate virtual environment (Windows)
# venv\Scripts\activate

2. Install Project

# Install project and dependencies in editable mode
pip install -e .

3. Run the Program

financial-report

About

A SEC financial report is input and a well-organized table is output to Google Sheet.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages