9.1

Roll Yields

PYTHON PLUGIN Commodities Carry

Description

Strategy 9.1: Roll yield long backwardation / short contango

Strategy Logic

Strategy 9.1: Roll yield based on term structure. Compute phi = P1 / P2 (front-month / second-month futures price). Phi > 1 = backwardation (buy), phi < 1 = contango (sell). Build a zero-cost portfolio: long commodities with higher phi, short those with lower phi. Expects DataFrames with 'close' (front-month price) and 'close_2' (second-month price). Falls back to 'front' and 'deferred' columns.

Parameters

Parameter Default Value Type
long_quantile 0.7 float
short_quantile 0.3 float

Risk Configuration

Risk Parameter Value
Max Position Pct 8.0%
Stop Loss Pct 5.0%
Take Profit Pct 10.0%
Max Drawdown Pct 15.0%