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

Corporate-Action Divisor Bridge

Install and import#

bash
npm install fintech-algorithms
ts
import { calculate } from "fintech-algorithms/index-and-benchmark-engineering/index-initialization-and-continuity/corporate-action-divisor-bridge";

Signature#

calculate(data)

Applies a corporate action to an index by routing its non-market value change through the divisor. Connects D02's event handling to the index level: the constituent's price changes for real, the index level must not.

Parameters#

NameTypeNotes
data{ preEventMarketValue: number; nonMarketValueChange: number; preEventDivisor: number; action: string }nonMarketValueChange is the part of the value change that is *not* economic — the part the divisor must absorb. Splitting a change into its market and non-market components correctly is the whole difficulty.

Returns#

{ action, preEventLevel, postEventMarketValue, newDivisor, bridgedLevel }

The rebased divisor and the level either side, which should match.

Errors#

  • When the pre-event divisor is not positive — throws

Complexity: time O(1), space O(1).

Worked example#

verified This is the worked example published in the article, replayed by the test suite on every run. The output cannot drift.

Input#

data
{
  "preEventMarketValue": 100000000,
  "nonMarketValueChange": -4000000,
  "preEventDivisor": 100000,
  "action": "special dividend"
}

Call#

calculate(data)

Returns#

object with 5 fields: action, preEventLevel, postEventMarketValue, newDivisor, bridgedLevel

{
  "action": "special dividend",
  "preEventLevel": 1000,
  "postEventMarketValue": 96000000,
  "newDivisor": 96000,
  "bridgedLevel": 1000
}

Diagrams#

Corporate-Action Divisor Bridge — article hero
Corporate-Action Divisor Bridge — failure guard
Corporate-Action Divisor Bridge — worked example

Calculation flow#

Corporate-Action Divisor Bridge calculation flow
flowchart LR
    A["Point-in-time inputs"] --> B["Validate units and timing"]
    B --> C{"Contract feasible?"}
    C -->|No| D["Reject with reason"]
    C -->|Yes| E["Calculate Corporate-Action Divisor Bridge"]
    E --> F["Recompute invariants"]
    F --> G{"Checks pass?"}
    G -->|No| D
    G -->|Yes| H["Publish audited output"]
Corporate-Action Divisor Bridge methodology state
stateDiagram-v2
    [*] --> FrozenInputs
    FrozenInputs --> Validated: contract passes
    FrozenInputs --> Rejected: missing or infeasible
    Validated --> Calculated: apply named rule
    Calculated --> Audited: invariants pass
    Calculated --> Rejected: invariant fails
    Audited --> Published: version and timestamp recorded
    Published --> Revised: approved correction
    Revised --> FrozenInputs: rebuild from retained source state

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#

The rest of the Index Initialization and Continuity family#