> This page is for API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.spreadspace.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.spreadspace.app/_mcp/server.

# Attribute catalog

An attribute snapshot holds a loan's finished figures as data: `attributes`
for money and counts, `ratios` for coverage and margins. Both are keyed by the
names below. This page lists the full fixed vocabulary, 184 attributes
and 21 ratios, generated from the same registry the snapshots are built
from. If a name is here, you can key on it.

Names are stable. If a snapshot does not include a name, the loan's documents
did not state that figure. Keys are never dropped from a period map, so a
missing year inside an attribute reads `null` instead of disappearing. Value
formats follow the [value conventions](/api/conventions): money is a 2-decimal
string, ratios and percents carry 4 decimals.

Four families are named after something an analyst typed or a return printed,
so they cannot be listed here. They are described at the end of this page.

Every entry has a `label` and a `unit`, plus a `basis` where one applies
(every value it can take is listed under [Basis](#basis) below). A label marked
*(as the return words it)* follows the filed return's own wording for that
line. Where per-form wordings are listed, the label changes with the form. A
ratio whose basis reads **Per snapshot** takes its basis from the years in that
snapshot: book where the return states books, tax elsewhere, and `mixed` when
the filed years disagree.

## Filed return, tax basis

Figures as they appear on the filed business return. Every name starts with `tax_return_tax_` and every entry has `basis: "tax"`.

| Name                                                  | Label                                                                               | Unit    | Basis |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------- | ------- | ----- |
| `tax_return_tax_advertising`                          | Advertising                                                                         | `money` | `tax` |
| `tax_return_tax_amortization`                         | Amortization                                                                        | `money` | `tax` |
| `tax_return_tax_amortization_deducted`                | Amortization deducted                                                               | `money` | `tax` |
| `tax_return_tax_bad_debts`                            | Bad debts                                                                           | `money` | `tax` |
| `tax_return_tax_bank_fees`                            | Bank service charges                                                                | `money` | `tax` |
| `tax_return_tax_cogs`                                 | Cost of goods sold                                                                  | `money` | `tax` |
| `tax_return_tax_cogs_labor`                           | Cost of labor (COGS)                                                                | `money` | `tax` |
| `tax_return_tax_depletion`                            | Depletion                                                                           | `money` | `tax` |
| `tax_return_tax_depreciation`                         | Depreciation                                                                        | `money` | `tax` |
| `tax_return_tax_depreciation_form_4562`               | Depreciation deducted                                                               | `money` | `tax` |
| `tax_return_tax_dividend_income`                      | Dividend income                                                                     | `money` | `tax` |
| `tax_return_tax_ebitda`                               | EBITDA (tax basis)                                                                  | `money` | `tax` |
| `tax_return_tax_ebitda_adjusted`                      | Adjusted EBITDA (tax basis)                                                         | `money` | `tax` |
| `tax_return_tax_employee_benefits`                    | Employee benefits                                                                   | `money` | `tax` |
| `tax_return_tax_gross_profit`                         | Gross profit                                                                        | `money` | `tax` |
| `tax_return_tax_gross_receipts`                       | Gross receipts                                                                      | `money` | `tax` |
| `tax_return_tax_gross_royalties`                      | Gross royalties                                                                     | `money` | `tax` |
| `tax_return_tax_interest_expense`                     | Interest expense                                                                    | `money` | `tax` |
| `tax_return_tax_interest_income`                      | Interest income                                                                     | `money` | `tax` |
| `tax_return_tax_management_fees`                      | Management fees                                                                     | `money` | `tax` |
| `tax_return_tax_net_capital_gain`                     | Net capital gain                                                                    | `money` | `tax` |
| `tax_return_tax_net_gain_form_4797`                   | Taxable gain (loss), Form 4797 *(as the return words it)*                           | `money` | `tax` |
| `tax_return_tax_officer_compensation`                 | Officer compensation *(as the return words it)*                                     | `money` | `tax` |
| `tax_return_tax_ordinary_business_income`             | Ordinary business income (loss)                                                     | `money` | `tax` |
| `tax_return_tax_ordinary_income`                      | Ordinary business income (loss) *(as the return words it)*                          | `money` | `tax` |
| `tax_return_tax_other_deductions`                     | Other deductions                                                                    | `money` | `tax` |
| `tax_return_tax_other_income`                         | Other income                                                                        | `money` | `tax` |
| `tax_return_tax_other_operating_expenses`             | Other operating expenses                                                            | `money` | `tax` |
| `tax_return_tax_owner_compensation`                   | Owner compensation *(1065: Guaranteed payments; 1120, 1120s: Officer compensation)* | `money` | `tax` |
| `tax_return_tax_payroll_taxes`                        | Payroll taxes                                                                       | `money` | `tax` |
| `tax_return_tax_pension`                              | Pension                                                                             | `money` | `tax` |
| `tax_return_tax_professional_services`                | Professional & contract services                                                    | `money` | `tax` |
| `tax_return_tax_rent`                                 | Rents                                                                               | `money` | `tax` |
| `tax_return_tax_rental_expenses`                      | Real Estate Rental Expenses (total)                                                 | `money` | `tax` |
| `tax_return_tax_rental_gross_rents`                   | Gross Rents (total)                                                                 | `money` | `tax` |
| `tax_return_tax_rental_net_income`                    | Net Rental Income                                                                   | `money` | `tax` |
| `tax_return_tax_rental_noi`                           | Net operating income (rental real estate)                                           | `money` | `tax` |
| `tax_return_tax_rental_noi_adjusted`                  | Adjusted net operating income (rental real estate)                                  | `money` | `tax` |
| `tax_return_tax_repairs_maintenance`                  | Repairs & maintenance                                                               | `money` | `tax` |
| `tax_return_tax_research_development`                 | Research & development                                                              | `money` | `tax` |
| `tax_return_tax_returns_allowances`                   | Returns & allowances                                                                | `money` | `tax` |
| `tax_return_tax_revenue_net`                          | Net revenue                                                                         | `money` | `tax` |
| `tax_return_tax_salaries_payroll_taxes_benefits`      | Salaries, payroll taxes & benefits *(as the return words it)*                       | `money` | `tax` |
| `tax_return_tax_salaries_wages`                       | Salaries and wages                                                                  | `money` | `tax` |
| `tax_return_tax_schedule_l_accounts_payable`          | Accounts payable                                                                    | `money` | `tax` |
| `tax_return_tax_schedule_l_accounts_receivable_net`   | Accounts receivable, net                                                            | `money` | `tax` |
| `tax_return_tax_schedule_l_accumulated_depreciation`  | Accumulated depreciation                                                            | `money` | `tax` |
| `tax_return_tax_schedule_l_cash`                      | Cash & equivalents                                                                  | `money` | `tax` |
| `tax_return_tax_schedule_l_current_assets`            | Current assets                                                                      | `money` | `tax` |
| `tax_return_tax_schedule_l_current_liabilities`       | Current liabilities                                                                 | `money` | `tax` |
| `tax_return_tax_schedule_l_gross_ppe`                 | Gross PP\&E                                                                         | `money` | `tax` |
| `tax_return_tax_schedule_l_inventories`               | Inventories                                                                         | `money` | `tax` |
| `tax_return_tax_schedule_l_land`                      | Land                                                                                | `money` | `tax` |
| `tax_return_tax_schedule_l_loans_from_shareholders`   | Loans from shareholders *(as the return words it)*                                  | `money` | `tax` |
| `tax_return_tax_schedule_l_mortgages_notes_over_1yr`  | Mortgages / notes payable ≥ 1 yr *(as the return words it)*                         | `money` | `tax` |
| `tax_return_tax_schedule_l_mortgages_notes_under_1yr` | Mortgages & notes under 1 year                                                      | `money` | `tax` |
| `tax_return_tax_schedule_l_net_ppe`                   | Net PP\&E                                                                           | `money` | `tax` |
| `tax_return_tax_schedule_l_other_assets`              | Other assets                                                                        | `money` | `tax` |
| `tax_return_tax_schedule_l_other_current_assets`      | Other current assets                                                                | `money` | `tax` |
| `tax_return_tax_schedule_l_other_current_liabilities` | Other current liabilities                                                           | `money` | `tax` |
| `tax_return_tax_schedule_l_other_investments`         | Other investments                                                                   | `money` | `tax` |
| `tax_return_tax_schedule_l_other_liabilities`         | Other liabilities                                                                   | `money` | `tax` |
| `tax_return_tax_schedule_l_total_assets`              | Total assets                                                                        | `money` | `tax` |
| `tax_return_tax_schedule_l_total_equity`              | Total equity                                                                        | `money` | `tax` |
| `tax_return_tax_schedule_l_total_liabilities`         | Total liabilities                                                                   | `money` | `tax` |
| `tax_return_tax_taxes_licenses`                       | Taxes & licenses                                                                    | `money` | `tax` |
| `tax_return_tax_taxes_licenses_excl_payroll`          | Taxes & licenses (excl. payroll & income tax)                                       | `money` | `tax` |
| `tax_return_tax_total_deductions`                     | Total deductions                                                                    | `money` | `tax` |
| `tax_return_tax_total_operating_expenses`             | Total operating expenses                                                            | `money` | `tax` |

## Filed return, book basis

Book-basis figures read from the same returns, present only on years where the return states a book reconciliation. Every name starts with `tax_return_book_` and every entry has `basis: "book"`.

| Name                                              | Label                               | Unit    | Basis  |
| ------------------------------------------------- | ----------------------------------- | ------- | ------ |
| `tax_return_book_amortization`                    | Amortization                        | `money` | `book` |
| `tax_return_book_capital_gains`                   | Capital gains (Schedule D)          | `money` | `book` |
| `tax_return_book_charitable_contributions`        | Charitable contributions            | `money` | `book` |
| `tax_return_book_cogs`                            | Cost of goods sold                  | `money` | `book` |
| `tax_return_book_depreciation`                    | Depreciation                        | `money` | `book` |
| `tax_return_book_depreciation_amortization_total` | Total depreciation & amortization   | `money` | `book` |
| `tax_return_book_ebit`                            | EBIT                                | `money` | `book` |
| `tax_return_book_ebitda`                          | EBITDA (book per return)            | `money` | `book` |
| `tax_return_book_ebitda_adjusted`                 | Adjusted EBITDA (book per return)   | `money` | `book` |
| `tax_return_book_gain_loss_on_disposals`          | Book gain (loss) on asset disposals | `money` | `book` |
| `tax_return_book_gross_profit`                    | Gross profit                        | `money` | `book` |
| `tax_return_book_gross_receipts`                  | Gross receipts                      | `money` | `book` |
| `tax_return_book_interest_expense`                | Interest expense                    | `money` | `book` |
| `tax_return_book_interest_income`                 | Interest income                     | `money` | `book` |
| `tax_return_book_meals_entertainment`             | Meals & entertainment               | `money` | `book` |
| `tax_return_book_net_income`                      | Net income per books                | `money` | `book` |
| `tax_return_book_operating_income`                | Operating income                    | `money` | `book` |
| `tax_return_book_other_income`                    | Other income                        | `money` | `book` |
| `tax_return_book_returns_allowances`              | Returns & allowances                | `money` | `book` |
| `tax_return_book_revenue_net`                     | Net revenue                         | `money` | `book` |
| `tax_return_book_tax_provision`                   | Tax provision                       | `money` | `book` |
| `tax_return_book_total_operating_expenses`        | Total operating expenses            | `money` | `book` |

## Filed return ratios

Ratios built from the filed returns. Each carries a `basis` that says which family its figures came from.

| Name                                               | Label                                                                                                                                                             | Unit      | Basis            |
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ---------------- |
| `tax_return_adjusted_ebitda_margin_percent`        | Adjusted EBITDA margin                                                                                                                                            | `percent` | Per snapshot     |
| `tax_return_allowance_percent_of_gross_ar`         | Allowance for bad debts as a share of gross receivables                                                                                                           | `percent` | `tax_return_tax` |
| `tax_return_cash_ratio`                            | Cash ratio (Schedule L)                                                                                                                                           | `ratio`   | `tax_return_tax` |
| `tax_return_cogs_percent_of_revenue`               | Cost of goods sold as a share of net revenue                                                                                                                      | `percent` | `tax_return_tax` |
| `tax_return_current_ratio`                         | Current ratio (Schedule L)                                                                                                                                        | `ratio`   | `tax_return_tax` |
| `tax_return_ebitda_margin_percent`                 | EBITDA margin                                                                                                                                                     | `percent` | Per snapshot     |
| `tax_return_gross_margin_percent`                  | Gross margin                                                                                                                                                      | `percent` | `tax_return_tax` |
| `tax_return_interest_coverage`                     | Interest coverage (EBITDA / interest expense)                                                                                                                     | `ratio`   | Per snapshot     |
| `tax_return_interest_coverage_adjusted`            | Interest coverage (adjusted EBITDA / interest expense)                                                                                                            | `ratio`   | Per snapshot     |
| `tax_return_net_income_margin_percent`             | Net income margin                                                                                                                                                 | `percent` | Per snapshot     |
| `tax_return_opex_percent_of_gross_profit`          | Operating expenses as a share of gross profit                                                                                                                     | `percent` | `tax_return_tax` |
| `tax_return_opex_percent_of_revenue`               | Operating expenses as a share of net revenue                                                                                                                      | `percent` | `tax_return_tax` |
| `tax_return_owner_compensation_percent_of_revenue` | Owner compensation as a share of net revenue *(1065: Guaranteed payments as a share of net revenue; 1120, 1120s: Officer compensation as a share of net revenue)* | `percent` | `tax_return_tax` |
| `tax_return_quick_ratio`                           | Quick ratio (Schedule L)                                                                                                                                          | `ratio`   | `tax_return_tax` |
| `tax_return_revenue_growth_percent`                | Revenue growth                                                                                                                                                    | `percent` | `tax_return_tax` |

## Company-prepared statements

Figures from company-prepared statements, agings and debt schedules, never from a return. Every name starts with `company_reported_`.

| Name                                                   | Label                                    | Unit      | Basis              |
| ------------------------------------------------------ | ---------------------------------------- | --------- | ------------------ |
| `company_reported_accounts_payable`                    | Accounts payable                         | `money`   |                    |
| `company_reported_accounts_receivable`                 | Accounts receivable                      | `money`   |                    |
| `company_reported_ap_aging_total`                      | Accounts payable aging total             | `money`   |                    |
| `company_reported_ar_aging_total`                      | Accounts receivable aging total          | `money`   |                    |
| `company_reported_beginning_cash`                      | Cash at beginning of period              | `money`   |                    |
| `company_reported_cash`                                | Cash                                     | `money`   |                    |
| `company_reported_cash_from_financing`                 | Net cash from financing activities       | `money`   |                    |
| `company_reported_cash_from_investing`                 | Net cash from investing activities       | `money`   |                    |
| `company_reported_cash_from_operations`                | Net cash from operating activities       | `money`   |                    |
| `company_reported_cash_ratio`                          | Cash ratio                               | `ratio`   | `company_reported` |
| `company_reported_cogs`                                | Cost of revenue                          | `money`   |                    |
| `company_reported_cogs_depreciation`                   | Depreciation                             | `money`   |                    |
| `company_reported_cogs_inventory`                      | Inventory                                | `money`   |                    |
| `company_reported_cogs_labor`                          | Labor (COGS)                             | `money`   |                    |
| `company_reported_cogs_other_costs`                    | Other costs                              | `money`   |                    |
| `company_reported_cogs_purchases`                      | Purchases                                | `money`   |                    |
| `company_reported_current_assets`                      | Total current assets                     | `money`   |                    |
| `company_reported_current_liabilities`                 | Total current liabilities                | `money`   |                    |
| `company_reported_current_ratio`                       | Current ratio                            | `ratio`   | `company_reported` |
| `company_reported_debt_schedule_total_balance`         | Debt schedule total balance              | `money`   |                    |
| `company_reported_debt_schedule_total_payment`         | Debt schedule total periodic payment     | `money`   |                    |
| `company_reported_debt_to_equity`                      | Debt to equity                           | `ratio`   | `company_reported` |
| `company_reported_depreciation_amortization`           | Depreciation & amortization              | `money`   |                    |
| `company_reported_distributions`                       | Distributions                            | `money`   |                    |
| `company_reported_ebitda`                              | EBITDA per financial statements          | `money`   |                    |
| `company_reported_ebitda_adjusted`                     | Adjusted EBITDA per financial statements | `money`   |                    |
| `company_reported_ending_cash`                         | Cash at end of period                    | `money`   |                    |
| `company_reported_equity`                              | Total equity                             | `money`   |                    |
| `company_reported_gross_margin_percent`                | Gross margin                             | `percent` | `company_reported` |
| `company_reported_gross_profit`                        | Gross profit                             | `money`   |                    |
| `company_reported_income_tax_expense`                  | Income tax expense                       | `money`   |                    |
| `company_reported_interest_expense`                    | Interest expense                         | `money`   |                    |
| `company_reported_inventory`                           | Inventory                                | `money`   |                    |
| `company_reported_net_change_in_cash`                  | Net change in cash                       | `money`   |                    |
| `company_reported_net_income`                          | Net income                               | `money`   |                    |
| `company_reported_net_margin_percent`                  | Net margin                               | `percent` | `company_reported` |
| `company_reported_noi`                                 | Net operating income                     | `money`   |                    |
| `company_reported_noi_adjusted`                        | Adjusted net operating income            | `money`   |                    |
| `company_reported_officer_compensation`                | Officer compensation                     | `money`   |                    |
| `company_reported_operating_expenses`                  | Operating expenses                       | `money`   |                    |
| `company_reported_operating_income`                    | Operating income                         | `money`   |                    |
| `company_reported_opex_administrative`                 | Administrative                           | `money`   |                    |
| `company_reported_opex_advertising`                    | Advertising                              | `money`   |                    |
| `company_reported_opex_amortization`                   | Amortization                             | `money`   |                    |
| `company_reported_opex_auto_and_vehicle`               | Auto and vehicle                         | `money`   |                    |
| `company_reported_opex_bad_debts`                      | Bad debts                                | `money`   |                    |
| `company_reported_opex_bank_charges`                   | Bank charges                             | `money`   |                    |
| `company_reported_opex_charitable_contributions`       | Charitable contributions                 | `money`   |                    |
| `company_reported_opex_commissions`                    | Commissions                              | `money`   |                    |
| `company_reported_opex_depreciation`                   | Depreciation                             | `money`   |                    |
| `company_reported_opex_depreciation_amortization`      | Depreciation & amortization              | `money`   |                    |
| `company_reported_opex_employee_benefits`              | Employee benefits                        | `money`   |                    |
| `company_reported_opex_insurance`                      | Insurance                                | `money`   |                    |
| `company_reported_opex_labor_cost`                     | Labor cost                               | `money`   |                    |
| `company_reported_opex_meals`                          | Meals                                    | `money`   |                    |
| `company_reported_opex_office_and_supplies`            | Office and supplies                      | `money`   |                    |
| `company_reported_opex_officer_compensation`           | Officer compensation                     | `money`   |                    |
| `company_reported_opex_other_ga`                       | Other G\&A                               | `money`   |                    |
| `company_reported_opex_payroll_taxes`                  | Payroll taxes                            | `money`   |                    |
| `company_reported_opex_pension_and_profit_sharing`     | Pension and profit-sharing plans         | `money`   |                    |
| `company_reported_opex_professional_fees_and_services` | Professional fees and services           | `money`   |                    |
| `company_reported_opex_rent`                           | Rent                                     | `money`   |                    |
| `company_reported_opex_repairs_and_maintenance`        | Repairs and maintenance                  | `money`   |                    |
| `company_reported_opex_research_and_development`       | Research and development                 | `money`   |                    |
| `company_reported_opex_salaries_and_wages`             | Salaries and wages                       | `money`   |                    |
| `company_reported_opex_software_and_subscriptions`     | Software and subscriptions               | `money`   |                    |
| `company_reported_opex_taxes_and_licenses`             | Taxes and licenses                       | `money`   |                    |
| `company_reported_opex_travel_and_entertainment`       | Travel and entertainment                 | `money`   |                    |
| `company_reported_opex_unclassified`                   | Unclassified                             | `money`   |                    |
| `company_reported_opex_utilities`                      | Utilities                                | `money`   |                    |
| `company_reported_opex_workers_compensation`           | Workers compensation                     | `money`   |                    |
| `company_reported_other_income_expense`                | Other income (expense)                   | `money`   |                    |
| `company_reported_pretax_income`                       | Income before taxes                      | `money`   |                    |
| `company_reported_quick_ratio`                         | Quick ratio                              | `ratio`   | `company_reported` |
| `company_reported_rent_expense`                        | Rent expense                             | `money`   |                    |
| `company_reported_rental_income`                       | Rental income                            | `money`   |                    |
| `company_reported_revenue`                             | Revenue                                  | `money`   |                    |
| `company_reported_revenue_other`                       | Other                                    | `money`   |                    |
| `company_reported_revenue_returns_allowances`          | Returns and allowances                   | `money`   |                    |
| `company_reported_revenue_sales`                       | Sales                                    | `money`   |                    |
| `company_reported_revenue_unclassified`                | Unclassified                             | `money`   |                    |
| `company_reported_total_assets`                        | Total assets                             | `money`   |                    |
| `company_reported_total_liabilities`                   | Total liabilities                        | `money`   |                    |
| `company_reported_total_liabilities_and_equity`        | Total liabilities and equity             | `money`   |                    |
| `company_reported_working_capital`                     | Working capital                          | `money`   |                    |

## Personal return (Form 1040)

Figures from a guarantor's personal return, carried by a snapshot finalized under that person. Every name starts with `personal_return_`: Schedule E rental figures carry `personal_return_rental_`; each Schedule C business carries its own figures under `personal_return_schedule_c_<business>_`, named after the business as printed (described at the end of this page), and a return with two or more businesses also carries their sum under the fixed `personal_return_schedule_c_` names below.

| Name                                            | Label                                                         | Unit    | Basis |
| ----------------------------------------------- | ------------------------------------------------------------- | ------- | ----- |
| `personal_return_rental_expenses`               | Rental expenses (Schedule E)                                  | `money` |       |
| `personal_return_rental_gross_rents`            | Gross rents (Schedule E)                                      | `money` |       |
| `personal_return_rental_net_income`             | Net rental income (Schedule E)                                | `money` |       |
| `personal_return_rental_noi`                    | Net operating income (Schedule E rental real estate)          | `money` |       |
| `personal_return_rental_noi_adjusted`           | Adjusted net operating income (Schedule E rental real estate) | `money` |       |
| `personal_return_schedule_c_cogs`               | Cost of goods sold (Schedule C)                               | `money` |       |
| `personal_return_schedule_c_gross_income`       | Gross income (Schedule C)                                     | `money` |       |
| `personal_return_schedule_c_gross_profit`       | Gross profit (Schedule C)                                     | `money` |       |
| `personal_return_schedule_c_gross_receipts`     | Gross receipts (Schedule C)                                   | `money` |       |
| `personal_return_schedule_c_net_profit`         | Net profit or loss (Schedule C)                               | `money` |       |
| `personal_return_schedule_c_other_income`       | Other income (Schedule C)                                     | `money` |       |
| `personal_return_schedule_c_returns_allowances` | Returns and allowances (Schedule C)                           | `money` |       |
| `personal_return_schedule_c_revenue_net`        | Net revenue (Schedule C)                                      | `money` |       |
| `personal_return_schedule_c_total_expenses`     | Total expenses (Schedule C)                                   | `money` |       |

## Basis

`basis` says what kind of source a figure came from. A money attribute carries
a basis only when it was read from a filed business return. Figures from
company-prepared statements, a guarantor's personal return and analyst-built
aggregates carry none; their name prefix (`company_reported_`,
`personal_return_`, `custom_`) says where they belong. A ratio always
carries a basis, and a ratio marked **Per snapshot** above resolves to
`tax_return_book`, `tax_return_tax` or `mixed` from the years in that
snapshot.

| Basis              | On         | Meaning                                                                                                                                                                                            |
| ------------------ | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tax`              | attributes | The figure as stated on the filed business return, on the return's own tax basis.                                                                                                                  |
| `book`             | attributes | A book-basis figure read from the same return, present only on years the return states a book reconciliation.                                                                                      |
| `tax_return_tax`   | ratios     | Built from tax-basis figures on the filed returns.                                                                                                                                                 |
| `tax_return_book`  | ratios     | Built from book-basis figures on the filed returns.                                                                                                                                                |
| `company_reported` | ratios     | Built from figures on company-prepared statements.                                                                                                                                                 |
| `mixed`            | ratios     | Built from figures of more than one basis: either a per-snapshot ratio whose filed years disagree (book where the return states books, tax elsewhere), or a ratio drawn from more than one family. |
| `custom`           | ratios     | Analyst-built. What goes into the figure is the analyst's own definition and never leaves the workspace.                                                                                           |

## DSCR recipes

Every debt-service coverage recipe saved on a loan's business produces one
ratio, named `dscr_<slug>`, and so does every recipe saved on a guarantor
whose card stands on the spread being finalized. The slug is the recipe's own
name, lowercased, with each run of characters outside `a-z0-9` collapsed to a
single `_`, the edges trimmed, and the result capped at 48 characters. Two
recipes whose names produce the same slug are suffixed `_2`, `_3` and so on,
in the order the loan holds them.

The label is `DSCR (<recipe name>)` and the unit is `ratio`. The basis is
`tax_return_tax` or `tax_return_book` for a recipe built from the filed
returns, `company_reported` for a recipe built from the company-prepared
statements, and `mixed` for a guarantor's recipe, which reads her personal
return beside her personal financial statements. A guarantor's ratio is keyed
by calendar year; a column of hers that states no year is left out. These
ratios appear in `final` and `draft` snapshots, because a recipe is analyst
judgment applied on every save. They never appear in the documents-only
`machine` snapshot. `inputs.dscr_configs` names every business recipe
saved on the loan, whether or not it produced a figure, and every guarantor
recipe whose card stands on the spread.

## Global DSCR

A Global DSCR placed on a finalized spread, or shown in a finalized memo,
produces one ratio, named `global_dscr_<slug>`. The slug is the Global DSCR's
own name, slugged the way a DSCR recipe's name is. Two whose names produce the
same slug are suffixed `_2`, `_3` and so on, in the order the loan holds
them.

The label is `Global DSCR (<name>)`, the unit is `ratio` and the basis is
`mixed`. A year it does not state reads `null`. On a spread it rides the
snapshot of the company or guarantor the spread belongs to, and that spread's
finalize holds every figure on the loan until it is reopened. A memo that shows
one finalizes a loan-level snapshot whose manifest states the entity key
`whole-loan`, beside the snapshots of the companies and guarantors it covers.
Like a DSCR recipe it is analyst judgment: it appears in `final` and `draft`
snapshots and never in the documents-only `machine` snapshot.

## Analyst-built ratios and stats

A figure an analyst built and placed on the spread appears under
`custom_<slug>`. The slug is the analyst's own name for it, lowercased, with
each run of characters outside `a-z0-9` collapsed to a single `_`, the edges
trimmed, capped at 48 characters, and trimmed again after the cap, so a key
never ends in `_`. An empty result reads `visual`.

A slug is claimed once per snapshot across both groups, in definition-id order,
with repeats suffixed `_2`, `_3` and so on. It is claimed whether or not the
figure produced a value, so a year gaining a figure never renames its
neighbour. A figure that divides one value by another goes in `ratios` with
`basis: custom`. One that does not is an aggregate money figure and goes in
`attributes`. A ratio's unit is `ratio`, or `percent` when the analyst set it to
read as a percentage; a `percent` value is on the per-cent scale, like every
other percent in the payload.

Each one carries `custom_visual_id`, the definition's own opaque id, which
stays the same across renames. Key on the id, not the slug, so a rename
never moves your join. These appear in `final` and `draft` snapshots and
never in the documents-only `machine` snapshot. What the analyst built the
figure out of never leaves the workspace.

## Schedule C businesses

A guarantor's snapshot states each Schedule C business on the return under its
own names, `personal_return_schedule_c_<business>_<line>`, where `<line>` is
one of `gross_receipts`, `returns_allowances`, `revenue_net`, `cogs`,
`gross_profit`, `other_income`, `gross_income`, `total_expenses` and
`net_profit`, the same lines the fixed `personal_return_schedule_c_` names
above carry for the sum. The business slug is the business name as printed on
the schedule (its principal business when no name prints), lowercased, with
each run of characters outside `a-z0-9` collapsed to a single `_`, the edges
trimmed, capped at 48 characters and trimmed again after the cap; an empty
result reads `business`. Two businesses whose names produce the same slug are
suffixed `_2`, `_3` and so on, in the order the return prints them.

The label is `<line> (Schedule C, <business name>)` and the unit is `money`.
A line the schedule leaves blank every year states nothing. The fixed
`personal_return_schedule_c_` names carry the sum across businesses only when
the return prints two or more; a lone business is stated once, under its own
name. These are printed figures, so they appear in every snapshot, the
documents-only `machine` snapshot included.