Ledger & Candle
Chapter 09 · Derivatives

Futures Trading

Reading time ~80 min · Data as of 30 Sep 2026 · Based on Zerodha Varsity Module 4 (Futures Trading), all 13 chapters

1. What you'll learn and why it matters

So far this course has dealt with the cash market: you pay the full price of a share, it lands in your demat account, and you can hold it as long as you like. A futures contract is different. You agree today on a price for a trade that settles on a fixed future date, and you put down only a deposit (the margin), typically 11% to 20% of the position's value. That one difference changes the risk completely. A 5% move in the stock becomes a 25% to 45% move on the money you actually put in.

Read this before anything else

SEBI's latest study of individual traders in equity derivatives (released 20 Aug 2026, covering FY25–FY26) found that 87.7% of individuals lost money in FY26, with aggregate net losses of ₹91,685 crore and an average loss of about ₹1.17 lakh per trader. The loss rate among futures traders was lower than among options traders but still 66.0%. Transaction costs alone were about ₹25,000 crore: before costs 82.1% were losers, after costs 87.7%. Futures are a professional tool. This chapter teaches you how they work so you can use them carefully, or decide not to use them at all, and both are reasonable choices.

By the end of this chapter you will be able to:

Why this matters for your style

Swing and positional traders use futures to take leveraged directional views and, unlike the cash market, to hold a short position overnight. Long-term investors mostly don't need futures, with one exception: a short Nifty futures position can temporarily hedge a portfolio through a risky event without selling (and paying capital-gains tax on) your shares. Futures traders must master margins, M2M, rollover and position sizing. Most retail blow-ups come from not respecting those four.

How this chapter is organised (and a shorter path)

The chapter has four parts. Part A, the contract (Sections 2–5): what a future is and how one trade works. Part B, the money (Sections 6–9): margin, leverage and the daily mark-to-market cash flows, with two full real ledgers. Part C, reading the market (Sections 10–14): liquidity, fair value and basis, calendar spreads, open interest, rollover and expiry. Part D, using futures (Sections 15–16): hedging a portfolio and sizing a positional trade.

If you are a long-term investor who only wants to hedge, the essential path is Sections 2–8, 11.1, 14 and 15, then the checklist in Section 18. If you plan to trade futures positionally, read everything, and pay most attention to Sections 8 and 16.

2. Forwards: the ancestor, and its four problems

A forward contract is a private agreement between two parties to exchange an asset for cash on a fixed future date at a price fixed today. Varsity uses the example of a jeweller who wants to lock in the price of gold for a purchase three months away, and a gold importer who is happy to lock in today's selling price. Neither pays anything today. On the agreed date they exchange gold for the agreed amount, whatever the market price is by then.

2.1 The logic: transferring price risk

The buyer of a forward (the jeweller) is protected if prices rise and loses the chance to buy cheaper if prices fall. The seller (the importer) has the opposite exposure. Each side gives up some upside to remove uncertainty. At expiry there are only three outcomes: price above the agreed price (buyer gains, seller loses the same amount), below it (the reverse), or equal (nobody gains). One side's gain is exactly the other's loss.

Worked example · illustrative numbers

A three-month gold forward

  1. Agreement: buyer will take 10 kg of gold in 3 months at ₹15,000 per gram. Deal value = 10,000 g × ₹15,000 = ₹15 crore.
  2. Gold ends at ₹16,000/g. Market value = ₹16 crore. Buyer pays only ₹15 crore, so buyer gains ₹1 crore and the seller loses ₹1 crore.
  3. Gold ends at ₹14,200/g. Market value = ₹14.2 crore. Buyer must still pay ₹15 crore, so buyer loses ₹80 lakh and the seller gains ₹80 lakh.
  4. Settlement can be physical (gold delivered against ₹15 crore) or cash (only the difference, ₹1 crore or ₹80 lakh, changes hands).

2.2 The four problems with forwards

ProblemWhat goes wrong
Liquidity riskYou must find someone with the exact opposite need, for the same quantity and date. Usually that means paying an intermediary.
Default (counterparty) riskIf prices move a lot, the losing side has every incentive to walk away. Nothing but a legal contract stops them.
Regulatory riskPrivate, over-the-counter (OTC) deals are lightly supervised, which makes default and disputes more likely.
RigidityIf your view changes halfway through, you cannot easily exit. The terms are customised, so nobody else wants to take over your contract.

3. What a futures contract fixes

A futures contract keeps the core of a forward (agree a price today for a trade at a future date) and moves it onto an exchange. The exchange's clearing corporation (NSE Clearing Ltd for NSE) becomes the counterparty to every buyer and every seller. That single change, plus standard terms, margins and daily settlement, fixes all four problems.

FeatureForwardFutures (NSE)
Where it tradesPrivately (OTC)On the exchange, anonymous order book
TermsCustomisedStandardised: underlying, lot size, expiry, tick size, settlement
Counterparty riskHighClearing corporation guarantees settlement, backed by margins and daily M2M
RegulationLightSEBI-regulated
Exit before expiryVery hardAny time in market hours: just take the opposite trade (square off)
Expiries availableOne, negotiatedThree monthly contracts at any time (near, next, far)
SettlementPhysical or cash, as agreedIndex futures: cash. Stock futures: physical delivery (since Oct 2019)

Two prices now matter. The spot price is the price in the normal cash market. The futures price is the price of the futures contract. They move almost together, because arbitrage (Section 11) keeps the gap small, but they are not equal. The gap is called the basis.

4. Contract specifications on NSE today

Every futures contract is fully defined by its specification. Here is what each term means, with the values in force as of October 2026 (each one checked against the sources listed in Section 21):

TermMeaningCurrent NSE rule (verified Oct 2026)
UnderlyingWhat the contract is onIndices (NIFTY, BANKNIFTY, FINNIFTY, MIDCPNIFTY, NIFTYNXT50) and 213 stocks (Oct-2026 contracts in our bhavcopy)
Lot sizeMinimum tradable quantity (units/shares per contract)NIFTY 65 and BANKNIFTY 30 since the Jan-2026 series. Stock lots vary (RELIANCE 500, HDFCBANK 650, SBIN 750). Exchanges revise lot sizes periodically, so always check the bhavcopy's NewBrdLotQty.
Contract valueFutures price × lot sizeSEBI's Oct-2024 framework requires index-derivative contracts to be worth at least ₹15 lakh when lot sizes are set. Contract value then floats with price: after Nifty's fall, one NIFTY lot was ₹14.76 lakh on 30 Sep 2026. Stock-futures lots on 30 Sep 2026 ranged from ₹2.96 lakh to ₹16.94 lakh (median ₹6.31 lakh).
Expiry cycleThree monthly contracts trade at any timeLast Tuesday of the month for NSE index and stock futures (NSE moved expiry from Thursday to Tuesday from 1 Sep 2025). If that Tuesday is a holiday, expiry moves to the previous trading day: the Nov-2026 contracts expire Mon 23 Nov because Tue 24 Nov (Guru Nanak Jayanti) is a holiday.
Tick sizeSmallest price stepIndex futures: ₹0.05 up to an index level of 15,000, ₹0.10 from 15,000 to 30,000, ₹0.20 above 30,000 (revised from April 2025). So NIFTY trades in ₹0.10 steps and BANKNIFTY in ₹0.20 steps. Stock futures follow the stock's price-band tick (₹0.01 for many stocks under ₹250, for example).
Daily settlement pricePrice used for the daily M2MThe futures closing price (a volume-weighted average of the last 30 minutes), shown as SttlmPric in the bhavcopy
Final settlementWhat happens at expiryIndex futures: cash-settled at the index's closing value on expiry day. Stock futures: physically settled. Longs take delivery and pay the full value; shorts must deliver shares.
Trading hours9:15 am to 3:30 pm, Monday to Friday, except exchange holidays

Our data confirms these rules. In the August–September 2026 bhavcopy, NIFTY futures prices move only in multiples of ₹0.10 and BANKNIFTY in ₹0.20. The September contract's final settlement price on 29 Sep was 22,716.20, exactly the Nifty's closing value that day.

4.1 Real contract data, 30 Sep 2026

The table below is built from the NSE F&O bhavcopy for 30 Sep 2026 (October contracts). The SPAN percentage comes from NSE Clearing's SPAN risk-parameter file for the same day. Section 6 explains the margin columns.

Contract (Oct-26)LotFutures priceSpotContract value ₹SPAN %ELM %Margin ₹ (approx)LeverageOI (contracts)Volume (contracts)
NIFTY6522,707.3022,620.4514,75,9749.342.01,67,3708.8×2,77,15558,953
BANKNIFTY3055,006.0054,633.0516,50,1809.312.01,86,6678.8×79,83224,111
RELIANCE5001,191.801,187.005,95,90014.243.51,05,7065.6×2,90,86418,765
HDFCBANK650715.55708.714,65,10814.163.582,1375.7×5,63,98538,017
SBIN750967.20959.507,25,40014.183.51,28,2745.7×1,32,7109,180
INFY4001,002.60994.104,01,04015.703.577,0085.2×1,82,72025,169
TCS2252,055.202,050.594,62,42014.773.584,4795.5×1,19,98112,477
TATASTEEL2,750186.07184.305,11,69214.183.590,4545.7×1,12,20411,654
ITC1,725263.55262.754,54,62414.253.580,7035.6×85,6266,216

A few things stand out. One NIFTY lot is a ₹14.76 lakh position. Even the "smallest" stock-futures lot, VEDL (1,150 shares), was worth ₹2.96 lakh. Open interest (OI, Section 13) in the NIFTY Oct contract was 2,77,155 contracts, and 58,953 contracts traded that day.

Two histograms: contract value of one lot for 213 stock futures, median 6.3 lakh rupees; margin for one lot, median 1.3 lakh rupees
Figure 9.1: Contract value and approximate margin for one lot of each of the 213 stock futures on 30 Sep 2026 (Oct contract). Margin = SPAN from NSE Clearing's SPAN file + 3.5% extreme-loss margin. Source: NSE bhavcopy, NSE Clearing SPAN file.

4.2 The contract cycle: near, next and far month

At any moment three monthly contracts trade: the near (current) month, the next (mid) month and the far month. When the near month expires, the next month becomes the near month and a new far month is listed. Liquidity is concentrated in the near month. On 30 Sep 2026, NIFTY Oct futures traded 58,953 contracts, Nov 5,653 and Dec just 1,933.

Timeline showing NIFTY Aug, Sep, Oct, Nov, Dec 2026 futures contracts, their trading windows and expiry dates
Figure 9.2: The NIFTY futures contracts in our data. The Aug contract expired Tue 25 Aug and Nov was listed the next day. Sep expired Tue 29 Sep and Dec was listed on 30 Sep. Nov expires Mon 23 Nov because Tue 24 Nov is an exchange holiday. Source: NSE bhavcopy.

5. Your first futures trade: long, short, square-off

When you buy (go long) one lot of futures, you commit to buying the lot at today's futures price on expiry. When you sell (go short), you commit to selling it. You do not have to wait for expiry. At any time you can square off by taking the opposite trade: sell what you bought, or buy back what you sold. Your obligation then passes to whoever took the other side, and your margin is released.

