Skip to content

Add Equity Tear Sheets cookbook - #79

Merged
georgeatparallel merged 2 commits into
mainfrom
claude/finance-tear-sheet-pparallel-8ec9b7
Oct 28, 2026
Merged

georgeatparallel merged 2 commits into
mainfrom
claude/finance-tear-sheet-pparallel-8ec9b7

Conversation

@khushishelat

Copy link
Copy Markdown
Collaborator

What this adds

A new Python recipe, python-recipes/parallel-tear-sheets. A CSV of public companies goes in, and a cited two-page PDF tear sheet per company comes out, plus a third page showing the research basis behind every field.

cd python-recipes/parallel-tear-sheets
cp .env.example .env   # add PARALLEL_API_KEY
uv run tearsheet.py companies.csv --limit 3
Page 1 Page 2 Research basis

How it works

  • Research uses only the Task API. One Task Group holds every run for the CSV. Each company gets five focused core runs: profile, financials, market, news and signals. As soon as those finish, a pro thesis run starts with their facts as its input.
  • Each section gets its own source policy. Financials are restricted to sec.gov plus the company's own site. News is limited to the last 90 days with after_date.
  • Python does the arithmetic. Growth, margins, free cash flow, P/E, the section headlines, and the cross-checks between independently researched fields are all computed from the reported figures. No other model is involved.
  • Runs are resumable. Each run ID is saved as soon as it is created, so rerunning the command never pays twice.

Sample input and output

  • companies.csv: 23 deliberately different companies, including a bank, an insurer, a REIT, a utility, an airline, a pre-revenue biotech, a recent IPO, and EUR, JPY, GBP, TWD and CNY reporters.
  • sample/: the NVIDIA, LVMH and JPMorgan PDFs, plus NVDA.json with the raw Task results (citations, reasoning, confidence). Verbatim page excerpts are stripped from the JSON.

Testing

  • Full run on all 23 companies: 138 Task runs, 0 failures, 9.2 minutes, $5.17 at list prices.
  • Output: every company returned four fiscal years in its own reporting currency, and every sheet rendered to exactly 3 pages.
  • Arithmetic checks flagged three real issues:
    • Celsius's oldest EPS predates its stock split.
    • CAVA's oldest EPS predates its IPO.
    • Berkshire's dual share classes break the price × shares comparison.
  • Error paths: a missing or rejected API key now exits with a one-line message, and a malformed CSV is reported clearly.
  • Pre-commit: passes, including gitleaks. No keys or .env files are committed.

Notes for review

  • I also registered the recipe in the root README.md (Data Enrichment table), python-recipes/README.md, and website/cookbook.json. cookbook.json validates against its schema.
  • PDFs are rendered with WeasyPrint. On macOS it needs brew install pango; the script finds Homebrew's copy without any extra setup.
  • Sheets use the open-source Geist fonts by default. The licensed Parallel brand fonts are not committed; TEARSHEET_FONT_DIR opts into them locally.

🤖 Generated with Claude Code

A CSV of public companies in, a cited two-page PDF tear sheet per company
out. Five focused Task runs per company in one Task Group (profile,
financials, market, news, signals) plus a pro thesis run on their facts.
Derived metrics, headlines and arithmetic checks are computed in Python, and
a research basis page shows every field's citations, reasoning and
confidence. Includes a 23-company sample CSV, three sample PDFs and the raw
research behind one of them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@khushishelat
khushishelat requested review from a team and georgeatparallel October 28, 2026 20:49
@georgeatparallel
georgeatparallel merged commit 53df8b7 into main Oct 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants