NiveshBuddy Learn
Investing & Strategy ConceptsBeginner

Understanding Corporate Actions & Historical Data

A bonus issue can halve a share price overnight without anyone losing a rupee. What corporate actions are, why they corrupt historical price data if left alone, and how NiveshBuddy handles them — an adjustment for splits, bonuses and demergers, and an exit for mergers and delistings.

9 min readUpdated

What You’ll Learn

By the end of this article, you’ll understand:

  • What a corporate action is, in plain terms
  • Why an unadjusted price chart can show a crash that never happened
  • How bonus issues and stock splits are adjusted automatically, and why dividends need nothing at all
  • Why a holding is exited ahead of a merger, while a demerger is only an adjustment
  • What an ex-date is and why it is the deciding moment
  • How to recognise the effect of all this when reading your own backtest

What a corporate action is

A corporate action is something a company does that affects its own shares — how many exist, what each one is worth, what they pay out, or whether the company continues to exist in its current form.

Five are worth knowing before you read a backtest, because each one affects historical price data:

Corporate actionWhat the company does
DividendPays out part of its profits in cash to shareholders
Bonus issueGives existing shareholders additional shares free of cost, in proportion to what they already hold
Stock splitDivides each existing share into a larger number of smaller ones
MergerCombines with another company; shareholders end up holding something different
DemergerSeparates part of itself into a new company, which shareholders also receive

One more term does all the work in this article. The ex-date is the cut-off: from that date, the share trades without the entitlement attached to the action. Someone buying on or after the ex-date does not receive the bonus shares or the demerged company. It is the moment the change becomes real in the price.

Why this matters to a price chart

Here is the problem in one example. It is illustrative, with round numbers chosen to make the arithmetic visible.

A company announces a 1:1 bonus — one free share for every share held.

A 1:1 bonus issue, before and after

The day before

  • 100 shares held
  • ₹200 a share

₹20,000

position value

The day after

  • 200 shares held
  • ₹100 a share

₹20,000

position value

Illustrative. The share count doubles and the price halves. The investor's position is worth exactly what it was worth the day before.

Nobody gained anything and nobody lost anything. The same value is simply divided into twice as many pieces.

But look at what the raw price history now shows: ₹200, then ₹100. A strategy reading that data sees a 50% overnight crash. Every rule you might have written reacts to it — a moving average bends, a rate-of-change filter registers a collapse, a stop loss triggers on a fall that never happened.

This is the whole issue. The price genuinely changed; the shareholder's wealth did not. Historical data that records the first without accounting for the second is not just imprecise, it is actively misleading.

NiveshBuddy's history runs from 2021, on end-of-day prices, and it is adjusted for corporate actions — which is the answer to this problem for everything that looks backwards. A simulation, which moves forward one trading day at a time, meets each event as it happens. The rest of this article takes the cases in turn: the ones that are adjusted, and the ones that end in an exit.

How the simple cases are handled

For bonus issues and stock splits, NiveshBuddy adjusts automatically. Both the historical price data and the position quantities are corrected so the record stays continuous — in a backtest and in a simulation alike.

In the example above, the historical prices before the bonus are restated on the new basis, so the series reads as a smooth ₹100 rather than a fall from ₹200. The holding of 100 shares becomes 200. The position's value is unchanged at every point, and the chart shows what actually happened to the investor's money rather than what happened to the label on one share.

In a simulation you can see it happen. The holding's quantity and average price are adjusted, and the row in Active Portfolio carries an Adjusted for split or Adjusted for bonus pill; hover over it to see what changed. Its value and profit or loss are unchanged. If the ratio leaves a fraction of a share (a 3:2 split of 101 shares, say), that fraction is paid out in cash, and the trade log records it as "Closed: split or bonus fraction paid in cash".

Why these two events can be handled this way: the arithmetic is exact. A 1:1 bonus or a 2:1 split has one unambiguous conversion, known in advance, with no judgement involved. Adjusting is simply applying it.

A demerger is adjusted too, not exited. When a company separates part of itself, its share price drops on the ex-date by roughly the value that moved to the new company, and NiveshBuddy works out that share from the price gap. In a backtest, the price history is adjusted for it, as for a split. In a simulation, the holding keeps its number of shares, its average price is lowered in the same proportion, and the value that moved to the new company is credited to Cash Balance. The new company's shares are not added to the simulation, because they often list weeks later. The row carries an Adjusted for demerger pill.

Dividends need no special treatment at all, for a related reason. The historical price data a strategy is evaluated against is already adjusted for them, so a dividend never shows up as an artificial fall on its ex-date. There is no dividend rule in the builder, nothing to configure, and no dividend event to hunt for in a trade log — the effect is simply present in the data the strategy reads.

Mergers and delistings: the holding is exited

Mergers and delistings are different. After a merger, a shareholder may hold shares in a different company, at a ratio set by the terms of the deal, in an entity with a different business and a different price history. After a delisting, the shares stop trading altogether. There is no exact conversion to apply, so NiveshBuddy does not guess at one: the holding is exited — in a backtest and in a simulation alike, on the same days.

A merger is exited just before its ex-date. The exit is decided two trading days before the ex-date and filled at the closing price of the last trading day before it, so the proceeds are already in cash when the structure changes. The trade carries a Merger exit pill. In those last days before the ex-date, the strategy does not enter that stock either.

