QuantsappFaster in the app: live data, alerts, tradingOpen
Log inStart free
OI · PCR · VIX signalsPositionalNIFTYmedium complexity

ITM-OTM OI imbalance long

This positional strategy reads the NIFTY option chain to decide whether to hold a long futures position. Every afternoon it compares call and put open interest around the at-the-money strike across the next four expiries, weighting the nearest most. If writers are leaning bullish, it goes long; if they lean bearish and option premiums are cheap, it goes flat. It never shorts.
Holds NIFTY futures long while option open interest near the money across four expiries leans bullish, and goes flat when it leans bearish with cheap premiums.
Market viewBullish
TradesNIFTY near-month futures, 1 lot
RiskOpen-ended (loss not capped by the structure)
CapitalFutures margin
SuitsIntermediate
Trades a month1.8
Typical hold12 days
Profitable months5 of 12
Longest losing run4 trades
Made money inNIFTY rising over 1% while held (5 trades)
Lost money inEntries after a gap-up openNIFTY falling over 1% while held
Default settings
Symbol
Scan time
Exec time
Roll time
N expiries
Rows
Threshold
Premium cap %
Lots
Backtest this strategy →Change any setting, pick your own period and run it in the Quantsapp web app. Backtesting is part of the Max plan. Pro+ members can use it now as a free trial.
1

How it trades

What it trades
Universe
NIFTY Positional · 1 Oct 25 → 30 Sep 26
Enters
09:16 the session after the 15:20 OI score exceeds +0.10
Legs
BUY FUT · Near month · Current month · 1 lot
Exits
signal Next 09:16 after score below -0.10 with ATM premiums under 0.8% of the futureroll 15:15 on futures expiry day; re-bought next session if still long
Re-entry
Whenever the score turns bullish again
Score
once a day at SCAN_TIME, for each of the nearest N_EXPIRIES expiries with a chain: take the listed strikes in order and the ATM row i. in-the-money diff = call OI of rows i-ROWS..i - put OI of rows i..i+ROWS out-of-money diff = call OI of rows i..i+ROWS - put OI of rows i-ROWS..i diff = in-the-money diff - out-of-money diff The expiries are weighted 4, 3, 2, 1 (nearest first; re-normalised over the expiries present) and the weighted diff is divided by the weighted total OI of those rows, so the score is a share of the OI near the money (-1 .. +1).
Entry
score above +THRESHOLD -> long regime: buy LOTS of the near-month future at EXEC_TIME of the next session (held while the regime lasts).
Exit
score below -THRESHOLD AND the weighted ATM call and ATM put premiums are both below PREMIUM_CAP_PCT % of the future -> flat regime: sell at EXEC_TIME of the next session. No stop and no target (the source has neither).
Roll
a future cannot be held past its expiry - on the futures expiry day the long is closed at ROLL_TIME and re-bought at EXEC_TIME of the next session if the regime is still long.
2

Results

PRE-BUILT · DEFAULTS
NIFTY · 2025-10-01 → 2026-09-30 · 21 trades · before costs
Net P&L−₹1,42,903
Win rate33%
Max drawdown−₹2,07,950
Avg per trade−₹6,805
Profit factor0.54
Worst trade−₹1,26,665
3

Where it made and lost money

With 21 trades the buckets are small, but the pattern is plain. Five trades where NIFTY rose more than 1% while held made ₹1,47,175; five where it fell more than 1% lost ₹2,29,247, with no winners, because the exit waits for a bearish OI reading plus cheap premiums, which rarely come during a fall. Eleven trades where NIFTY stayed within 1% lost ₹60,831. Entries the day after a gap-up open were the weakest group, losing ₹1,27,897 over 8 trades. Figures are before costs.

How the entry day opened
Gap up of 0.4% or more−₹1,27,8978 trades12% won
Flat open−₹9,64412 trades50% won
Gap down of 0.4% or more−₹5,3621 trades0% won
Trend going in
Uptrend (NIFTY above its 20-day average)−₹33,06412 trades33% won
Downtrend (NIFTY below its 20-day average)−₹1,09,8389 trades33% won
India VIX the evening before
VIX below 11.5 (calm)+₹37,7546 trades50% won
VIX 11.5-14.5 (normal)−₹1,06,42711 trades27% won
VIX above 14.5 (nervous)−₹74,2304 trades25% won
Kind of session on the entry day
Quiet session (range under 0.75%)−₹57,94111 trades27% won
Trend day (closed near the high or low)−₹8,2723 trades33% won
Choppy day (wide range, closed mid-range)−₹76,6907 trades43% won
Market while the trade was held
NIFTY rose over 1% while held+₹1,47,1755 trades80% won
NIFTY within ±1% while held−₹60,83111 trades27% won
NIFTY fell over 1% while held−₹2,29,2475 trades0% won
Session direction on the entry day
NIFTY closed above its open−₹1,06,47514 trades29% won
NIFTY closed below its open−₹36,4277 trades43% won
Expiry day (NIFTY weekly)
Expiry day−₹1,90,2093 trades0% won
Other days+₹47,30718 trades39% won
Day of the week
Monday−₹20,0853 trades0% won
Tuesday−₹1,90,2093 trades0% won
Wednesday+₹3,3468 trades12% won
Thursday−₹1,0025 trades80% won
Friday+₹65,0482 trades100% won
The same trades, split by the market conditions around each entry, before costs.
4

