Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,22 @@ ifndef EXPECTED_CANONICAL_SHA256
endif
@PYTHONDONTWRITEBYTECODE=1 python3 -m src.sec_fundamentals_patch_preview --sec-preview-path "$(SEC_PREVIEW)" --canonical-path "$(or $(CANONICAL_PATH),data/fundamentals.csv)" --expected-sec-preview-sha256 "$(EXPECTED_SEC_PREVIEW_SHA256)" --expected-canonical-sha256 "$(EXPECTED_CANONICAL_SHA256)" --repository-head "$(shell git rev-parse HEAD)"

.PHONY: sec-fundamentals-patch-apply
sec-fundamentals-patch-apply:
ifndef PATCH_PREVIEW
$(error PATCH_PREVIEW is required, for example: make sec-fundamentals-patch-apply PATCH_PREVIEW=/tmp/reviewed-patch.json)
endif
ifndef EXPECTED_PATCH_PREVIEW_SHA256
$(error EXPECTED_PATCH_PREVIEW_SHA256 is required)
endif
ifndef EXPECTED_CANONICAL_SHA256
$(error EXPECTED_CANONICAL_SHA256 is required)
endif
ifneq ($(CONFIRM_EXACT_FOUR_CELL_APPLY),1)
$(error CONFIRM_EXACT_FOUR_CELL_APPLY=1 is required)
endif
@PYTHONDONTWRITEBYTECODE=1 python3 -m src.sec_fundamentals_patch_apply --patch-preview-path "$(PATCH_PREVIEW)" --canonical-path "$(or $(CANONICAL_PATH),data/fundamentals.csv)" --expected-patch-preview-sha256 "$(EXPECTED_PATCH_PREVIEW_SHA256)" --expected-canonical-sha256 "$(EXPECTED_CANONICAL_SHA256)" --repository-head "$(shell git rev-parse HEAD)" --authorize-exact-four-cell-apply

demo-dashboard-render-smoke:
@STOCK_RESEARCH_DATA_PROFILE=demo python3 -m src.dashboard_render_smoke

Expand Down
4 changes: 2 additions & 2 deletions data/fundamentals.csv
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ TSLA,EV,Consumer Discretionary,48.0,-0.0293069915037363,0.040009701878157,0.2,94
SPY,Broad Market,ETF,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
QQQ,Nasdaq Growth,ETF,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
XLF,Financials,ETF,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
AMD,,,,2.2434570906877664,0.8134734471758304,,5329000000.0,2.65,6735000000.0,,1.2638393694877088,0.6931882154250328,,,5585000000.0,4098000000.0,,1630600639.0,,,,,,sec_companyfacts,2017-12-30,2488,10-K,2018-02-27,0000002488-18-000042,EBITDA was not staged because no direct SEC EBITDA fact was available.,ADVANCED MICRO DEVICES INC,,,
AMD,,,,2.2434570906877664,0.8134734471758304,,34639000000.0,2.65,6735000000.0,,1.2638393694877088,0.6931882154250328,,,5585000000.0,4098000000.0,,1630600639.0,,,,,,sec_companyfacts,2017-12-30,2488,10-K,2026-02-04,0000002488-18-000042,EBITDA was not staged because no direct SEC EBITDA fact was available.,ADVANCED MICRO DEVICES INC,,,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Recompute FCF margin when replacing revenue

This replaces AMD's revenue denominator while retaining fcf_margin=1.263839..., which is still 6.735B / 5.329B; with the new 34.639B revenue it should be about 19.4%. The same stale-denominator problem exists for AAPL. scenario_lab._like_for_like_baseline prefers the explicit margin over recomputing it and default_scenario_parameters consequently clamps AMD's stale 126% margin to 45%, materially overstating DCF projections. Recompute the dependent margins or apply a period-coherent set of fundamentals.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep SEC filing metadata from the same filing

