The Evaluation and Optimization of Trading Strategies