Adapting Trading Strategies to Market Conditions