How Corporate Actions, Futures Expirations, and Contract Rolls Affect Historical Prices and Positions
Welcome back. In the previous lesson, you separated economic P&L from cash movements: equity financing and stock borrow are costs, while futures variation margin is the daily cash realization of P&L. That accounting discipline has an important consequence: an apparent move in a chart is not necessarily a market return. It may be a mechanical adjustment caused by a corporate action or a change from one futures contract to another.
This lesson explains how to keep those mechanical events from corrupting signals, returns, and position records. By the end, you should be able to distinguish a tradable instrument history from a research-friendly adjusted series, and record what actually happens to an open equity or futures position.
A price is quoted in units, and the units can change
A historical price series is not always a direct, immutable record of economic gains and losses. Two broad classes of events change its interpretation:
- Equity corporate actions can change the number of shares, cash held, ticker, or even the security that a shareholder owns.
- Futures expiration and rolls replace one dated contract with another contract that has a different price level.
The core rule is:
Keep an event ledger for positions and cash, and use a separately defined normalized series for research.
If those two layers are mixed, a backtest may interpret a 50% stock split as a crash, or a difference between two futures maturities as an overnight trading gain.
Corporate actions: preserve economic value, not a particular share price
A corporate action is an issuer event that changes the economic or administrative terms of a security. For systematic equity trading, the main events to recognize are:
- stock splits and reverse splits;
- cash dividends;
- ticker or symbol changes;
- mergers, acquisitions, spinoffs, and delistings.
The mechanics vary, but your accounting question is constant: what happens to the position quantity, price basis, and cash balance?