About this strategy

  1. At 15:20 each day, for each of the next four NIFTY expiries (skipping one that expires that day), take five strikes on each side of the ATM strike.
  2. Compute an in-the-money difference (call OI below ATM minus put OI above ATM) and an out-of-the-money difference (call OI above ATM minus put OI below ATM); the score is the first minus the second.
  3. Weight the expiries 4, 3, 2, 1 from nearest to furthest and divide by the total OI in those rows, giving a score between -1 and +1.
  4. If the score is above +0.10, buy one lot of NIFTY futures at 09:16 the next session and hold.
  5. If the score falls below -0.10 and the weighted ATM call and put premiums are each below 0.8% of the future, sell at 09:16 the next session.
  6. On the monthly futures expiry day, close at 15:15 and re-buy the next session if the signal is still long. No stop, no target.

Why traders use it

Option writers are often seen as the better-informed side, and where they build open interest is read as where they expect the market not to go. Measuring the imbalance across several expiries, rather than just the nearest, aims to capture positioning that is more than one week's noise. Normalising by total OI turns raw contract counts into a share that works across time. It is an attempt to follow the option market's collective lean.

Works best whenBullish option positioning is followed by a NIFTY rally of more than 1% during the hold. Only five trades in this test fitted that pattern, so the evidence is thin.
Struggles whenNIFTY falls more than 1% while the long is held: the exit needs both a bearish OI score and cheap premiums, which rarely arrive in a sell-off. Entries after a gap-up open were the weakest group in this test.

The year in plain words

With default settings on NIFTY from 1 Oct 2025 to 30 Sep 2026, the strategy took 21 trades and won 7. It lost ₹1,42,903 before costs and ₹1,51,169 after ₹20 per order and bid-ask slippage. The trouble is that long positions are held with no stop until the OI score turns bearish, and in March one trade lost ₹1,26,665 before the exit signal came. December and September each lost about ₹50,000, while October (₹49,634) and April (₹69,264) were the bright spots. The maximum drawdown before costs reached ₹2,07,950.

What the settings do

Scan timeWhen the option chain is read each day. The signal is acted on at the next session's execution time.Exec timeWhen the futures trade is placed on the session after a signal.Roll timeThe time on the monthly futures expiry day when an open long is closed before being re-bought in the next contract.N expiriesHow many upcoming expiries are included in the score. Fewer expiries make it react to short-term positioning.RowsHow many strikes on each side of ATM are counted. More rows include further strikes and dilute the near-money signal.ThresholdHow strong the imbalance must be to change the regime. A higher threshold trades less often.Premium cap %ATM call and put premiums must each be below this share of the future price for a bearish score to send the strategy flat.

Risks

  • There is no stop loss; a single trade lost ₹1,26,665 before the exit condition was met.
  • The exit requires cheap ATM premiums, which tend to be expensive exactly when markets fall, delaying exits.
  • Open-interest readings can reflect hedging rather than directional views, so the signal may be misread.
  • A full NIFTY futures lot is held overnight for days or weeks at a time.

Who it suits

Traders interested in option-chain analytics who want to test whether open-interest positioning predicts NIFTY's direction, and who have capital for very large swings on a single futures lot.

5

Questions traders ask

What does OI imbalance mean in options?

It compares open interest on calls and puts at certain strikes. Here, heavy put writing below the price and call positions that favour upside count as bullish. The score measures how lopsided that positioning is around the at-the-money strike.

Is the OI imbalance strategy profitable?

Not in this test. From 1 Oct 2025 to 30 Sep 2026 on NIFTY it lost ₹1,42,903 before costs and ₹1,51,169 after ₹20 per order and bid-ask slippage, over 21 trades. Past results do not guarantee future ones.

Why weight four expiries?

The nearest expiry reflects short-term trading, while later expiries carry longer-term positions. Weighting them 4, 3, 2, 1 gives the nearest the most say but still lets later expiries influence the reading.

Why doesn't it go short when the score is bearish?

The rule set is long-or-flat. A bearish reading, combined with cheap premiums, only closes the long. The strategy never sells NIFTY futures to open a short.

6

Before you rely on it

ADAPTED FOR TODAY'S NSE RULESThe source ran on BANKNIFTY WEEKLY expiries, which were discontinued in Nov 2024; BANKNIFTY now has monthlies only, so "the next four expiries" would reach four months out. The default is NIFTY, whose weekly series keeps the source's meaning of four near expiries (set SYMBOL = "BANKNIFTY" for the original index - it then weights the next monthlies). Sized in lots.
WATCH OUTThe source notebook has a NameError and no outputs; its sample was 124 days with a hard-coded loop and returns summed rather than compounded. Treat it as an idea, not a tested system.
WHERE THE RULES WERE UNCLEAR · OUR CHOICESThe source's thresholds (+-350,000 contracts of OI, a 350-point premium cap) were absolute numbers for 2023 BANKNIFTY lot sizes and OI; they do not carry over. Per the spec, the OI score is normalised by the OI in the window (THRESHOLD is a share) and the premium cap is a % of the future (350 points was ~0.8 % of BANKNIFTY then). "Weighted CE/PE close" is read as the ATM call and put premiums at SCAN_TIME, weighted like the OI. The signal is read before the close and acted on at the next session, as in the source. An expiry expiring that very day is skipped (its chain is gone by the next session and its ATM premium is near zero, which would trip the premium cap). LOCAL DATA: only the nearest two expiries are stored locally, so a smoke run weights 2 expiries.
Also known asbanknifty oi trend regime
Backtests run on historical NSE data with fills at the last traded price. "Before costs" excludes brokerage, taxes and slippage. Quantsapp is not recommending any strategy; it is just a backtesting utility. Past results are not a promise of future returns.

Log in or sign up

Enter your mobile number. New to Quantsapp? The same OTP creates your free account.

+91

By continuing you agree to the Terms of Use and Privacy Policy.