S1-4: Greenblatt metrics #35
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
epic:E1-foundation
epic:E2-correct-metrics
epic:E3-fast-jobs
epic:E4-cli
epic:E5-web-ui
epic:E6-history
good first issue
help wanted
invalid
question
sprint-tracking
story
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ckreidl/screener!35
Loading…
Reference in a new issue
No description provided.
Delete branch "9-greenblatt-metrics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🤖 Claude: Closes #9
Fixes #4 (ROTC definition). Also removes the sign flip in #3 (negative EBIT now gives negative ROTC); excluding EBIT ≤ 0 stays with S1-5 (#10).
What changed
src/metrics.ts(new):computeMetrics(facts, marketCap)src/extract.ts: new fieldsshortTermInvestments,financeLeaseCurrent/financeLeaseNoncurrent(only when reported outside the debt lines),financeLeaseRightOfUseAsset(only when PP&E is the plainPropertyPlantAndEquipmentNet). Debt lines count as including leases when tagged*CapitalLeaseObligations*orDebtCurrent(the taxonomy defines it to include them; MU's $491M is all finance leases).DebtCurrent). This follows from the apples-to-apples decision; say if you want it otherwise.Acceptance criteria (hand-computed, in
test/metrics.test.ts)Definition of Done
bun testpasses; new logic has tests: 120 pass, 0 failbun checkis clean andbun fmt --checkpasses: no type errors; all files formatteddata/, 0 errors, market caps fromcompany_facts.db. 5,170 filers with a fiscal year in the last 13 months: 3,173 get ROTC (25 have capital 0 → null), 3,025 get EY (243 have EV ≤ 0 → null). Leases added off the debt lines for 1,101; right-of-use assets added to PP&E for 656.Risks / follow-ups
LongTermDebtorPropertyPlantAndEquipmentNetbut actually includes leases in it would have them counted twice. No fixture does this, but it isn't detectable from tags alone across the 1,101 / 656 companies above.🤖 Generated with Claude Code
🤖 Claude: Code review: No issues found. Checked for bugs and CLAUDE.md compliance.