← Algo & Backtesting

Adjustment rules: rolling a position instead of closing it

A stop loss can only close a leg. Most option sellers do something else when a side is threatened: they roll it further out, pull the safe side in, or re-centre the whole straddle. Adjustment rules write those decisions down so they happen the same way every time.

What an adjustment does

An adjustment re-strikes a live position. The engine closes the leg, waits for that exit to be confirmed filled, then opens the new strike off the live option chain. The new leg gets a fresh stop and target from its own entry, and every action is recorded in the strategy log.

Rules are cards in Step 4B. Each fires once when its condition becomes true and re-arms only after it has gone false again, so a rule sitting on its threshold does not fire every second. You can run rules as alerts only, which records the trigger and places nothing.

The rule types

RuleTrigger → action
Roll or exit at a price levelA leg’s premium reaches a level set from its own entry (%, points or absolute ₹) → roll away N strikes, roll in, or exit.
Price band around entryOne band, two sides: premium rises through entry + band → one action; falls through entry − band → another.
Roll or exit at a delta levelA leg’s |delta| reaches a threshold → roll by strikes, exit, or roll away to a target |delta|.
CE/PE divergence|CE − PE| premium gap crosses a threshold → the winning side rolls in (for example to about 80% of the loser’s premium) and the losing side rolls away, as one action.
RebalanceOne side’s premium reaches N× the other → the cheap side rolls in to a strike worth about 80% of the expensive side.
Delta / gamma hedgeThe book’s net delta (or optionally net gamma) skews past a limit → roll the heavy leg, or hedge with futures.
Spot re-centreThe underlying moves X% from its reference → close both legs and reopen at the new ATM ± offset; the reference then resets.

The divergence, rebalance and re-centre rules apply to straddle and strangle shapes: one CE and one PE on the same underlying and expiry.

Step 4B with a leg-delta rule: roll away by one strike when a short leg reaches |delta| 0.55, plus the strike-gap and daily action guards.
Step 4B with a leg-delta rule: roll away by one strike when a short leg reaches |delta| 0.55, plus the strike-gap and daily action guards.

The guards that apply to every rule

The cap matters most. On a trending day an unguarded rule can roll a short call five times in an hour and pay the spread on every one.

A worked example: the delta hedge

A short straddle, 75 per side, net delta limit 0.20. At entry the call is +0.50 delta and the put −0.50; selling negates both, so net = 0.

NIFTY rallies. The call is now 0.74 delta and the put −0.27. Net delta = (−0.74 × 75 + 0.27 × 75) ÷ 150 = −0.235, past the limit.

For the concept behind it, see delta hedging explained.

In a backtest

Adjustment rules are simulated bar by bar: a roll closes at the bar price and reopens at the target strike from the archived strikes, with deltas from Black-Scholes on the bar’s IV and the same latch, daily cap, cooldown and gap guard as live.

Two things do not replay, and the report says so: the delta rule’s futures action, because the option archive holds no futures bars, and alert-only rules, which place nothing anywhere. Live evaluates on ticks and the backtest on one-minute bars, so live can act up to a bar earlier.

Common mistakes

Where to find it

  1. In Algo & Backtest, open Step 4B.
  2. Click + Add rule and pick the rule type; fill its thresholds and action.
  3. Set the gap, the daily cap and cooldown, and the short-legs-only switch.
  4. Backtest and read the adjustment entries in the trade log.

Common questions

Can an algo roll my short strike automatically?

Yes. A price-level or delta-level adjustment rule closes the threatened leg and opens a new strike further out of the money when its threshold is reached.

How many adjustments can happen in a day?

By default three actions per day across all rules, with 60 seconds between actions. Both are editable.

Are adjustments included in backtests?

Yes, rolls are simulated bar by bar. The futures delta-hedge action and alert-only rules are the exceptions and are flagged in the report.

What stops an adjustment from inverting a strangle?

The minimum CE minus PE strike gap, 100 by default. Any roll that would breach it is aborted entirely.

Can I hedge a short straddle with futures?

In live and paper runs, yes: the delta hedge rule can trade front-month futures against the net delta and unwind them when the book rebalances.

More on Algo & Backtesting

More in Algo & Backtesting · App: Algo & Backtest · Definitions: glossary · All: every article