Basic and Diluted EPS
4 algorithms in Earnings and Per-Share Analytics · 1 with asserted arithmetic.
In this family#
-
If-Converted Convertible-Debt Dilution verified
Applies the if-converted method to one convertible debt instrument: it time-weights the conversion shares over the days the instrument was outstanding inside the period, adds the numerator components back to earnings, and compares the resulting candidate against basic EPS to classify the instrument dilutive or antidilutive. All arithmetic runs in 50-significant-digit decimal with half-even rounding and the money figures come back as exact decimal strings. A contract failure is rethrown as an
Errorwhose message beginsEPS calculation failed:.ifConvertedConvertibleDebtDilution(input) -
If-Converted Convertible-Preference Dilution contract
The if-converted method for convertible preference shares: assume conversion, add the shares, add back the preference dividend. Conversion is only included when it is **dilutive** — an anti-dilutive instrument is excluded, and including it overstates EPS.
calculateConvertiblePreferenceDilution(input) -
Treasury-Share Method for Options/Warrants contract
The treasury share method for options and warrants: assume exercise, assume the proceeds buy back shares at the average market price, count only the net new shares. Using the period-end price instead of the average is the standard error, and it changes the answer.
calculateTreasuryShareMethod(input) -
Contingently Issuable Shares contract
Decides whether shares issuable on a condition count today. The rule is that they are included from the date the condition is *satisfied*, judged as at the reporting date — not when issue is merely likely, which is where judgement creeps in.
calculateContingentShareInclusion(input)
What they share#
Every topic here is a record-transform, so once you have
called one the rest follow the same shape. Import paths differ only in the final segment:
import { ifConvertedConvertibleDebtDilution } from "fintech-algorithms/earnings-and-per-share-analytics/basic-and-diluted-eps/if-converted-convertible-debt-dilution";
import { calculateConvertiblePreferenceDilution } from "fintech-algorithms/earnings-and-per-share-analytics/basic-and-diluted-eps/if-converted-convertible-preference-dilution";Read them in the order above — the sequence is pedagogical, not alphabetical.
Where this sits#
Earnings and Per-Share Analytics collects 8 algorithms across 2 families. For the concept behind this family rather than the call signatures, see the concept guides.