Dechow-Dichev Accrual Quality
Install and import#
npm install fintech-algorithmsimport { dechowDichevAccrualQuality } from "fintech-algorithms/fundamental-analysis-and-valuation/quality-and-distress/dechow-dichev-accrual-quality";Signature#
dechowDichevAccrualQuality(data)Runs the firm-specific Dechow-Dichev regression of scaled working-capital accruals on lagged, current and leading operating cash flow, and reports the residual standard deviation as the accrual-quality measure.
Parameters#
| Name | Type | Notes |
|---|---|---|
data | { observations: { period: string; cfo_scaled: number; working_capital_accrual_scaled: number }[] } | observations must be an array of at least seven period records ordered in time. Each record needs a unique non-empty period label, a cfo_scaled value and a working_capital_accrual_scaled value. The first and last records are used only as the lag and lead for their neighbours, so the regression is fitted on the interior periods. |
Returns#
{ state: string; method: string; coefficients: { intercept: number; cfo_t_minus_1: number; cfo_t: number; cfo_t_plus_1: number }; estimation_periods: string[]; fitted_accruals: number[]; residuals: number[]; accrual_quality: number; interpretation: string; available_after_period: string }
coefficients holds the fitted intercept and the three cash-flow slopes. estimation_periods lists the interior period labels actually regressed, with fitted_accruals and residuals aligned to it. accrual_quality is the residual standard deviation using degrees of freedom equal to the observation count less the four coefficients, so a larger value means lower quality, which interpretation restates. available_after_period is the label of the final observation, since the last interior fit needs its lead. method is dechow-dichev-2002-firm-specific and state is calculated.
Errors#
- When data is not a plain object — throws TypeError
- When cfo_scaled or working_capital_accrual_scaled is missing or not a finite number — throws TypeError
- When observations is not an array, holds fewer than seven records, or contains a non-object entry — throws RangeError
- When a period label is empty or repeated — throws RangeError
- When the regression design matrix is singular — throws RangeError
Complexity: time O(n),
space O(n).
Worked example#
executed Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.
Input#
{
"observations": [
{
"period": "Y1",
"cfo_scaled": 0.082,
"working_capital_accrual_scaled": 0.011
},
{
"period": "Y2",
"cfo_scaled": 0.064,
"working_capital_accrual_scaled": 0.018
},
{
"period": "Y3",
"cfo_scaled": 0.091,
"working_capital_accrual_scaled": -0.006
}
]
}Call#
dechowDichevAccrualQuality(data)Returns#
object with 9 fields: state, method, coefficients, estimation_periods, fitted_accruals, residuals, accrual_quality, interpretation, …
{
"state": "calculated",
"method": "dechow-dichev-2002-firm-specific",
"coefficients": {
"intercept": 0.03644529821051595,
"cfo_t_minus_1": 0.04149503236651636,
"cfo_t": -0.5247590858810153,
"cfo_t_plus_1": 0.06807435790812336
},
"estimation_periods": ["Y2", "Y3", "Y4", "Y5", "Y6", "Y7"],
"fitted_accruals": [
0.012458075937824543,
-0.0054526017115175875,
0.022705476699814174,
-0.011870859874287619,
0.00953492500736294,
-0.0031794130798601925
],
"residuals": [
0.005541924062175456,
-0.0005473982884824126,
-0.0017054766998141728,
-0.0001291401257123813,
-0.0005349250073629404,
0.00017941307986019247
],
"accrual_quality": 0.003108868359945476,
"interpretation": "higher residual dispersion means lower accrual quality",
"available_after_period": "Y10"
}Other exports#
This module also exports
calculate, altmanZScore, piotroskiFScore, beneishMScore, sloanAccrualMeasure, ohlsonOScore, zmijewskiXScore, springateSScore, tafflerZScore, fulmerHScore, groverGScore, dechowFScoreForMisstatementRisk, modifiedJonesDiscretionaryAccrualModel. Every module additionally exports run as an alias of its
primary function, and a meta object carrying its catalog id, domain, family,
shape and article URL.
Diagrams#
How it works#
This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.
References#
- The Quality of Accruals and Earnings: The Role of Accrual Estimation Errors — Patricia M. Dechow and Ilia D. Dichev
- Beginners' Guide to Financial Statements — U.S. Securities and Exchange Commission
- Conceptual Framework for Financial Reporting — International Accounting Standards Board
- Evidence boundary