10.2

Calendar Spread

PYTHON PLUGIN Futures Relative Value

Description

Strategy 10.2: Calendar spread mean-reversion on near vs deferred futures

Strategy Logic

Strategy 10.2: Calendar (time) spread. Spread = near-month price - deferred-month price. When the spread widens beyond a threshold (near premium grows) -> sell signal (bear spread: sell near, buy deferred). When the spread narrows or inverts -> buy signal (bull spread: buy near, sell deferred). Expects 'close' (near-month) and 'close_2' (deferred-month).

Parameters

Parameter Default Value Type
spread_lookback 63 int
z_entry 1.5 float
z_exit 0.5 float

Risk Configuration

Risk Parameter Value
Max Position Pct 8.0%
Stop Loss Pct 3.0%
Take Profit Pct 6.0%
Max Drawdown Pct 10.0%