We derive an optimal trading strategy that benchmarks the closing price in a mean-variance optimization framework. By taking into account risk aversion, market impact, volatility and market volume, the optimal strategy specifies the quantities to be traded at each point in time in the continuous trading session as well as in the closing auction. The optimal strategy is expressed in closed form, which allows fast implementation. Because the closing price is a moving target, despite the apparent similarity with arrival-price strategies, closing-price strategies show distinctive features, such as the unwinding of previous fills. Exploration of the efficient frontier along with the late start volume weighted average price (VWAP) strategies, which traders often use to benchmark closing prices, leads to a practical method of determining the risk-aversion parameter from an effective trading rate.