How yoonyoungkim/smart-investor works
Smart Investor selects dividend stocks and ETFs in US and Korean markets by collecting market and fundamental data, calculating financial indicators, and applying configurable criteria. Its principal workflow is ticker collection, price/dividend/financial collection, metric calculation and caching, then recommendation filtering and reporting. Country-specific collectors and optional notification channels support that workflow; scheduled scans provide an automated entry point. The graph reflects README-documented stages and SOURCE INDEX references; unsampled implementations and their internal call details are not inferred.
Main entry points: recommend_stocks.py Recommendation Run · jobs.py Scheduled Scans · base.py Notification Channels · engine.py Filter Engine
Components 24
Market Data Collection
- Ticker Collection
src/smart_investor/collectors/kr/ticker.py - US Collectors
src/smart_investor/collectors/us - KR Market Collectors
src/smart_investor/collectors/kr - DART Integration
src/smart_investor/collectors/kr/dart.py
Metric Analysis
- Metric Calculation
scripts/calculate_metrics.py - Metrics Calculator
src/smart_investor/analysis/calculator.py
Persistence
- Database Configuration
src/smart_investor/db/config.py - Database Sessions
src/smart_investor/db/connection.py - Data Persistence
src/smart_investor/db/persistence.py - Market Data Tables
src/smart_investor/db/models.py - Metric Cache
src/smart_investor/db/models.py
Recommendations
- Recommendation Run
scripts/recommend_stocks.py - Stock Metrics Model
src/smart_investor/models/stock.py - Filter Configuration
src/smart_investor/filters/config.py - Filter Registry
src/smart_investor/filters/registry.py - Filter Criteria
src/smart_investor/filters/criteria.py - Filter Engine
src/smart_investor/filters/engine.py - Excel Reporting
src/smart_investor/reporting/excel.py
Scheduling and Delivery
- Scheduled Scans
src/smart_investor/scheduler/jobs.py - Notification Channels
src/smart_investor/notifications/base.py - Email Delivery
src/smart_investor/notifications/email.py - Slack Delivery
src/smart_investor/notifications/slack.py - Telegram Delivery
src/smart_investor/notifications/telegram.py
Other components
- Operator
Connections 28
- Operator → Ticker Collection: starts collection
- Operator → US Collectors: starts collection
- Operator → KR Market Collectors: starts collection
- KR Market Collectors → DART Integration: uses for fundamentals
src/smart_investor/collectors/kr/financial.py - Ticker Collection → Data Persistence: saves tickers
- US Collectors → Data Persistence: saves collected data
src/smart_investor/collectors/us/price.py - KR Market Collectors → Data Persistence: saves collected data
src/smart_investor/collectors/kr/price.py - Data Persistence → Market Data Tables: upserts market data
src/smart_investor/db/persistence.py - Operator → Metric Calculation: calculates indicators
- Metric Calculation → Metrics Calculator: invokes calculations
scripts/calculate_metrics.py - Metrics Calculator → Market Data Tables: reads collected data
scripts/calculate_metrics.py - Metric Calculation → Metric Cache: stores dated metrics
scripts/calculate_metrics.py - Operator → Recommendation Run: runs recommendation
- Recommendation Run → Metrics Calculator: calculates metrics
scripts/recommend_stocks.py - Recommendation Run → Filter Configuration: configures filters
scripts/recommend_stocks.py - Filter Configuration → Filter Registry: selects registered criteria
src/smart_investor/filters/config.py - Filter Registry → Filter Criteria: builds criteria
src/smart_investor/filters/registry.py - Recommendation Run → Filter Engine: applies filters
scripts/recommend_stocks.py - Filter Engine → Filter Criteria: checks metrics
src/smart_investor/filters/engine.py - Filter Engine → Stock Metrics Model: returns filter results
src/smart_investor/filters/engine.py - Recommendation Run → Excel Reporting: exports results
scripts/recommend_stocks.py - Operator → Scheduled Scans: schedules scans
- Scheduled Scans → Metrics Calculator: calculates metrics
src/smart_investor/scheduler/jobs.py - Scheduled Scans → Filter Engine: filters stocks
src/smart_investor/scheduler/jobs.py - Scheduled Scans → Notification Channels: sends scan results
src/smart_investor/scheduler/jobs.py - Notification Channels → Email Delivery: dispatches to
src/smart_investor/notifications/email.py - Notification Channels → Slack Delivery: dispatches to
src/smart_investor/notifications/slack.py - Notification Channels → Telegram Delivery: dispatches to
src/smart_investor/notifications/telegram.py