Stock splits and reverse splits
Suppose you own 100 shares at 100 per share. Your position value is:
In a 2-for-1 split, each old share becomes two new shares. Immediately after the split, ignoring ordinary market movement, you hold 200 shares near 50 each:
More generally, if is the number of new shares received per old share, then:
where and are pre-split quantity and price, and and are post-split values. The product , and therefore the immediate economic value, is unchanged.
A reverse split works in the opposite direction. In a 1-for-10 reverse split, 1,000 shares at 1 per share become 100 shares at roughly 10 per share. Reverse splits can also create fractional-share entitlements; brokers commonly resolve those with a cash-in-lieu payment.
A raw daily price history might show the price falling from 100 to 50 on the split date. Treating that as a investment return is plainly wrong. For signal research, historical prices before the split are commonly divided by two so that the chart is expressed in the post-split share unit. Historical volume is often adjusted in the opposite direction so that share turnover remains comparable.
Impact of corporate action on derivatives, company balance sheets and how to adjust historical data
Watch Impact of corporate action on derivatives, company balance sheets and how to adjust historical data from Zerodha Varsity. It gives a compact visual explanation of why raw equity prices can show false jumps after splits and why a trading system needs normalized data.
Watch the split intuition to see why a split changes charted prices without changing investment value. Then watch the adjustment example, which uses an anomalous one-day return to identify a split and rescales historical prices. Treat an extreme return as a diagnostic clue, not proof: validate every adjustment against a reliable corporate-action record.
For an open position, a split is not merely a data-cleaning operation. Your broker and portfolio state must change the position itself:
| Before a 2-for-1 split | After a 2-for-1 split |
|---|---|
| 100 shares | 200 shares |
| Average cost basis: 100 per share | Average cost basis: 50 per share |
| Position value: 10,000 | Position value: approximately 10,000 |
| Limit sell at 110 | Equivalent limit sell at 55, for twice as many shares |
The final row matters operationally. Open orders with price or quantity terms may need adjustment or cancellation according to exchange and broker rules. A research engine that adjusts prices but leaves a simulated position at its old share count will manufacture a large loss.
Dividends: price return is not total return
A cash dividend transfers value from the company to shareholders. On the ex-dividend date, the stock price commonly declines by approximately the dividend amount, all else equal.
Suppose you hold 100 shares at 100 and the company goes ex-dividend for 1 per share. A simplified economic ledger is:
| Item | Approximate value |
|---|---|
| Value before ex-date | 10,000 |
| Equity value after a 1-per-share price decline | 9,900 |
| Dividend entitlement | 100 |
| Total value, before other market movement | 10,000 |
For a long position, the approximate one-day total-value change is:
where is the cash dividend per share. If the only change is the dividend, the price decline and dividend cash offset.
For a short position, the sign reverses. A short seller generally owes a manufactured dividend to the lender of the borrowed shares. A strategy that appears profitable on raw short-sale price returns can therefore be materially overstated if it omits those payments.
This leads to three distinct kinds of equity series:
| Series | What it represents | Main use |
|---|---|---|
| Raw price | The historical quoted price at that time | Fills, position accounting, audit trails |
| Split-adjusted price | History rescaled to remove split discontinuities | Many price-based indicators |
| Total-return-adjusted price | Price history adjusted for splits and distributions, typically assuming reinvestment | Long-horizon return comparison |
| Cash ledger | Actual dividends credited or debited to the account | Portfolio P&L simulation |
Do not use total-return-adjusted prices and then separately credit dividends to the account. That would count the same economic benefit twice.
Read QuantConnect's Corporate Actions documentation to connect the financial mechanics to algorithm state: data normalization, position changes, cash entries, ticker changes, and delistings.
In the “Splits” section, read the split definition, then continue through the discussion beginning “If you backtest without the” and ending with indicator handling. Focus on the distinction between adjusted historical data and raw-mode position adjustments. In “Dividends,” read the dividend treatment. Notice the two internally consistent approaches: factor dividends into the price series, or preserve raw prices and add dividend cash. Finally, in “Symbol Changes” and “Delistings,” read the order consequence of a ticker change, then read from “The delist warning occurs” through the delisting workflow. These events show why a persistent security identifier is safer than treating a ticker as a permanent identity.
Symbol changes, mergers, and delistings
A ticker change does not normally create P&L, but it can break an algorithm that keys its holdings, orders, or data joins only by ticker string. Maintain a stable internal security identifier and a time-dated mapping from that identifier to the ticker that was valid on each date.
A delisting or merger is more consequential. The position may be converted into cash, shares of an acquiring company, a combination of both, or an illiquid residual claim. A realistic historical dataset must retain these names rather than simply removing them once they disappear. Otherwise, losing companies vanish from the past and a strategy’s simulated universe becomes unrealistically favorable.
Record corporate actions as events, not as mysterious return corrections
For research, adjusted prices are convenient. For accounting, the original economic events must remain visible.
A minimal corporate-action table should include:
| Field | Purpose |
|---|---|
| Persistent security ID | Preserves identity across ticker changes |
| Effective date and known-at timestamp | Establishes when the system may act on the event |
| Event type | Split, dividend, merger, symbol change, delisting |
| Split ratio or cash amount | Defines the mechanical adjustment |
| Successor security or cash terms | Handles conversions and delistings |
| Source and revision timestamp | Supports later audit and reproducibility |
On the effective date, apply the event to the raw portfolio state. For example:
- Update quantity and cost basis for a split.
- Credit or debit cash for a dividend according to the signed position.
- Cancel or replace orders whose identifiers or terms have changed.
- Convert or liquidate a position according to the documented merger or delisting terms.
- Revalue the resulting position using valid post-event prices.
Then, separately, construct the price series used by a signal. A 50-day moving average should not suddenly collapse because a company split its stock; but your fill simulation should still use the raw price that could actually have been traded at the time.
Futures expire; a “continuous future” does not trade
A futures instrument is always a contract with a specified maturity. For example, a crude-oil root symbol can have several listed contracts, each with a different delivery month and expiration date. The contracts reference the same broad underlying market, but they are legally distinct instruments and can trade at different prices.
At expiry, settlement depends on the contract specification:
- Cash-settled futures are closed through a final cash settlement process.
- Physically delivered futures can create delivery obligations if held through the relevant deadline.
A systematic trader will usually close or roll a position before the first-notice date, last-trading day, or other broker-imposed deadline. Those dates are contract-specific; “expiration” is not a sufficiently precise operational rule.
A futures roll changes the instrument, not just the label
A roll closes a position in an expiring contract and opens a comparable position in a later contract. Suppose a strategy is long one near-month contract at 100 and rolls into the next contract at 103.
The roll creates two position events:
| Contract | Action | Position after action |
|---|---|---|
| Near contract | Sell to close | 0 |
| Next contract | Buy to open | 1 |
There is no automatic 3-point profit merely because the new contract trades at 103 and the old one traded at 100. Futures are marked to market; you close the old contract at its actual price and begin marking the new contract from its own actual price. You do, however, incur execution costs on both legs, and the later contract may represent a different notional exposure if the number of contracts is held fixed.
A roll rule must state when the change occurs. Common choices are:
- Calendar rule: roll a fixed number of business days before last trading day.
- Liquidity rule: roll when the next contract’s volume or open interest exceeds that of the current contract.
- Hybrid rule: use a scheduled window but require minimum liquidity conditions.
The choice must be fixed before testing. A rule that retrospectively chooses the cheapest or most favorable day is a form of look-ahead bias.
Why naïvely stitching futures contracts creates false returns
Assume the near contract settles at 100 on the final day it is used in your dataset, while the next contract settles at 103 on that same date. If you append one price series to the other without adjustment, your chart jumps by 3 points.
That jump may reflect the futures curve, such as contango or backwardation. It is not necessarily a price move experienced by a trader during the roll.
The problem becomes clear with a simple ledger. Assume one contract has a constant multiplier and the strategy holds one contract throughout:
| Date | Contract held | Contract price | Daily futures P&L |
|---|---|---|---|
| Day 1 | Near | 99 | — |
| Roll day | Near, then next | 100, then 103 | +1 on the near contract; no gain from changing contract |
| Day after roll | Next | 102 | -1 on the next contract |
The actual cumulative futures price P&L is approximately zero: gain 1 before the roll and lose 1 afterward. But a naïve stitched series of 99, 100, 102 suggests a gain of 3. The missing distinction is that the 103 opening level of the new contract was never a gain on the old contract.
A continuous futures series is a synthetic research series created to remove or manage this discontinuity. It is useful for long historical indicators, but it is not a security you can directly trade.
Futures Continuation: What it is, Challenges, Methods and More
Read QuantInsti's explanation of continuous futures to see the practical data problem, the main adjustment conventions, and why the chosen convention must match the intended analysis.
Begin in “Challenge with futures continuation contract.” Read why a continuation is needed. Then read the artificial-gap explanation. Relate the chart gap to the false P&L in the preceding example. In “Methods to build a continuous futures,” read proportional adjustment, then read from “This method of adjustment takes away” through backward and forward adjustment. Also read the “Rollover/Perpetual series” subsection, focusing on its weighted transition between two contracts. Finish with “Which method to choose?” and read the selection principle. The important conclusion is not that one method is universally best, but that each method preserves some properties while distorting others.
Three continuous-series conventions and what each preserves
Let be the old contract’s price on the roll date and the new contract’s price on that same date. In the example:
The roll gap is:
Backward additive adjustment
A backward additive series shifts all prices before the roll by the gap:
for dates before the roll.
The old contract’s final adjusted value becomes 103, matching the new contract’s value at the roll. This makes point changes within each old contract remain intact. With a stable multiplier, that can be useful for models framed in price points.
Its limitation is that percentage returns change because the denominator changes. Repeated backward additive adjustments can also make sufficiently old prices very small or even negative. An adjusted level of does not mean the original futures contract traded at a negative price.
Backward ratio adjustment
A backward ratio series scales older prices by:
In the example:
The adjusted historical price is:
This preserves percentage changes within the adjusted portion of a contract’s history. It is therefore often preferable when the signal is expressed in returns, ratios, or volatility-normalized terms.
Its limitation is that price-point changes are altered. A one-point move in an old adjusted contract no longer necessarily corresponds to one point of actual historical contract movement.
Perpetual or weighted-roll series
A perpetual series blends the old and new contracts over several days:
where gradually decreases from near 1 to 0 during the roll window.
This creates a smooth transition and can approximate a strategy that actually transfers exposure gradually. But it also implies a multi-day execution schedule, with trading costs and exposure split across two contracts. Do not use a smoothly blended signal series while assuming an instantaneous, costless one-day roll in the portfolio ledger.
The essential distinction
| Question | Correct object |
|---|---|
| What did the strategy actually hold? | Dated futures contracts and a roll-event ledger |
| What was the daily account P&L? | Actual contract settlements, multipliers, and roll fills |
| How should a long historical trend indicator be computed? | A precisely documented continuous series |
| Did the roll itself earn the apparent chart gap? | No; inspect actual contract P&L and execution costs |
| What is the current tradeable instrument? | The specific active contract selected by the roll rule |
A robust data design for equity actions and futures rolls
For an implementation in pandas or a database, avoid one catch-all close column that silently mixes raw and adjusted observations. Store clearly named objects instead:
raw_equity_prices
split_adjusted_equity_prices
total_return_equity_prices
corporate_action_events
futures_contract_prices
contract_specifications
roll_schedule
continuous_futures_prices
orders_and_fills
positions_and_cash
For every continuous futures series, store metadata alongside the values:
- contract-selection rule;
- roll trigger and observation time;
- old and new contract identifiers;
- price field used, such as settlement or close;
- adjustment method;
- cumulative additive offsets or ratio factors;
- whether a weighted roll is assumed;
- transaction-cost assumptions for the actual roll.
That metadata is part of the model. Two vendors can both label a series “continuous crude oil” while using different roll dates and adjustments, producing different signals and different backtest results.
Key takeaways
Corporate actions can change price, quantity, cash, or identity without representing ordinary market returns. A stock split changes share count and per-share price while preserving immediate position value; dividends require either a cash entry or a total-return price adjustment, but not both. Ticker changes and delistings require persistent identifiers and explicit position-handling rules.
Futures contracts have finite maturities. Expiration closes the contract through cash or delivery settlement, while a roll closes one dated contract and opens another. A continuous futures series is a useful analytical construction, not a tradeable asset. Its roll rule and adjustment convention determine which properties of history are preserved.
Next, you will shift from data mechanics to research design: translating a market intuition into a falsifiable trading hypothesis with a defined signal, holding period, benchmark, and rejection criterion.
Can't find a good explanation? Sign up and we'll make it for you
Sign up