Skip to content
TotalFinance

Fundamentals · @insiderfinance/totalfinance

@insiderfinance/totalfinance/fundamentals

import { … } from '@insiderfinance/totalfinance/fundamentals'
stable-by-law (pre-1.0; not a 1.0 stability guarantee)iface 43type 6fn 57JSON ↗
fn

netDebtToEbitda

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import { netDebtToEbitda } from '@insiderfinance/totalfinance/fundamentals';

export declare const netDebtToEbitda: RatioFacade<SingleStatementRatioInput>;
Fields, parameters and returned members (24)

Loading 24 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

netProfitMargin

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import { netProfitMargin } from '@insiderfinance/totalfinance/fundamentals';

export declare const netProfitMargin: RatioFacade<IncomeStatementRatioInput<Pick<IncomeStatement, 'period' | 'revenue' | 'netIncome'>>>;
Fields, parameters and returned members (52)

Loading 52 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

operatingMargin

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import { operatingMargin } from '@insiderfinance/totalfinance/fundamentals';

export declare const operatingMargin: RatioFacade<IncomeStatementRatioInput<Pick<IncomeStatement, 'period' | 'revenue' | 'operatingIncome'>>>;
Fields, parameters and returned members (52)

Loading 52 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

payablesTurnover

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import { payablesTurnover } from '@insiderfinance/totalfinance/fundamentals';

export declare const payablesTurnover: RatioFacade<PairRatioInput>;
Fields, parameters and returned members (26)

Loading 26 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

perShareFundamentals

#

Split-aware per-share normalization: the period's diluted shares are multiplied by the supplied cumulative split factor so a pre-split period and a post-split observer meet on one basis. The factor and the shares used are echoed; shares absent or non-positive is an error, never a NaN.

Signature
import { perShareFundamentals } from '@insiderfinance/totalfinance/fundamentals';

export declare function perShareFundamentals(input: PerShareFundamentalsInput): PerShareFundamentalsResult;
Fields, parameters and returned members (16)

Loading 16 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

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.

Signature
import { piotroskiFScore } from '@insiderfinance/totalfinance/fundamentals';

export declare function piotroskiFScore(input: PiotroskiInput): PiotroskiResult;
Fields, parameters and returned members (12)
Name · typeMeaning · unitRequired · default
(input)PiotroskiInput—unitless by nameRequiredNo @default declared
(input).currentFinancialStatements—unitless by nameRequiredNo @default declared
(input).priorFinancialStatements—unitless by nameRequiredNo @default declared
(input).priorPriorFinancialStatements

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
RequiredNo @default declared
return.assumptions{ model: string; returnBasis: 'beginning total assets'; }—unitless by nameRequiredNo @default declared
return.assumptions.modelstring

The published model name (a label, deliberately not a literal type).

unitless by name
RequiredNo @default declared
return.assumptions.returnBasis'beginning total assets'

Returns and turnover use BEGINNING total assets, per the paper.

unitless by name
RequiredNo @default declared
return.diagnostics{ warnings: string[]; }—unitless by nameRequiredNo @default declared
return.diagnostics.warningsstring[]

One warning per unevaluable signal.

unitless by name
RequiredNo @default declared
return.evaluableSignalsnumber

How many of the nine signals could be evaluated; 9 when every input line was present.

unitless by name
RequiredNo @default declared
return.fScorenumber

Sum of the evaluable signals (each 0 or 1).

unitless by name
RequiredNo @default declared
return.signalsPiotroskiSignal[]—unitless by nameRequiredNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

priceToBook

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import { priceToBook } from '@insiderfinance/totalfinance/fundamentals';

export declare const priceToBook: RatioFacade<MarketMultipleRatioInput>;
Fields, parameters and returned members (28)

Loading 28 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

priceToEarnings

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import { priceToEarnings } from '@insiderfinance/totalfinance/fundamentals';

export declare const priceToEarnings: RatioFacade<MarketMultipleRatioInput>;
Fields, parameters and returned members (28)

Loading 28 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

priceToSales

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import { priceToSales } from '@insiderfinance/totalfinance/fundamentals';

export declare const priceToSales: RatioFacade<MarketMultipleRatioInput>;
Fields, parameters and returned members (28)

Loading 28 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

quickRatio

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import { quickRatio } from '@insiderfinance/totalfinance/fundamentals';

export declare const quickRatio: RatioFacade<BalanceSheetRatioInput<Pick<BalanceSheet, 'period' | 'currentLiabilities' | 'inventory' | 'currentAssets'>>>;
Fields, parameters and returned members (64)

Loading 64 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

receivablesTurnover

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import { receivablesTurnover } from '@insiderfinance/totalfinance/fundamentals';

export declare const receivablesTurnover: RatioFacade<PairRatioInput>;
Fields, parameters and returned members (26)

Loading 26 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

reconcileFinancialStatements

#

Accounting-identity diagnostics: the balance-sheet identity, gross-profit articulation, current-versus-total containment, and — with the prior period — cash articulation (Δcash = operating + investing + financing). A check whose fields are absent reports null, never a silent pass presented as proof.

Signature
import { reconcileFinancialStatements } from '@insiderfinance/totalfinance/fundamentals';

export declare function reconcileFinancialStatements(input: ReconcileStatementsInput): ReconciliationResult;
Fields, parameters and returned members (11)
Name · typeMeaning · unitRequired · default
(input)ReconcileStatementsInput—unitless by nameRequiredNo @default declared
(input).priorStatementsFinancialStatements

