When a split or bonus makes your scanner lie
One morning my scanner told me a healthy stock had crashed 50% overnight. Nothing had happened to the company. It had issued a 1:1 bonus, and my data had no idea.
The morning the scanner lied
The stock had closed near ₹1,000 the day before. The next day's NSE data showed it near ₹500. To my scanner, that was a 50% fall, a fresh 52-week low and a broken trend, all at once.
The real picture was the opposite. Every shareholder now held twice as many shares at half the price. The value of each holding had not changed at all. If I had acted on that signal, or trusted a backtest built on the same data, I would have made a decision based on a number that was simply wrong.
Why it happens
NSE's end-of-day files report the actual traded prices for each day, exactly as they were. They do not go back and rewrite older prices when a company changes its share count.
So when a split, bonus or rights issue happens, the price scale changes overnight. Yesterday's prices are on the old scale and today's are on the new one. Any tool that reads those files straight, and most home-built ones do, sees one long history with a cliff in the middle.
The common culprits:
- Stock split. Splitting a ₹10 face value share into five ₹2 shares makes the price drop to about a fifth.
- Bonus issue. A 1:1 bonus gives one free share for every share held, so the price roughly halves.
- Rights issue. New shares are offered below market price, so the price adjusts down by a smaller amount.
- Large special dividend. The price drops by the dividend on the ex-date. Usually small, but it adds up over years.
What it breaks
One bad day of data does not stay in one place. It quietly spreads into everything built on top of it:
- Scanners. The stock shows up as a big loser, a 52-week low or a breakdown. A good stock can drop out of a momentum list for weeks.
- Moving averages and indicators. A 200-day average now mixes old-scale and new-scale prices. It stays wrong for the next 200 days, not just one.
- 52-week high and low. The old high on the old scale can be twice the current price, so the stock looks far from its high when it is actually at it.
- Backtests. A test can show a stop-loss being hit on the bonus date, a loss that never happened in real life. Run across many years and many stocks, these fake losses can make a good strategy look bad, or a bad one look good.
- Alerts. A price or percentage-drop alert fires for no real reason, and after a few of those, people stop trusting the alerts at all.
How I fixed it
The fix is not to delete the bad day. It is to put all of history back on today's scale, so every price is comparable with every other price.
- Keep a list of corporate actions. NSE publishes splits, bonuses and rights issues with their ex-dates. My data pipeline pulls this list every evening along with the prices.
- Work out an adjustment factor for each action. For a bonus of A new shares for every B held, the factor is B ÷ (A + B). A 1:1 bonus gives 1 ÷ 2 = 0.5. For a split, it is the new face value ÷ the old one, so ₹10 to ₹2 gives 0.2.
- Adjust every price before the ex-date. Open, high, low and close are multiplied by the factor; volume is divided by it. History now lines up with today, and the 50% "crash" disappears.
- Keep the raw data untouched. Adjusted prices are stored separately. If a factor turns out wrong, I can rebuild from the original files instead of guessing.
- Check every evening for unexplained gaps. Any stock that moves more than a set limit overnight, with no corporate action on file, is flagged for a manual look before the scanners run. Most flags are real news, but now and then one is a missing action, and that is exactly the one that matters.
adjusted price = raw price × B ÷ (A + B) (bonus of A for every B)
Check your own setup in five minutes
If you use your own scanner, spreadsheet or backtest on NSE data, these questions tell you quickly whether this problem is hiding in it:
- Pick a stock you know had a recent bonus or split. Does your chart show a sudden cliff on the ex-date?
- Does your data source say whether its prices are adjusted or raw? If it doesn't say, assume raw.
- Do your moving averages and 52-week highs come from adjusted prices?
- When you backtest, are stop-losses being hit on corporate-action dates?
- Is anything checking for big overnight gaps before your scanner runs?
If any answer is "I'm not sure", it is worth an hour to find out. It is far cheaper than a decision made on a price that never existed.
Educational content only. Not investment advice. Quant Moment Systems is not registered with SEBI as an investment adviser or research analyst.