The AMD row now pairs a 2026-02-04 filing date with accession 0000002488-18-000042 and a 2017-12-30 period; AAPL similarly pairs its new 2025 date with a 2018 accession and period. build_research_change_snapshot treats sec_filed_date and sec_accession as one latest-filing identity, while _filing_events detects arrivals only when the accession changes, so these new filings are missed and downstream snapshots expose impossible date/accession pairs. Update the companion accession and period metadata or leave the filing date unchanged.

Useful? React with 👍 / 👎.

AVGO,,,,3.117716768714201,0.2827609363008442,,20848000000.0,4.77,26914000000.0,,1.2909631619339983,1.2223714504988488,,,14174000000.0,66057000000.0,,4734668184.0,,,,,,sec_companyfacts,2018-11-04,1730168,10-K,2018-12-21,0001730168-18-000084,EBITDA was not staged because no direct SEC EBITDA fact was available.,Broadcom Inc.,,,
COHR,,,,2.931500342667924,0.0425994611639342,,1158794000.0,-0.52,192764000.0,,0.1663488074670735,0.0829491695676712,,,1592730000.0,3193781000.0,,195639321.0,,,,,,sec_companyfacts,2018-06-30,820318,10-K,2018-08-28,0001564590-18-022409,EBITDA was not staged because no direct SEC EBITDA fact was available.,COHERENT CORP.,,,
CRDO,,,,1.263434730787169,0.1194734130845401,,436775000.0,0.29,29022000.0,,0.0664461106977276,0.0849957071718848,,,1220464000.0,,,184449940.0,,,,,,sec_companyfacts,2025-05-03,1807794,10-K,2025-07-02,0001628280-25-033813,Debt was unavailable from SEC Companyfacts. | EBITDA was not staged because no direct SEC EBITDA fact was available.,Credo Technology Group Holding Ltd,,,
HOOD,,,,0.515757370382921,0.4209702660406886,,4473000000.0,2.05,1610000000.0,,0.3599374021909233,,,,5012000000.0,,,791184698.0,,,,,,sec_companyfacts; sec_filing_document,2026-04-06,1783879,10-Q,2026-04-29,0001783879-26-000062,Debt was unavailable from SEC Companyfacts. | EBITDA was not staged because no direct SEC EBITDA fact was available. | Shares outstanding was unavailable from SEC Companyfacts. | Shares outstanding staged from explicit SEC filing document fact dei:EntityCommonStockSharesOutstanding.,"Robinhood Markets, Inc.",,,2026-06-26T01:38:24+00:00
LITE,,,,-0.0653730653730653,0.0640138408304498,,404600000.0,0.37,-104700000.0,,-0.2587740978744439,-0.4451309935739001,,,2617800000.0,6520400000.0,,77800000.0,,,,,,sec_companyfacts,2019-06-29,1633978,10-K,2019-08-27,0001633978-19-000069,EBITDA was not staged because no direct SEC EBITDA fact was available.,Lumentum Holdings Inc.,,,
META,,,,0.2216703849824621,0.3008369574952977,,200966000000.0,23.49,46109000000.0,,0.2294368201586338,0.4143785515957923,,,23426000000.0,58748000000.0,,2196045588.0,,,,,,sec_companyfacts; sec_filing_document,2026-03-09,1326801,10-Q,2026-04-30,0001628280-26-028526,EBITDA was not staged because no direct SEC EBITDA fact was available. | Shares outstanding was unavailable from SEC Companyfacts. | Shares outstanding staged from explicit SEC filing document fact dei:EntityCommonStockSharesOutstanding.,"Meta Platforms, Inc.",,,2026-06-26T01:41:27+00:00
MU,,,,2.897781197896627,0.2809713401994011,,30391000000.0,7.59,1668000000.0,,0.0548846698035602,0.3214767529860814,,,13908000000.0,3624000000.0,,1127734051.0,,,,,,sec_companyfacts,2018-08-30,723125,10-K,2018-10-15,0000723125-18-000092,EBITDA was not staged because no direct SEC EBITDA fact was available.,MICRON TECHNOLOGY INC,,,
AAPL,,,,3.9862949403923778,0.42173233682863,,265595000000.0,7.46,98767000000.0,,0.3718707053973155,0.5009506956079746,,,45572000000.0,82714000000.0,,14687356000.0,,,,,,sec_companyfacts,2018-09-29,320193,10-K,2018-11-05,0000320193-18-000145,EBITDA was not staged because no direct SEC EBITDA fact was available.,Apple Inc.,,,
AAPL,,,,3.9862949403923778,0.42173233682863,,416161000000.0,7.46,98767000000.0,,0.3718707053973155,0.5009506956079746,,,45572000000.0,82714000000.0,,14687356000.0,,,,,,sec_companyfacts,2018-09-29,320193,10-K,2025-10-31,0000320193-18-000145,EBITDA was not staged because no direct SEC EBITDA fact was available.,Apple Inc.,,,
GOOGL,,,,0.1509008108154437,0.3280987796522654,,402836000000.0,10.81,73266000000.0,,0.1818755026859565,0.3203263859238002,,,38063000000.0,79499000000.0,,5824000000.0,,,,,,sec_companyfacts; sec_filing_document,2026-03-16,1652044,10-Q,2026-04-30,0001652044-26-000048,EBITDA was not staged because no direct SEC EBITDA fact was available. | Shares outstanding was unavailable from SEC Companyfacts. | Shares outstanding staged from explicit SEC filing document fact dei:EntityCommonStockSharesOutstanding.,Alphabet Inc.,,,2026-06-26T01:36:19+00:00
A,,,,0.0642551166111375,0.2913685152057245,,4472000000.0,4.57,1152000000.0,,0.257602862254025,0.3307245080500894,,,1758000000.0,3034000000.0,,282602317.0,,,,,,sec_companyfacts,2017-10-31,1090872,10-K,2017-12-21,0001090872-17-000018,EBITDA was not staged because no direct SEC EBITDA fact was available.,"AGILENT TECHNOLOGIES, INC.",,,
ABBV,,,,0.0856676252352043,0.0690974493132766,,61160000000.0,2.36,17816000000.0,,0.2913015042511445,0.2464846304774362,,,9391000000.0,0.0,,1766792821.0,,,,,,sec_companyfacts,2025-12-31,1551152,10-K,2026-02-20,0001551152-26-000008,EBITDA was not staged because no direct SEC EBITDA fact was available.,AbbVie Inc.,,,
Expand Down
1 change: 1 addition & 0 deletions data/reviewed_batch_proofs.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
batch_id,review_date,reviewer,lane,scope,tickers,command_run,validation_result,preview_result,apply_result,pre_run_readiness_snapshot,post_run_readiness_snapshot,changed_readiness_counts,changed_tickers,source_files,generated_artifacts_reviewed,final_outcome,notes
RB-20260820-SEC-DIRECT-001,2026-08-20,owner-authorized Codex review,fundamentals,exact SEC direct-field canonical apply,"AAPL,AMD",hash-guarded exact four-cell apply,make validate-data passed; affected tests passed; Research render smoke passed,inspection-only patch preview sha256=8d0da6bdd2dd52a938adcd1e882031fd3f278d3fc245151943f6f0d2c0e91553; projection identity=4749c18918220d53ca2d2dc27492bd81cec3f83dc11fb85d71848e9b899b616a,applied exact four cells; receipt sha256=af7d95169fdf568bfee93cc2f90dc94ce15b28326dbb3ab1c372f69715aaa944,saved readiness stale; no materialization,saved readiness stale; unchanged,no readiness counts changed,"AAPL,AMD",data/fundamentals.csv,only the exact reviewed canonical fundamentals artifact retained; all other generated churn excluded,human_reviewed_supported,"{""apply_receipt_sha256"":""af7d95169fdf568bfee93cc2f90dc94ce15b28326dbb3ab1c372f69715aaa944"",""canonical_after_sha256"":""6cd354f2cf2a2733224ec3a1ac2cbd70a0374cee5c55d18f7e680716c5aefc99"",""canonical_before_sha256"":""1b27ac9b31f9316177dfe060e21a90111d32c632104801ba4decae741ec0c418"",""changed_cells"":[""AMD:revenue"",""AMD:sec_filed_date"",""AAPL:revenue"",""AAPL:sec_filed_date""],""patch_preview_sha256"":""8d0da6bdd2dd52a938adcd1e882031fd3f278d3fc245151943f6f0d2c0e91553"",""readiness_mutated"":false}"
RB-20260613T012355Z,2026-06-12,local reviewer,peers,top 10 peer reviewed batch packet,"AAPL,MSFT,CRDO,QQQ,SMH,AACB,AACI,AACO,AAPG,AARD",make coverage-frontier TOP_N=10 && make reviewed-batch LANE=peers TOP_N=10 && make peer-mapping-queue TOP_N=25,not_run_read_only,not_run_read_only,not_run_no_source_proof,peer-ready 9/3538; peer valuation inputs blocked,peer queue still shows 3512 missing source-backed mapping rows and 15 mapped rows waiting on peer valuation inputs,none; no data applied,none,outputs/reviewed_batch_packet.md; outputs/reviewed_batch_packet.csv; data/reports/peer_unlock_worklist.csv,kept reviewed packet and batch proof ledger; broad generated CSV churn excluded,skipped,Read-only peer lane pilot. Source proof was not applied; peer mapping and peer valuation inputs remain review-gated.
RB-20260613T014434Z,2026-06-12,local reviewer,prices,top 10 price reviewed batch packet plus 3500-candidate dry run,"ARCT,ARDX,ARE,ARQT,ARRY,ARVN,ARW,ARWR,ASAN,ASB",make reviewed-batch LANE=prices TOP_N=10 && make price-refresh-loop DRY_RUN=1 MAX_CANDIDATES=3500 TOP_N=100 PROVIDER=yahoo && make reviewed-batch-compare LANE=prices BATCH_ID=RB-20260613T014434Z REVIEW_DATE=2026-06-12 TOP_N=10,not_run_dry_run_only,dry_run_reviewed_35_capped_batches_no_provider_call,not_run_no_data_changed,missing prior snapshot; make reviewed-batch-compare reported 0 prior rows,current readiness report has 3538 rows; no real refresh was run,not available; comparison blocked by missing prior snapshot,none,outputs/reviewed_batch_packet.md; outputs/reviewed_batch_packet.csv; dry-run terminal output; data/reports/ticker_readiness_report.csv,kept reviewed packet and batch proof ledger; broad generated CSV churn excluded,skipped,"Dry-run-only price pilot. Planned 35 capped 100-ticker batches for up to 3500 missing-price candidates; no provider call, import, apply, or local data refresh was run."
RB-20260614-PRICE-COVERAGE,2026-06-14,local reviewer,prices,capped Yahoo missing-price refresh across remaining broad-universe price queue,capped_missing_price_queue; 3289 changed tickers; BF.B and BRK.B still blocked,make readiness-snapshot && make price-refresh-loop MAX_CANDIDATES=3500 TOP_N=100 PROVIDER=yahoo SLEEP_SECONDS=30 && make readiness && make status,make price-validate returned no_staged_file because no manual import file was used,make price-preview returned no_staged_file because direct capped provider refresh was used,price-refresh-loop completed capped provider refresh; no imports-apply path used,3538 rows from data/reports/ticker_readiness_report.previous.csv,3538 rows from data/reports/ticker_readiness_report.csv,overall_readiness_state blocked 3273->2 partial 265->3536; price_ready not_ready 3273->2 ready 265->3536; dcf_ready ready 23->27; peer_ready ready 9->26,"3289 changed; sample A,AAL,AAME,AAON,ABBV,ABEO,ABSI,ABT,ABTC,ABUS",data/prices.csv; outputs/price_update_status.csv; data/price_coverage_report.csv; data/reports/ticker_readiness_report.previous.csv; data/reports/ticker_readiness_report.csv,make diff-hygiene reviewed; broad generated CSV churn excluded from public commit by default,supported,"Real capped research-grade Yahoo price refresh. Price coverage now 3536/3538; BF.B and BRK.B remain provider/symbol blocked. No broker integration, order routing, auto-trading, or investment advice."
Expand Down
Loading