BackgroundAffective disorders are associated with poorer cognition in older adults; however, whether this association can already be observed in mid-life remains unclear.AimsTo investigate the effects of affective symptoms over a period of 30 years on mid-life cognitive function. First, we explored whether timing (sensitive period) or persistence (accumulation) of affective symptoms predicted cognitive function. Second, we tested how different longitudinal trajectories of affective symptoms were associated with cognitive function.MethodThe study used data from the National Child Development Study. Memory, verbal fluency, information processing speed and accuracy were measured at age 50. Affective symptoms were measured at ages 23, 33, 42 and 50 and used to derive longitudinal trajectories. A structured modelling approach compared a set of nested models in order to test accumulation versus sensitive period hypotheses. Linear regressions and structural equation modelling were used to test for longitudinal associations of affective symptoms with cognitive function.ResultsAccumulation of affective symptoms was found to be the best fit for the data, with persistent affective symptoms being associated with poorer immediate memory (b = −0.07, s.e. = 0.03, P = 0.01), delayed memory (b = −0.13, s.e. = 0.04, P < 0.001) and information processing accuracy (b = 0.18, s.e. = 0.08, P = 0.03), but not with information processing speed (b = 3.15, s.e. = 1.89, P = 0.10). Longitudinal trajectories of repeated affective symptoms were associated with poorer memory, verbal fluency and information processing accuracy.ConclusionsPersistent affective symptoms can affect cognitive function in mid-life. Effective management of affective disorders to prevent recurrence may reduce risk of poor cognitive outcomes and promote healthy cognitive ageing.Declaration of interestNone.