Futures P&L \[ \text{P\&L}_{\text{long}} = (F_{\text{exit}} - F_{\text{entry}}) \times \text{lot size} \times \text{lots} \] \[ \text{P\&L}_{\text{short}} = (F_{\text{entry}} - F_{\text{exit}}) \times \text{lot size} \times \text{lots} \]
\(F_{\text{entry}}\)
The futures price at which you opened the position, in ₹ (index points for NIFTY, where 1 point = ₹1 per unit).
\(F_{\text{exit}}\)
The futures price at which you squared off, or the final settlement price if you held to expiry.
lot size
Units (shares, or index units) in one contract, set by the exchange: 65 for NIFTY, 500 for RELIANCE (Section 4).
lots
How many contracts you traded.
P&L
Profit (positive) or loss (negative) in ₹, before costs.

How it works: the price change per unit, times the number of units you control. A long gains when the exit is higher than the entry. A short gains when it is lower, which is why the two prices swap places.

The payoff is linear. Every 1-point move in NIFTY futures is ₹65 per lot, in either direction, with no ceiling and no floor. Futures are also a zero-sum game before costs: every rupee one side gains, the other side loses. After brokerage, STT and other charges, the participants as a whole lose money, which is one reason most individual traders lose.

Real example · NIFTY Oct-26 futures · 30 Sep 2026

What a 1% move does to one lot

  1. Price on 30 Sep: 22,707.30. Lot 65. Contract value = 22,707.30 × 65 = ₹14,75,974.50.
  2. A 1% rise (≈ 227.1 points) gives a long position 227.07 × 65 ≈ +₹14,760, and the short loses the same amount.
  3. A 5% fall (≈ 1,135.4 points) costs the long ≈ ₹73,799. That is close to the ₹74,493 one lot would have lost on the single overnight gap of 7 Apr 2025 (Section 16).
Left: straight-line payoff of long and short one lot NIFTY futures. Right: return on margin versus underlying move for NIFTY and RELIANCE
Figure 9.3: Left, the linear payoff of one lot of NIFTY Oct-26 futures entered at 22,707.3. Right, the same moves expressed as a % return on margin (Section 7). Source: NSE bhavcopy, SPAN file 30 Sep 2026.

6. Margins: SPAN, exposure and peak margin

6.1 Why margins exist

The clearing corporation guarantees that the winner gets paid, so it must make sure the loser can pay. It does that in two ways: (1) it collects a deposit, the initial margin, from both buyer and seller before the trade, and (2) it settles gains and losses every day through mark-to-market (Section 8), so losses can never pile up unnoticed.

Initial margin \[ \text{Initial margin} = \text{SPAN margin} + \text{Exposure (extreme-loss) margin} \] \[ \text{SPAN} \approx \text{SPAN\%} \times \text{contract value}, \qquad \text{ELM} = \text{ELM\%} \times \text{contract value} \]
Initial margin
The deposit you must have in your account, in ₹, before you can open the position. Both buyer and seller pay it.
SPAN margin
The main part: NSE Clearing's estimate of the worst one-contract loss over a short period (explained below). It changes every day.
SPAN%
That worst-case loss as a % of the futures price, read from NSE Clearing's daily SPAN file (9.34% for NIFTY on 30 Sep 2026). The \(\approx\) is because the file gives a rupee loss per unit; the % is just that loss ÷ price.
ELM
Exposure / extreme-loss margin: an extra buffer on top of SPAN.
ELM%
A fixed rate: 2% for index futures, 3.5% for stock futures.
contract value
Futures price × lot size, in ₹: the full size of the position you control.

How it works: work out the contract value, take the SPAN % and the ELM % of it, and add the two. The total, as a % of contract value, is your margin % (11.34% for one NIFTY lot on 30 Sep 2026).

Real example · SPAN file 30 Sep 2026

Margin for one lot of NIFTY and RELIANCE October futures

  1. NIFTY: the SPAN file's worst-case loss is ₹2,120.78 per unit at a futures price of 22,707.30, which is 9.34%. SPAN per lot = 2,120.78 × 65 = ₹1,37,850.70.
  2. NIFTY ELM = 2% × ₹14,75,974.50 = ₹29,519.49. Initial margin = 1,37,850.70 + 29,519.49 = ₹1,67,370 (11.34% of contract value).
  3. RELIANCE: SPAN ₹169.70 per share (14.24% of 1,191.80) × 500 = ₹84,850. ELM = 3.5% × ₹5,95,900 = ₹20,856.50. Initial margin = ₹1,05,706.50 (17.74%).
  4. Stocks need a higher % margin than the index because a single stock is more volatile. Across all stock futures, SPAN on 30 Sep ranged from 14.16% to 46.55% (POLICYBZR), median 16.44%.

Your broker's margin calculator will show slightly different numbers. SPAN changes every day and broker figures include any additional or ad-hoc margins. Use the broker's number for real trades. Use the method above to understand why margin is what it is.

6.2 How margin works in India today (2026)

In your framework

Margins move every day, so framework.costs.futures_charges covers only transaction costs. For margin, fetch your broker's number before each trade, and treat the margin as the minimum cash you need, never the maximum you can lose.

7. Leverage: the calculation and the danger

Margin lets you control a large position with a small deposit. The ratio is your leverage:

Leverage \[ \text{Leverage} = \frac{\text{Contract value}}{\text{Margin}} = \frac{1}{\text{margin \%}} \] \[ \text{Return on margin} = \text{Leverage} \times \text{underlying \% move} \] \[ \text{Move that wipes out the entire margin} = \text{margin \%} \]
Contract value
Futures price × lot size × lots, in ₹.
Margin
The initial margin blocked for the position (SPAN + ELM, Section 6), in ₹.
margin %
Margin ÷ contract value, written as a decimal in the formula (11.34% = 0.1134).
Leverage
How many rupees of position each rupee of margin controls, shown as "×".
underlying % move
The % change in the futures price.
Return on margin
Your profit or loss as a % of the margin you put up.
  1. Divide contract value by margin. Since margin is a fixed % of contract value, this is the same as 1 ÷ margin %.
  2. Multiply any price move by the leverage to see what it does to your margin money.
  3. An adverse move equal to the margin % loses an amount equal to the whole margin.
Real example · 30 Sep 2026

NIFTY vs RELIANCE leverage

  1. NIFTY: leverage = 14,75,974.50 / 1,67,370 = 8.82×. A 1% move in Nifty = 8.8% gain or loss on your margin. An 11.34% adverse move wipes out the whole margin.
  2. RELIANCE: leverage = 5,95,900 / 1,05,706.50 = 5.64×. A 17.74% adverse move wipes out the margin.
  3. Compare with the cash market. ₹1,67,370 in Nifty ETFs exposes you to a 1% move of ₹1,674. The same money as margin on one NIFTY futures lot exposes you to ₹14,760.
Why leverage is dangerous, not "efficient"

Leverage does not change the odds of a trade being right. It only multiplies the size of the result. The danger is in the arithmetic of losses: after a 50% loss you need +100% to get back to where you started. Leverage is often sold as a way to make more from less capital. The more useful way to see it is that leverage raises the chance of a large, fast loss. The safest use of futures is to hold only as many lots as your risk budget allows (Section 16), not as many as your margin allows. If you have ₹10 lakh and hold one Nifty lot, your real leverage is 1.5×, not 8.8×.

8. Mark-to-market: a full daily ledger for a real Nifty trade

8.1 The idea

With a forward, gains and losses build up silently until expiry. With futures, the clearing corporation settles them every day. At the end of each day your position is revalued at the day's settlement price. If it went your way, the gain is credited to your account. If not, the loss is debited. Next day, the reference price is reset to that settlement price. This is mark-to-market (M2M). It stops losses from piling up and is what makes the clearing corporation's guarantee credible.

Daily M2M \[ \text{M2M}_t = \text{side} \times (P_t - P_{t-1}) \times \text{lot size} \times \text{lots}, \quad \text{side} = +1 \text{ (long)}, -1 \text{ (short)} \] \[ \text{On the entry day } P_{t-1} = \text{your trade price}; \text{ on the exit day } P_t = \text{your exit price.} \] \[ \sum_t \text{M2M}_t = \text{total P\&L} \]
\(t\)
A trading day. \(t-1\) is the trading day before it.
\(P_t\)
The futures settlement price on day \(t\) (SttlmPric in the bhavcopy), in ₹ or index points.
\(P_{t-1}\)
The previous day's settlement price: the reference your position was revalued at last night.
side
+1 for a long, −1 for a short. It flips the sign so a price rise is a gain for a long and a loss for a short.
lot size, lots
Units per contract and number of contracts, as in Section 5.
\(\text{M2M}_t\)
The cash credited (positive) or debited (negative) to your account at the end of day \(t\), in ₹.
\(\sum_t\)
Add up the daily M2M amounts over every day you held the position.
  1. Each evening, take today's settlement price minus yesterday's, multiply by the units you hold, and apply the sign for long or short. That amount is paid into or out of your account.
  2. The next day's change is measured from today's settlement price, not from your entry price.
  3. The only exceptions are the first and last days, where your actual trade prices replace a settlement price.
  4. Adding up every day's M2M gives exactly the same total as the simple P&L formula in Section 5. M2M only changes when the cash moves.

8.2 The trade

Real data · NIFTY Sep-26 futures · 3 Aug → 29 Sep 2026

Long 1 lot, held to expiry without a stop

