We introduce a novel class of term structure models for variance swaps. The multivariate state process is characterized by a quadratic diffusion function. The variance swap curve is quadratic in the state variable and available in closed form, greatly facilitating empirical analysis. Various goodness-of-fit tests show that quadratic models fit variance swaps on the S&P 500 remarkably well, and outperform affine models. We solve a dynamic optimal portfolio problem in variance swaps, index option, stock index and bond. An empirical analysis uncovers robust features of the optimal investment strategy. (C) 2015 The Authors. Published by Elsevier B.V.