Overview
PDF-first equity screener over tabular fundamentals — deterministic retrieval and reranking, evidence-grounded packet generation, and MCP-ready data tools. Scoring stays source of truth; LLM explains but never invents.
- Python 3.11, RAG-like tabular retrieval (no vector DB), deterministic overlay scoring
- Evidence packet: 5 typed
EvidenceItems per pick withas_ofandsource - Offline fixture
tests/fixtures/base_snapshot.json— fully offlinepytestand CLI
Install
git clone https://github.com/ianlyoo/signal-foundry.git
cd signal-foundry
python -m venv .venv
# Windows: .venv\Scripts\activate
pip install -e .[dev]
pytest -q
python -m screener.cli run --mode offline --input tests/fixtures/base_snapshot.json --output-dir out/demo
Evaluation — deterministic screening in measured snapshot
6-pick invariant (3 safer_growth + 3 higher_risk_higher_growth), 5 evidence items per pick, citation validation via validate_grounding(). LLM rationale is evidence-only with template fallback source_mode.
Limitations adjacent to claims: RAG-like tabular retrieval — no embedding index or ANN search; live snapshot requires FMP/SEC/FRED keys; scoring weights and macro overlay are deterministic heuristics, not financial advice; PDF output on Windows needs WeasyPrint GTK runtime.
Pipeline — retrieval → reranking → evidence → generation → validation
- Retrieval
pipeline.py:run_offline/run_live— loadInputSnapshotrows for as-of date - Reranking
scoring.py— normalize valuation/growth/quality/risk + macro overlay → Top-6 - Evidence
evidence.py:build_evidence()— 5 items per pick (valuation/growth/quality/risk/macro) - Grounded generation
rationale.py:generate_rationale()— evidence-only; citation subset check, template fallback - Reporting
reporting.py— Markdown / HTML / PDF +evidence_packets.json+run_manifest.json
Project links
License and ownership
Owner: ianlyoo — License: MIT — Version: 0.1.0 — Language: Python