The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

Public API / @insiderfinance/totalfinance

@insiderfinance/totalfinance/fundamentals

import from '@insiderfinance/totalfinance/fundamentals'

Every public export in this entry point, including type-only declarations. Search by name or concept.

Jump to an export (106)

AltmanComponent · AltmanInput · AltmanResult · AltmanVariant · AnalyzeFundamentalsInput · AnalyzeFundamentalsResult · AnalyzedRatio · BalanceSheet · BalanceSheetRatioInput · BeneishComponent · BeneishInput · BeneishResult · CashFlowStatement · CommonSizeInput · CommonSizeResult · DayMetricRatioInput · DebtServiceCoverageInput · DebtServiceRatioInput · EnterpriseMultipleRatioInput · FinancialStatements · FundamentalGrowthInput · FundamentalGrowthResult · FundamentalPeriod · FundamentalSeries · FundamentalSnapshot · IncomeStatement · IncomeStatementRatioInput · InvestedCapitalRatioInput · MarketMultipleRatioInput · MarketObservation · PairRatioInput · PerShareFundamentalsInput · PerShareFundamentalsResult · PiotroskiInput · PiotroskiResult · PiotroskiSignal · RatioCategory · RatioFacade · RatioInput · RatioPeriodIdentity · RatioReport · RawFundamentalsRecord · ReconcileStatementsInput · ReconciliationCheck · ReconciliationResult · RestatementPolicy · SelectFundamentalSnapshotInput · SingleStatementRatioInput · TrailingTwelveMonthInput · accrualRatio · altmanZScore · analyzeFundamentals · assetTurnover · beneishMScore · bookValuePerShare · cashConversionCycle · cashFlowToNetIncome · cashRatio · cashReturnOnAssets · commonSizeFinancialStatements · currentRatio · daysInventoryOutstanding · daysPayablesOutstanding · daysSalesOutstanding · debtServiceCoverage · debtToAssets · debtToEquity · dividendYield · earningsPerShare · earningsYield · ebitdaMargin · enterpriseValueToEbitda · enterpriseValueToRevenue · freeCashFlowPerShare · freeCashFlowYield · fundamentalGrowth · grossMargin · interestCoverage · inventoryTurnover · isPeriodAvailableAt · netDebtToEbitda · netProfitMargin · operatingMargin · payablesTurnover · perShareFundamentals · piotroskiFScore · priceToBook · priceToEarnings · priceToSales · quickRatio · receivablesTurnover · reconcileFinancialStatements · requireBalanceSheet · requireCashFlowStatement · requireFinancialStatements · requireFundamentalPeriod · requireIncomeStatement · requireMarketObservation · returnOnAssets · returnOnCapitalEmployed · returnOnEquity · returnOnInvestedCapital · revenuePerShare · selectFundamentalSnapshot · statementsAvailableTimestampMs · trailingTwelveMonthStatements

interface

AltmanComponent

One Altman component.

/** One Altman component. */
export interface AltmanComponent {
    component: 'X1' | 'X2' | 'X3' | 'X4' | 'X5';
    definition: string;
    value: number;
    coefficient: number;
    contribution: number;
}
Fields, parameters & returned members (5)
Name / typeMeaning & unitOptional / default
coefficient
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
component
'X1' | 'X2' | 'X3' | 'X4' | 'X5'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
contribution
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
definition
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
value
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

AltmanInput

Input for {@link altmanZScore}.

/** Input for {@link altmanZScore}. */
export interface AltmanInput {
    statements: FinancialStatements;
    variant: AltmanVariant;
    /** REQUIRED for `public-manufacturing` (its X4 uses market equity); rejected otherwise. */
    marketEquity?: number;
}
Fields, parameters & returned members (85)
Name / typeMeaning & unitOptional / default
marketEquity
number
REQUIRED for `public-manufacturing` (its X4 uses market equity); rejected otherwise.
unitless by name
Optional
No @default declared; consult the signature and description.
statements
FinancialStatements

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance
import('@insiderfinance/totalfinance/fundamentals').BalanceSheet

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.accountsPayable
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.accountsReceivable
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.cashAndCashEquivalents
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.currentAssets
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.currentLiabilities
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.inventory
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.longTermDebt
number
Interest-bearing debt due beyond one year.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.minorityInterest
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period
import('@insiderfinance/totalfinance/fundamentals').FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
statements.balance.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
statements.balance.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.preferredEquity
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.propertyPlantEquipmentNet
number
Net property, plant, and equipment.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.retainedEarnings
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.shortTermDebt
number
Interest-bearing debt due within one year.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.shortTermInvestments
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.totalAssets
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.totalDebt
number
Total interest-bearing debt. When absent and both maturities are present, consumers may derive `shortTermDebt + longTermDebt` and say so; "debt" NEVER silently means total liabilities.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.totalEquity
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.totalLiabilities
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow
import('@insiderfinance/totalfinance/fundamentals').CashFlowStatement

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.acquisitions
number
Positive magnitude of cash spent on acquisitions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.capitalExpenditure
number
Positive magnitude of cash spent on property, plant, and equipment.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.depreciationAndAmortization
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.dividendsPaid
number
Positive magnitude of cash paid out as dividends.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.financingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.investingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.operatingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period
import('@insiderfinance/totalfinance/fundamentals').FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.shareRepurchases
number
Positive magnitude of cash spent repurchasing shares.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.stockBasedCompensation
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.income
import('@insiderfinance/totalfinance/fundamentals').IncomeStatement

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.costOfRevenue
number
Positive magnitude.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.dilutedSharesOutstanding
number
Split-adjusted weighted-average diluted shares for the period.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.grossProfit
number
Reported gross profit; when absent, consumers may derive `revenue - costOfRevenue` and say so.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.incomeFromContinuingOperations
number
When reported separately from `netIncome` (the Beneish accrual basis prefers it).
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.incomeTaxExpense
number
Positive magnitude (a net tax benefit is a negative amount and is stated as such).
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.interestExpense
number
Positive magnitude.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.netIncome
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.operatingExpenses
number
Positive magnitude of total operating expenses below gross profit.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.operatingIncome
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period
import('@insiderfinance/totalfinance/fundamentals').FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
statements.income.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
statements.income.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.revenue
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.sellingGeneralAdministrativeExpense
number
Positive magnitude (Beneish SGAI consumes it).
unitless by name
Optional
No @default declared; consult the signature and description.
variant
AltmanVariant

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

