Skip to content

Signal 7 — Roll Yield Carry

Thuộc tínhGiá trị
Phân loạiFutures Term Structure
Khung thời gianWeekly / Monthly
Paper gốcErb-Harvey (2006); Gorton-Rouwenhorst (2006)
Loại dữ liệuMulti-contract futures curve
Hướng giao dịchCarry harvest
CapacityTrung bình–Cao

Logic. Tính spread annualized giữa front-month và back-month contract: carry = (F_back − F_front) / F_front × (365 / days_diff). Contango (carry > 0 cho long position nghĩa là chi phí roll dương) → short carry. Backwardation (carry < 0) → long carry. Sort universe theo carry, long-short top/bottom.

Công thức.Roll Yield = (F_front − F_back) / F_back × annualization_factor

Code Python.

python
def roll_yield(front_price, back_price, days_between):
    return (front_price - back_price) / back_price * (365.0 / days_between)

def carry_signal(curve_df):
    """curve_df: cols = ['front', 'back', 'days_between'] per asset."""
    curve_df['carry'] = roll_yield(
        curve_df['front'], curve_df['back'], curve_df['days_between']
    )
    ranks = curve_df['carry'].rank(pct=True)
    curve_df['weight'] = np.where(
        ranks > 0.7, 1.0,
        np.where(ranks < 0.3, -1.0, 0.0)
    )
    return curve_df

QuantConnect setup. AddFuture("ES", Resolution.Daily) rồi enumerate chain.Contracts để lấy curve. Trên VN30F (chỉ một-hai contract active), pattern này hạn chế; thường dùng cho commodity futures (CL, NG, GC) trên CME qua QC.

Powered by dautu.tech