Maximizing Tax Benefits of Transaction Costs