Contents Lesson 5 of 17

6 min read · practitioner

Which number is this field, exactly?

The previous lesson found where the statements live. This one is about the fields whose names promise more than they deliver: an outflow stored as a positive number, two things called EBITDA, a zero that means "does not apply". None of them raises an error, and each one produces a figure that looks right. Every value below was read on 29 September 2026, and the tables in the exercise are the live versions.

Signs belong to fields, not to statements

In Apple's fiscal 2025 cash flow statement, capitalExpenditures and dividendsPaid are positive, although both are money leaving the company. salePurchaseOfStock, the buyback line, is negative. Three outflows in one object, two conventions.

The published freeCashFlow settles which convention the vendor itself uses: it equals totalCashFromOperatingActivities minus capitalExpenditures, to the dollar, and nothing else. So the field is operating cash flow less capex, after interest (which sits inside operating cash flow) and with stock-based compensation already added back (stockBasedCompensation is in this statement, not the income statement). Code that "adds every outflow because outflows are negative" overstates free cash flow by twice the capex and reports nothing wrong.

One small parsing note from the same object: most values arrive as strings with two decimals, "111482000000.00", and capitalExpenditures arrived as "12715000000" with none. Parse numbers from strings; do not split on the decimal point.

One name, two windows; one word, three lines

EBITDA exists twice. Highlights.EBITDA is trailing twelve months to MostRecentQuarter; ebitda inside Financials::Income_Statement::yearly belongs to one fiscal year. For Apple they differed by about a sixth. A multiple built on one and compared with a multiple built on the other is comparing two different years.

ebit is the pre-tax line. For Apple it equals incomeBeforeTax exactly, and differs from operatingIncome by the other income and expense in between. Two defensible "EV/EBIT" figures therefore exist for one company, depending on which line you divide by.

otherOperatingExpenses is not "other". It equals costOfRevenue plus totalOperatingExpenses: total costs. Subtract it from revenue as if it were a residual and you have subtracted costs twice.

interestExpense can be null, as it is for Apple, when the filing does not break it out. Interest coverage is then not computable from this endpoint. Record "not reported", never zero: zero would claim the company borrows for free.

Zero as a placeholder

The ratio fields use 0 where the ratio does not apply, and null elsewhere, and a sort cannot tell either from a real value.

  • McDonald's has negative shareholders' equity after years of buybacks: Highlights.BookValue is negative. ReturnOnEquityTTM reads 0, beside a normal ReturnOnAssetsTTM.
  • JPMorgan's Valuation.EnterpriseValueEbitda reads 0. EBITDA means little for a bank, and the field is filled with a zero rather than left empty.
  • Rivian, loss-making, shows Highlights.PERatio and PEGRatio as null, Valuation.TrailingPE and ForwardPE as 0, and EnterpriseValueEbitda negative. Ask for filter=Highlights::PERatio on its own and the answer is the string "NA". Three spellings of "no earnings multiple" in one company.

Sort ascending on TrailingPE or EnterpriseValueEbitda and the top of the list is loss-makers and banks, not bargains. Treat 0 in a ratio field as missing until the inputs behind it say otherwise.

Totals, history, and a field that lives twice

  • The balance sheet closes on one field. totalLiab plus totalStockholderEquity does not always reach totalAssets: Starbucks' fiscal 2025 falls $7.4 million short, which is exactly its noncontrollingInterestInConsolidatedEntity. liabilitiesAndStockholdersEquity is the field that equals total assets.
  • History has a floor. Apple's yearly statements begin at fiscal 1985 although it listed in 1980, and the same 1985 floor holds for other long-listed names. Read the oldest key of the map, never IPODate.
  • Short interest lives in Technicals. SharesStats.SharesShort and ShortRatio are null for Apple while Technicals.SharesShort and ShortRatio carry the numbers; ShortPercentFloat is populated in SharesStats. Filter to the wrong section and "no short interest" is what your code reports.
  • A period has two dates. Each statement entry carries date, the period end, and filing_date, when it became public: Apple's year to 30 September 2025 was filed on 31 October. A backtest that joins on date trades on numbers nobody had yet.
  • epsActual is not the statements' EPS. Earnings::History carries the figure consensus is scored against, which for many filers is the company's adjusted number. Snowflake's quarter to 30 April 2026 shows epsActual 0.39 beside a statement netIncome of about −296 million dollars.
  • Holders is a top list. Holders.Institutions returned 20 rows and Holders.Funds 10 for Apple. Summing them gives the largest holders' share, not institutional ownership; that figure is SharesStats.PercentInstitutions.

Try it now

  1. Here is Apple's newest annual cash flow statement, the signed lines. Check that freeCashFlow is operating cash flow minus capitalExpenditures. Then write, for each of the three outflow lines, the sign your code must apply before summing.
Live API response: mda4 apple cash flow signs
  1. Here is the same year's income statement between revenue and tax, then the EBITDA in Highlights. Find the two fields that are equal, check what otherOperatingExpenses is the sum of, and write down the period each EBITDA covers.
Live API response: mda4 apple profit lines
Live API response: mda4 apple ebitda ttm
  1. Here are McDonald's, JPMorgan and Rivian. For every 0 and every dash, say whether it is a measurement, a placeholder or a missing value, and what a screen sorted ascending on that field would do with the company.
Live API response: mda4 mcd negative equity
Live API response: mda4 jpm valuation
Live API response: mda4 rivn loss maker multiples
  1. Here are Apple's SharesStats and Technicals from one call. Say which section your short-interest code should read, and which field it still needs from the other.
Live API response: mda4 apple short interest two sections
  1. Here is Snowflake's quarter to 30 April 2026 twice, from Earnings::History and from the quarterly income statement. Say which of the two a "beat" is measured on, and count the days between the period end and reportDate. Then do the same count for Apple's year from date and filing_date in the step 2 table.
Live API response: mda4 snow eps actual q1 2026
Live API response: mda4 snow net income q1 2026