Urgent.News

What's breaking now, across thousands of outlets.

Tech

The fy field in SEC XBRL data doesn't mean what you think

The SEC gives you every US public company's financials for free through data.sec.gov . No key, no signup. It's one of the best free datasets in finance, and it's easy to get wrong. Here's Apple's net income from the companyfacts endpoint, filtered the way most people would try first: fy == 2025 and form == "10-K" . start end value fp frame 2022-09-25 2023-09-30 96 , 995 , 000 , 000 FY CY 2023…

The Federal Communications Commission (SEC) provides completely free access to financial data for all publicly traded US companies via data.sec.gov. Despite being incredibly easy to use, many analysts and investors misuse its data, leading to incorrect conclusions. A simple example with Apple Inc.'s financial data illustrates the pitfalls.

When querying the SEC data for Apple's net income for the fiscal year 2025 using the endpoint 'companyfacts' with filters 'fy == 2025' and 'form == 10-K', three different data points are returned, all tagged with 'fy: 2025'. This is misleading because 'fy' represents the fiscal year of the filing, not the fiscal year of the financial figures.

Apple's 2025 10-K report includes three years of income statement data - 2023, 2024, and 2025 - and each figure for net income is tagged with 'fy: 2025'. If a programmer only takes the first matching entry, they would incorrectly report Apple's 2023 net income as 2025's.

The issue isn't just about tags changing over time, but also about the fact that fiscal years don't always align with calendar years. Apple's fiscal year 2023, for instance, ran for 371 days as it was a 53-week year, while Microsoft's fiscal year ends in June and NVIDIA's fiscal year ends in late January. Furthermore, a 10-K filing may contain both year-to-date and annual values under the same tag, leading to confusion.

One cannot simply rely on the 'fy' tag to accurately categorize financial data. Instead, analysts should focus on the period itself to determine the fiscal year of the reported figures. If a period has a start date, its duration can be used to classify it as annual or quarterly. Periods without a start date represent a balance-sheet snapshot and need to be classified based on the filing form - 10-K for annual reports and 10-Q for quarterly reports.

A robust method would be to key each value by its period end date and retain only the most recent filing for each metric. For each key metric, a priority list of tags should be established and values merged by period to prevent gaps when tags change. This approach ensures accurate and consistent representation of financial data.

For those who find it challenging to manage these complexities, Apify, a web automation platform, offers an SEC EDGAR Filings & Financials actor. By providing a list of tickers, this tool returns normalized annual and quarterly statements along with the most recent company filings.

Lastly, when interacting with the SEC data, it's crucial to include a User-Agent with a contact email in the request headers to avoid being blocked due to lack of identification. Additionally, adhering to a limit of 10 requests per second can help maintain a good rapport with the SEC's servers.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Doom Ran Inside TypeScript's Type Checker. Here's How Types Execute Code

Book: The TypeScript Type System Also by me: The TypeScript Library — the 5-book collection My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools…

  • In February 2025, TypeScript type checker ran entire Doom game using WebAssembly
  • Type checker evaluated 20 million type instantiations per second
  • Type system used conditional types, infer, and template literals to create complex programs

My first DEV Post

🚀 Starting My Developer Journey: Learning, Building, and Growing Hey everyone! 👋 I'm a B.Tech student passionate about software development, Artificial Intelligence, and Machine Learning.

Null Is Not Zero: What an MCP Tool Description Has to Carry

A REST API's documentation is read by a developer once. An MCP tool description is the one piece of text a model reads on every single call, which makes it where you stop an agent misreporting your…

  • MCP tool description crucial for model's accuracy
  • Null ROI not zero, score not return, negative numbers correct
  • Guardrails in descriptions prevent incorrect data summarization

More from Wednesday 14 October →