Assume you are a quantitative researcher tasked with building a pairs trading strategy in the China A-share market. Walk me through how you would design, implement, and evaluate this strategy from scratch. Specifically, address how you would select appropriate trading pairs, generate trading signals, manage risk, and effectively backtest and optimize the strategy to ensure its robustness and profitability.