# Spin-Off Price Adjustment

> Separate Parent Price from Distributed Value

`D02-F02-A02` · Corporate Actions and Security Master Data → Complex Distributions · archetype `record-transform` · difficulty 3/5 · verification **verified**

Full page: https://docs.thefintechbuilder.com/corporate-actions-and-security-master-data/complex-distributions/spin-off-price-adjustment/
Agent skill: `npx skills add IslamBaraka90/Fintech-Algorithms-Library` — https://docs.thefintechbuilder.com/guides/agent-skill/

## Install and import

```bash
npm install fintech-algorithms
```

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

## Signature

```ts
calculate(input)
```

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.

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `input` | `{ asOf: string; revisions: EventRevision[] }` | yes | Revisions carry the parent cum price and the value distributed per parent share, usually derived from the child's when-issued price. Point-in-time by construction: `asOf` is the knowledge time, and only revisions available at or before it are eligible. Passing the event date instead of the knowledge date is what lets a backtest use information it could not have had. |

## Returns

`{ status, parentCumPrice, distributedValuePerParent, theoreticalParentExReference, adjustmentFactor, … }`

The theoretical ex-distribution reference for the parent and the factor to apply to its history, with a `status` that distinguishes a completed calculation from one awaiting a reliable child valuation.

## Errors

- When the distributed value cannot be established at asOf — reported as a status rather than thrown

## Complexity

Time `O(revisions)`, space `O(1)`.

## Worked example

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

### Input

`input`:

```json
{
  "asOf": "2026-06-02T20:00:00Z",
  "revisions": [
    {
      "eventId": "SYNTH-SPIN-2026",
      "revisionId": "SYNTH-SPIN-2026-R1",
      "revisionSequence": 1,
      "availableAt": "2026-05-21T12:00:00Z",
      "status": "confirmed",
      "quoteCurrency": "USD",
      "recordAt": "2026-05-20T20:00:00Z",
      "whenIssuedStartAt": "2026-05-27T13:30:00Z",
      "distributionAt": "2026-06-01T12:00:00Z",
      "parentExAt": "2026-06-01T13:30:00Z",
      "childRegularWayAt": "2026-06-01T13:30:00Z",
      "unavailableChildPricePolicy": "pending",
      "parentCumObservation": {
        "price": 120,
        "currency": "USD",
        "priceType": "regular_way_cum_distribution",
        "observedAt": "2026-05-29T20:00:00Z",
        "availableAt": "2026-05-29T20:00:05Z",
        "sourceId": "SYNTH-PARENT-CLOSE"
      },
      "parentExObservation": {
        "price": 108,
        "currency": "USD",
        "priceType": "regular_way_ex_distribution",
        "observedAt": "2026-06-01T20:00:00Z",
        "availableAt": "2026-06-01T20:00:05Z",
        "sourceId": "SYNTH-PARENT-EX-CLOSE"
      }
    }
  ]
}
```

### Call

```ts
calculate(input)
```

### Returns

object with 16 fields: eventId, revisionId, availableAt, status, quoteCurrency, parentCumPrice, distributedValuePerParent, theoreticalParentExReference, …

```json
{
  "eventId": "SYNTH-SPIN-2026",
  "revisionId": "SYNTH-SPIN-2026-R1",
  "availableAt": "2026-05-21T12:00:00Z",
  "status": "ready",
  "quoteCurrency": "USD",
  "parentCumPrice": 120,
  "distributedValuePerParent": 13.5,
  "theoreticalParentExReference": 106.5,
  "backwardAdjustmentFactor": 0.8875,
  "factorDirection": "multiply_pre_event_parent_prices",
  "factorAnchor": "post_event_parent_only_basis",
  "rounding": "shortest_decimal_half_up_6_on_output_only",
  "components": [
    {
      "securityId": "SYNTH-CHILD-A",
      "entitlementRatio": 0.25,
      "priceType": "when_issued",
      "priceQuote": 44,
      "valuePerParent": 11,
      "holderEntitlement": {
        "exactChildShares": 5.75,
        "wholeChildShares": 5,
        "fractionalChildShare": 0.75,
        "fractionalReferenceValue": 33,
        "actualCashInLieuKnown": false
      }
    },
    {
      "securityId": "SYNTH-CHILD-B",
      "entitlementRatio": 0.1,
      "priceType": "regular_way",
      "priceQuote": 25,
      "valuePerParent": 2.5,
      "holderEntitlement": {
        "exactChildShares": 2.3,
        "wholeChildShares": 2,
        "fractionalChildShare": 0.3,
        "fractionalReferenceValue": 7.5,
        "actualCashInLieuKnown": false
      }
    }
  ],
  "economicValueAllocation": {
    "parentWeight": 0.8875,
    "children": [
      {
        "securityId": "SYNTH-CHILD-A",
        "weight": 0.091667
      },
      {
        "securityId": "SYNTH-CHILD-B",
        "weight": 0.020833
      }
    ]
  }
}
```

Showing 14 of 16 fields.

## Other exports

`roundHalfUp6`. 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.

## Verification and provenance

Tier: **verified** (via input-expected).

The worked example below is the figure published in this algorithm's article, replayed and asserted by the test suite on every build. The arithmetic cannot drift without the build failing.

Both tiers guarantee the signature. Full explanation: https://docs.thefintechbuilder.com/guides/verification/

Generated from the docs.json payload shipped inside fintech-algorithms@0.13.1.
The signature and parameter list are checked against the compiled implementation at build time,
so a description that contradicts the code fails the build rather than reaching this file.

## Links

- Article (how it works, step by step): https://thefintechbuilder.com/corporate-actions-and-security-master-data/complex-distributions/spin-off-price-adjustment/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/corporate-actions-and-security-master-data/complex-distributions/spin-off-price-adjustment/impl.ts
- Standalone repository: https://github.com/IslamBaraka90/Fintech-Spin-Off-Price-Adjustment-Corporate-Actions-algorithm
- Package on npm: https://www.npmjs.com/package/fintech-algorithms
- Domain index for agents: https://docs.thefintechbuilder.com/corporate-actions-and-security-master-data/llms.txt
