This paper proposes a theory of when labor contract should be nominal or, instead, indexed. We find that, contracts should be indexed if prices are difficult to forecast and nominal otherwise. We use a principal-agent model developed by Jovanovic and Ueda (1997), with moral hazard, renegotiation, and where a signal (the nominal value of the sales of the agent) is observed before renegotiation takes place. We show that their result, that the optimal contract is nominal when agents must choose pure strategies, is robust to the case where agents can choose mixed strategies in the sense that, for certain parameters, the optimal contract is still nominal. For other parameters, however, we show that the optimal contract is indexed. Our findings are consistent with two empirical regularities. First prices are more volatile with higher inflation and, second, countries with high inflation tend to have indexed contracts. Our theory suggests that it is because prices are difficult to forecast in high inflation countries that contracts are indexed.