10.1.1

Cross-Hedging

PYTHON PLUGIN Futures Hedging

Description

Strategy 10.1.1: Cross-hedge basis divergence with correlated futures

Strategy Logic

Strategy 10.1.1: Cross-hedging with correlated futures. Compute optimal hedge ratio via OLS regression of spot returns on futures returns. Signal when the basis between the two diverges from its historical mean by more than a z-score threshold. Expects DataFrames with 'close' (spot) and a 'hedge_futures' column for the correlated futures contract, or two separate symbols in data dict. The param 'hedge_pair' maps symbol -> hedge symbol.

Parameters

Parameter Default Value Type
regression_lookback 126 int
z_entry 2.0 float
z_exit 0.5 float
hedge_pairs {} dict

Risk Configuration

Risk Parameter Value
Max Position Pct 8.0%
Stop Loss Pct 4.0%
Take Profit Pct 8.0%
Max Drawdown Pct 12.0%