Balancing transaction costs versus the gain from trading is a key problem in fund management — with or without optimization.
Cost is often assumed to be the same for every share (or lot or contract) that is bought or sold. This is a reasonable assumption for small trades. But market impact means that for big trades it gets more expensive per share as the size of the trade increases.
Another use of costs is to alleviate the problem in optimization that the input predictions are not known exactly. The transaction costs can be increased which tends to reduce the size of the trade which is the right thing to do when there is uncertainty in the inputs. The term “robust optimization” is used for the allowance of the inexact nature of the inputs (note that there is an unfortunately large number of uses of the word “robust” that can apply in this realm).
Specifying and appropriately scaling costs is a non-trivial task. A crude but much simpler approach is just to use a turnover constraint.
Portfolio Probe allows very flexible trading costs. They can, of course, be linear. They can also have terms that involve arbitrary powers of the number of units traded. For example, a square root term like that of the inventory model of Grinold and Kahn can be used. The 0.6 exponent empirically found by Almgren et al. is another possibility. It is easy to allow each asset to have its own set of exponents.
It is also possible to have different costs depending on if it is a buy or a sell, and if the position is long or short.
ucost argument makes it easy to align the size of costs to the other quantities in the utility function.