The effect of economic shocks on human capital is theoretically ambiguous due to opposing income and substitution effects. Using child level information on schooling, child labour, and cognitive development, we investigate the effect of cocoa price fluctuations on human capital production in Ghana. We demonstrate that the timing of the price shock matters. For school-aged children, the substitution effect dominates: a price boom decreases schooling and increases child labour. An increase of one standard deviation in the current-year real producer price of cocoa significantly decreases current school attendance by 8.6 percentage points and the likelihood of being in the correct grade in the following year by 5.5 percentage points. For pre-school-aged children, however, the income effect dominates: early life and in utero booms in the real producer
price of cocoa significantly increase Raven/IQ scores and grade attainment.