The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

Public API / @insiderfinance/totalfinance

@insiderfinance/totalfinance/fundamentals/scores

import from '@insiderfinance/totalfinance/fundamentals/scores'

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

Jump to an export (13)

AltmanComponent · AltmanInput · AltmanResult · AltmanVariant · BeneishComponent · BeneishInput · BeneishResult · PiotroskiInput · PiotroskiResult · PiotroskiSignal · altmanZScore · beneishMScore · piotroskiFScore

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

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

PiotroskiInput

Input for {@link piotroskiFScore}: three consecutive periods of one entity.

// ---------------------------------------------------------------------------------------------------
// Piotroski F-score
// ---------------------------------------------------------------------------------------------------
/** Input for {@link piotroskiFScore}: three consecutive periods of one entity. */
export interface PiotroskiInput {
    current: FinancialStatements;
    prior: FinancialStatements;
    /**
     * The period before `prior`. Needed because the paper's return and turnover use BEGINNING
     * assets, so the prior year's own signal needs the balance sheet one further back.
     */
    priorPrior: FinancialStatements;
}
Fields, parameters & returned members (249)

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

PiotroskiResult

Result of {@link piotroskiFScore}.

/** Result of {@link piotroskiFScore}. */
export interface PiotroskiResult {
    assumptions: {
        /** The published model name (a label, deliberately not a literal type). */
        model: string;
        /** Returns and turnover use BEGINNING total assets, per the paper. */
        returnBasis: 'beginning total assets';
    };
    diagnostics: {
        /** One warning per unevaluable signal. */
        warnings: string[];
    };
    /** Sum of the evaluable signals (each 0 or 1). */
    fScore: number;
    /** How many of the nine signals could be evaluated; 9 when every input line was present. */
    evaluableSignals: number;
    signals: PiotroskiSignal[];
}
Fields, parameters & returned members (8)
Name / typeMeaning & unitOptional / default
assumptions
{ model: string; returnBasis: 'beginning total assets'; }

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.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.
diagnostics
{ warnings: string[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.warnings
string[]
One warning per unevaluable signal.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
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.
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.
signals
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

PiotroskiSignal

One of the nine binary signals.

/** One of the nine binary signals. */
export interface PiotroskiSignal {
    signal: string;
    /** 1 or 0 per the paper; `null` with `reason` when an optional statement line is absent. */
    value: 0 | 1 | null;
    detail: string;
    reason?: string;
}
Fields, parameters & returned members (4)
Name / typeMeaning & unitOptional / default
detail
string

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

unitless by name
Optional
No @default declared; consult the signature and description.
signal
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
value
0 | 1 | null
1 or 0 per the paper; `null` with `reason` when an optional statement line is absent.
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.

function

altmanZScore

The Altman Z-score with the published coefficients and denominator definitions per variant. `X1` working capital / assets, `X2` retained earnings / assets, `X3` operating income / assets, `X4` the variant's equity basis / total liabilities, `X5` sales / assets where the variant has one. The variant is REQUIRED — there is no default bankruptcy model.

export declare function altmanZScore(input: AltmanInput): AltmanResult;
Fields, parameters & returned members (13)
Name / typeMeaning & unitOptional / default
(input)
AltmanInput

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).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.
(input).statements
FinancialStatements

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

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions
{ equityBasis: 'market' | 'book'; model: string; variant: AltmanVariant; }

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

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.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.
return.assumptions.variant
AltmanVariant

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

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

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

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

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.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.

function

beneishMScore

The original eight-variable 1999 Beneish equation `-4.84 + 0.920 DSRI + 0.528 GMI + 0.404 AQI + 0.892 SGI + 0.115 DEPI - 0.172 SGAI + 4.679 TATA - 0.327 LVGI`, with the component definitions fixed to the paper. Every variable the model needs must be present in both periods — there is NO five-variable fallback, silent or otherwise.

export declare function beneishMScore(input: BeneishInput): BeneishResult;
Fields, parameters & returned members (10)
Name / typeMeaning & unitOptional / default
(input)
BeneishInput

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).current
FinancialStatements

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).prior
FinancialStatements

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions
{ model: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.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.
return.components
BeneishComponent[]

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

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.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.
return.mScore
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.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.

function

piotroskiFScore

The standard nine binary signals, per the paper: profitability (return on beginning assets, operating cash flow, their improvement, accruals), leverage/liquidity/funding (falling long-term-debt ratio, improving current ratio, no net share issuance), and efficiency (improving gross margin, improving beginning-assets turnover). Each signal is reported, not only the total; a signal whose statement line is absent reports `null` with the reason and is excluded from `fScore` — never guessed to 0 or 1.

export declare function piotroskiFScore(input: PiotroskiInput): PiotroskiResult;
Fields, parameters & returned members (12)
Name / typeMeaning & unitOptional / default
(input)
PiotroskiInput

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).current
FinancialStatements

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).prior
FinancialStatements

unitless by name
Required / declared member
No @default declared; consult the signature and description.
(input).priorPrior
FinancialStatements
The period before `prior`. Needed because the paper's return and turnover use BEGINNING assets, so the prior year's own signal needs the balance sheet one further back.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.assumptions
{ model: string; returnBasis: 'beginning total assets'; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.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.
return.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.
return.diagnostics
{ warnings: string[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.diagnostics.warnings
string[]
One warning per unevaluable signal.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
return.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.
return.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.
return.signals
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.