Assumptions (stated so you can reproduce them): the trader buys 1 lot (65) of NIFTY Sep-26 futures at the 3 Aug settlement price of 24,760.00 and holds it to expiry. The account starts with ₹2,00,000. Required margin each day = 11.34% of contract value (SPAN 9.34% + ELM 2%). The SPAN % is taken from the 30-Sep SPAN file and held constant. Real SPAN changes daily, but this keeps the arithmetic transparent. When the balance after M2M falls below the required margin, the trader tops up exactly the shortfall (the margin call).

  1. Initial margin on 3 Aug = 24,760 × 65 × 11.34% = ₹1,82,500. The account has ₹2,00,000, so the trade is allowed with a buffer of ₹17,500.
  2. 4 Aug: settlement 24,683.50. M2M = (24,683.50 − 24,760.00) × 65 = −76.5 × 65 = −₹4,972.50. Balance ₹1,95,027.50.
  3. 5 Aug: settlement 24,770.00. M2M = (24,770.00 − 24,683.50) × 65 = +86.5 × 65 = +₹5,622.50. Note the reference price is the previous settlement, not your entry price.
  4. 29 Sep (expiry): the contract is cash-settled at the final settlement price 22,716.20 (Nifty's close). Total P&L = (22,716.20 − 24,760.00) × 65 = −₹1,32,847. The sum of all 40 daily M2M entries is the same −₹1,32,847.

8.3 The full ledger

DateSettlement priceChangeDaily M2M ₹Cumulative P&L ₹Margin required ₹Balance after M2M ₹Top-up (margin call) ₹
03 Aug24,760.00+0.00001,82,5002,00,000—
04 Aug24,683.50-76.50−4,972−4,9721,81,9361,95,028—
05 Aug24,770.00+86.505,6226501,82,5742,00,650—
06 Aug24,861.40+91.405,9416,5911,83,2482,06,591—
07 Aug24,789.70-71.70−4,6601,9301,82,7192,01,930—
10 Aug24,790.90+1.20782,0081,82,7282,02,008—
11 Aug24,674.10-116.80−7,592−5,5841,81,8671,94,416—
12 Aug24,602.90-71.20−4,628−10,2121,81,3421,89,788—
13 Aug24,602.00-0.90−58−10,2701,81,3361,89,730—
14 Aug24,587.00-15.00−975−11,2451,81,2251,88,755—
17 Aug24,533.50-53.50−3,478−14,7221,80,8311,85,278—
18 Aug24,359.90-173.60−11,284−26,0061,79,5511,73,9945,558
19 Aug24,238.80-121.10−7,872−33,8781,78,6591,71,6806,979
20 Aug24,392.60+153.809,997−23,8811,79,7921,88,656—
21 Aug24,391.10-1.50−98−23,9781,79,7811,88,558—
24 Aug24,324.10-67.00−4,355−28,3341,79,2871,84,203—
25 Aug24,471.70+147.609,594−18,7401,80,3751,93,797—
26 Aug24,429.10-42.60−2,769−21,5081,80,0611,91,028—
27 Aug24,281.90-147.20−9,568−31,0761,78,9761,81,460—
28 Aug24,341.90+60.003,900−27,1761,79,4181,85,360—
31 Aug24,251.40-90.50−5,882−33,0591,78,7511,79,478—
01 Sep24,090.30-161.10−10,472−43,5301,77,5641,69,0068,558
02 Sep24,000.30-90.00−5,850−49,3801,76,9011,71,7145,187
03 Sep24,000.10-0.20−13−49,3941,76,8991,76,88812
04 Sep24,048.10+48.003,120−46,2741,77,2531,80,019—
07 Sep23,867.70-180.40−11,726−58,0001,75,9231,68,2937,630
08 Sep23,749.60-118.10−7,676−65,6761,75,0531,68,2476,806
09 Sep23,552.20-197.40−12,831−78,5071,73,5981,62,22211,376
10 Sep23,484.00-68.20−4,433−82,9401,73,0951,69,1653,930
11 Sep23,485.20+1.2078−82,8621,73,1041,73,173—
15 Sep23,223.90-261.30−16,984−99,8461,71,1781,56,18914,989
16 Sep23,272.30+48.403,146−96,7001,71,5351,74,324—
17 Sep23,333.40+61.103,972−92,7291,71,9851,78,295—
18 Sep23,378.50+45.102,932−89,7981,72,3171,81,227—
21 Sep23,446.30+67.804,407−85,3901,72,8171,85,634—
22 Sep23,394.60-51.70−3,360−88,7511,72,4361,82,273—
23 Sep23,449.80+55.203,588−85,1631,72,8431,85,861—
24 Sep23,108.60-341.20−22,178−1,07,3411,70,3281,63,6836,645
25 Sep23,186.70+78.105,076−1,02,2641,70,9041,75,405—
28 Sep22,819.60-367.10−23,862−1,26,1261,68,1981,51,54316,655
29 Sep22,716.20-103.40−6,721−1,32,8471,67,4361,61,477—
Three panels: NIFTY Sep futures price falling from 24760 to 22716; daily M2M bars mostly red; account balance repeatedly dropping below required margin with red margin-call dots
Figure 9.4: The long NIFTY Sep-26 trade. Top: settlement prices with the entry, the expiry settlement and a 2×ATR stop level. Middle: daily M2M cash flows. Bottom: balance after M2M against required margin; each red dot is a margin call. Source: NSE bhavcopy; margin % from SPAN file.
−8.25%
Futures price move
−₹1,32,847
Total P&L, 1 lot
−72.8%
Loss as % of initial margin
12
Margin calls
₹94,324
Extra cash added

8.4 A margin call, step by step

Real data · 17 → 18 Aug 2026

The first margin call in the ledger

  1. Close of 17 Aug: settlement 24,533.50; balance ₹1,85,277.50.
  2. 18 Aug: settlement 24,359.90. M2M = (24,359.90 − 24,533.50) × 65 = −173.6 × 65 = −₹11,284. Balance = 1,85,277.50 − 11,284 = ₹1,73,993.50.
  3. Required margin = 24,359.90 × 65 × 11.34% = ₹1,79,551.10. (Margin falls a little as the contract value falls, but much less than the loss.)
  4. Shortfall = 1,79,551.10 − 1,73,993.50 = ₹5,557.60. The trader must add this cash, or the broker can square off the position, usually at a bad price.

Over the trade there were 12 margin calls, and the trader had to add ₹94,324 on top of the original ₹2,00,000. At expiry the margin was released and the account held ₹1,61,477 (= 2,00,000 + 94,324 − 1,32,847). The futures price fell only 8.25%, yet the loss equalled 72.8% of the initial margin. Of the 40 trading days after entry, 26 were losing days and 14 winning days. The worst single day was 28 Sep (−₹23,861.50).

8.5 The same trade with a stop-loss

Real data · stop rule applied to the same trade

Exit when the settlement closes below entry − 2 × ATR(14)

  1. Nifty's 14-day Wilder ATR on 3 Aug was 230.8 points (Chapter 4). Stop = 24,760 − 2 × 230.8 = 24,298.4.
  2. On 19 Aug the settlement price closed at 24,238.8, below the stop. Exit there (a real stop order would usually fill near the stop during the day; we use the close to stay with the settlement data).
  3. Loss = (24,238.8 − 24,760.0) × 65 = −₹33,878, about one-quarter of the −₹1,32,847 from holding to expiry. The stop could not make the trade a winner. It kept a bad trade small.
Lesson from the ledger

M2M makes leverage visible every evening. If you cannot comfortably fund several margin calls without changing your plan, the position is too big. Decide your exit (stop) before you enter, and never "add margin to stay in" a trade that has hit its stop.

9. Shorting with futures: a real stock-futures ledger

Shorting means selling first and buying back later. You profit if the price falls and lose if it rises. In the Indian cash market you can short shares only intraday: an unsquared short leads to an auction and penalties, because you have no shares to deliver. (The exchange's Securities Lending and Borrowing (SLB) scheme does allow borrowing shares to short for longer, but it is thinly traded and rarely practical for a retail trader.) In futures, a short position is just as easy to hold overnight as a long, with the same margin and the same M2M (with the sign reversed). That makes futures the main tool for positional shorting.

The logic of a short

A short futures position is an agreement to sell at today's price on expiry. If the price falls, you can buy back cheaper and keep the difference. The stop-loss for a short sits above the entry price. Note the asymmetry: a long can at most lose the full price (the stock goes to zero), but a short's loss has no theoretical limit, because the price can keep rising.

Real data · INFY Sep-26 futures · 3 Aug → 24 Sep 2026

Short 1 lot (400 shares), squared off before expiry

  1. Sell 1 lot at the 3 Aug settlement price of 1,178.10. Contract value = 1,178.10 × 400 = ₹4,71,240. Margin at 19.2% (SPAN 15.70% + ELM 3.5%) = ₹90,488. The account starts with ₹1,50,000.
  2. Each day M2M = −(Pt − Pt−1) × 400. Example: 7 Sep, settlement fell 44.5 (1,138.10 → 1,093.60), M2M = +44.5 × 400 = +₹17,800.
  3. Square off (buy back) on 24 Sep at 1,014.10, five days before expiry, to avoid physical settlement (Section 14). P&L = (1,178.10 − 1,014.10) × 400 = +₹65,600.
  4. It was not a smooth ride. By 11 Aug the trade was −₹7,000. A single day, 15 Sep, cost ₹15,400 when INFY bounced 38.5 points.
DateSettlement priceChangeDaily M2M ₹Cumulative P&L ₹Margin required ₹Balance after M2M ₹Top-up (margin call) ₹
03 Aug1,178.10+0.000090,4881,50,000—
04 Aug1,167.90-10.204,0804,08089,7051,54,080—
05 Aug1,176.10+8.20−3,28080090,3351,50,800—
06 Aug1,175.00-1.104401,24090,2501,51,240—
07 Aug1,185.30+10.30−4,120−2,88091,0411,47,120—
10 Aug1,192.30+7.00−2,800−5,68091,5791,44,320—
11 Aug1,195.60+3.30−1,320−7,00091,8321,43,000—
12 Aug1,181.50-14.105,640−1,36090,7491,48,640—
13 Aug1,177.60-3.901,56020090,4501,50,200—
14 Aug1,178.20+0.60−240−4090,4961,49,960—
17 Aug1,147.40-30.8012,32012,28088,1301,62,280—
18 Aug1,125.20-22.208,88021,16086,4251,71,160—
19 Aug1,128.10+2.90−1,16020,00086,6481,70,000—
20 Aug1,137.20+9.10−3,64016,36087,3471,66,360—
21 Aug1,127.80-9.403,76020,12086,6251,70,120—
24 Aug1,137.80+10.00−4,00016,12087,3931,66,120—
25 Aug1,141.50+3.70−1,48014,64087,6771,64,640—
26 Aug1,129.90-11.604,64019,28086,7861,69,280—
27 Aug1,120.80-9.103,64022,92086,0871,72,920—
28 Aug1,153.90+33.10−13,2409,68088,6301,59,680—
31 Aug1,135.50-18.407,36017,04087,2161,67,040—
01 Sep1,157.50+22.00−8,8008,24088,9061,58,240—
02 Sep1,143.60-13.905,56013,80087,8381,63,800—
03 Sep1,139.50-4.101,64015,44087,5241,65,440—
04 Sep1,138.10-1.4056016,00087,4161,66,000—
07 Sep1,093.60-44.5017,80033,80083,9981,83,800—
08 Sep1,088.10-5.502,20036,00083,5761,86,000—
09 Sep1,037.60-50.5020,20056,20079,6972,06,200—
10 Sep1,037.20-0.4016056,36079,6662,06,360—
11 Sep1,042.50+5.30−2,12054,24080,0732,04,240—
15 Sep1,081.00+38.50−15,40038,84083,0301,88,840—
16 Sep1,061.80-19.207,68046,52081,5551,96,520—
17 Sep1,065.60+3.80−1,52045,00081,8471,95,000—
18 Sep1,049.60-16.006,40051,40080,6182,01,400—
21 Sep1,043.10-6.502,60054,00080,1192,04,000—
22 Sep1,029.80-13.305,32059,32079,0982,09,320—
23 Sep1,019.00-10.804,32063,64078,2682,13,640—
24 Sep1,014.10-4.901,96065,60077,8922,15,600—
Top: INFY Sep futures falling from 1178 to 1014, a profitable short. Bottom: ETERNAL Sep futures rising from 310.75 to 336.45, a losing short
Figure 9.5: The same mechanics on two stocks over the same window. INFY fell and the short made ₹65,600. ETERNAL rose and the identical approach lost ₹62,322 on one 2,425-share lot. Source: NSE bhavcopy.
Real data · honest counter-example · ETERNAL Sep-26

A short that went wrong

Shorting 1 lot (2,425 shares) of ETERNAL Sep futures at 310.75 on 3 Aug and buying back at 336.45 on 24 Sep: loss = (310.75 − 336.45) × 2,425 = −₹62,322, against an initial margin of about ₹1,65,867. In this market (Nifty −8% over the window), most stocks fell, but not all. A short needs a reason, a stop above a logical level, and position sizing, just like a long.

10. Index futures, liquidity and impact cost

NIFTY futures take their value from the Nifty 50 index. Varsity gives several reasons why index futures suit beginners better than single-stock futures. The index is diversified across 50 stocks, so one company's bad news rarely moves it much. It is very hard to manipulate. Its volatility is lower than most single stocks, so margin is a smaller % (9.34% SPAN for NIFTY vs 14–47% for stocks on 30 Sep). It is cash-settled, so there is no delivery risk. And it is the most liquid contract.

Real data · 30 Sep 2026

Liquidity compared

10.1 Impact cost

Every order book has a bid (best price a buyer is offering) and an ask (best price a seller wants). If you buy at the ask and immediately sell at the bid, you lose the spread. Impact cost measures how far your execution price is from the "ideal" mid-price. It is a direct measure of liquidity.

Impact cost \[ \text{Ideal price} = \frac{\text{best bid} + \text{best ask}}{2} \] \[ \text{Impact cost} = \frac{\text{actual execution price} - \text{ideal price}}{\text{ideal price}} \times 100 \]
best bid
The highest price any buyer is currently offering, in ₹.
best ask
The lowest price any seller is currently asking, in ₹.
Ideal price
The mid-point of the two: a fair "no-friction" price.
actual execution price
The average price you actually got. A large order may fill at several price levels.
Impact cost
How far your fill was from the mid-point, as a % of the mid-point.

How it works: find the mid-price, measure how far your fill was from it, and express that gap as a % of the mid-price. For a buy the gap is execution − ideal; for a sell, use ideal − execution so the cost is still positive. The smaller the number, the more liquid the contract.

Illustrative numbers · not market data

Liquid vs illiquid contract

  1. Liquid index future: bid 22,707.0, ask 22,707.3, ideal 22,707.15. A market buy fills at 22,707.3. Impact = 0.15 / 22,707.15 = 0.0007%.
  2. Illiquid stock future: bid 1,000, ask 1,004, ideal 1,002. A market buy of one lot eats through two price levels and averages 1,005. Impact = 3 / 1,002 = 0.30%, over 400 times worse. On a 2× ATR stop of ~3% that is a tenth of your risk lost just getting in.

Practical rule: before trading any futures contract, look at the bid-ask spread and the depth for at least 5–10× your quantity. Prefer limit orders in anything less liquid than NIFTY, BANKNIFTY or the top-traded stock futures.

11. Futures pricing: cost of carry, basis, contango and backwardation

11.1 The logic: why futures usually trade above spot

Imagine two ways to own Nifty on 27 Oct. (a) Buy the shares today: you pay the full price now, give up the interest that money could have earned, and receive any dividends paid before 27 Oct. (b) Buy Oct futures: you pay (almost) nothing now, can keep the money in Treasury bills earning interest, but receive no dividends. If (a) and (b) are to cost the same, the futures price must equal the spot price plus interest minus dividends. If it didn't, arbitrageurs would buy the cheaper one and sell the dearer one until the gap closed. This relationship is the spot–futures parity, or cost-of-carry model.

Futures fair value (cost of carry) \[ F = S \times \left(1 + r \times \frac{x}{365}\right) - d \qquad \text{(Varsity's simple-interest form)} \] \[ F = S\, e^{rT} - d\,e^{r(T - t_d)} \;\approx\; S\,e^{rT} - d \qquad \text{(continuous compounding, } T = x/365\text{)} \] \[ \text{Basis} = F - S \] \[ \text{Implied carry (annualised)} = \left(\frac{F}{S} - 1\right)\times\frac{365}{x} \]
\(F\)
The futures price: its fair value in the first two lines, the actual market price in the last two. In ₹ or index points.
\(S\)
The spot price: today's price of the stock or index itself in the cash market.
\(r\)
The yearly risk-free interest rate, as a decimal. Varsity suggests the 91-day Treasury bill yield. We use r = 5.52%, the 91-day T-bill cut-off yield shown on RBI's homepage on 2 Oct 2026 (the RBI policy repo rate is 5.25%).
\(x\)
Calendar days from today to expiry. \(x/365\) turns it into a fraction of a year.
\(T\)
The same time to expiry in years, \(x/365\).
\(d\)
Dividends per share (in ₹, or index points for an index) expected to go ex before expiry. Zero if there are none.
\(t_d\)
Time from today until the dividend, in years.
\(e^{rT}\)
\(e \approx 2.718\) is the base of continuous compounding (interest added every instant). \(e^{rT}\) is the growth factor for rate \(r\) over \(T\) years, very close to \(1 + rT\) for short periods.
Basis
Futures minus spot. Positive means futures trade at a premium.
Implied carry
The yearly interest rate the market price is implying: the basis as a % of spot, scaled up from \(x\) days to a full year.
  1. Fair value: add to spot the interest you would earn on that money until expiry, \(S \times r \times x/365\), then subtract any dividend you would miss by holding futures instead of shares.
  2. The continuous form does the same with a slightly different compounding rule. The two forms differ by only a fraction of a rupee over one to three months.
  3. Basis is the gap you actually see in the market. Implied carry turns that gap into a yearly rate so you can compare it with \(r\). If it is close to \(r\), the futures price is close to fair value.
Real data · NIFTY Oct-26 · 30 Sep 2026

Fair value, step by step

  1. Spot \(S\) = 22,620.45 (Nifty close). Days to expiry \(x\) = 30 Sep → 27 Oct = 27. \(r\) = 5.52%. Ignore dividends for now (\(d\) = 0).
  2. \(F = 22{,}620.45 \times (1 + 0.0552 \times 27/365) = 22{,}620.45 \times 1.004083 = \) 22,712.82.
  3. Continuous form: \(22{,}620.45 \times e^{0.0552 \times 27/365} =\) 22,713.00 (only 0.18 points different).
  4. Actual settlement price: 22,707.30, which is 5.52 points (0.02%) below fair value. Basis = 22,707.30 − 22,620.45 = +86.85 points. Implied carry = (22,707.30/22,620.45 − 1) × 365/27 = 5.19% p.a., slightly below the T-bill rate. That is consistent with a small dividend yield on the index and with trading costs.

11.2 Fair value vs actual for NIFTY and three stocks (30 Sep 2026)

ContractDays to expirySpotFair value \(S(1+r\,x/365)\)Fair value \(Se^{rT}\)Actual (settle)Actual − fairBasisImplied carry % p.a.
NIFTY 27-Oct2722,620.4522,712.8222,713.0022,707.30-5.52+86.855.19
NIFTY 23-Nov5422,620.4522,805.1822,805.9422,828.30+23.12+207.856.21
NIFTY 29-Dec9022,620.4522,928.3422,930.4422,973.40+45.06+352.956.33
RELIANCE 27-Oct271,187.001,191.851,191.861,191.80-0.05+4.805.47
RELIANCE 23-Nov541,187.001,196.691,196.731,197.70+1.01+10.706.09
RELIANCE 29-Dec901,187.001,203.161,203.271,204.40+1.24+17.405.94
HDFCBANK 27-Oct27708.71711.60711.61715.55+3.95+6.8413.05
HDFCBANK 23-Nov54708.71714.50714.52718.80+4.30+10.099.62
HDFCBANK 29-Dec90708.71718.36718.42723.80+5.44+15.098.64
SBIN 27-Oct27959.50963.42963.43967.20+3.78+7.7010.85
SBIN 23-Nov54959.50967.34967.37972.20+4.86+12.708.95
SBIN 29-Dec90959.50972.56972.65978.40+5.84+18.907.99
Bar chart of annualised basis for NIFTY, RELIANCE, HDFCBANK, SBIN Oct/Nov/Dec contracts against the 5.52% T-bill line
Figure 9.6: Implied carry (annualised basis) on 30 Sep 2026. NIFTY and RELIANCE trade close to the risk-free rate. HDFCBANK and SBIN near-month futures trade rich, at 13.0% and 10.8% p.a. Source: NSE bhavcopy; r from RBI.

How to read the table:

11.3 Dividends make futures cheaper: MARUTI, August 2026

The \(-d\) in the formula matters when a stock goes ex-dividend before the contract expires. The holder of shares gets the dividend and the futures holder doesn't, so futures trade lower by roughly the dividend. MARUTI went ex-dividend on 7 Aug 2026 for ₹140 per share. Watch what happened to the basis:

DateContractSpotDaysFair, no dividendFair, minus ₹140 dividendActual futuresBasis
2026-08-05MARUTI 25-Aug14,189.962014,232.8814,092.8814,034.00-155.96
2026-08-06MARUTI 25-Aug14,079.661914,120.1213,980.1213,915.00-164.66
2026-08-07MARUTI 25-Aug14,037.031814,075.2414,075.2414,018.00-19.03
2026-08-05MARUTI 29-Sep14,189.965514,307.9914,167.9914,125.00-64.96
2026-08-06MARUTI 29-Sep14,079.665414,194.6414,054.6414,001.00-78.66
2026-08-07MARUTI 29-Sep14,037.035314,149.5414,149.5414,103.00+65.97

11.4 Basis converges to zero at expiry

As expiry approaches, there are fewer days of interest left, so the basis shrinks. On expiry day futures and spot must converge, because index futures settle at the closing index value and stock futures settle through delivery. The NIFTY Oct contract's basis was mostly 250–380 points in mid-August (about 70–85 days of carry) and 86.8 points on 30 Sep (27 days). Day to day it is noisy: on 3 Aug it was only 112.8. The Sep contract's basis was exactly 0 at its 29 Sep final settlement.

Line chart of NIFTY Sep and Oct futures minus spot, Sep basis falling to zero on 29 Sep
Figure 9.7: NIFTY futures basis, Aug–Sep 2026. The Sep contract converges to spot on 29 Sep. Day-to-day wiggles are real. They come from demand imbalances and from the settlement-price vs closing-price timing difference. On 3 Aug the Sep contract even settled 14.3 points below spot. Source: NSE bhavcopy.

11.5 Premium, discount, contango, backwardation

SituationEquity termCommodity termTypical cause
Futures > spotPremiumContangoNormal: interest cost of carry
Futures < spotDiscountBackwardationDividend before expiry, heavy short demand, or (in commodities) scarcity
Histogram of annualised basis for 213 stock futures; median 5.4 percent; 49 below zero
Figure 9.8: Annualised basis of the 213 Oct-26 stock futures on 30 Sep 2026. Median 5.44% p.a., close to the T-bill rate. 49 contracts were at a discount and 68 above 10% p.a. Short-dated basis annualised is noisy, so treat extreme values with suspicion. Source: NSE bhavcopy.

11.6 Cash-and-carry arbitrage (and why it is not free money)

If futures trade above fair value, you can buy spot and sell futures at the same time. At expiry the two converge, so you lock in the gap whatever the market does. This is cash-and-carry arbitrage, and it is what keeps futures near fair value. A real check:

Real data · HDFCBANK Oct-26 · 30 Sep 2026

Is HDFCBANK's rich basis an opportunity?

  1. Buy 650 shares at spot 708.71 (cash needed ₹4,60,662) and sell 1 lot of Oct futures at 715.55. Locked gross spread = (715.55 − 708.71) × 650 = ₹4,446.
  2. Financing: that ₹4,60,662 could have earned 5.52% for 27 days = ₹1,881.
  3. Securities transaction tax (STT, a government levy on every trade; Section 16.3) alone: 0.1% on buying the delivery shares + 0.1% on the delivery at expiry + 0.05% on the futures sale ≈ ₹1,158.
  4. Net before brokerage, exchange charges, stamp duty, GST, DP charges and margin funding ≈ 4,446 − 1,881 − 1,158 = ₹1,407, about 0.3% on ₹4.6 lakh for a month of capital and execution risk. Professional desks with very low costs can do this. For a retail trader it rarely pays.
In your framework

framework.futures.fair_value(spot, r, days, div=0) returns the cost-of-carry fair value and framework.futures.basis the basis. Use them to check, before a trade, whether a futures price is distorted by a dividend or an unusual premium.

12. Calendar spreads

A calendar spread is long one expiry and short another expiry of the same underlying. Because the two legs move almost together, the position's risk (and margin) is far smaller. You are betting only on the difference between the two prices. In theory that difference is the cost of carry between the two expiry dates:

Theoretical calendar spread \[ F_{\text{far}} - F_{\text{near}} \approx S \times r \times \frac{x_{\text{far}} - x_{\text{near}}}{365} \;-\; \text{dividends between the two expiries} \]
\(F_{\text{far}}\)
The price of the later-expiring contract (for example Oct when the other leg is Sep).
\(F_{\text{near}}\)
The price of the earlier-expiring contract.
\(S\)
Today's spot price.
\(r\)
The yearly risk-free rate as a decimal (5.52% here).
\(x_{\text{far}} - x_{\text{near}}\)
Calendar days between the two expiry dates.
dividends between the two expiries
Dividends (₹ per share, or index points) going ex after the near expiry but before the far one.

How it works: each contract's fair value is spot plus interest to its own expiry (Section 11). Subtract one from the other and only the interest for the days between the expiries is left, less any dividend in that gap. If the market spread is much wider or narrower than this, a spread trader may bet on it returning to theory.

Real data · NIFTY Oct − Sep spread

Theory vs market

  1. 28 Sep 2026: Oct 22,910.7 − Sep 22,819.6 = 91.1 points. Theory: 22,780.25 × 5.52% × 28/365 = 96.5 points. The market was 5.4 points below theory.
  2. Over Aug–Sep the Oct−Sep spread ranged from 142.5 points (5 Aug) to 76.9 points (25 Sep). That is noise around a slowly falling theoretical value, partly because Nifty itself fell (a lower spot means a smaller carry).
  3. On 30 Sep, Nov − Oct = 121.0 points vs a theoretical 92.4. A spread trader expecting this to normalise would sell Nov and buy Oct. The risk is that the gap persists or widens.
Line chart of NIFTY Oct minus Sep futures spread and Nov minus Oct spread against a theoretical carry line
Figure 9.9: NIFTY calendar spreads vs the theoretical carry at 5.52% (dashed). The Oct−Sep series stops on 28 Sep, because on expiry day the Sep leg settles at spot. Source: NSE bhavcopy.
Calendar spreads are not risk-free

The margin benefit disappears on the day the near leg expires: for index derivatives since Feb 2025, and for single-stock calendar spreads from 5 May 2026. Zerodha's illustration of the stock rule showed one spread's margin jumping from about ₹26,000 per lot to about ₹2.6 lakh (about ₹1.3 lakh for each leg). Spreads also suffer from the illiquidity of far-month contracts. For a beginner, calendar spreads are mainly useful for understanding rollover cost (Section 14).

13. Open interest and the four buildups

13.1 What open interest is

Open interest (OI) is the number of contracts that are currently open: entered and not yet squared off or expired. Every contract has one long and one short, so OI counts pairs. OI rises only when a new buyer and a new seller both open positions. It falls when an existing long and an existing short both close. It stays the same when an existing holder simply passes the position to a new trader.

Worked example · hypothetical traders

How OI and volume evolve

DayTradeVolumeOI afterWhy
1A buys 1 from B (both new)11New long + new short
2C buys 2 from D (both new)23Two new pairs added
3A sells 1 to E (A exits, E new)13Position transferred: OI unchanged
4C sells 2 to D (both closing)21Two pairs closed

Volume restarts from zero every day and counts each trade once (one buy + one sell = 1). OI is a running stock carried from day to day. On 30 Sep 2026, NIFTY futures volume was 66,539 contracts across all expiries, while OI was 3,11,084 contracts.

In the bhavcopy, OpnIntrst is reported in units (shares or index units), so divide by lot size to get contracts. When you study OI over a month, add up all expiries. Otherwise rollover (Section 14) looks like a huge OI collapse in one contract and a surge in the next.

13.2 Reading OI with price

On its own OI tells you nothing about direction, because every long has a short. Paired with price, it hints at who is acting:

PriceOIInterpretationLogic
UpUpLong buildupNew money is buying aggressively. Fresh longs are pushing price up.
DownUpShort buildupNew money is selling aggressively. Fresh shorts are pushing price down.
UpDownShort coveringShorts are buying back to exit. The rise may lack fresh buying.
DownDownLong unwindingLongs are selling to exit. The fall may lack fresh selling.

Varsity also gives a companion table for volume with price. Rising price on rising volume is bullish. Falling price on rising volume is bearish. Price moves on falling volume suggest the trend may be tiring. And it warns that abnormally high OI built up during a fast move signals heavy leverage: a small trigger can then cause a violent unwind.

OI buildup classification \[ \Delta P = \frac{P_t}{P_{t-k}} - 1, \qquad \Delta OI = \frac{\sum_{\text{expiries}} OI_t}{\sum_{\text{expiries}} OI_{t-k}} - 1 \] \[ \Rightarrow\; \text{quadrant} = (\operatorname{sign}\Delta P, \operatorname{sign}\Delta OI) \]
\(t\), \(k\)
\(t\) is the day you measure on. \(k\) is the look-back in trading days: \(k = 1\) compares with yesterday; for the 31 Aug → 28 Sep example below, \(k = 19\) sessions.
\(P_t\)
The spot (underlying) close on day \(t\).
\(\Delta P\)
The % change in price over the window (\(\Delta\) means "change in"), as a decimal.
\(OI_t\)
Open interest on day \(t\) in one contract month.
\(\sum_{\text{expiries}}\)
Add up OI across all live expiries (near, next and far), so rollover from one month to the next does not look like a collapse.
\(\Delta OI\)
The % change in that total OI over the window.
\(\operatorname{sign}\)
Just the direction: "up" if the change is positive, "down" if negative.
  1. Compute the % change in price and the % change in total OI over the same window.
  2. Keep only whether each one went up or down.
  3. Look up the pair in the table above: up/up = long buildup, down/up = short buildup, up/down = short covering, down/down = long unwinding. If either change is exactly zero, call it neutral.
Real data · NIFTY · 31 Aug → 28 Sep 2026

A textbook short buildup

  1. Nifty spot: 24,080.40 → 22,780.25, a change of −5.40%.
  2. Total NIFTY futures OI (all expiries): 2,68,815 → 3,69,942 contracts, a change of +37.62%.
  3. Price down + OI up = short buildup. Traders added fresh shorts as the index fell. BANKNIFTY was the same: −6.12% price, +36.46% OI.
  4. After the Sep expiry on 29 Sep, OI dropped to 3,11,084 contracts on 30 Sep, because positions not rolled over were settled.
Top: Nifty spot falling through Aug-Sep 2026. Bottom: total Nifty futures OI rising from about 200k to nearly 400k contracts, dropping after each expiry
Figure 9.10: NIFTY spot (top) and total NIFTY futures OI in contracts (bottom). OI rose steadily while price fell, a short buildup, and dropped at each expiry. Source: NSE bhavcopy.

13.3 All stock futures, September 2026 series

Classifying the 210 stock futures by price change and total-OI change from 31 Aug to 28 Sep gives: Short buildup 118, Long unwinding 68, Short covering 13, Long buildup 11. This was a falling market, so most stocks were on the left of the chart. Clear examples from each quadrant:

Scatter plot of price change versus OI change for NSE stock futures, coloured by quadrant: short buildup dominates
Figure 9.11: Price vs OI quadrants for NSE stock futures, September 2026 series (two extreme-OI outliers, including POLICYBZR at +165% OI, lie off the chart but are included in the legend counts). Source: NSE bhavcopy.

13.4 Honest test: does the daily buildup predict tomorrow?

Many websites publish daily "long buildup" lists as trading signals. We tested that on our data: every stock-futures day in Aug–Sep 2026 (excluding expiry days, when OI falls mechanically), classified by that day's price and total-OI change, then looked at the next day's spot return.

Daily signal (stock futures)ObservationsAvg next-day return% of next days up
Long buildup1,634-0.402%38.0%
Long unwinding1,734-0.092%46.0%
Neutral41-0.313%41.5%
Short buildup2,687-0.050%47.5%
Short covering1,644-0.288%36.7%

Across all observations, 42.8% of next days were up (the market was falling). "Long buildup" days were followed by an up day only 38.0% of the time, worse than average. "Short buildup" days were followed by up days 47.5% of the time, better than average. If anything, in this sample one-day buildups showed a slight short-term mean reversion, not continuation. Two months of one falling market proves nothing in general. But it is enough to show that OI buildup is context, not a signal. Use it to understand whether a move is driven by new positions or by exits, and combine it with price structure (Chapters 3–5).

F&O ban period

When a stock's market-wide open interest exceeds 95% of its market-wide position limit (MWPL), the stock enters a ban period. You may only reduce positions, not add new ones. SEBI's 2025 changes measure this in delta-adjusted "future-equivalent OI" and set MWPL from free float and cash-market volume. Check the exchange's ban list before carrying a stock-futures position.

In your framework

framework.futures.oi_buildup(price_chg, oi_chg) returns 'Long buildup', 'Short buildup', 'Short covering' or 'Long unwinding'. Feed it the sum of OI over all expiries. framework.futures.oi_buildup_table(fut, date, prev_date=None) classifies every symbol this way, from the spot change and total OI. Pass prev_date="2026-08-31" with date="2026-09-28" to reproduce Section 13.3.

14. Expiry, rollover and physical settlement

14.1 Rollover

Futures expire monthly, but a positional view may last longer. Rolling over means closing the expiring contract and opening the same position in the next month. Most traders roll in the last few days. The rollover % tells you how much of the expiring OI was carried forward:

Rollover % and rollover cost \[ \text{Rollover \%} = \frac{OI_{\text{next}} + OI_{\text{far}}}{OI_{\text{near}} + OI_{\text{next}} + OI_{\text{far}}} \times 100 \quad(\text{measured on expiry day}) \] \[ \text{Rollover cost (long)} = (F_{\text{next}} - F_{\text{near}}) \times \text{lot size} \]
\(OI_{\text{near}}\)
Open interest in the expiring (near-month) contract. Units or contracts both work, as long as all three use the same.
\(OI_{\text{next}}\), \(OI_{\text{far}}\)
Open interest in the next-month and far-month contracts.
Rollover %
The share of total OI that already sits in later months. Usually tracked over the last few days before expiry; the figure on expiry day is the one quoted and compared month to month.
\(F_{\text{next}}\), \(F_{\text{near}}\)
The prices at which you buy the next-month contract and sell the expiring one, in ₹ or index points.
Rollover cost
The extra you pay, in ₹ per lot, to move a long position forward by one month (before transaction costs).
  1. Rollover %: add up OI in the next and far months and divide by OI in all three months. A high figure means most positions are being carried forward, not closed.
  2. Rollover cost: the spread between the two months, times the lot size. A long pays it; a short receives it. Multiply by the number of lots for a bigger position.

Example (NIFTY, 29 Sep, table below, OI in units): \((1{,}71{,}35{,}235 + 19{,}99{,}465) / (66{,}23{,}305 + 1{,}71{,}35{,}235 + 19{,}99{,}465) = 1{,}91{,}34{,}700 / 2{,}57{,}58{,}005 = 74.3\%\).

UnderlyingDateSep OI (units)Oct OINov OIRollover %
NIFTY24-Sep1,40,23,10081,60,29512,18,36040.1
NIFTY28-Sep88,52,0251,35,41,97016,52,23563.2
NIFTY29-Sep66,23,3051,71,35,23519,99,46574.3
BANKNIFTY24-Sep17,72,3108,60,10099,69035.1
BANKNIFTY28-Sep9,91,26017,81,6101,34,13065.9
BANKNIFTY29-Sep6,31,11022,60,3201,59,36079.3
RELIANCE24-Sep8,33,99,0006,36,63,00085,71,00046.4
RELIANCE28-Sep2,62,14,00012,21,33,5001,22,64,00083.7
RELIANCE29-Sep1,08,54,50014,63,82,0001,47,46,50093.7
HDFCBANK24-Sep19,67,98,55019,06,89,8501,38,29,40051.0
HDFCBANK28-Sep7,02,53,30031,36,97,1501,94,88,95082.6
HDFCBANK29-Sep2,89,43,85036,53,59,8002,42,91,80093.1
INFY24-Sep5,36,00,4002,41,31,60011,22,00032.0
INFY28-Sep1,94,50,0005,97,68,00015,83,60075.9
INFY29-Sep86,00,4007,26,22,80019,13,20089.7
TCS24-Sep1,74,33,6751,08,18,0005,23,35039.4
TCS28-Sep33,34,2752,42,78,4007,23,82588.2
TCS29-Sep19,12,0502,70,64,1258,89,87593.6
SBIN24-Sep6,18,09,0004,38,20,25060,74,25044.7
SBIN28-Sep2,18,02,5008,64,81,00071,80,50081.1
SBIN29-Sep1,62,81,7509,97,40,25081,30,75086.9
ICICIBANK24-Sep6,83,53,6005,06,88,40059,97,60045.3
ICICIBANK28-Sep2,23,83,90011,14,76,40065,90,50084.1
ICICIBANK29-Sep2,18,16,90012,50,41,00069,77,60085.8
Stacked bars of NIFTY OI by contract from 17 to 30 Sep 2026, Sep OI shrinking and Oct OI growing
Figure 9.12: Rollover week. NIFTY OI moves from the Sep to the Oct contract. The label on each bar is that day's rollover % (share of OI already in Oct and Nov). On expiry day (29 Sep) it reached 74.3%. Source: NSE bhavcopy.
Real data · rollover cost · 28 Sep 2026

Rolling a NIFTY long from Sep to Oct

  1. Sell Sep at 22,819.6 and buy Oct at 22,910.7 (settlement prices on 28 Sep). The spread paid = 91.1 points.
  2. As a % of price: 91.1 / 22,819.6 = 0.399%. Annualised over the 28 days between expiries: 0.399% × 365/28 = 5.2% p.a., roughly the interest rate, as the cost-of-carry model predicts.
  3. In rupees: 91.1 × 65 = ₹5,922 per lot, plus transaction costs on four legs (two closes and two opens). A long pays the carry. A short receives it, because they sell the dearer contract.
  4. RELIANCE the same day: Sep 1,200.6 → Oct 1,206.6, a roll cost of 6.0 × 500 = ₹3,000 per lot.

Reading rollover: a high rollover with price falling (as with NIFTY in September, combined with short buildup) means traders are carrying bearish positions into the next month. A low rollover means traders are closing out. Compare it with the previous month's figure: NIFTY's Aug rollover was 77.4% vs 74.3% in Sep, and RELIANCE's 94.7% vs 93.7%.

14.2 Physical settlement of stock futures

Since the October 2019 expiry, all stock F&O contracts are physically settled. If you hold a stock future at expiry:

Beginner rule

Square off or roll every stock-futures position at least 2–3 trading days before expiry. Never let a stock future go into physical settlement by accident. Index futures (NIFTY, BANKNIFTY) are cash-settled, but they still expire, so roll them deliberately, not by habit.

In your framework

framework.futures.rollover_pct computes the rollover % above from framework.data.load_futures().

15. Hedging with futures and beta

15.1 What hedging is, and what it can't do

A hedge is a position that gains when your main position loses, so the combination is less volatile. With futures, you hedge a long stock holding by shorting futures. Typical reasons: you hold shares long-term but fear a short-term event (budget, election results, a global shock). Selling would trigger capital-gains tax and force you to time your re-entry.

Varsity separates two kinds of risk:

15.2 Hedging a single stock with its own futures

Real data · RELIANCE · 31 Aug → 28 Sep 2026

500 shares hedged with 1 lot of RELIANCE Sep futures

  1. Hold 500 shares at spot 1,277.0. Short 1 lot (500) of Sep futures at 1,301.1. The basis on 31 Aug was unusually wide at 24.1.
  2. 28 Sep: spot 1,197.6 and futures 1,200.6.
  3. Shares: (1,197.6 − 1,277.0) × 500 = −₹39,700. Short futures: (1,301.1 − 1,200.6) × 500 = +₹50,250.
  4. Net +₹10,550, exactly the narrowing of the basis (24.1 → 3.0 = 21.1 × 500). The hedge removed the price risk. What remained was basis risk, which this time happened to be favourable.

15.3 Beta: how much a stock moves with the market

To hedge with index futures you need to know how sensitive each stock is to the index. That sensitivity is beta: the slope of a regression of the stock's daily returns on the index's daily returns.

Beta \[ \beta = \frac{\operatorname{Cov}(R_{\text{stock}}, R_{\text{Nifty}})}{\operatorname{Var}(R_{\text{Nifty}})} \quad(\text{= Excel's SLOPE(stock returns, Nifty returns)}) \]
\(R_{\text{stock}}\)
The stock's daily returns: each day's % change in closing price, one number per day (247 days here).
\(R_{\text{Nifty}}\)
The Nifty 50's daily returns over the same days.
\(\operatorname{Cov}\)
Covariance: how much the two return series move together. Positive if the stock tends to rise on days the Nifty rises.
\(\operatorname{Var}\)
Variance: how much the Nifty's daily returns spread out around their average.
\(\beta\)
Beta: the stock's average % move for a 1% move in the Nifty.

How it works: line up the two columns of daily returns, then divide their covariance by the variance of the Nifty column. The result is the slope of the best-fit line through a scatter of stock returns against Nifty returns, which is exactly what Excel's SLOPE function returns. Chapter 8 uses the same formula on weekly returns.

The market's own beta is 1.0. β > 1 means the stock tends to move more than the index (high beta). β < 1 means it moves less (low beta). Using daily returns from 1 Sep 2025 to 31 Aug 2026 (247 days), our data gives: LT 1.43, HDFCBANK 1.26, TATASTEEL 1.12, SBIN 1.06, ICICIBANK 0.94, RELIANCE 0.89, TCS 0.86, INFY 0.79, HINDUNILVR 0.74, ITC 0.65, BHARTIARTL 0.63.

Two scatter plots of daily stock returns versus Nifty returns with regression lines: TATASTEEL steeper, HINDUNILVR flatter
Figure 9.13: Beta is the slope of the regression line. TATASTEEL (left) moves more than Nifty. HINDUNILVR (right) moves less. The wide scatter around each line is the unsystematic risk an index hedge can't remove. Source: daily closes, Sep 2025–Aug 2026.

Beta has limits. It is estimated from the past, it changes over time, and correlations are often modest (INFY's correlation with Nifty was only 0.35 over this year). Treat it as an estimate, not a constant.

15.4 Hedging a portfolio with NIFTY futures

Portfolio hedge \[ \beta_p = \sum_i w_i \beta_i, \qquad \text{Hedge value} = \beta_p \times V_{\text{portfolio}} \] \[ \text{Lots} = \frac{\text{Hedge value}}{F_{\text{Nifty}} \times \text{lot size}} \]
\(i\)
Labels each stock in the portfolio. \(\sum_i\) means add up over all the stocks.
\(w_i\)
Stock \(i\)'s weight: its market value ÷ total portfolio value. The weights add up to 1 (100%).
\(\beta_i\)
Stock \(i\)'s beta against the Nifty (formula above).
\(\beta_p\)
The portfolio's beta: the weighted average of the stock betas.
\(V_{\text{portfolio}}\)
Total market value of the portfolio today, in ₹.
Hedge value
The rupee amount of Nifty exposure that moves like your portfolio, in ₹.
\(F_{\text{Nifty}}\)
The NIFTY futures price you short at.
lot size
Units per NIFTY contract (65). \(F_{\text{Nifty}} \times\) lot size is the value of one lot.
  1. Multiply each stock's weight by its beta and add them up to get the portfolio beta.
  2. Multiply the portfolio value by that beta. A ₹20 lakh portfolio with beta 0.93 behaves roughly like ₹18.6 lakh of Nifty.
  3. Divide by the value of one NIFTY futures lot to get the number of lots to short. You can only trade whole lots, so round, and accept that the hedge will be a little over or under.
Real data · ₹20 lakh portfolio · 31 Aug → 28 Sep 2026

Eight large caps, hedged with NIFTY Sep futures

StockQtyPrice 31 AugValue 31 Aug ₹WeightBetaWeighted betaPrice 28 SepP&L ₹
RELIANCE1961,277.002,50,29212.5%0.890.1121,197.60−15,562
HDFCBANK353709.002,50,27712.5%1.260.158719.053,548
ICICIBANK1721,454.002,50,08812.5%0.940.1171,302.00−26,144
INFY2201,133.802,49,43612.5%0.790.0981,003.20−28,732
TCS1042,399.302,49,52712.5%0.860.1082,070.70−34,174
LT624,044.902,50,78412.5%1.430.1793,766.40−17,267
ITC978255.502,49,87912.5%0.650.081265.209,487
BHARTIARTL1381,811.902,50,04212.5%0.630.0781,771.40−5,589
  1. Portfolio value \(V\) = ₹20,00,325. Weighted beta \(\beta_p\) = sum of the last-but-one column = 0.931.
  2. Hedge value = 0.931 × 20,00,325 = ₹18,62,937.
  3. One NIFTY Sep lot on 31 Aug = 24,251.4 × 65 = ₹15,76,341. Lots = 18,62,937 / 15,76,341 = 1.18 → 1 lot (you can only trade whole lots). Margin ≈ ₹1,78,751.
  4. Result on 28 Sep. Portfolio: −₹1,14,435 (−5.72%; Nifty fell 5.40%). Short 1 lot: (24,251.4 − 22,819.6) × 65 = +₹93,067. Net = −₹21,368.
  5. Why not zero? With 1 lot the portfolio was under-hedged (1 instead of 1.18). It also fell a little more than its beta implied, mainly because TCS and INFY fell 13–14% on stock-specific weakness. With 2 lots it would have been over-hedged, and the net would have been +₹71,699, which in a rising market would have become a loss.
  6. One detail helped the hedge. The futures fell 1,431.8 points while spot Nifty fell only 1,300.15, because the Sep basis shrank from 171.0 points (24,251.4 − 24,080.4) to 39.35 (22,819.6 − 22,780.25). That convergence added 131.65 × 65 = ₹8,557 of the ₹93,067. This is normal: a short futures hedge collects the cost of carry, roughly the interest rate, while a long pays it (Sections 11 and 14).
Line chart of portfolio P&L falling, short futures P&L rising, and hedged total staying near zero
Figure 9.14: Daily P&L of the unhedged portfolio, the short NIFTY futures and the hedged total. The hedge cut a ₹1.14 lakh drawdown to ₹21 thousand. Source: daily closes and NSE bhavcopy.
Real data · honest counter-example · TCS hedged with NIFTY

When the risk is company-specific

  1. Hold 625 TCS shares (₹14,99,563 on 31 Aug at 2,399.3). β = 0.86, so hedge = 0.86 × 14,99,563 / 15,76,341 = 0.82 → 1 lot short NIFTY Sep.
  2. By 28 Sep TCS was at 2,070.7 (−13.7%). Shares: −₹2,05,375. Futures: +₹93,067. Net: −₹1,12,308.
  3. Nifty fell 5.4%, but TCS fell 13.7%. The extra fall was unsystematic risk (an IT-sector and company move), which an index hedge cannot cover. Only diversification, or hedging with TCS's own futures, would have helped.
Hedging costs money

A hedge also removes your upside while it is on. It costs transaction charges, needs margin (₹1.79 lakh here) and needs cash for margin calls if the market rallies, because the short futures then lose money every day. Many investors meet part of the margin by pledging shares they already hold, but the broker counts pledged shares only after a haircut, at least half of the margin must be cash or cash equivalents, and daily M2M losses must always be paid in cash. So keep a cash buffer even for a hedge. Hedge for a specific, time-bound risk, then lift the hedge. Chapter 10 shows how put options can hedge with a known maximum cost.

In your framework

framework.futures.beta_hedge(portfolio_value, beta, fut_price, lot) returns the exact and rounded number of lots. framework.futures.mtm_ledger(settle, entry_price, lots, lot_size, side, margin_pct, capital) rebuilds the daily M2M tables in Sections 8 and 9, including the full SPAN + ELM required each day and the top-up on every margin call.

16. Positional futures for a beginner: capital, sizing, gaps

16.1 Why the 1% rule is hard with big lots

Chapter 11 recommends risking at most about 1% of capital per trade. For futures, the position-sizing formula becomes:

Lots from risk budget \[ \text{Lots} = \left\lfloor \frac{\text{Capital} \times \text{risk \%}}{|\text{Entry} - \text{Stop}| \times \text{lot size}} \right\rfloor \] \[ \text{If this is 0, the trade is too big for your account.} \]
Capital
Your total trading account, in ₹.
risk %
The most you are willing to lose on this one trade, as a decimal (1% = 0.01).
Entry, Stop
Your planned entry price and stop-loss price, in ₹ or index points.
\(|\ldots|\)
The vertical bars mean "ignore the sign": the distance between entry and stop, whether you are long (stop below) or short (stop above).
lot size
Units per contract (65 for NIFTY).
\(\lfloor\ldots\rfloor\)
Round down to a whole number: 1.9 becomes 1, 0.7 becomes 0.
  1. Capital × risk % is your risk budget: the rupees you can afford to lose if the stop is hit.
  2. Stop distance × lot size is what one lot loses if the stop is hit.
  3. Divide the first by the second and round down. That is how many lots fit inside your budget.
  4. If the answer is 0, even one lot would risk more than your budget. Skip the trade (or see the options after the table below). Don't raise the risk % or squeeze the stop inside ordinary daily noise just to make one lot fit.
Real data · ₹5 lakh account · 30 Sep 2026

How wide a stop can one NIFTY lot afford?

  1. Risk budget = 1% × 5,00,000 = ₹5,000.
  2. Maximum stop distance for one lot = 5,000 / 65 = 76.9 points, which is 0.339% of the futures price.
  3. Nifty's ATR(14) on 30 Sep was 209.0 points (0.9%). A 77-point stop sits well inside one ordinary day's noise and would be hit by random movement.
  4. A sensible 2×ATR stop (418 points) risks 418 × 65 = ₹27,173 per lot. That is 1% of ₹27.2 lakh. With ₹5 lakh, the same trade risks 5.4% of capital.
ContractLotATR(14) on 30 SepATR % of priceRisk per lot, 2×ATR stop ₹Margin per lot ₹Capital for 1% risk ₹
NIFTY65209.00.9%27,1731,67,37027,17,330
BANKNIFTY30651.51.2%39,0891,86,66739,08,868
RELIANCE50020.21.7%20,2481,05,70620,24,821
HDFCBANK65014.02.0%18,14282,13718,14,203
SBIN75016.71.7%25,0711,28,27425,07,084
INFY40026.92.7%21,54377,00821,54,266
TCS22559.62.9%26,80084,47926,79,959
ITC1,7254.61.8%15,99880,70315,99,767
TATASTEEL2,7504.42.4%24,31990,45424,31,877
Bar chart: capital needed for 1 percent risk with a 2xATR stop is 16 to 39 lakh rupees per lot, versus margin of about 1 to 2 lakh
Figure 9.15: Capital needed so that one lot with a 2×ATR(14) stop risks only 1%, vs the margin the broker blocks. The margin says you can trade with ₹1–2 lakh. The risk maths says you should have ₹15–40 lakh per lot. Source: daily OHLC, NSE bhavcopy, SPAN file 30 Sep 2026.

Practical options if your capital is smaller: (a) stay in the cash market for swing trades, where you can buy exactly the number of shares your risk allows; (b) use futures only for occasional hedging; (c) accept a 2% risk per trade and a tighter, structure-based stop, knowing you will be stopped out more often; or (d) build capital first. Never solve the problem by dropping the stop.

In your framework

framework.risk.position_size(capital, risk_pct, entry, stop, lot_size=65, max_position_pct=None) returns a quantity in units, rounded down to a whole number of lots (divide by 65 to get lots), and 0 when one lot exceeds your risk budget. Pass max_position_pct=None for futures, because the default caps the position at your cash, which only makes sense in a cash account. Treat 0 as "skip this trade". framework.risk.atr_stop gives the ATR-based stop.

16.2 Gap risk: when stops don't protect you

A stop-loss order can only fill when the market trades. If bad news arrives overnight, the market can open far beyond your stop, and you are filled at the open. With leverage, that one gap can cost more than your whole planned risk.

Real data · gaps, Oct 2023 – Sep 2026

How big can an overnight gap be?

Left: histogram of Nifty overnight gaps with the 7 April 2025 minus 5 percent gap marked. Right: HDFCBANK candlesticks showing an 8.7 percent gap down on 19 March 2026
Figure 9.16: Overnight gap risk. Left: Nifty open vs previous close, 738 sessions (log scale). Right: HDFCBANK's −8.7% opening gap on 19 Mar 2026. Source: daily OHLC (Yahoo Finance / NSE).

Ways to manage gap risk: hold fewer lots than your risk budget allows before known events (results, policy, elections, budgets); prefer index futures over single stocks, since index gaps are smaller; and keep spare cash for margin calls. If you are long stock futures, consider a protective put (Chapter 10).

16.3 Costs (summary; details in Chapter 13)

From 1 Apr 2026, STT on futures is 0.05% of the sell-side value (up from 0.02%, Budget 2026). On one NIFTY lot (~₹14.8 lakh) that is about ₹738 per round trip in STT alone, before brokerage, exchange and clearing charges, SEBI fees, stamp duty and GST. Rollovers add four legs per month. framework.costs.futures_charges computes them. For tax, futures P&L is generally treated as non-speculative business income. See Chapter 13.

16.4 A beginner's rulebook for positional futures

  1. Learn on paper first. Paper-trade or trade cash-market equivalents for at least 3 months and keep an M2M ledger like Section 8.
  2. Start with NIFTY futures only. Most liquid, cash-settled, lowest margin %, no single-company gaps.
  3. Size by risk, not by margin. Lots = risk budget / (stop distance × lot size). Keep account equity at least 3–5× the margin of the positions you hold.
  4. Every trade has a pre-defined stop, placed beyond a logical level (swing low/high, 2×ATR). Exit when it's hit. Never add margin to "give it room".
  5. One or two positions at a time, and never all in the same direction across correlated stocks (five long bank futures is one trade, not five).
  6. Close or roll stock futures 2–3 days before expiry to avoid physical settlement and expiry-day margin jumps.
  7. Cut size before known events. Budgets, RBI policy, results, elections.
  8. Check costs and liquidity: bid-ask spread, depth, STT.
  9. Track your expectancy (Chapter 11) over at least 30 trades before increasing size.
  10. Remember the base rate. 66% of individual futures traders and 87.7% of all individual F&O traders lost money in FY26.

17. Try it yourself

These snippets need a copy of the course repository and Python with pandas and numpy (setup steps are in its framework/README.md). Run them from the repository's root folder, for example with .venv/bin/python, because the file paths are relative to that folder. Each snippet reproduces numbers from this chapter. The full analysis is in course/scripts/ch09_figures.py.

17.1 Contract value, basis and implied carry from the bhavcopy

import pandas as pd
f = pd.read_csv("data/fno/futures_aug_sep_2026.csv", parse_dates=["TradDt", "XpryDt"])
d = f[(f.TradDt == "2026-09-30") & (f.TckrSymb.isin(["NIFTY", "RELIANCE", "HDFCBANK", "SBIN"]))].copy()
d["days"] = (d.XpryDt - d.TradDt).dt.days
d["contract_value"] = d.SttlmPric * d.NewBrdLotQty
d["basis"] = d.SttlmPric - d.UndrlygPric
d["fair"] = d.UndrlygPric * (1 + 0.0552 * d.days / 365)          # r = 91-day T-bill
d["implied_carry_%"] = (d.SttlmPric / d.UndrlygPric - 1) * 365 / d.days * 100
pd.set_option("display.width", 200)
cols = ["TckrSymb", "XpryDt", "days", "UndrlygPric", "SttlmPric", "fair", "basis",
        "implied_carry_%", "contract_value"]
print(d[cols].sort_values(["TckrSymb", "days"]).round({"fair": 2, "basis": 2, "implied_carry_%": 2}).to_string(index=False))
# NIFTY Oct: spot 22620.45, settle 22707.3, fair 22712.82, implied 5.19%

17.2 Daily M2M ledger for any futures position

import pandas as pd
f = pd.read_csv("data/fno/futures_aug_sep_2026.csv", parse_dates=["TradDt", "XpryDt"])

def ledger(sym, expiry, side, entry_date, exit_date, lots=1):
    s = f[(f.TckrSymb == sym) & (f.XpryDt == expiry)].set_index("TradDt").sort_index()
    lot = int(s.NewBrdLotQty.iloc[0])
    px = s.SttlmPric.loc[entry_date:exit_date]
    out = pd.DataFrame({"settle": px})
    out["m2m"] = side * px.diff().fillna(0) * lot * lots      # day 1: entry at that day's settle
    out["cum"] = out.m2m.cumsum()
    return out

L = ledger("NIFTY", "2026-09-29", +1, "2026-08-03", "2026-09-29")
print(L.tail(3)); print("Total:", round(L.m2m.sum(), 2))       # -132847.0
S = ledger("INFY", "2026-09-29", -1, "2026-08-03", "2026-09-24")
print("INFY short total:", round(S.m2m.sum(), 2))               # 65600.0

17.3 OI buildup for every stock over a window

import pandas as pd
f = pd.read_csv("data/fno/futures_aug_sep_2026.csv", parse_dates=["TradDt", "XpryDt"])
oi = f.groupby(["TckrSymb", "TradDt"]).OpnIntrst.sum().unstack()       # all expiries summed
spot = f.groupby(["TckrSymb", "TradDt"]).UndrlygPric.first().unstack()
a, b = "2026-08-31", "2026-09-28"
pc = spot[b] / spot[a] - 1
oc = oi[b] / oi[a] - 1
def buildup(p, o):
    return {(True, True): "Long buildup", (False, True): "Short buildup",
            (True, False): "Short covering", (False, False): "Long unwinding"}[(p > 0, o > 0)]
res = pd.DataFrame({"price_%": pc * 100, "oi_%": oc * 100}).dropna()
res["class"] = [buildup(p, o) for p, o in zip(res["price_%"], res["oi_%"])]
print(res.loc[["NIFTY", "TCS", "ITC", "DRREDDY", "HAVELLS"]].round(1))
indices = ["NIFTY", "BANKNIFTY", "FINNIFTY", "MIDCPNIFTY", "NIFTYNXT50", "NIFTYFPI"]
print(res.drop(index=indices, errors="ignore")["class"].value_counts())   # stocks only: 118/68/13/11

17.4 Rollover %, beta and hedge lots

import pandas as pd, numpy as np
f = pd.read_csv("data/fno/futures_aug_sep_2026.csv", parse_dates=["TradDt", "XpryDt"])
g = f[(f.TckrSymb == "NIFTY") & (f.TradDt == "2026-09-29")].set_index("XpryDt").OpnIntrst
print("Rollover %:", round(g.drop(pd.Timestamp("2026-09-29")).sum() / g.sum() * 100, 1))   # 74.3

px = lambda s: pd.read_csv(f"data/ohlc/{s}.csv", index_col=0, parse_dates=True)
n = px("IDX_NSEI").Close.pct_change()
r = px("LT")["Adj Close"].pct_change()
j = pd.concat([r, n], axis=1, keys=["s", "m"], sort=True).loc["2025-09-01":"2026-08-31"].dropna()
beta = np.polyfit(j.m, j.s, 1)[0]
print("LT beta:", round(beta, 2))                                 # 1.43
value, fut, lot = 2000325, 24251.4, 65
print("Lots for beta 0.931:", round(0.931 * value / (fut * lot), 2))   # 1.18

18. Practical checklist

19. Key takeaways

Key takeaways

20. Quiz and exercises

Q1. Name the four problems with forward contracts and the feature of futures that solves each.
Liquidity risk → an exchange with many anonymous participants. Default/counterparty risk → the clearing corporation guarantees settlement, backed by margins and daily M2M. Regulatory risk → SEBI regulation. Rigidity → standardised contracts you can square off any time in market hours.
Q2. On 30 Sep 2026 SBIN Oct futures settled at 967.20 with a lot of 750 and SPAN of 14.18%. What are the contract value, initial margin (stock ELM 3.5%) and leverage?
Contract value = 967.20 × 750 = ₹7,25,400. Margin % = 14.18% + 3.5% = 17.68%. Margin ≈ 0.1768 × 7,25,400 ≈ ₹1,28,250 (the table shows ₹1,28,274 using the unrounded SPAN). Leverage = 1/0.1768 ≈ 5.66×. A 17.7% adverse move would wipe out the margin.
Q3. You are long 2 lots of NIFTY futures. Yesterday's settlement was 23,449.8 and today's is 23,108.6 (24 Sep 2026). What is today's M2M?
M2M = (23,108.6 − 23,449.8) × 65 × 2 = −341.2 × 130 = −₹44,356, debited from your account tonight. (One lot lost ₹22,178 that day in the Section 8 ledger.)
Q4. Your account has ₹1,80,000 and you hold 1 NIFTY lot. After today's M2M of −₹12,000 the futures settle at 23,500. With margin at 11.34% of contract value, is there a margin call, and of how much?
Balance = 1,80,000 − 12,000 = ₹1,68,000. Required = 23,500 × 65 × 0.1134 = ₹1,73,218.50. Shortfall = 1,73,218.50 − 1,68,000 ≈ ₹5,219. You must add it or reduce the position. If your stop has been hit, exit instead.
Q5. On 30 Sep 2026 RELIANCE spot was 1,187.00 and the Nov contract (54 days to expiry) settled at 1,197.70. Using r = 5.52%, compute the fair value and the implied carry.
Fair = 1,187 × (1 + 0.0552 × 54/365) = 1,187 × 1.008167 = 1,196.69. Actual is 1.01 above. Implied carry = (1,197.70/1,187 − 1) × 365/54 = 0.009014 × 6.759 = 6.09% p.a., slightly above the T-bill rate.
Q6. A stock futures contract trades 120 rupees below spot two days before the stock goes ex-dividend for ₹125. Is this a bearish signal? What happens to the basis on the ex-date?
No. Futures holders don't receive the dividend, so fair value = S(1 + r·x/365) − d, and the discount mostly reflects the ₹125 dividend. On the ex-date spot drops by about the dividend and the basis jumps back towards normal carry. MARUTI's Aug-26 basis went from −164.66 to −19.03 on its ₹140 ex-date (7 Aug 2026).
Q7. Over a week a stock's price rises 6% while total futures OI (all expiries) falls 15%. Classify it and say what you would check next.
Short covering (price up, OI down). Shorts are buying back. The rally may lack fresh buying and could fade once covering ends. Check volume, whether price is breaking a real resistance (Chapter 3), and whether fresh longs appear (OI turning up with price = long buildup). Our Aug–Sep test showed one-day buildups had no reliable next-day edge, so don't trade the label alone.
Q8. On HDFCBANK's expiry day (29 Sep 2026), OI was Sep 2,89,43,850, Oct 36,53,59,800 and Nov 2,42,91,800 shares. What is the rollover %? What does it tell you?
Rollover = (36,53,59,800 + 2,42,91,800) / (2,89,43,850 + 36,53,59,800 + 2,42,91,800) = 38,96,51,600 / 41,85,95,450 = 93.1%. Almost all open positions were carried into October. Positioning conviction stayed high, and you would read its direction from price and OI change (Section 13).
Q9. You hold a ₹30 lakh portfolio with beta 1.15. NIFTY futures are at 22,707.3 (lot 65). How many lots should you short to hedge? What if you round down?
Hedge value = 1.15 × 30,00,000 = ₹34,50,000. One lot = 22,707.3 × 65 = ₹14,75,975. Lots = 34,50,000 / 14,75,975 = 2.34. Shorting 2 lots under-hedges: about 15% of the market exposure (0.34/2.34) stays unhedged, so in a fall you still lose some money. Shorting 3 over-hedges: you profit in a fall but lose in a rally. Either way, company-specific moves stay unhedged.
Q10. You have ₹8 lakh and want to risk 1% on a long NIFTY futures trade with a 2×ATR stop, where ATR = 209 points. How many lots can you trade? What should you do?
Risk budget = ₹8,000. Risk per lot = 2 × 209 × 65 = ₹27,170. Lots = floor(8,000 / 27,170) = 0. The trade is too big for the account at 1% risk. Options: skip it; express the view in the cash market (e.g. a Nifty ETF sized to ₹8,000 of risk); use a tighter, structure-based stop only if it still sits outside normal noise; or accept that one lot means 3.4% risk. Do not drop the stop.
Q11. Why must you close or roll a long stock-futures position before expiry, even if you are bullish?
Stock futures are physically settled. At expiry a long must take delivery and pay the full contract value (e.g. about ₹5.91 lakh for one RELIANCE lot at the Sep settlement). Brokers also raise margins sharply near and on expiry day (Zerodha: 50% of contract value or 1.5× NRML on expiry day, whichever is lower) and may square off under-funded positions. Rolling to the next month keeps the view without delivery.
Q12. Exercise: using the bhavcopy, build an M2M ledger for a SHORT 1 lot of BANKNIFTY Sep-26 futures from 31 Aug to 28 Sep 2026. What is the total P&L, and what do you notice about the biggest single-day loss vs the initial margin?
Use snippet 17.2: ledger("BANKNIFTY", "2026-09-29", -1, "2026-08-31", "2026-09-28"). Entry 57,887.2, exit 54,556.2, lot 30. Total = (57,887.2 − 54,556.2) × 30 = +₹99,930. The worst day was 16 Sep, at −₹9,852. That is about 5% of an initial margin of roughly ₹1.96 lakh (57,887.2 × 30 × 11.31%), from one day's move in a trade that ended up winning. Single bad days are normal even in good trades, which is why you keep spare cash and size by risk.
Q13. You hold a ₹15 lakh portfolio with beta 1.0 and short 1 lot of NIFTY Oct futures at 22,707.3 to hedge through a three-week event. Instead of falling, Nifty futures rise 4%. What happens to your account, and was the hedge a mistake?
The futures lose about 4% × 22,707.3 = 908.3 points × 65 = ≈ ₹59,040, debited in cash day by day through M2M (with margin calls if your cash runs low). The portfolio gains about 4% × 15,00,000 = ≈ ₹60,000, but only on paper, in shares you have not sold. Net wealth is roughly unchanged, which is exactly what a hedge promises: you gave up the upside to remove the downside. It was not a mistake, but it shows two real costs: you need spare cash for the M2M losses (pledged shares cannot pay them), and you must lift the hedge when the event passes, or it will keep cancelling your gains.

21. Sources

Zerodha Varsity, Module 4, Futures Trading (concepts; explained here in our own words): 1. Background – Forwards Market · 2. Introducing Futures Contract · 3. The Futures Trade · 4. Leverage & Payoff · 5. Margin & M2M · 6. Margin Calculator (Part 1) · 7. Margin Calculator (Part 2) · 8. All about Shorting · 9. The Nifty Futures · 10. Futures Pricing · 11. Hedging with Futures · 12. Open Interest · 13. Quick note on Physical Settlement.

Rules and rates (checked Oct 2026): SEBI, Study: Profitability of Individual Traders in the Equity Derivatives Segment FY25–FY26 (20 Aug 2026) · NSE Clearing, Equity derivatives margins (SPAN, ELM 2%/3.5%, calendar-spread ELM) · NSE Clearing SPAN risk-parameter file, 30 Sep 2026 · RBI homepage (91-day T-bill 5.5199%, repo 5.25%, as of 2 Oct 2026) · RBI Weekly Statistical Supplement, interest rates (25 Sep 2026) · NSE expiry moved to Tuesday from 1 Sep 2025 · NSE lot-size revision (NIFTY 65, BANKNIFTY 30) from the Jan-2026 series · NSE tick-size revision for derivatives (Apr 2025) · NSE trading holidays 2026 · STT rates from 1 Apr 2026 (futures 0.05%) · SEBI's Oct-2024 index-derivative measures (Zerodha Z-Connect) · History of F&O margin requirements / peak margin (Zerodha Z-Connect) · Zerodha physical-settlement policy · Removal of calendar-spread benefit for stock derivatives on expiry day (5 May 2026) · Why Zerodha stopped bracket orders · SEBI 2025 MWPL / future-equivalent OI changes.

Data: NSE F&O UDiFF bhavcopy, futures, 3 Aug – 30 Sep 2026 (data/fno/futures_aug_sep_2026.csv); SPAN values extracted to data/extra/ch09_span_20260930.csv; daily OHLC from NSE via Yahoo Finance (data/ohlc/). All calculations and figures: course/scripts/ch09_figures.py. Examples are historical analysis for education, not recommendations.

← PreviousValuationNext →Options Essentials & Hedging