IMLInvestment
Model Library

Allocation references

Transaction cost units: from a quoted rate to portfolio drag

Reconcile basis points, trade notional, ticket fees and portfolio-level drag without confusing a cost assumption with observed execution.

Give every cost a denominator

A cost input needs both a unit and a base. Six basis points means 0.06%, or 0.0006 as a decimal fraction, but six basis points of traded notional is not six basis points of portfolio value. A per-share commission instead multiplies shares, while a fixed ticket charge multiplies the number of chargeable orders. Store these quantities separately before converting them into a common currency. The same USD 12 cost is 1.2 basis points of a USD 100,000 portfolio and 6 basis points of USD 20,000 traded. Omitting the denominator turns a correct number into an ambiguous claim.

Distinguish the spread from one crossing

Suppose a purely hypothetical quote has bid 99.98 and ask 100.02, with midpoint 100.00. The full quoted spread is four basis points of midpoint. Buying at the ask costs two basis points relative to that midpoint; selling at the bid costs another two. A round trip at an unchanged quote therefore crosses the full spread before commissions. Cvxportfolio identifies half-spread as one possible proportional cost coefficient. This is a reference-price convention, not a promise that an order reaches the displayed quote. If a measured slippage figure already includes spread crossing, adding the same spread component again would double count it.

Reconcile both legs of a rebalance

The table assumes a USD 100,000 portfolio, a USD 10,000 sale and a USD 10,000 purchase. Each leg carries an invented six-basis-point proportional charge plus a USD 1 ticket fee. Each proportional charge is USD 6, each total charge USD 7, and the combined cost USD 14. Dividing by portfolio value gives 0.00014, or 1.4 basis points. The proportional component alone is 1.2 basis points. These rates are chosen for transparent arithmetic and are not a broker quotation, a spread estimate or a recommendation. Two chargeable tickets are assumed; actual fee aggregation rules could differ.

Convert turnover before applying a rate

Under the self-financing convention used here, the example has 20% gross trading and 10% half-turnover. A uniform six-basis-point per-leg rate multiplies the 20% gross measure, producing 1.2 basis points of portfolio drag. Applying it directly to half-turnover produces 0.6 basis points and misses one side. Alternatively, a twelve-basis-point combined rate can multiply half-turnover for this balanced example. That shortcut stops being reliable when buy and sell sizes or rates differ. Cvxportfolio's turnover constraint documents its half-norm definition, making it possible to check the conversion explicitly instead of relying on the word turnover.

Separate linear charges from size effects

A constant proportional rate assumes that doubling traded notional doubles that component of cost. Market impact need not behave that way. Cvxportfolio's generic model includes a nonlinear size term that also depends on volatility and market volume; its existence is a reason to label a simple linear example narrowly. Estimating such a term requires a specified trading horizon and compatible volume units. A daily volume number cannot be treated as available liquidity in a one-minute interval. Likewise, converting a per-share fee into basis points requires a price. Keep omitted impact, financing, borrow and currency-conversion costs visible rather than silently setting realistic expectations to zero.

State when drag enters the return

Cost timing changes how a gross return becomes a net return. If both are measured against starting capital and costs are deducted at the end, subtracting 0.00014 from a hypothetical 0.01 gross return gives 0.00986, or 0.986%. If that cost is deducted first and the remaining capital then earns 1%, the final return is 0.98586%. The difference is small here but identifies different accounting assumptions. For multiple periods, apply the chosen convention to each period before compounding. Subtracting a sum of percentage costs from a compounded gross return generally does not reconstruct the same path.

Test units as well as totals

An effective fixture checks zero trading, one purchase, a balanced rebalance and asymmetric rates. It should reject a negative fee where rebates are outside the stated contract, and reject a percent input where the field requires a decimal fraction. Test portfolio drag separately from the currency cost so a shared scaling error cannot pass both assertions. Keep the rate assumption, trade quantities, reference price and fee count with the result. Even perfect reconciliation demonstrates only that the stated cost convention was applied correctly. It does not establish realized execution quality or the economic adequacy of the assumed rates.

Synthetic fee assumptions, not market observations. Independently checked against USD 100,000 starting value: USD 14 / USD 100,000 = 0.00014 = 0.014% = 1.4 basis points.
Hypothetical legAbsolute notional USDRate in basis pointsProportional cost USDTicket fee USDTotal cost USD
Sell A100006617
Buy B100006617
Combined200006 per leg12214

Primary references

These sources support methods and conventions. The example values are original constructions, not observations extracted from these documents.

Related investigations

Allocation references

Turnover definitions: count the trades before comparing the number

Distinguish gross trading, half-turnover, cash movements and drift using a fully reconciled synthetic rebalance.

Implementation contracts

The model card input contract: make valid inputs unambiguous

Specify shape, units, identity, numerical domains and rejection behavior before treating a mathematical example as reusable code.

Implementation contracts

Reproducible model artifacts: preserve the calculation, not just its answer

Build a checkable evidence bundle that distinguishes identical files, numerically equivalent outputs and independently verified arithmetic.