Cache sector and industry #14
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#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Look up profile data only for companies we have not seen before.
Acceptance criteria
sector_cachetable, keyed by CIK, stores the ticker the lookup used, sector, industry, source (yahooorsic), and the date fetched.company_analysis;Notes
quoteSummarycall per company for the price, so this story alone doesn't make enrich much faster.Dependencies
None. #13 depends on this one.
Definition of Done
bun testpasses; new logic has testsbun checkis clean andbun fmt --checkpassesCloses #<this issue>🤖 Claude: Proposed acceptance criteria (backlog refinement)
Today: sector and industry come from
quoteSummary(one request per company, about 1 per second), with SEC's SIC code as the fallback when Yahoo has none (#45). Eligibility needs a sector: an unknown one excludes the company.Acceptance criteria
sector_cachetable, keyed by ticker, stores sector, industry, source (yahooorsic), and the date fetched.company_analysis;Questions
Dependencies
None. #13 depends on this one.
It seems to me that if CIK is more constant we'd want to key by CIK rather than ticker. But I'm not very well versed in this area. I know I've seen tickers change. I don't know that CIKs change.
90 days is fine.
🤖 Claude: Final acceptance criteria are in the issue body. One change from the proposal: the cache is keyed by CIK, not ticker. SEC never changes or reuses a CIK, but tickers change (FB → META) and get reused by unrelated companies after a delisting, so a ticker-keyed cache could give a new company the old one's sector. The ticker used for the lookup is stored alongside for traceability. Refresh age stays at 90 days.