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

Rights-Issue TERP Adjustment

Install and import#

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

Signature#

calculate(input)

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.

Parameters#

NameTypeNotes
input{ asOf: string; revisions: EventRevision[] }Each revision carries the cum price, the subscription price, and the ratio of new to existing shares. 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#

{ terp, referencePrice, subscriptionCashQuote, valuePerOldShare, adjustmentFactor, … }

TERP with every input that produced it, plus the value per old share — the quantity that shows the transfer is a transfer and not a loss.

Errors#

  • When no revision is available at asOf — returned as a state on the result rather than thrown
  • When the subscription ratio is not positive — throws

Complexity: time O(revisions), 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#

input
{
  "asOf": "2024-05-24T00:00:00Z",
  "revisions": [
    {
      "eventId": "NG-2024-RIGHTS",
      "revisionId": "NG-PROSPECTUS-2024-05-23",
      "revisionSequence": 1,
      "availableAt": "2024-05-23T23:59:59Z",
      "status": "confirmed",
      "recordAt": "2024-05-20T18:00:00+01:00",
      "exAt": "2024-05-24T08:00:00+01:00",
      "rightsTradingStartAt": "2024-05-24T08:00:00+01:00",
      "paymentDeadlineAt": "2024-06-10T11:00:00+01:00",
      "newSharesTradeAt": "2024-06-12T08:00:00+01:00",
      "terms": {
        "oldShares": 24,
        "newShares": 7,
        "rawCumRightsPrice": 1127.5,
        "cashDisadvantage": 39.12,
        "quoteCurrency": "GBp",
        "subscriptionPrice": 645,
        "subscriptionCurrency": "GBp",
        "fxQuotePerSubscription": 1,
        "feesPerNewShareQuote": 0,
        "taxesPerNewShareQuote": 0,
        "holdingOldShares": 100,
        "outOfMoneyPolicy": "reject",
        "priceSourceId": "NG-PROSPECTUS-P52-LSE-DOL-QUOTE",
        "priceDate": "2024-05-22"
      }
    }
  ]
}

Call#

calculate(input)

Returns#

object with 15 fields: eventId, revisionId, availableAt, quoteCurrency, referencePrice, subscriptionCashQuote, terp, valuePerOldShare, …

{
  "eventId": "NG-2024-RIGHTS",
  "revisionId": "NG-PROSPECTUS-2024-05-23",
  "availableAt": "2024-05-23T23:59:59Z",
  "quoteCurrency": "GBp",
  "referencePrice": 1088.38,
  "subscriptionCashQuote": 645,
  "terp": 988.261935,
  "valuePerOldShare": 100.118065,
  "valuePerNewShareRight": 343.261935,
  "adjustmentFactor": 0.908012,
  "issueDiscountToTerp": 0.347339,
  "inTheMoney": true,
  "applied": true,
  "entitlement": {
    "exactNewShares": 29.166667,
    "wholeNewShares": 29,
    "fractionalNewShare": 0.166667
  }
}

Showing 14 of 15 fields.

Diagrams#

Rights-Issue TERP Adjustment — article hero
Rights-Issue TERP Adjustment — failure guard
Rights-Issue TERP Adjustment — worked example

Calculation flow#

TERP evidence and calculation flow
flowchart LR
    A["Event revisions"] --> B["Select latest available at asOf"]
    B --> C{"Confirmed and timed correctly?"}
    C -->|No| X["Reject with diagnostic"]
    C -->|Yes| D["Normalize price, currency, FX, fees, taxes"]
    D --> E{"Subscription cash below reference?"}
    E -->|Yes| F["Derive TERP and two rights values"]
    E -->|No| G["Reject or explicit no adjustment"]
    F --> H["Emit revision and units"]
    G --> H
    H --> I["Keep observed ex-rights trade separate"]
Rights-issue operational lifecycle
stateDiagram-v2
    [*] --> RecordSnapshot: 20 May 18:00 London
    RecordSnapshot --> TermsAvailable: prospectus published 23 May
    TermsAvailable --> ExRights: 24 May 08:00
    ExRights --> NilPaid: nil-paid dealings begin
    NilPaid --> Accepted: pay and accept by 10 June 11:00
    NilPaid --> RenouncedOrLapsed: transfer or do not accept
    Accepted --> FullyPaidShares: dealings begin 12 June 08:00
    RenouncedOrLapsed --> AllocatedByTerms: proceeds depend on offer rules

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#

  • R1 - National Grid plc Rights Issue Prospectus
  • R2 - National Grid 7-for-24 Rights Issue announcement
  • R3 - National Grid Rights Issue and Prospectus hub
  • R4 - S&P DJI Equity Indices Policies & Practices
  • R5 - FTSE Russell Corporate Actions and Events Guide
  • R6 - RFC 3339: Date and Time on the Internet
  • Evidence decision

The rest of the Complex Distributions family#