  We develop cointegration for multivariate continuous-time stochastic
processes, both in finite and infinite dimension. Our definition and analysis
are based on factor processes and operators mapping to the space of prices and
cointegration. The focus is on commodity markets, where both spot and forward
prices are analysed in the context of cointegration. We provide many examples
which include the most used continuous-time pricing models, including forward
curve models in the Heath-Jarrow-Morton paradigm in Hilbert space.