AltmanResult

Result of {@link altmanZScore}.

/** Result of {@link altmanZScore}. */
export interface AltmanResult {
    assumptions: {
        /** The published model name (a label, deliberately not a literal type). */
        model: string;
        variant: AltmanVariant;
        equityBasis: 'market' | 'book';
    };
    diagnostics: {
        warnings: string[];
    };
    zScore: number;
    variant: AltmanVariant;
    components: AltmanComponent[];
}
Fields, parameters & returned members (9)
Name / typeMeaning & unitOptional / default
assumptions
{ equityBasis: 'market' | 'book'; model: string; variant: AltmanVariant; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.equityBasis
'market' | 'book'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.model
string
The published model name (a label, deliberately not a literal type).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.variant
AltmanVariant

unitless by name
Required / declared member
No @default declared; consult the signature and description.
components
AltmanComponent[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics
{ warnings: string[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.warnings
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
variant
AltmanVariant

unitless by name
Required / declared member
No @default declared; consult the signature and description.
zScore
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

type

AltmanVariant

The published Altman variants; each fixes its coefficients and its equity basis.

// ---------------------------------------------------------------------------------------------------
// Altman Z-score
// ---------------------------------------------------------------------------------------------------
/** The published Altman variants; each fixes its coefficients and its equity basis. */
export type AltmanVariant = 'public-manufacturing' | 'private-manufacturing' | 'non-manufacturing';
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

AnalyzeFundamentalsInput

Input for {@link analyzeFundamentals}.

/** Input for {@link analyzeFundamentals}. */
export interface AnalyzeFundamentalsInput {
    /** The reported history (restatements included) — the analysis sees only what `asOf` allows. */
    statements: readonly FinancialStatements[];
    /** The market side for valuation multiples; without it they are reported missing, not guessed. */
    marketSnapshot?: MarketObservation;
    asOf: EpochMs;
    restatementPolicy: RestatementPolicy;
    /** Day metrics need the explicit period-day count; absent → they are reported missing. */
    periodDays?: number;
    /** Bounds market-observation staleness for the multiples when supplied. */
    maximumStalenessMs?: number;
    /** Explicit tax rate for return on invested capital; else the effective rate is derived. */
    taxRate?: number;
    /** The exact debt-service denominator; absent → debtServiceCoverage is reported missing. */
    debtServiceAmount?: number;
    /** Separately supplied non-operating assets for enterprise value. */
    nonOperatingAssets?: number;
    /** Runs the Altman Z-score under this explicit published variant; absent → reported missing. */
    altmanVariant?: AltmanVariant;
}
Fields, parameters & returned members (14)
Name / typeMeaning & unitOptional / default
altmanVariant
AltmanVariant
Runs the Altman Z-score under this explicit published variant; absent → reported missing.
unitless by name
Optional
No @default declared; consult the signature and description.
asOf
number

an instant: epoch milliseconds or a YYYY-MM-DD / zoned ISO string (the resolveAsOf convention)
Required / declared member
No @default declared; consult the signature and description.
debtServiceAmount
number
The exact debt-service denominator; absent → debtServiceCoverage is reported missing.
currency amount (the field or record currency)
Optional
No @default declared; consult the signature and description.
marketSnapshot
MarketObservation
The market side for valuation multiples; without it they are reported missing, not guessed.
unitless by name
Optional
No @default declared; consult the signature and description.
marketSnapshot.marketCapitalization
number

unitless by name
Optional
No @default declared; consult the signature and description.
marketSnapshot.observedTimestampMs
number
When the price was observed (epoch ms). Must not precede the fundamentals' availability.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
marketSnapshot.sharePrice
number

currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
marketSnapshot.sharesOutstanding
number
Split-adjusted shares consistent with `sharePrice`.
unitless by name
Optional
No @default declared; consult the signature and description.
maximumStalenessMs
number
Bounds market-observation staleness for the multiples when supplied.
milliseconds
Optional
No @default declared; consult the signature and description.
nonOperatingAssets
number
Separately supplied non-operating assets for enterprise value.
unitless by name
Optional
No @default declared; consult the signature and description.
periodDays
number
Day metrics need the explicit period-day count; absent → they are reported missing.
days
Optional
No @default declared; consult the signature and description.
restatementPolicy
RestatementPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements
readonly FinancialStatements[]
The reported history (restatements included) — the analysis sees only what `asOf` allows.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
taxRate
number
Explicit tax rate for return on invested capital; else the effective rate is derived.
decimal rate (0.05 = 5%)
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

AnalyzeFundamentalsResult

Result of {@link analyzeFundamentals}.

/** Result of {@link analyzeFundamentals}. */
export interface AnalyzeFundamentalsResult {
    assumptions: {
        asOf: EpochMs;
        restatementPolicy: RestatementPolicy;
        periodUsed: {
            periodEndDate: string;
            periodType: string;
            fiscalYear: number;
        };
        priorPeriodUsed?: {
            periodEndDate: string;
            periodType: string;
            fiscalYear: number;
        };
    };
    diagnostics: {
        /** One warning per metric that could not be formed (mirrors `missing`). */
        warnings: string[];
    };
    asOf: EpochMs;
    restatementPolicy: RestatementPolicy;
    /** How many statement sets were visible at `asOf` after restatement resolution. */
    periodsVisible: number;
    /** The period the single-period metrics used. */
    periodUsed: {
        periodEndDate: string;
        periodType: string;
        fiscalYear: number;
    };
    /** The prior period the average-balance metrics used, when one was visible. */
    priorPeriodUsed?: {
        periodEndDate: string;
        periodType: string;
        fiscalYear: number;
    };
    ratios: Record<string, AnalyzedRatio>;
    scores: {
        piotroski?: PiotroskiResult;
        altman?: AltmanResult;
        beneish?: BeneishResult;
    };
    /** Every metric that could not be formed, with its reason — the honest gaps ledger. */
    missing: Array<{
        metric: string;
        reason: string;
    }>;
}
Fields, parameters & returned members (54)
Name / typeMeaning & unitOptional / default
asOf
number

an instant: epoch milliseconds or a YYYY-MM-DD / zoned ISO string (the resolveAsOf convention)
Required / declared member
No @default declared; consult the signature and description.
assumptions
{ asOf: EpochMs; periodUsed: { periodEndDate: string; periodType: string; fiscalYear: number; }; priorPeriodUsed?: { periodEndDate: string; periodType: string; fiscalYear: number; }; restatementPolicy: RestatementPolicy; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.asOf
number

an instant: epoch milliseconds or a YYYY-MM-DD / zoned ISO string (the resolveAsOf convention)
Required / declared member
No @default declared; consult the signature and description.
assumptions.periodUsed
{ fiscalYear: number; periodEndDate: string; periodType: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.periodUsed.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.periodUsed.periodEndDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
assumptions.periodUsed.periodType
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.priorPeriodUsed
{ fiscalYear: number; periodEndDate: string; periodType: string; }

unitless by name
Optional
No @default declared; consult the signature and description.
assumptions.priorPeriodUsed.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.priorPeriodUsed.periodEndDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
assumptions.priorPeriodUsed.periodType
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.restatementPolicy
RestatementPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics
{ warnings: string[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.warnings
string[]
One warning per metric that could not be formed (mirrors `missing`).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
missing
{ metric: string; reason: string; }[]
Every metric that could not be formed, with its reason — the honest gaps ledger.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
periodUsed
{ fiscalYear: number; periodEndDate: string; periodType: string; }
The period the single-period metrics used.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
periodUsed.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
periodUsed.periodEndDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
periodUsed.periodType
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
periodsVisible
number
How many statement sets were visible at `asOf` after restatement resolution.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
priorPeriodUsed
{ fiscalYear: number; periodEndDate: string; periodType: string; }
The prior period the average-balance metrics used, when one was visible.
unitless by name
Optional
No @default declared; consult the signature and description.
priorPeriodUsed.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
priorPeriodUsed.periodEndDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
priorPeriodUsed.periodType
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
ratios
Record<string, AnalyzedRatio>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
restatementPolicy
RestatementPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores
{ altman?: AltmanResult; beneish?: BeneishResult; piotroski?: PiotroskiResult; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.altman
AltmanResult

unitless by name
Optional
No @default declared; consult the signature and description.
scores.altman.assumptions
{ equityBasis: 'market' | 'book'; model: string; variant: AltmanVariant; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.altman.assumptions.equityBasis
'market' | 'book'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.altman.assumptions.model
string
The published model name (a label, deliberately not a literal type).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.altman.assumptions.variant
AltmanVariant

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.altman.components
import('@insiderfinance/totalfinance/fundamentals').AltmanComponent[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.altman.diagnostics
{ warnings: string[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.altman.diagnostics.warnings
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.altman.variant
AltmanVariant

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.altman.zScore
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.beneish
BeneishResult

unitless by name
Optional
No @default declared; consult the signature and description.
scores.beneish.assumptions
{ model: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.beneish.assumptions.model
string
The published model name (a label, deliberately not a literal type).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.beneish.components
import('@insiderfinance/totalfinance/fundamentals').BeneishComponent[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.beneish.diagnostics
{ warnings: string[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.beneish.diagnostics.warnings
string[]
Conventions the inputs forced (e.g. D&A standing in for pure depreciation) — disclosed.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.beneish.mScore
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.beneish.notes
string[]
The same disclosures as `diagnostics.warnings` (kept for direct reading).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.piotroski
PiotroskiResult

unitless by name
Optional
No @default declared; consult the signature and description.
scores.piotroski.assumptions
{ model: string; returnBasis: 'beginning total assets'; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.piotroski.assumptions.model
string
The published model name (a label, deliberately not a literal type).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.piotroski.assumptions.returnBasis
'beginning total assets'
Returns and turnover use BEGINNING total assets, per the paper.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.piotroski.diagnostics
{ warnings: string[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.piotroski.diagnostics.warnings
string[]
One warning per unevaluable signal.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.piotroski.evaluableSignals
number
How many of the nine signals could be evaluated; 9 when every input line was present.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.piotroski.fScore
number
Sum of the evaluable signals (each 0 or 1).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
scores.piotroski.signals
import('@insiderfinance/totalfinance/fundamentals').PiotroskiSignal[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

AnalyzedRatio

One computed (or explicitly not-computed) metric.

/** One computed (or explicitly not-computed) metric. */
export interface AnalyzedRatio {
    value: number | null;
    reason?: string;
}
Fields, parameters & returned members (2)
Name / typeMeaning & unitOptional / default
reason
string

unitless by name
Optional
No @default declared; consult the signature and description.
value
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BalanceSheet

One reported balance sheet (balances at `period.periodEndDate`).

/** One reported balance sheet (balances at `period.periodEndDate`). */
export interface BalanceSheet {
    period: FundamentalPeriod;
    cashAndCashEquivalents: number;
    shortTermInvestments?: number;
    accountsReceivable?: number;
    inventory?: number;
    currentAssets?: number;
    /** Net property, plant, and equipment. */
    propertyPlantEquipmentNet?: number;
    totalAssets: number;
    currentLiabilities?: number;
    accountsPayable?: number;
    /** Interest-bearing debt due within one year. */
    shortTermDebt?: number;
    /** Interest-bearing debt due beyond one year. */
    longTermDebt?: number;
    /**
     * Total interest-bearing debt. When absent and both maturities are present, consumers may derive
     * `shortTermDebt + longTermDebt` and say so; "debt" NEVER silently means total liabilities.
     */
    totalDebt?: number;
    totalLiabilities: number;
    preferredEquity?: number;
    minorityInterest?: number;
    totalEquity: number;
    retainedEarnings?: number;
    /** Source-specific extras, preserved verbatim and never consumed by compute functions. */
    metadata?: Record<string, unknown>;
}
Fields, parameters & returned members (31)
Name / typeMeaning & unitOptional / default
accountsPayable
number

unitless by name
Optional
No @default declared; consult the signature and description.
accountsReceivable
number

unitless by name
Optional
No @default declared; consult the signature and description.
cashAndCashEquivalents
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
currentAssets
number

unitless by name
Optional
No @default declared; consult the signature and description.
currentLiabilities
number

unitless by name
Optional
No @default declared; consult the signature and description.
inventory
number

unitless by name
Optional
No @default declared; consult the signature and description.
longTermDebt
number
Interest-bearing debt due beyond one year.
unitless by name
Optional
No @default declared; consult the signature and description.
metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
minorityInterest
number

unitless by name
Optional
No @default declared; consult the signature and description.
period
FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
preferredEquity
number

unitless by name
Optional
No @default declared; consult the signature and description.
propertyPlantEquipmentNet
number
Net property, plant, and equipment.
unitless by name
Optional
No @default declared; consult the signature and description.
retainedEarnings
number

unitless by name
Optional
No @default declared; consult the signature and description.
shortTermDebt
number
Interest-bearing debt due within one year.
unitless by name
Optional
No @default declared; consult the signature and description.
shortTermInvestments
number

unitless by name
Optional
No @default declared; consult the signature and description.
totalAssets
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
totalDebt
number
Total interest-bearing debt. When absent and both maturities are present, consumers may derive `shortTermDebt + longTermDebt` and say so; "debt" NEVER silently means total liabilities.
unitless by name
Optional
No @default declared; consult the signature and description.
totalEquity
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
totalLiabilities
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

type

BalanceSheetRatioInput

Balance-only formulas: use the actual balance sheet or the existing complete set.

/** Balance-only formulas: use the actual balance sheet or the existing complete set. */
export type BalanceSheetRatioInput<Facts extends Pick<BalanceSheet, 'period'> = BalanceSheet> = (SingleStatementRatioInput & {
    balance?: never;
}) | {
    balance: Facts & Partial<BalanceSheet>;
    statements?: never;
};
Fields, parameters & returned members (33)
Name / typeMeaning & unitOptional / default
balance
Facts & Partial<BalanceSheet>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
balance.accountsPayable
number

unitless by name
Optional
No @default declared; consult the signature and description.
balance.accountsReceivable
number

unitless by name
Optional
No @default declared; consult the signature and description.
balance.cashAndCashEquivalents
number

unitless by name
Optional
No @default declared; consult the signature and description.
balance.currentAssets
number

unitless by name
Optional
No @default declared; consult the signature and description.
balance.currentLiabilities
number

unitless by name
Optional
No @default declared; consult the signature and description.
balance.inventory
number

unitless by name
Optional
No @default declared; consult the signature and description.
balance.longTermDebt
number
Interest-bearing debt due beyond one year.
unitless by name
Optional
No @default declared; consult the signature and description.
balance.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
balance.minorityInterest
number

unitless by name
Optional
No @default declared; consult the signature and description.
balance.period
import('@insiderfinance/totalfinance/fundamentals').FundamentalPeriod

unitless by name
Optional
No @default declared; consult the signature and description.
balance.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
balance.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
balance.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
balance.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
balance.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
balance.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
balance.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
balance.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
balance.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
balance.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
balance.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
balance.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
balance.preferredEquity
number

unitless by name
Optional
No @default declared; consult the signature and description.
balance.propertyPlantEquipmentNet
number
Net property, plant, and equipment.
unitless by name
Optional
No @default declared; consult the signature and description.
balance.retainedEarnings
number

unitless by name
Optional
No @default declared; consult the signature and description.
balance.shortTermDebt
number
Interest-bearing debt due within one year.
unitless by name
Optional
No @default declared; consult the signature and description.
balance.shortTermInvestments
number

unitless by name
Optional
No @default declared; consult the signature and description.
balance.totalAssets
number

unitless by name
Optional
No @default declared; consult the signature and description.
balance.totalDebt
number
Total interest-bearing debt. When absent and both maturities are present, consumers may derive `shortTermDebt + longTermDebt` and say so; "debt" NEVER silently means total liabilities.
unitless by name
Optional
No @default declared; consult the signature and description.
balance.totalEquity
number

unitless by name
Optional
No @default declared; consult the signature and description.
balance.totalLiabilities
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements
never

unitless by name
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BeneishComponent

One Beneish component index.

/** One Beneish component index. */
export interface BeneishComponent {
    index: 'DSRI' | 'GMI' | 'AQI' | 'SGI' | 'DEPI' | 'SGAI' | 'LVGI' | 'TATA';
    expandedName: string;
    value: number;
    coefficient: number;
    contribution: number;
    currentPeriodEndDate: string;
    priorPeriodEndDate: string;
}
Fields, parameters & returned members (7)
Name / typeMeaning & unitOptional / default
coefficient
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
contribution
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
currentPeriodEndDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
expandedName
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
index
'DSRI' | 'GMI' | 'AQI' | 'SGI' | 'DEPI' | 'SGAI' | 'LVGI' | 'TATA'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
priorPeriodEndDate
string

calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
value
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BeneishInput

Input for {@link beneishMScore}: two consecutive periods.

// ---------------------------------------------------------------------------------------------------
// Beneish M-score
// ---------------------------------------------------------------------------------------------------
/** Input for {@link beneishMScore}: two consecutive periods. */
export interface BeneishInput {
    current: FinancialStatements;
    prior: FinancialStatements;
}
Fields, parameters & returned members (166)

This large namespace is split into complete field pages. No fields are omitted.

Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BeneishResult

Result of {@link beneishMScore}.

/** Result of {@link beneishMScore}. */
export interface BeneishResult {
    assumptions: {
        /** The published model name (a label, deliberately not a literal type). */
        model: string;
    };
    diagnostics: {
        /** Conventions the inputs forced (e.g. D&A standing in for pure depreciation) — disclosed. */
        warnings: string[];
    };
    mScore: number;
    components: BeneishComponent[];
    /** The same disclosures as `diagnostics.warnings` (kept for direct reading). */
    notes: string[];
}
Fields, parameters & returned members (7)
Name / typeMeaning & unitOptional / default
assumptions
{ model: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.model
string
The published model name (a label, deliberately not a literal type).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
components
BeneishComponent[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics
{ warnings: string[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.warnings
string[]
Conventions the inputs forced (e.g. D&A standing in for pure depreciation) — disclosed.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
mScore
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
notes
string[]
The same disclosures as `diagnostics.warnings` (kept for direct reading).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

CashFlowStatement

One reported cash-flow statement (flows over the period).

/** One reported cash-flow statement (flows over the period). */
export interface CashFlowStatement {
    period: FundamentalPeriod;
    operatingCashFlow: number;
    investingCashFlow: number;
    financingCashFlow: number;
    /** Positive magnitude of cash spent on property, plant, and equipment. */
    capitalExpenditure?: number;
    depreciationAndAmortization?: number;
    stockBasedCompensation?: number;
    /** Positive magnitude of cash spent on acquisitions. */
    acquisitions?: number;
    /** Positive magnitude of cash paid out as dividends. */
    dividendsPaid?: number;
    /** Positive magnitude of cash spent repurchasing shares. */
    shareRepurchases?: number;
    /** Source-specific extras, preserved verbatim and never consumed by compute functions. */
    metadata?: Record<string, unknown>;
}
Fields, parameters & returned members (23)
Name / typeMeaning & unitOptional / default
acquisitions
number
Positive magnitude of cash spent on acquisitions.
unitless by name
Optional
No @default declared; consult the signature and description.
capitalExpenditure
number
Positive magnitude of cash spent on property, plant, and equipment.
unitless by name
Optional
No @default declared; consult the signature and description.
depreciationAndAmortization
number

unitless by name
Optional
No @default declared; consult the signature and description.
dividendsPaid
number
Positive magnitude of cash paid out as dividends.
unitless by name
Optional
No @default declared; consult the signature and description.
financingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
investingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
operatingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
period
FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
shareRepurchases
number
Positive magnitude of cash spent repurchasing shares.
unitless by name
Optional
No @default declared; consult the signature and description.
stockBasedCompensation
number

unitless by name
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

CommonSizeInput

Input for {@link commonSizeFinancialStatements}.

// ---------------------------------------------------------------------------------------------------
// commonSizeFinancialStatements
// ---------------------------------------------------------------------------------------------------
/** Input for {@link commonSizeFinancialStatements}. */
export interface CommonSizeInput {
    statements: FinancialStatements;
}
Fields, parameters & returned members (83)
Name / typeMeaning & unitOptional / default
statements
FinancialStatements

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance
BalanceSheet

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.accountsPayable
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.accountsReceivable
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.cashAndCashEquivalents
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.currentAssets
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.currentLiabilities
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.inventory
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.longTermDebt
number
Interest-bearing debt due beyond one year.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.minorityInterest
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period
FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
statements.balance.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
statements.balance.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.preferredEquity
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.propertyPlantEquipmentNet
number
Net property, plant, and equipment.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.retainedEarnings
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.shortTermDebt
number
Interest-bearing debt due within one year.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.shortTermInvestments
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.totalAssets
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.totalDebt
number
Total interest-bearing debt. When absent and both maturities are present, consumers may derive `shortTermDebt + longTermDebt` and say so; "debt" NEVER silently means total liabilities.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.totalEquity
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.totalLiabilities
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow
CashFlowStatement

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.acquisitions
number
Positive magnitude of cash spent on acquisitions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.capitalExpenditure
number
Positive magnitude of cash spent on property, plant, and equipment.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.depreciationAndAmortization
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.dividendsPaid
number
Positive magnitude of cash paid out as dividends.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.financingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.investingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.operatingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period
FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.shareRepurchases
number
Positive magnitude of cash spent repurchasing shares.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.stockBasedCompensation
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.income
IncomeStatement

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.costOfRevenue
number
Positive magnitude.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.dilutedSharesOutstanding
number
Split-adjusted weighted-average diluted shares for the period.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.grossProfit
number
Reported gross profit; when absent, consumers may derive `revenue - costOfRevenue` and say so.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.incomeFromContinuingOperations
number
When reported separately from `netIncome` (the Beneish accrual basis prefers it).
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.incomeTaxExpense
number
Positive magnitude (a net tax benefit is a negative amount and is stated as such).
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.interestExpense
number
Positive magnitude.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.netIncome
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.operatingExpenses
number
Positive magnitude of total operating expenses below gross profit.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.operatingIncome
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period
FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
statements.income.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
statements.income.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.revenue
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.sellingGeneralAdministrativeExpense
number
Positive magnitude (Beneish SGAI consumes it).
unitless by name
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

CommonSizeResult

Result of {@link commonSizeFinancialStatements}: each line as a FRACTION of its stated base.

/** Result of {@link commonSizeFinancialStatements}: each line as a FRACTION of its stated base. */
export interface CommonSizeResult {
    assumptions: {
        incomeBasis: 'revenue';
        balanceBasis: 'totalAssets';
        cashFlowBasis: 'revenue';
    };
    diagnostics: {
        warnings: string[];
    };
    /** Income lines over `revenue`. */
    income: {
        basis: 'revenue';
        lines: Record<string, number>;
    };
    /** Balance lines over `totalAssets`. */
    balance: {
        basis: 'totalAssets';
        lines: Record<string, number>;
    };
    /** Cash-flow lines over `revenue`. */
    cashFlow: {
        basis: 'revenue';
        lines: Record<string, number>;
    };
}
Fields, parameters & returned members (15)
Name / typeMeaning & unitOptional / default
assumptions
{ balanceBasis: 'totalAssets'; cashFlowBasis: 'revenue'; incomeBasis: 'revenue'; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.balanceBasis
'totalAssets'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.cashFlowBasis
'revenue'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.incomeBasis
'revenue'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
balance
{ basis: 'totalAssets'; lines: Record<string, number>; }
Balance lines over `totalAssets`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
balance.basis
'totalAssets'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
balance.lines
Record<string, number>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
cashFlow
{ basis: 'revenue'; lines: Record<string, number>; }
Cash-flow lines over `revenue`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
cashFlow.basis
'revenue'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
cashFlow.lines
Record<string, number>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics
{ warnings: string[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.warnings
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
income
{ basis: 'revenue'; lines: Record<string, number>; }
Income lines over `revenue`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
income.basis
'revenue'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
income.lines
Record<string, number>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

DayMetricRatioInput

Day metrics: the pair plus the explicit period-day count (never guessed).

/** Day metrics: the pair plus the explicit period-day count (never guessed). */
export interface DayMetricRatioInput extends PairRatioInput {
    periodDays: number;
}
Fields, parameters & returned members (167)

This large namespace is split into complete field pages. No fields are omitted.

Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

type

DebtServiceCoverageInput

Additive income-only coverage request; the existing extendable full-set interface is preserved.

/** Additive income-only coverage request; the existing extendable full-set interface is preserved. */
export type DebtServiceCoverageInput = IncomeStatementRatioInput<Pick<IncomeStatement, 'period' | 'operatingIncome'>> & {
    debtServiceAmount: number;
};
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

DebtServiceRatioInput

Debt-service coverage: the exact supplied denominator.

/** Debt-service coverage: the exact supplied denominator. */
export interface DebtServiceRatioInput extends SingleStatementRatioInput {
    debtServiceAmount: number;
}
Fields, parameters & returned members (84)
Name / typeMeaning & unitOptional / default
debtServiceAmount
number

currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
statements
FinancialStatements

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance
BalanceSheet

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.accountsPayable
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.accountsReceivable
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.cashAndCashEquivalents
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.currentAssets
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.currentLiabilities
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.inventory
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.longTermDebt
number
Interest-bearing debt due beyond one year.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.minorityInterest
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period
import('@insiderfinance/totalfinance/fundamentals').FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
statements.balance.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
statements.balance.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.preferredEquity
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.propertyPlantEquipmentNet
number
Net property, plant, and equipment.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.retainedEarnings
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.shortTermDebt
number
Interest-bearing debt due within one year.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.shortTermInvestments
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.totalAssets
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.totalDebt
number
Total interest-bearing debt. When absent and both maturities are present, consumers may derive `shortTermDebt + longTermDebt` and say so; "debt" NEVER silently means total liabilities.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.totalEquity
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.totalLiabilities
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow
import('@insiderfinance/totalfinance/fundamentals').CashFlowStatement

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.acquisitions
number
Positive magnitude of cash spent on acquisitions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.capitalExpenditure
number
Positive magnitude of cash spent on property, plant, and equipment.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.depreciationAndAmortization
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.dividendsPaid
number
Positive magnitude of cash paid out as dividends.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.financingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.investingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.operatingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period
import('@insiderfinance/totalfinance/fundamentals').FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.shareRepurchases
number
Positive magnitude of cash spent repurchasing shares.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.stockBasedCompensation
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.income
IncomeStatement

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.costOfRevenue
number
Positive magnitude.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.dilutedSharesOutstanding
number
Split-adjusted weighted-average diluted shares for the period.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.grossProfit
number
Reported gross profit; when absent, consumers may derive `revenue - costOfRevenue` and say so.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.incomeFromContinuingOperations
number
When reported separately from `netIncome` (the Beneish accrual basis prefers it).
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.incomeTaxExpense
number
Positive magnitude (a net tax benefit is a negative amount and is stated as such).
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.interestExpense
number
Positive magnitude.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.netIncome
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.operatingExpenses
number
Positive magnitude of total operating expenses below gross profit.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.operatingIncome
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period
import('@insiderfinance/totalfinance/fundamentals').FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
statements.income.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
statements.income.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.revenue
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.sellingGeneralAdministrativeExpense
number
Positive magnitude (Beneish SGAI consumes it).
unitless by name
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

EnterpriseMultipleRatioInput

Enterprise-value multiples: separately supplied non-operating assets.

/** Enterprise-value multiples: separately supplied non-operating assets. */
export interface EnterpriseMultipleRatioInput extends MarketMultipleRatioInput {
    nonOperatingAssets?: number;
}
Fields, parameters & returned members (90)
Name / typeMeaning & unitOptional / default
marketObservation
MarketObservation

unitless by name
Required / declared member
No @default declared; consult the signature and description.
marketObservation.marketCapitalization
number

unitless by name
Optional
No @default declared; consult the signature and description.
marketObservation.observedTimestampMs
number
When the price was observed (epoch ms). Must not precede the fundamentals' availability.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
marketObservation.sharePrice
number

currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
marketObservation.sharesOutstanding
number
Split-adjusted shares consistent with `sharePrice`.
unitless by name
Optional
No @default declared; consult the signature and description.
maximumStalenessMs
number

milliseconds
Optional
No @default declared; consult the signature and description.
nonOperatingAssets
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements
FinancialStatements

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance
BalanceSheet

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.accountsPayable
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.accountsReceivable
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.cashAndCashEquivalents
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.currentAssets
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.currentLiabilities
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.inventory
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.longTermDebt
number
Interest-bearing debt due beyond one year.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.minorityInterest
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period
import('@insiderfinance/totalfinance/fundamentals').FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
statements.balance.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
statements.balance.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.preferredEquity
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.propertyPlantEquipmentNet
number
Net property, plant, and equipment.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.retainedEarnings
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.shortTermDebt
number
Interest-bearing debt due within one year.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.shortTermInvestments
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.totalAssets
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.totalDebt
number
Total interest-bearing debt. When absent and both maturities are present, consumers may derive `shortTermDebt + longTermDebt` and say so; "debt" NEVER silently means total liabilities.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.balance.totalEquity
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.balance.totalLiabilities
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow
import('@insiderfinance/totalfinance/fundamentals').CashFlowStatement

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.acquisitions
number
Positive magnitude of cash spent on acquisitions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.capitalExpenditure
number
Positive magnitude of cash spent on property, plant, and equipment.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.depreciationAndAmortization
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.dividendsPaid
number
Positive magnitude of cash paid out as dividends.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.financingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.investingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.operatingCashFlow
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period
import('@insiderfinance/totalfinance/fundamentals').FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
statements.cashFlow.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.cashFlow.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.shareRepurchases
number
Positive magnitude of cash spent repurchasing shares.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.cashFlow.stockBasedCompensation
number

unitless by name
Optional
No @default declared; consult the signature and description.
statements.income
IncomeStatement

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.costOfRevenue
number
Positive magnitude.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.dilutedSharesOutstanding
number
Split-adjusted weighted-average diluted shares for the period.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.grossProfit
number
Reported gross profit; when absent, consumers may derive `revenue - costOfRevenue` and say so.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.incomeFromContinuingOperations
number
When reported separately from `netIncome` (the Beneish accrual basis prefers it).
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.incomeTaxExpense
number
Positive magnitude (a net tax benefit is a negative amount and is stated as such).
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.interestExpense
number
Positive magnitude.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.metadata
Record<string, unknown>
Source-specific extras, preserved verbatim and never consumed by compute functions.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.netIncome
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.operatingExpenses
number
Positive magnitude of total operating expenses below gross profit.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.operatingIncome
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period
import('@insiderfinance/totalfinance/fundamentals').FundamentalPeriod

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.accession
string
Source accession identifier, when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.period.availableTimestampMs
number
When the data became AVAILABLE to an observer — the point-in-time eligibility instant. A backtest or event study must not see this period before this time; `periodEndDate` never controls eligibility.
epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.currency
string
ISO 4217 currency of the monetary figures.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.filedTimestampMs
number
When the filing was made, when known.
epoch milliseconds (UTC instant)
Optional
No @default declared; consult the signature and description.
statements.income.period.fiscalQuarter
1 | 2 | 3 | 4

unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.period.fiscalYear
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.form
string
Source form (e.g. `10-Q`), when known.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.period.monetaryScale
1 | 1000 | 1000000
Monetary figures are reported in units of this scale.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.periodEndDate
string
Strict `YYYY-MM-DD` calendar date the period ends on.
calendar date (YYYY-MM-DD)
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.periodStartDate
string
Strict `YYYY-MM-DD` calendar date; optional because some sources report only period ends.
calendar date (YYYY-MM-DD)
Optional
No @default declared; consult the signature and description.
statements.income.period.periodType
'quarter' | 'year' | 'trailing-twelve-months'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.period.restatementOf
string
When this record restates an earlier one, the accession (or identifier) it restates.
unitless by name
Optional
No @default declared; consult the signature and description.
statements.income.revenue
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
statements.income.sellingGeneralAdministrativeExpense
number
Positive magnitude (Beneish SGAI consumes it).
unitless by name
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.