The immediately prior period, enabling the cash-articulation check across the two.

unitless by name
OptionalNo @default declared
(input).statementsFinancialStatements—unitless by nameRequiredNo @default declared
(input).toleranceAmountnumber

Absolute tolerance in reported units (period.monetaryScale). Default 1 — one reported unit, the rounding a scaled filing can legitimately carry. Documented and echoed in the result.

currency amount (the field or record currency)
OptionalNo @default declared
return.assumptions{ toleranceAmount: number; }—unitless by nameRequiredNo @default declared
return.assumptions.toleranceAmountnumber

Absolute tolerance in reported units, echoed (default 1).

currency amount (the field or record currency)
RequiredNo @default declared
return.checksReconciliationCheck[]—unitless by nameRequiredNo @default declared
return.diagnostics{ warnings: string[]; }—unitless by nameRequiredNo @default declared
return.diagnostics.warningsstring[]

One warning per failed or unevaluable check.

unitless by name
RequiredNo @default declared
return.reconcilesboolean

True when every evaluable check is within tolerance.

unitless by name
RequiredNo @default declared
return.toleranceAmountnumber—currency amount (the field or record currency)RequiredNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

requireBalanceSheet

#

Validate one BalanceSheet at a public boundary.

Signature
import { requireBalanceSheet } from '@insiderfinance/totalfinance/fundamentals';

export declare function requireBalanceSheet(functionName: string, balance: BalanceSheet): void;
Fields, parameters and returned members (21)

Loading 21 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

requireCashFlowStatement

#

Validate one CashFlowStatement at a public boundary.

Signature
import { requireCashFlowStatement } from '@insiderfinance/totalfinance/fundamentals';

export declare function requireCashFlowStatement(functionName: string, cashFlow: CashFlowStatement): void;
Fields, parameters and returned members (13)

Loading 13 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

requireFinancialStatements

#

Validate a FinancialStatements set: each statement, then the identity agreement — the three periods must share periodEndDate, periodType, currency, and monetaryScale, because every cross-statement ratio assumes one period and one unit.

Signature
import { requireFinancialStatements } from '@insiderfinance/totalfinance/fundamentals';

export declare function requireFinancialStatements(functionName: string, statements: FinancialStatements): void;
Fields, parameters and returned members (5)
Name · typeMeaning · unitRequired · default
(functionName)string—unitless by nameRequiredNo @default declared
(statements)FinancialStatements—unitless by nameRequiredNo @default declared
(statements).balanceBalanceSheet—unitless by nameRequiredNo @default declared
(statements).cashFlowCashFlowStatement—unitless by nameRequiredNo @default declared
(statements).incomeIncomeStatement—unitless by nameRequiredNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

requireFundamentalPeriod

#

Validate a FundamentalPeriod at a public boundary (Law 12 closed request): presence, types, the strict date grammar, the literal domains, and the ordering facts a period must obey.

Signature
import { requireFundamentalPeriod } from '@insiderfinance/totalfinance/fundamentals';

export declare function requireFundamentalPeriod(functionName: string, period: FundamentalPeriod): asserts period is FundamentalPeriod;
Fields, parameters and returned members (14)

Loading 14 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

requireIncomeStatement

#

Validate one IncomeStatement at a public boundary.

Signature
import { requireIncomeStatement } from '@insiderfinance/totalfinance/fundamentals';

export declare function requireIncomeStatement(functionName: string, income: IncomeStatement): void;
Fields, parameters and returned members (15)

Loading 15 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

requireMarketObservation

#

Validate a MarketObservation at a public boundary.

Signature
import { requireMarketObservation } from '@insiderfinance/totalfinance/fundamentals';

export declare function requireMarketObservation(functionName: string, observation: MarketObservation): void;
Fields, parameters and returned members (6)
Name · typeMeaning · unitRequired · default
(functionName)string—unitless by nameRequiredNo @default declared
(observation)MarketObservation—unitless by nameRequiredNo @default declared
(observation).marketCapitalizationnumber—unitless by nameOptionalNo @default declared
(observation).observedTimestampMsnumber

When the price was observed (epoch ms). Must not precede the fundamentals' availability.

epoch milliseconds (UTC instant)
RequiredNo @default declared
(observation).sharePricenumber—currency amount (the field or record currency)RequiredNo @default declared
(observation).sharesOutstandingnumber

Split-adjusted shares consistent with sharePrice.

unitless by name
OptionalNo @default declared

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

returnOnAssets

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import { returnOnAssets } from '@insiderfinance/totalfinance/fundamentals';

export declare const returnOnAssets: RatioFacade<PairRatioInput>;
Fields, parameters and returned members (26)

Loading 26 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.

fn

returnOnCapitalEmployed

#

Public declaration. Read the signature and member contracts below; no additional behaviour is inferred.

Signature
import { returnOnCapitalEmployed } from '@insiderfinance/totalfinance/fundamentals';

export declare const returnOnCapitalEmployed: RatioFacade<PairRatioInput>;
Fields, parameters and returned members (26)

Loading 26 members…

Stability: stable-by-law (pre-1.0; not a 1.0 stability guarantee). Units come from declared names; “unitless by name” means the name alone does not establish a unit. See conventions and errors and warnings.