The idea of assuming that the transaction cost is one half of the bid-offer spread comes from several assumptions:
the positions are marked-to-market at mid;
you can actually execute at bid or ask (that your trade isn't large enough to impact the market);
there are no other fees or costs.
Bid-Ask Spreads: Measuring Trade Execution Costs in ...