Pairs trading is a common strategy used by hedge funds. When the spread between two highly correlated assets is observed to deviate from historical observations, a long position is taken in the underpriced asset, and a short position in the overpriced one. If the spread narrows, both positions are closed, thus generating a profit. We study when to optimally liquidate a pairs trading strategy when the difference between the two assets is modeled by an Ornstein–Uhlenbeck process. We also provide a sensitivity analysis in the model parameters.