FundLens is a privacy-conscious, evidence-grounded workspace for comparing two or three ETF or fund factsheets. It extracts normalized facts with page citations, keeps a human reviewer in control, calculates historical metrics with deterministic Python, checks generated claims, and exports an approved research brief.
Try the hosted MVP at fundlens-research.streamlit.app.
FundLens provides research and decision support, not financial advice. It does not recommend a “best” fund or issue buy, sell, or suitability conclusions.
- Accepts a Google AI Studio API key for the current browser session only.
- Validates and parses up to three text-based factsheet PDFs.
- Uses the fixed
gemma-4-31b-itmodel to produce strict structured data. - Lets the user approve, correct, reject, or leave each cited field unresolved.
- Compares issuer disclosures and explains comparability limitations.
- Validates adjusted-price CSVs and calculates reproducible risk/return metrics.
- Maps client requirements to observable trade-offs and due-diligence questions.
- Checks each generated claim against document evidence or calculated metrics.
- Exports reviewed Markdown or PDF without unapproved unsupported claims.
Requirements: Python 3.12 and uv.
uv sync --all-groups
uv run streamlit run app.pyOpen http://localhost:8501. Start with two PDFs from sample_data/synthetic_factsheets/ and the matching CSVs from sample_data/prices/.
Generate or refresh the synthetic dataset with:
uv run python scripts/generate_sample_data.pydocker compose up --buildThe container uses a read-only root filesystem and an in-memory temporary directory. A small VPS should provide at least 2 GB of RAM.
The password field hides the key on screen, but Streamlit sends it to the Python server. FundLens holds it only in that user's session memory—never in a file, cookie, database, shared cache, report, or application log. Forget API key clears the credential and rotates sensitive browser widgets so the entire workspace is discarded.
Users who do not trust a hosted operator with in-memory access should run the Docker deployment locally. See PRIVACY.md and SECURITY.md.
date,adjusted_close
2025-01-02,100.00
2025-01-03,100.40Prices must be positive numbers with unique, valid dates. FundLens reports the observation period and its methodology with every calculation. It never asks the language model to calculate financial metrics.
uv run ruff check .
uv run ruff format --check .
uv run mypy src app.py
uv run pytestGemma calls are replaced by deterministic fakes in CI. No real API key is required or permitted in tests.
The primary deployment is fundlens-research.streamlit.app, built from branch main and entrypoint app.py. It has no server-owned AI key or secrets.toml; Community Cloud installs the locked Python 3.12 environment from uv.lock.
MIT