Skip to content
Ti
← All Projects

APPLIED FINANCE LAB / 05

Finance Data Analysis

A SQL-based data validation and reporting exercise using Apple's SEC EDGAR financial history.

SQLData ValidationExcelReporting

SNAPSHOT — AS OF SEPTEMBER 2026

31.97%

Strongest Operating Margin (FY25)

26.92%

Strongest Net Margin (FY25)

0

Data-Validation Exceptions Found

Question / Objective

Build a small, structured financial dataset from Apple's SEC filings, validate it with basic SQL queries, and produce a clean reporting output — a practical exercise in the kind of data preparation and validation work that sits behind any finance analysis.

Course-Concept Connection

  • Financial Modeling
  • FIN 3063 — Computer Modeling of Financial Applications
  • FIN 3603 — Introduction to Data Science for Finance Majors

Data Sources

Methodology

  1. 1.Pulled Apple's fiscal-year revenue, operating income, and net income for FY2021–FY2025 directly from three separate SEC EDGAR XBRL company-concept endpoints, rather than a single combined pull, to practice assembling a dataset from multiple structured sources.
  2. 2.Loaded the five years of figures into a small local table (fiscal year, period end, revenue, operating income, net income) to enable structured querying rather than manual spreadsheet lookups.
  3. 3.Wrote basic SQL queries (SELECT, WHERE, ORDER BY, JOIN, and aggregate functions like AVG and MAX) to calculate operating and net margin by year, identify the strongest-margin year, flag any year with a year-over-year revenue decline, and run a simple data-validation check.
  4. 4.Cross-checked every query result against the same underlying figures already used in the Corporate Financial Analysis & Capital Budgeting and Financial Modeling & Forecasting analyses on this site, confirming consistency across all three.

Assumptions

  • This is a small, five-row dataset built for practice — the SQL techniques used (SELECT, WHERE, JOIN, and basic aggregates) are basic/foundational, not a demonstration of advanced database administration or large-scale data engineering.
  • Fiscal-year figures are as originally reported in each year's 10-K, not restated for any subsequent accounting changes.

Analysis

Query Output — Margins by Fiscal Year

Result of a basic SQL query joining revenue, operating income, and net income by fiscal year and computing margin percentages.

Fiscal YearRevenueOperating MarginNet Margin
FY2021$365.8B29.78%25.88%
FY2022$394.3B30.29%25.31%
FY2023$383.3B29.82%25.31%
FY2024$391.0B31.51%23.97%
FY2025$416.2B31.97%26.92%

Basic SQL Queries Used

Written and run against a small local table (fiscal_year, period_end, revenue, operating_income, net_income) built from the SEC EDGAR figures above.

SELECT fiscal_year, revenue,
       ROUND(operating_income * 100.0 / revenue, 2) AS operating_margin_pct
FROM apple_financials
ORDER BY fiscal_year;
-- Years where revenue declined year-over-year
SELECT curr.fiscal_year, curr.revenue, prev.revenue AS prior_year_revenue,
       ROUND((curr.revenue - prev.revenue) * 100.0 / prev.revenue, 2) AS yoy_growth_pct
FROM apple_financials curr
JOIN apple_financials prev ON curr.fiscal_year = prev.fiscal_year + 1
WHERE curr.revenue < prev.revenue;
-- Data validation: net income should never exceed operating income
SELECT fiscal_year FROM apple_financials
WHERE net_income > operating_income;

Key Findings

  • Operating margin rose from 29.78% (FY2021) to 31.97% (FY2025); a SQL query confirmed FY2023 is the only year in the window where revenue fell year-over-year (down 2.8% from FY2022), yet operating margin that year (29.82%) held roughly flat versus FY2021.
  • Net margin was more variable than operating margin across the window, ranging from 23.97% (FY2024) to 26.92% (FY2025) — a reminder that items below the operating line (taxes, other income/expense) don't always move in step with operating performance.
  • FY2025 had both the strongest operating margin (31.97%) and the strongest net margin (26.92%) of the five years, identified directly by a SQL query rather than manual inspection.
  • A data-validation query checking that net income never exceeds operating income (which would flag a likely data error) returned no exceptions across all five years.

Limitations

  • • This is a very small dataset (five rows) built for practice with basic SQL — it is not a demonstration of production-scale data engineering or database administration.
  • • Figures are pulled from three separate SEC EDGAR XBRL concept endpoints rather than one unified source; all five years used the same XBRL tag per concept for consistency, but minor definitional differences between tags are possible across companies or filing years in general.
  • • This is not investment advice.
Tools used: SQL (basic), SEC EDGAR XBRL API, Data validation, ReportingLast updated: September 2026

This independent analysis was developed for portfolio demonstration using concepts from Tazreen Islam's Finance education at UTSA. It is not an original course submission and is not investment advice or a recommendation to buy or sell any security.

AI-assisted workflow: AI tools were used to support research, model development, coding, and validation. Source data, assumptions, calculations, and conclusions were reviewed against underlying sources before publication.