We analyze cointegration in commodity markets, and propose a parametric class of pricing measures which preserves cointegration for forward prices with fixed time to maturity. We present explicit expressions for the term structure of volatility and correlation in the context of our spot price models based on continuous-time autoregressive moving average dynamics for the stationary components. The term structures have many interesting shapes, and we provide some empirical evidence from refined oil future prices at NYMEX defending our modeling idea. Motivated from these results, we present a cointegrated forward price dynamics using the Heath–Jarrow–Morton approach. In this setting, the concept of cointegration is extended to what we call cointegration in the limit, which is an asymptotic form of the notion. The Margrabe formula for spread option prices is shown to hold, with an explicit plug-in volatility. We present several numerical examples showing that cointegration leads to significantly cheaper spread options compared to the complete market case, where cointegration disappears with respect to the pricing measure.