fintech-algorithms
Using a coding agent? Give it the skill: npx skills add IslamBaraka90/Fintech-Algorithms-Library What it does →

If-Converted Convertible-Debt Dilution

Install and import#

bash
npm install fintech-algorithms
ts
import { ifConvertedConvertibleDebtDilution } from "fintech-algorithms/earnings-and-per-share-analytics/basic-and-diluted-eps/if-converted-convertible-debt-dilution";

Signature#

ifConvertedConvertibleDebtDilution(input)

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 Error whose message begins EPS calculation failed: .

Parameters#

NameTypeNotes
input{ period_start, period_end, continuing_operations_control_numerator, basic_weighted_average_shares, basic_components_complete, share_basis_restatement_complete, instrument: { issue_date, actual_conversion_date, lapse_redemption_or_extinguishment_date, fixed_ordinary_shares_on_conversion, holder_advantageous_terms_selected, expense_period_aligned, terms_restatement_complete, numerator_adjustment_components, is_final } }period_start and period_end are YYYY-MM-DD dates with the end not before the start, and basic_components_complete and share_basis_restatement_complete must both be true. continuing_operations_control_numerator and basic_weighted_average_shares are canonical decimal strings, the share count strictly positive. instrument needs holder_advantageous_terms_selected, expense_period_aligned and terms_restatement_complete all true, an issue_date, a fixed_ordinary_shares_on_conversion decimal string, and a non-empty numerator_adjustment_components array whose amount strings are summed. actual_conversion_date and lapse_redemption_or_extinguishment_date are optional; when either is supplied it closes the outstanding window on the day before it. is_final defaults to false. There are no numeric tuning parameters.

Returns#

{ topic_id, state, basic_eps, numerator_adjustment, incremental_shares, incremental_eps, candidate_diluted_eps, classification, included, active_days, period_days, is_final }

state is always calculated. active_days counts inclusive days from the later of period_start and issue_date to the earlier of period_end and the day before conversion or lapse, floored at zero, and period_days is the inclusive length of the reporting period; both are plain numbers. incremental_shares is the conversion share count scaled by active_days / period_days, and incremental_eps is null when those shares are zero. classification is dilutive, with included matching it, only when candidate_diluted_eps is strictly below basic_eps; otherwise it is antidilutive. All EPS and share figures are decimal strings.

Errors#

  • When basic_weighted_average_shares is not strictly positive, for instance a value of 0 — throws Error
  • When period_end is before period_start, any of the five input or instrument control flags is not true, numerator_adjustment_components is missing or empty, or a date is not a real YYYY-MM-DD value — throws Error

Complexity: time O(n) in the number of numerator adjustment components, space O(1).

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#

input
{
  "period_start": "2025-01-01",
  "period_end": "2025-12-31",
  "continuing_operations_control_numerator": "30000000",
  "basic_weighted_average_shares": "10000000",
  "basic_components_complete": true,
  "share_basis_restatement_complete": true,
  "instrument": {
    "instrument_id": "SYN-CONV-1",
    "issue_date": "2025-04-01",
    "actual_conversion_date": null,
    "lapse_redemption_or_extinguishment_date": null,
    "fixed_ordinary_shares_on_conversion": "2000000",
    "holder_advantageous_terms_selected": true,
    "expense_period_aligned": true,
    "terms_restatement_complete": true,
    "numerator_adjustment_components": [
      {
        "component_id": "effective-interest-avoided",
        "amount": "1800000"
      },
      {
        "component_id": "related-tax-effect",
        "amount": "-450000"
      },
      {
        "component_id": "consequential-change",
        "amount": "-50000"
      }
    ],
    "is_final": true
  }
}

Call#

ifConvertedConvertibleDebtDilution(input)

Returns#

object with 12 fields: topic_id, state, basic_eps, numerator_adjustment, incremental_shares, incremental_eps, candidate_diluted_eps, classification, …

{
  "topic_id": "D46-F02-A01",
  "state": "calculated",
  "basic_eps": "3",
  "numerator_adjustment": "1300000",
  "incremental_shares": "1506849.3150684931506849315068493150684931506849315",
  "incremental_eps": "0.86272727272727272727272727272727272727272727272728",
  "candidate_diluted_eps": "2.7201190476190476190476190476190476190476190476189",
  "classification": "dilutive",
  "included": true,
  "active_days": 275,
  "period_days": 365,
  "is_final": true
}

Diagrams#

If-Converted Convertible-Debt Dilution — if converted bridge

Calculation flow#

If-converted debt dilution flow
flowchart LR
  A["Completed Basic continuing-operations components"] --> B["Validate debt terms, settlement, dates, and sources"]
  B --> C{"US GAAP principal required in cash?"}
  C -- "Yes" --> X["No interest add-back; route to conversion-premium share calculation"]
  C -- "No" --> D["Set assumed-conversion interval"]
  D --> E["Sum pretax, tax, and consequential numerator changes"]
  D --> F["Weight fixed conversion shares over the same interval"]
  E --> G["Candidate = (Basic numerator + adjustment) ÷ (Basic shares + incremental shares)"]
  F --> G
  G --> H{"Exact candidate below continuing-operations Basic EPS?"}
  H -- "Yes" --> I["Standalone dilutive; send to ordering"]
  H -- "No" --> J["Antidilutive; exclude"]

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.

Read the article →

References#

  • IAS 33 Earnings per Share
  • Statement No. 128, Earnings per Share
  • Accounting for Convertible Instruments and Contracts in an Entity's Own Equity
  • Filed convertible-notes diluted-EPS example
  • Research limits

The rest of the Basic and Diluted EPS family#