We explore an optimal timing strategy for the trading of price spreads exhibiting mean-reverting characteristics. A sequential optimal stopping problem is formulated to analyze the optimal timings for both entering and subsequently liquidating positions, all while considering the impact of transaction costs. Our approach leverages the signature optimal stopping method to resolve this
sequential optimal stopping problem, thereby unveiling the precise entry and exit timings that maximize gains. Our framework accommodates a wide range of mean reversion dynamics, offering adaptability to diverse scenarios. Numerical results are provided to demonstrate its superior performance when comparing with conventional mean reversion trading rules.