A growing body of literature confirms the significance of the commodity futures basis factor: It has a significantly positive premium and it explains the cross-section of commodity-futures excess returns. We extend the literature by documenting predictive relation between this factor and the inter-quartile spread in the basis. Using commodity futures market data between 1972 and 2011, we show that the basis spread is a strong predictor of the basis factor return. Our finding supports the insight from recent theoretical models that economy-wide production shock affects the commodity market risk premium through the basis.
Keywords: Commodity futures, basis factor, predictability, inverse basis spread, decomposition, return dispersion
- The investment universe is all commodity futures contracts.
- The approach involves buying the top quintile (20%) of commodities exhibiting the highest roll-returns.
- Simultaneously, sell short the bottom quintile (20%) of commodities showing the lowest roll-returns.
- Maintain the long-short positions for a duration of one month.
- Contracts in each quintile are equally-weighted.
import backtrader as bt class RollRankStrategy(bt.Strategy): def __init__(self): # divide investment universe into quintiles self.quintiles = 5 # get the number of contracts in each quintile self.contracts_per_quintile = len(self.datas) // self.quintiles # get the length of roll period self.roll_period = 30 # assuming the trading period is 1 month # calculate the number of contracts to trade long/short self.num_longs_shorts = self.contracts_per_quintile // 5 def next(self): # calculate roll-returns for all contracts roll_returns = [d.close[-1] / d(-self.roll_period).close for d in self.datas] # sort contracts by roll-returns ranks = sorted(range(len(roll_returns)), key=lambda x: roll_returns[x]) # go long on top 20% of contracts for i in ranks[-self.num_longs_shorts:]: self.buy(self.datalist[i], size=1 / self.num_longs_shorts) # go short on bottom 20% of contracts for i in ranks[:self.num_longs_shorts]: self.sell(self.datalist[i], size=1 / self.num_longs_shorts)
Note: This is just an example, and the code may need to be adjusted based on the specifics of the commodity futures contracts being traded.