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

Complex Distributions

5 algorithms in Corporate Actions and Security Master Data · 5 with asserted arithmetic.

In this family#

  1. Rights-Issue TERP Adjustment verified

    Computes the theoretical ex-rights price. A rights issue is not a dividend and not a split: shareholders receive the right to buy new shares below market, so value transfers rather than disappears, and TERP is the price that makes the series continuous.

    calculate(input)
  2. Spin-Off Price Adjustment verified

    Splits a parent's price history at a spin-off. One company becomes two, so the parent's own history must be restated by the value that left with the child — otherwise the parent shows a fall it never suffered.

    calculate(input)
  3. Stock-Dividend Adjustment verified

    Applies a stock dividend, where shareholders receive additional shares instead of cash. Economically close to a split, but reported differently and often with a different volume convention — which is the part that gets missed.

    calculate(data)
  4. Special-Dividend Adjustment verified

    Handles a distribution large or irregular enough that treating it as an ordinary dividend misstates the series. The hard part is not the arithmetic but the classification, and this makes that decision explicit and auditable.

    calculate(rawData)
  5. Return-of-Capital Adjustment verified

    Applies a return of capital, which reduces the investor's cost basis rather than paying income. It affects price continuity and tax reporting differently from a dividend, and conflating the two misstates both.

    calculate(payload)

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:

ts
import { calculate } from "fintech-algorithms/corporate-actions-and-security-master-data/complex-distributions/rights-issue-terp-adjustment";
import { calculate } from "fintech-algorithms/corporate-actions-and-security-master-data/complex-distributions/spin-off-price-adjustment";

Read them in the order above — the sequence is pedagogical, not alphabetical.

Where this sits#

Corporate Actions and Security Master Data collects 20 algorithms across 4 families. For the concept behind this family rather than the call signatures, see the concept guides.