Skip to main content
This tutorial demonstrates a short strangle strategy with two layers of management:
  1. DTE-based rolling - the strangle (short call + short put) is rolled whenever the current options fall below min_dte days to expiry
  2. Daily delta hedging - the net options delta is neutralized each day using a front-month futures contract
The goal is to isolate theta (time decay) as the primary P&L driver while removing directional exposure.

Imports

We need the standard Pulse building blocks plus InstrumentType.FUTURE for the delta hedge leg.

Strategy Design

The DeltaHedgedShortStrangle strategy has four helper methods and a simple main loop:

Helpers

Roll trigger - _should_roll()

Returns True when:
  • No strangle is open yet, or
  • The DTE of the current options (read live from the datafeed) has fallen below min_dte

Roll - _roll_strangle()

  1. Closes the existing strangle and hedge atomically so the books go flat
  2. Resolves fresh call and put instruments via _resolve_strangle_instruments()
  3. Sells both legs with is_lots=True - lots is in contract lots, multiplied by contract_size internally
  4. Calls _enter_hedge() to open the initial futures position for this cycle

Hedge entry - _enter_hedge(call, put)

Resolves the futures expiry to match the option DTE (not a fixed offset), ensuring the hedge tracks the same underlying forward contract. Opens the initial futures position via broker.create_order.

Hedge rebalance - _rebalance_hedge()

On every non-roll day, calls _calculate_hedge_quantity() on the current strangle legs and calls Trade.rebalance(quantity) on the open hedge trade - adjusting the quantity in-place without generating a new trade entry.

Lots vs. Units

Running the Backtest

We initialise the strategy on Brent Crude (COM.BRN) with: run_sequentially wires up the datafeed, resolver, broker, and portfolio, then drives the strategy day-by-day through the full history.
Output

Performance Metrics

Output

Equity Curve

Chart output 1

Inspecting Trades

Every completed trade is stored in strategy.trades. Each trade records its instrument, quantity, open/close prices, and final P&L.
Output

Comparing Hedged vs. Unhedged

To see how much the delta hedge matters, we can run both variants side-by-side. The unhedged version is identical except _delta_hedge is never called - achieved simply by subclassing and overriding on_update.
Output
Chart output 2

Inspecting the Hedge

We can visualise how the delta hedge tracked the strangle’s net delta across the first strangle cycle. The three trades of the first cycle are call (index 0), put (index 1), and hedge (index 2).
Chart output 3
Last modified on November 4, 2026