# Rights-Issue Bonus-Factor Adjustment

`D46-F01-A07` · Earnings and Per-Share Analytics → Earnings and Share Foundations · archetype `record-transform` · difficulty 3/5 · verification **verified**

Full page: https://docs.thefintechbuilder.com/earnings-and-per-share-analytics/earnings-and-share-foundations/rights-issue-bonus-factor-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 { rightsIssueBonusFactorAdjustment } from "fintech-algorithms/earnings-and-per-share-analytics/earnings-and-share-foundations/rights-issue-bonus-factor-adjustment";
```

## Signature

```ts
rightsIssueBonusFactorAdjustment(input)
```

Extracts the bonus element of a rights issue by computing the theoretical ex-rights price and the market-to-TERP adjustment factor, then restates prior-period weighted-average shares and basic EPS with it. All arithmetic runs in 50-significant-digit decimal with half-even rounding and the figures come back as exact decimal strings. A contract failure is rethrown as an `Error` whose message begins `EPS calculation failed: `.

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `input` | `{ events: Array<{ event_id, effective_or_exercise_date, existing_shares_per_block, new_shares_per_block, cum_rights_fair_value_per_share, subscription_price_per_share, offered_to_all_existing_shareholders, event_is_effective }>, periods: Array<{ period_id, basis_date, basis_is_uniform, earnings_available_to_ordinary_shareholders, weighted_average_ordinary_shares }> }` | yes | `events` and `periods` are both required and must be non-empty arrays. Each event needs `existing_shares_per_block` and `new_shares_per_block` as positive integer strings, an `effective_or_exercise_date` in `YYYY-MM-DD` form, a `cum_rights_fair_value_per_share` above zero, a `subscription_price_per_share` from zero up to that fair value, and both `offered_to_all_existing_shareholders` and `event_is_effective` set to `true`. Unlike the bonus-issue topic, event ids and dates are not required to be unique or ordered. Each period needs a `basis_date`, `basis_is_uniform` set to `true`, decimal `earnings_available_to_ordinary_shareholders` and a strictly positive `weighted_average_ordinary_shares`. Nothing is defaulted. |

## Returns

`{ topic_id, state, events, periods }`

`state` is always `calculated`. `events` gives one row per input event with `event_id`, `terp` and the reduced factor as `factor_numerator` and `factor_denominator`. `periods` gives `period_id`, `applied_event_ids`, `factor_numerator`, `factor_denominator`, `restated_shares` and `restated_basic_eps`; a period picks up only the events dated strictly after its `basis_date`. Unlike the bonus-issue topic, no `earnings` or pre-restatement columns are emitted.

## Errors

- When `subscription_price_per_share` exceeds `cum_rights_fair_value_per_share` or is negative, or the fair value is not above zero — throws Error
- When `offered_to_all_existing_shareholders` or `event_is_effective` is not `true`, a per-block share count is not a positive integer string, a date is not a real `YYYY-MM-DD` value, `weighted_average_ordinary_shares` is not positive, or `basis_is_uniform` is not `true` — throws Error

## Complexity

Time `O(e * p) for e events and p periods`, space `O(e + p)`.

## Worked example

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`:

```json
{
  "events": [
    {
      "event_id": "SYN-RIGHTS-1",
      "effective_or_exercise_date": "2025-06-01",
      "existing_shares_per_block": "4",
      "new_shares_per_block": "1",
      "cum_rights_fair_value_per_share": "12.50",
      "subscription_price_per_share": "8.00",
      "offered_to_all_existing_shareholders": true,
      "event_is_effective": true
    }
  ],
  "periods": [
    {
      "period_id": "SYN-2024",
      "basis_date": "2024-12-31",
      "basis_is_uniform": true,
      "earnings_available_to_ordinary_shareholders": "18000000",
      "weighted_average_ordinary_shares": "9000000"
    },
    {
      "period_id": "SYN-CURRENT",
      "basis_date": "2025-06-01",
      "basis_is_uniform": true,
      "earnings_available_to_ordinary_shareholders": "9500000",
      "weighted_average_ordinary_shares": "9700000"
    }
  ]
}
```

### Call

```ts
rightsIssueBonusFactorAdjustment(input)
```

### Returns

object with 4 fields: topic_id, state, events, periods

```json
{
  "topic_id": "D46-F01-A07",
  "state": "calculated",
  "events": [
    {
      "event_id": "SYN-RIGHTS-1",
      "terp": "11.6",
      "factor_numerator": "125",
      "factor_denominator": "116"
    }
  ],
  "periods": [
    {
      "period_id": "SYN-2024",
      "applied_event_ids": ["SYN-RIGHTS-1"],
      "factor_numerator": "125",
      "factor_denominator": "116",
      "restated_shares": "9698275.8620689655172413793103448275862068965517241",
      "restated_basic_eps": "1.856"
    },
    {
      "period_id": "SYN-CURRENT",
      "applied_event_ids": [],
      "factor_numerator": "1",
      "factor_denominator": "1",
      "restated_shares": "9700000",
      "restated_basic_eps": "0.97938144329896907216494845360824742268041237113402"
    }
  ]
}
```

## Verification and provenance

Tier: **verified** (via E).

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.0.
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/earnings-and-per-share-analytics/earnings-and-share-foundations/rights-issue-bonus-factor-adjustment/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/earnings-and-per-share-analytics/earnings-and-share-foundations/rights-issue-bonus-factor-adjustment/impl.ts
- Package on npm: https://www.npmjs.com/package/fintech-algorithms
- Domain index for agents: https://docs.thefintechbuilder.com/earnings-and-per-share-analytics/llms.txt
