Summary
Introduce a config.yaml as the single configuration entry point. Users should never need to edit pipeline_v2.py or screening.py directly for standard customisation like watchlists, screener weights, peer sets, or output format preferences.
Motivation
Editing pipeline_v2.py is a developer behaviour. Config files are a user behaviour. This is the single lowest-effort change with the highest adoption impact. It also makes the repo look production-designed rather than demo-grade, which matters for portfolio credibility.
Proposed config.yaml Structure
# config.yaml
watchlist:
- AAPL
- MSFT
- NVDA
as_of: "2026-04-15" # or "latest"
screener:
weights:
valuation: 0.30
quality: 0.25
growth: 0.25
momentum: 0.20
min_score: 0.60
output:
format: [html, pdf, markdown]
interactive_charts: true
include_audit_trail: true
peers:
AAPL: [MSFT, GOOGL, META, AMZN]
MSFT: [AAPL, GOOGL, ORCL, SAP]
data_sources:
fred_api_key_env: FRED_API_KEY
sec_user_agent_env: SEC_USER_AGENT
Implementation Notes
- Use
pydantic-settings or PyYAML + dataclass for typed config loading
- Environment variable overrides for all API keys (never in config.yaml)
config.yaml validated at startup with clear error messages for missing/invalid fields
- CLI flag
--config path/to/config.yaml to specify non-default location
- Provide
config.example.yaml with all fields documented
Acceptance Criteria
Summary
Introduce a
config.yamlas the single configuration entry point. Users should never need to editpipeline_v2.pyorscreening.pydirectly for standard customisation like watchlists, screener weights, peer sets, or output format preferences.Motivation
Editing pipeline_v2.py is a developer behaviour. Config files are a user behaviour. This is the single lowest-effort change with the highest adoption impact. It also makes the repo look production-designed rather than demo-grade, which matters for portfolio credibility.
Proposed config.yaml Structure
Implementation Notes
pydantic-settingsorPyYAML+ dataclass for typed config loadingconfig.yamlvalidated at startup with clear error messages for missing/invalid fields--config path/to/config.yamlto specify non-default locationconfig.example.yamlwith all fields documentedAcceptance Criteria
config.yamlloaded at pipeline start and validatedconfig.example.yamlcommitted with inline documentation commentspipeline_v2.pyandscreening.pyno longer require direct editing for standard use--configflag supported