liveBook · Manning

Adverse selection cost

As explained in Experimentation for Engineers

The profit lost because trades are executed under adverse selection conditions.

Adverse selection cost is the profit lost when trades execute under conditions suggesting the market will move against them. Liquidity often appears greatest precisely when execution is least profitable. section 4.2

Order size trade-off

A request to buy $3,000 may execute only $2,000 because insufficient liquidity prevents the remaining purchase. Keeping orders small misses profit opportunities; increasing them too far raises adverse selection. The best order size balances both effects. section 4.2

A stylized model represents the cost as asc = 0.001 × exp(2 × order_size), with order_size measured in thousands of dollars. The model is qualitative rather than data-derived, so it supports exploration rather than precise attribution. section 4.2

Listing 4.6 Markout profit as a function of threshold and order size
def markout_profit_2D(threshold, order_size):
    cost = 1                                                             #1
    pps = 1                                                              #2
    asc = .001*np.exp(2*order_size)                                      #3
    signal = np.random.normal()                                          #4
    eps = 2*np.random.normal()                                           #4
    if (signal > threshold                                               #5
        or signal < -threshold):                                         #6
        profit = order_size*(pps*np.abs(signal) - cost + eps) - asc      #7
    else:
        profit = 0                                                       #8
    return profit

Inspect the Python markout-profit function that combines threshold, order size, signal, execution cost, noise, and adverse selection cost. section 4.2

How Experimentation for Engineers covers it

How deep it goes
Defines a stylized exponential cost model and stops short of claiming data-derived internal dynamics.
Examples
Uses partial execution of a $3,000 order and a Python markout-profit simulator with exponential adverse selection cost.
What it assumes
Assumes familiarity with trading profit, liquidity, order size, and trading thresholds.
What you can do after
Apply response surface methodology to evaluate order-size and threshold combinations.
How it connects
Links liquidity, order size, trading threshold, markout profit, and response surface methodology.

This explainer was generated by Manning's knowledge graph from the text of Experimentation for Engineers. The section links point to the parts of the book it draws on.