Transaction cost analysis to optimize trading strategies