sk851 Claude Opus 5 (1M context) commited on
Commit
d8d9690
·
1 Parent(s): 295b7af

fix(filings): match "purchases related to property" capex

Browse files

Nvidia's cash-flow statement labels capex "purchases related to property
and equipment and intangible assets", which matched none of the five
existing stems. build_cashflow_context then returned None rather than
raising, so the caller's try/except logged nothing and capex/FCF vanished
from the newsletter's inside-ticker analysis with no trace.

Ordering is safe: the matcher takes the first row in document order per
key, and the "held"/"accrued" exclusions already cover the known decoys.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

src/TerraFin/interface/pages/stock/income_filing.py CHANGED
@@ -270,7 +270,10 @@ _CF_LABELS = {
270
  # capex is worded several standard ways: "purchases of…", "expenditures for…"
271
  # (Micron, Intel), "additions to…", "payments to acquire…". Match on the stem
272
  # so the Oxford-comma / "plant and equipment" variants all resolve.
273
- "capex": ("purchases of property", "expenditures for property", "additions to property",
 
 
 
274
  "payments to acquire property", "capital expenditures"),
275
  "ocf": ("net cash provided by operating activities", "net cash from operating activities",
276
  "net cash generated by operating activities", "cash flows from operating activities"),
 
270
  # capex is worded several standard ways: "purchases of…", "expenditures for…"
271
  # (Micron, Intel), "additions to…", "payments to acquire…". Match on the stem
272
  # so the Oxford-comma / "plant and equipment" variants all resolve.
273
+ # "purchases RELATED TO property" (Nvidia) matched none of the others, so the
274
+ # whole context returned None and the caller silently lost capex/FCF.
275
+ "capex": ("purchases of property", "purchases related to property",
276
+ "expenditures for property", "additions to property",
277
  "payments to acquire property", "capital expenditures"),
278
  "ocf": ("net cash provided by operating activities", "net cash from operating activities",
279
  "net cash generated by operating activities", "cash flows from operating activities"),