A delisting is exited at the last price. A delisting is not announced in advance the way a merger is; it is seen only once the shares have stopped trading, after about 20 trading days without a price. Until then the holding sits at its last closing price. It is then closed at that price, with no transaction cost, and carries a Delisted pill.

A stock that stops trading for a while is held at its last close. Trading in a share can pause for days without the company delisting. While it does, a simulation tags the holding Last traded with the date of its last closing price, for example "Last traded 24 Oct", and values it at that close. If the rules signal an exit in the meantime, the exit waits: Scheduled Trades and the Action Center show "Waiting for trading to resume (signalled on 24 Oct).", and you can still reject it. An entry signalled on a day the stock has no closing price isn't made; its slot stays in cash.

What happens to a holding facing a merger

  1. The merger is scheduledAn ex-date is set for the merger
  2. The holding is exitedAt the close of the last trading day before the ex-date
  3. Proceeds become cashThe exit proceeds sit in Cash Balance
  4. Redeployed at the next rebalanceCash re-enters on the strategy's ordinary schedule
The strategy steps aside rather than guessing at post-merger terms.

Merger — needs review

If a simulation learns of a merger too late to exit before the ex-date — for example because it was paused — it doesn't pretend it exited in time. The holding is kept and marked Merger — needs review, and the Activity Logs record it. Once the old shares stop trading, the holding is closed as a delisting.

The pills appear on Active Portfolio and on a simulation's Trade Log, and Merger exit and Delisted also appear on a backtest's trade log. Hovering over one shows what happened and when.

This is a deliberate modelling choice with a stated cost, not an oversight. The platform's aim is a record that avoids assumptions it cannot make reliably — and stepping aside is the honest version of that. It does mean the record does not follow whatever the merged entity did next; NiveshBuddy is not reconstructing that outcome inside a backtest or a simulation.

Reading this in your own results

Once you know the mechanics, the effects become recognisable rather than puzzling.

Four things this explains

An exit you didn't ask for

An exit with no obvious signal behind it may be a merger exit or a delisting; its pill says which. The rules did not fire; the event did.

A stretch of cash

Between that exit, or a demerger's cash credit, and the next scheduled rebalance, the money sits in Cash Balance. The simulation is not fully invested for that period, and the result reflects it.

A smooth chart across a split

If a price series runs through a bonus or split without a step change, that is the adjustment working, not an error in the data.

An adjusted holding

In a simulation, an Adjusted for split, bonus or demerger pill means the quantity or average price was converted. Nothing was gained or lost; a leftover fraction, or the value that moved to a demerged company, shows up as cash.

None of this is something you configure, in a backtest or a simulation. There is no setting to change, and no decision to make while building a strategy. It is worth understanding for one reason: so that when you see it in your results, you read it correctly instead of concluding the strategy misbehaved.

Common misconceptions

  • "A price drop on a split means the stock fell." It means the share was divided. Your position's value is unchanged, and the adjusted history is what reflects that honestly.
  • "Bonus shares are a gain." They are the same value spread across more shares. A bonus is worth having for reasons of liquidity and accessibility, but the moment it happens it adds nothing to what you own.
  • "A simulation should just keep holding through a merger." Continuing would require assuming a conversion and a valuation that cannot be modelled reliably while the event is still unfolding. Exiting first states the uncertainty instead of hiding it inside a result.
  • "A merger exit in my simulation means the strategy made a decision." The strategy's rules did not fire. The event forced the exit, and the cash returns to the strategy's normal process at the next rebalance.
  • "A demerger means the holding was exited." It was not. A demerger is an adjustment: the holding stays, its average price is lowered, and the value that moved to the new company is credited as cash.
  • "A backtest ignores mergers because its data is adjusted." It does not. A backtest makes the same merger and delisting exits as a simulation, on the same days, and its trade log shows the same pills.
  • "A dividend will show up as a drop in my backtest." It will not. The price data is already adjusted for dividends, so there is no artificial fall to explain and nothing for you to account for.
  • "Corporate actions are an edge case I can ignore." Dividends, bonus issues and splits are routine in Indian equities. A backtest over several years across a broad universe will meet many of them.

Key takeaways

  • A corporate action changes the shape of a company's shares — how many exist, what each is worth, or whether the company continues in its current form.
  • The ex-date is the cut-off: from that date the share trades without the entitlement attached to the action.
  • An unadjusted price series can show a 50% crash for a 1:1 bonus in which no shareholder lost anything — which is why raw historical prices cannot be trusted on their own.
  • Bonus issues and stock splits are adjusted automatically, in both historical prices and position quantities, because the conversion is exact and known in advance — in a simulation the holding shows an Adjusted for split or Adjusted for bonus pill.
  • Dividends need no special treatment at all — the price data is already adjusted for them, so they never appear as an artificial fall.
  • A demerger is an adjustment, not an exit: the holding keeps its shares, its average price is lowered, and the value that moved to the new company is credited as cash.
  • Mergers and delistings end in an exit, in a backtest and a simulation alike — a merger just before its ex-date (Merger exit), a delisting at its last price (Delisted); the proceeds sit in Cash Balance until the next rebalance.
  • None of this is configurable — it matters so that you read an unexplained exit or a stretch of cash correctly rather than as a fault.