Lesson 1.1.5 · 65 min

Costs, settlement, leverage and margin

What it costs to trade is rarely on the broker's invoice: it is in the bid-ask spread, in the impact and in the time between deciding and executing. This lesson measures those costs with the NOVA session, explains when a trade settles and calculates the price at which a margin call arrives.

Fig. — Cost waterfall of a 20,000-share NOVA buy decided at 15:00 New York time, in basis points over the decision price
05/05
Module
1.1 · How markets work
Duration
65 min
Updated
Level 1 lessons
  1. 1.1 · How markets work

    1. 1.1.1 Market participants and trading venues
    2. 1.1.2 Sessions, auctions, holidays and calendars
    3. 1.1.3 Order book: bid, ask, spread and depth
    4. 1.1.4 Order types
    5. 1.1.5 Costs, settlement, leverage and margin
  2. 1.2 · Asset classes

    1. 1.2.1 Stocks: splits, dividends and corporate actions
    2. 1.2.2 ETFs: replication, tracking error, leveraged ETFs and UCITS
    3. 1.2.3 Futures: specifications, margin, roll and contango
    4. 1.2.4 Forex: pairs, pips, lots, rollover and CFDs
    5. 1.2.5 Options: calls, puts, intrinsic value and time value
    6. 1.2.6 Crypto: spot, perpetuals, funding and custody
    7. 1.2.7 Fixed income and interest rates; CFDs and leveraged products
  3. 1.3 · Market data sources

    1. 1.3.1 Types of market data: EOD, bars, ticks, order book and reference
    2. 1.3.2 Free market data sources
    3. 1.3.3 Retail and prosumer market data APIs
    4. 1.3.4 Professional market data providers
    5. 1.3.5 Crypto and on-chain data
    6. 1.3.6 Brokers as market data sources
    7. 1.3.7 Market data licensing and terms of use
    8. 1.3.8 How to choose a market data provider
  4. 1.4 · Financial data engineering

    1. 1.4.1 Downloading over REST and websockets: pagination, rate limits and retries
    2. 1.4.2 Data cleaning: missing values, bad ticks, gaps and time zones
    3. 1.4.3 Adjusting for splits and dividends: adjusted and unadjusted prices
    4. 1.4.4 Universes without survivorship bias: delistings, mergers and symbol changes
    5. 1.4.5 Building bars: time, tick, volume, dollar and imbalance
    6. 1.4.6 Continuous futures series: roll rules, difference adjustment and ratio adjustment
    7. 1.4.7 Storage: CSV, Parquet, partitioning, DuckDB, TimescaleDB and ArcticDB
    8. 1.4.8 Reproducible pipeline: download, validation, incremental updates and quality tests
  5. 1.5 · Fundamental and macro data

    1. 1.5.1 Financial statements, ratios, XBRL and SEC EDGAR
    2. 1.5.2 Macro data, economic calendars, estimates and transcripts
  6. 1.6 · Financial exploratory analysis

    1. 1.6.1 Returns, volatility, rolling correlations and drawdown
    2. 1.6.2 Stylized facts: fat tails, clustering, autocorrelation and leverage
    3. 1.6.3 Seasonality: day of the week, month, turn of the month and intraday sessions
  7. 1.7 · Programmed technical analysis

    1. 1.7.1 Technical indicators in Python
    2. 1.7.2 Your own implementation versus TA-Lib: validating results
    3. 1.7.3 Candlestick patterns and support and resistance
    4. 1.7.4 Multi-timeframe analysis without look-ahead

What a trade costs

The cost of a trade is the difference between what the system would have earned in a frictionless world and what it actually earns. Part of it shows up on the broker statement; most of it does not.

CostTypeWhen it is paidHow it is measured
Broker commissionExplicitOn executionPer share, per trade or as a % of the amount
Exchange and regulatory feesExplicitOn execution (some only on sales)According to each market's and country's schedule
Bid-ask spreadImplicitWhen crossing itHalf spread per side
ImpactImplicitWhen executing an order larger than the first levelAverage price paid versus the best price
Slippage (delay)ImplicitBetween the decision and the executionExecution price versus decision price
FinancingExplicitEvery day the position is openLoan interest, cost of borrowing securities
OpportunityImplicitIf the order is not executedWhat the unexecuted part would have earned

The reference for all the implicit costs is the decision price: the midpoint at the moment the system decides to trade. The difference between that price and what ends up being paid, plus the explicit costs, is called implementation shortfall. Measuring it in basis points (hundredths of a percentage point) makes it possible to add costs of different nature and to compare assets with very different prices.

Effective spread and realized spread

The quoted spread (lesson 1.1.3) is what it costs to cross the book if the order fits in the first level. The effective spread measures what was actually paid on each trade, against the prevailing midpoint just before it:

seff=2 D P−MtMts_{\text{eff}} = 2\,D\,\frac{P - M_t}{M_t}

where PP is the trade price, MtM_t the prevailing midpoint and D=+1D = +1 if the aggressor buys and −1-1 if it sells. The factor 2 makes it comparable with the quoted spread, which is a round trip. The realized spread uses instead the midpoint a few seconds or minutes later, Mt+ΔM_{t+\Delta}:

srealized=2 D P−Mt+ΔMt,impact=seff−srealizeds_{\text{realized}} = 2\,D\,\frac{P - M_{t+\Delta}}{M_t}, \qquad \text{impact} = s_{\text{eff}} - s_{\text{realized}}

The realized spread is what whoever provided the liquidity keeps if they unwind their position at the midpoint of that moment. If the price moves in the aggressor's direction, the liquidity provider loses part of the spread, or all of it: that is adverse selection, and the difference between the two spreads is the price impact of the trade.

To calculate them, each trade has to be joined with the quote prevailing before it, with allow_exact_matches=False, as in lesson 1.1.1, and with the quote prevailing at t+Δt+\Delta:

IN [01]python
import numpy as np
import pandas as pd

op = pd.read_parquet("nova_operaciones.parquet")
cot = pd.read_parquet("nova_cotizaciones.parquet")
cot["medio"] = (cot["bid"] + cot["ask"]) / 2
medios = cot[["ts", "medio"]]

reg = op[op["condicion"] == "regular"].copy()
reg = pd.merge_asof(reg, medios, on="ts", allow_exact_matches=False)
reg["D"] = np.where(reg["agresor"] == "compra", 1, -1)

def medio_en(ts):
    """Prevailing midpoint at each instant of `ts` (last change <= ts)."""
    m = pd.merge_asof(pd.DataFrame({"ts": ts}), medios, on="ts")
    return m["medio"].to_numpy()

reg["ef_pb"] = (2e4 * reg["D"] * (reg["precio"] - reg["medio"])
                / reg["medio"])
cols = ["ts", "precio", "agresor", "centro", "medio", "ef_pb"]
reg[cols].head(3).round({"ef_pb": 3})
OUT [01]Each trade with the prevailing midpoint and the one after
                                ts  precio agresor     centro  medio  ef_pb
0 2025-06-02 13:30:00.301051+00:00   53.34   venta  PRINCIPAL  53.35  3.749
1 2025-06-02 13:30:00.301052+00:00   53.34   venta  PRINCIPAL  53.35  3.749
2 2025-06-02 13:30:00.407366+00:00   53.34   venta  PRINCIPAL  53.35  3.749
IN [02]python
def media_pond(g, col):
    return np.average(g[col], weights=g["tamano"])

por_centro = reg.groupby("centro").apply(
    lambda g: pd.Series({"efectiva_pb": media_pond(g, "ef_pb"),
                         "operaciones": len(g)}))
por_centro.round(3)
OUT [02]Volume-weighted effective spread by venue
                efectiva_pb  operaciones
centro
INTERNALIZADOR        1.054       3914.0
MTF_A                 2.039       9640.0
MTF_B                 2.078       7230.0
OSCURO                0.000       4380.0
PRINCIPAL             2.074      25774.0

The three lit venues charge on average between 2.04 and 2.08 basis points of effective spread, somewhat more than the typical one-tick quoted spread (1.9 basis points, lesson 1.1.3) because some orders sweep more than one level. The dark venue, which crosses at the midpoint, has a zero effective spread: neither buyer nor seller pays spread. The internalizer, which often improves on the book price (lesson 1.1.1), charges half as much as the visible books. For a client, that is the economic argument for both.

Now the realized spread, at several horizons, for the trades on the lit venues:

IN [03]python
lit = reg[reg["centro"].isin(["PRINCIPAL", "MTF_A", "MTF_B"])].copy()
filas = {}
for h in ("1s", "10s", "1min", "5min"):
    m_desp = medio_en(lit["ts"] + pd.Timedelta(h))
    real = 2e4 * lit["D"] * (lit["precio"] - m_desp) / lit["medio"]
    ef = media_pond(lit, "ef_pb")
    rr = np.average(real, weights=lit["tamano"])
    filas[h] = {"efectiva": ef, "realizada": rr, "impacto": ef - rr}
pd.DataFrame(filas).T.round(2)
OUT [03]Realized spread and impact by horizon
      efectiva  realizada  impacto
1s        2.07       1.68     0.38
10s       2.07       0.27     1.80
1min      2.07      -6.95     9.02
5min      2.07     -14.47    16.54

At one second, the liquidity provider keeps 1.68 of the 2.07 basis points of spread. At ten seconds, almost nothing. At one minute and at five, the realized spread is negative: the price has followed the aggressor so far that whoever gave it liquidity loses money if they hold the position. In the simulated NOVA session, the aggressive order flow is what moves the price, and that is paid for in the spread of whoever provides liquidity. In real data the shape is usually the same (the realized spread falls with the horizon), although the figures depend on the stock and the day.

The impact curve

The average effective spread is about small orders. For a large order, what matters is how much of the book it has to walk through. With the 2,340 L2 snapshots of the session, a market buy of each size can be simulated on each snapshot and its average cost measured against the prevailing midpoint:

IN [04]python
l2 = pd.read_parquet("nova_libro_l2.parquet")
tamanos = [100, 500, 1_000, 2_000, 5_000,
           10_000, 20_000, 30_000, 50_000]

def coste_pb(foto, n):
    a = foto[foto["lado"] == "ask"].sort_values("precio")
    b = foto[foto["lado"] == "bid"]
    medio = (a["precio"].iloc[0] + b["precio"].max()) / 2
    if a["tamano"].sum() < n:
        return np.nan                     # the visible book is not deep enough
    resto, gasto = n, 0.0
    for p, q in zip(a["precio"], a["tamano"]):
        t = min(resto, q)
        gasto, resto = gasto + t * p, resto - t
        if resto == 0:
            break
    return 1e4 * (gasto / n - medio) / medio

costes = {n: [] for n in tamanos}
for _, foto in l2.groupby("ts"):
    for n in tamanos:
        costes[n].append(coste_pb(foto, n))
curva = pd.DataFrame({n: pd.Series(v) for n, v in costes.items()}).T
pd.DataFrame({"coste_medio_pb": curva.mean(axis=1),
              "mediana_pb": curva.median(axis=1),
              "sin_liquidez_pct": 100 * curva.isna().mean(axis=1)}
             ).round(2)
OUT [04]Cost of a market buy by size
       coste_medio_pb  mediana_pb  sin_liquidez_pct
100              0.98        0.94              0.00
500              1.04        0.94              0.00
1000             1.10        0.94              0.00
2000             1.22        0.94              0.00
5000             1.55        0.95              0.00
10000            2.02        1.68              0.17
20000            2.82        2.40              1.20
30000            3.57        3.02              5.64
50000            5.33        4.81             48.46
Fig. — Average cost of a NOVA market buy by order size, walking each of the 2,340 L2 snapshots of the 2 June 2025 session

Up to 2,000 shares, the cost barely exceeds half the spread: a little over one basis point. From 5,000 on, the order usually goes past the first level and the cost accelerates: 2.0 basis points with 10,000 shares, 3.6 with 30,000. With 50,000 the average is 5.3, and in almost half of the snapshots the visible book does not even have that many shares for sale across ten levels. That is why large orders are split into pieces and spread over time (the TWAP and VWAP algorithms of lesson 1.1.4) or sent to a dark venue (lesson 1.1.1).

Two caveats. The curve is optimistic: it assumes the book does not react while the order walks through it, and in reality liquidity providers pull orders as soon as they see a large one. And it is one-sided: if the position is unwound later, the cost is paid again.

One order, all its costs

The header figure is the cost waterfall of a specific order. At 15:00:00 New York time a system decides to buy 20,000 NOVA shares, with the midpoint at 52.745. The market order reaches the book ten seconds later. The system pays an assumed commission of 0.005 USD per share and finances half of the purchase on margin for five days at an assumed 6% annual rate (360-day basis). The broker figures are hypothetical; the book figures are those of the L2 snapshot.

IN [05]python
def foto_en(ts):
    return l2[l2["ts"] == ts]

def precio_medio_compra(foto, n):
    a = foto[foto["lado"] == "ask"].sort_values("precio")
    resto, gasto = n, 0.0
    for p, q in zip(a["precio"], a["tamano"]):
        t = min(resto, q)
        gasto, resto = gasto + t * p, resto - t
        if resto == 0:
            break
    return gasto / n

def mejores(foto):
    return (foto.loc[foto["lado"] == "bid", "precio"].max(),
            foto.loc[foto["lado"] == "ask", "precio"].min())

n = 20_000
decision = sum(mejores(foto_en("2025-06-02 19:00:00+00:00"))) / 2
f10 = foto_en("2025-06-02 19:00:10+00:00")
bid10, ask10 = mejores(f10)
medio10 = (bid10 + ask10) / 2
pagado = precio_medio_compra(f10, n)

pb = lambda x: 1e4 * x / decision
cascada = pd.Series({
    "retraso": pb(medio10 - decision),
    "media_horquilla": pb(ask10 - medio10),
    "impacto": pb(pagado - ask10),
    "comision": pb(0.005),
    "financiacion": 1e4 * 0.5 * 0.06 * 5 / 360,
})
print(f"decision {decision:.3f} · paid {pagado:.4f}")
print(f"notional {n * pagado:,.0f} USD")
cascada["total"] = cascada.sum()
cascada.round(2)
OUT [05]Cost waterfall of a 20,000-share buy
decision 52.745 · paid 52.7693
notional 1,055,386 USD
retraso            1.90
media_horquilla    0.95
impacto            1.76
comision           0.95
financiacion       4.17
total              9.72
dtype: float64

In ten seconds the midpoint rises by one cent, from 52.745 to 52.755: 1.90 basis points of delay paid before touching the book (in that snapshot the first level was heavily loaded on the bid side, and lesson 1.1.3 showed that this anticipates the rise). Then half the spread, 0.95, and the impact of walking the book beyond the best ask, 1.76. The assumed commission adds 0.95. Execution costs add up to 5.56 basis points, about 590 USD on 1.06 million. And the financing of five days on margin adds 4.17 more basis points: the largest cost in the waterfall is the one that does not appear in the execution.

Settlement: T+1 in the US, T+2 in Europe

After the trade, the delivery of the securities against cash happens a few business days later: settlement (lesson 1.1.1). Until then, buyer and seller have a commitment, not the securities or the money.

settlementsettlementT: tradingT: clearingT+1: UST+2: EU
Mermaid source
flowchart LR
  T[T: trading] --> C[T: clearing]
  C -->|settlement| L1[T+1: US]
  C -->|settlement| L2[T+2: EU]
  • The US settles stocks on T+1, the next business day, since May 28, 2024, the compliance date of the rules the SEC approved in February 20231Note 1 · SEC, press release 2023-29, “SEC Finalizes Rules to Reduce Risks in Clearance and Settlement”, February 15, 2023: “The compliance date for the final rules is May 28, 2024”..
  • The European Union settles on T+2 the trades in transferable securities executed on trading venues. Regulation (EU) 2025/2075 of October 8, 2025, which amends the central securities depositories regulation (CSDR), moves them to T+1 from October 11, 20272Note 2 · AMF, “Transition to T+1 settlement of transactions” (updated on April 23, 2026). The text of the regulation on EUR-Lex could not be read automatically when this lesson was prepared..

Business days are counted with a calendar, not by adding calendar days:

IN [06]python
import exchange_calendars as xcals

nyse = xcals.get_calendar("XNYS")
bme = xcals.get_calendar("XMAD")

for cal, n_dias, fechas in ((nyse, 1, ["2025-07-03", "2025-11-26",
                                       "2025-12-31"]),
                            (bme, 2, ["2025-04-16", "2025-12-23"])):
    for f in fechas:
        liq = cal.session_offset(f, n_dias)
        print(f"{cal.name}  trade {f} ({pd.Timestamp(f):%a})"
              f"  ->  T+{n_dias} {liq.date()} ({liq:%a})")
OUT [06]Settlement dates with an exchange calendar
XNYS  trade 2025-07-03 (Thu)  ->  T+1 2025-07-07 (Mon)
XNYS  trade 2025-11-26 (Wed)  ->  T+1 2025-11-28 (Fri)
XNYS  trade 2025-12-31 (Wed)  ->  T+1 2026-01-02 (Fri)
XMAD  trade 2025-04-16 (Wed)  ->  T+2 2025-04-22 (Tue)
XMAD  trade 2025-12-23 (Tue)  ->  T+2 2025-12-29 (Mon)

July 3, 2025 settles on Monday the 7th, because the NYSE is closed on the 4th; November 26, on Friday the 28th, skipping Thanksgiving. In Madrid, a sale on Wednesday, April 16, 2025 settles on Tuesday the 22nd, because Good Friday and Easter Monday are not business days. The exchange calendar is an approximation: the one that rules is that of the depository and the payment system, which may differ from the exchange's on some day of the year (lesson 1.1.2).

For a system, settlement matters in three places. In a cash account, the proceeds of a sale cannot be used to buy something else until it settles (or the broker advances them under conditions). Dividends are collected by whoever is listed as holder on the record date, so the ex-date depends on the settlement cycle (lesson 1.2.1). And in a margin account, it is the broker who puts up the missing cash when the purchase settles, and from then on charges interest on it.

Margin and leverage

A margin account makes it possible to buy with money lent by the broker, with the securities as collateral. Leverage is exposure divided by own equity: with 50,000 USD of your own and 50,000 borrowed, a 100,000 position has leverage 2. A 10% drop in the price becomes a 20% drop in equity.

In the US there are two minimum rules for stocks bought on margin:

  • Initial margin (Regulation T). The broker can lend up to 50% of the purchase price: the client puts up at least half3Note 3 · 12 CFR 220.12 (Regulation T): “50 percent of the current market value of the security” for margin equity securities..
  • Maintenance margin (FINRA Rule 4210). Account equity must be at least 25% of the market value of the long securities4Note 4 · FINRA Rule 4210 (c)(1): “25 percent of the current market value of all margin securities … ‘long’ in the account”. FINRA notes that the broker can liquidate the account at any time to cover a deficiency.. If it falls below, there is a margin call: post collateral or sell.
noyesThe price fallsBelow 25%?Position stays openMargin callDeposit cashSell position
Mermaid source
flowchart TB
  P[The price falls] --> E{Below 25%?}
  E -- no --> S[Position stays open]
  E -- yes --> M[Margin call]
  M --> A[Deposit cash]
  M --> V[Sell position]

With a loan LL per share and price PP, equity per share is P−LP - L. The call is triggered when equity falls to the maintenance margin mm of the value:

P−L=m P⟹P∗=L1−mP - L = m\,P \quad\Longrightarrow\quad P^{*} = \frac{L}{1 - m}

If the purchase was made at P0P_0 with the maximum Reg T loan, L=(1−mi) P0L = (1 - m_i)\,P_0 with mi=0.5m_i = 0.5, and this gives

P∗=P0 1−mi1−m=P0 0.50.75=23 P0P^{*} = P_0\,\frac{1 - m_i}{1 - m} = P_0\,\frac{0.5}{0.75} = \tfrac{2}{3}\,P_0
IN [07]python
def precio_llamada(p0, m_inicial=0.50, m_mant=0.25):
    prestamo = (1 - m_inicial) * p0
    return prestamo / (1 - m_mant)

p0 = op.loc[op["condicion"] == "subasta_cierre", "precio"].iloc[0]
acciones = 1_000
pstar = precio_llamada(p0)
print(f"purchase of {acciones} shares at {p0} USD")
print(f"loan: {(1 - 0.5) * p0 * acciones:,.0f} USD")
print(f"margin call at {pstar:.2f} USD ({pstar / p0 - 1:.1%})")
for mm in (0.30, 0.35, 0.40):
    print(f"  {mm:.0%} maintenance: call at "
          f"{precio_llamada(p0, m_mant=mm):.2f}")
OUT [07]Margin call price
purchase of 1000 shares at 53.12 USD
loan: 26,560 USD
margin call at 35.41 USD (-33.3%)
  30% maintenance: call at 37.94
  35% maintenance: call at 40.86
  40% maintenance: call at 44.27
Fig. — Equity of a 1,000-share NOVA purchase at 53.12 USD with a 50% loan against the required 25% maintenance

With the NOVA close of June 2, 2025, 53.12 USD, the call is triggered at 35.41: a drop of one third. It looks far away, but with stricter requirements it gets closer: with a 40% maintenance, which a broker can impose on volatile stocks, the call comes with a 16.7% drop. The figure plots account equity against the price and the required maintenance: they cross at the call.

Three things the calculation does not say. The broker can sell without notice and at whatever price there is, including a gap like the one in lesson 1.1.4: the call does not guarantee an exit at P∗P^{*}. The broker's requirements can be higher than the legal minimums, and change with volatility. And the loan costs interest every day, which is subtracted from equity and brings the call closer. Leveraged products for retail investors in the EU (CFDs, with ESMA leverage limits) are covered in lessons 1.2.4 and 1.2.7; futures margins, which work differently, in 1.2.3.

IN [08]python
prestamo = (1 - 0.5) * p0 * acciones
for dias in (5, 30, 365):
    interes = prestamo * 0.06 * dias / 360     # assumed rate, 360-day basis
    print(f"{dias:>3} days: {interes:8.2f} USD · "
          f"{1e4 * interes / (p0 * acciones):6.1f} bp of the position")
OUT [08]What it costs to finance the position
  5 days:    22.13 USD ·    4.2 bp of the position
 30 days:   132.80 USD ·   25.0 bp of the position
365 days:  1615.73 USD ·  304.2 bp of the position

A year on margin at a 6% rate on half the position costs 3.04% of the position, 6.08% of own equity. It is a return hurdle the strategy has to clear before earning anything from the leverage.

Exercises

  1. Calculate the volume-weighted average effective spread of the trades on the lit venues in the first half hour of the session (13:30 to 14:00 UTC) and in the rest of the day. Is it more expensive to trade at the start of the session?
Solution
IN [09]python
apertura = lit["ts"] < "2025-06-02 14:00:00+00:00"
for nombre, g in (("first half hour", lit[apertura]),
                  ("rest of the day", lit[~apertura])):
    print(f"{nombre:<19} {media_pond(g, 'ef_pb'):.3f} bp"
          f" · {len(g)} trades")
OUT [09]Effective spread by time slot
first half hour     2.065 bp · 6090 trades
rest of the day     2.067 bp · 36554 trades

In NOVA, no: 2.065 versus 2.067 basis points, practically the same. It matches the table of spreads by half hour in lesson 1.1.3, in which the first half hour does not stand out (only 2.2% of snapshots with more than one tick) and the one that does is the last. The first snapshot of the session had a two-tick spread, but it closes within seconds. With real data the measurement has to be repeated for each stock: it is the way to decide with numbers at what time it pays to execute.

  1. Repeat the cost waterfall with an order of 5,000 shares and another of 40,000. Which component changes most?
Solution
IN [10]python
for n in (5_000, 40_000):
    pagado = precio_medio_compra(f10, n)
    print(n, "shares · impact",
          round(1e4 * (pagado - ask10) / decision, 2), "bp")
OUT [10]Waterfall for two sizes
5000 shares · impact 0.0 bp
40000 shares · impact 3.08 bp

With 5,000 shares the impact is zero: in the 15:00:10 snapshot they fit in the first ask level. With 40,000 it rises to 3.08 basis points. The delay, the half spread and the per-share commission do not depend on the order size: they are the same basis points for 5,000 as for 40,000 shares. The impact does: it grows with the number of levels that have to be walked. For small orders, the spread dominates; for large orders, the impact.

  1. An account with 30,000 USD of its own buys 1,000 NOVA shares at 53.12 with the rest borrowed. What leverage does it have? At what price is the margin call triggered with the 25% maintenance? Does it meet the Reg T initial margin?
Solution

The position is worth 53,120 USD and the loan is 23,120 USD. Leverage: 53,120 / 30,000 = 1.77. The loan per share is 23.12, so the call is triggered at 23.12 / 0.75 = 30.83 USD, 42% below the purchase. It meets Reg T: the client puts up 56.5% of the price, more than the 50% minimum. With a smaller loan the call moves further away, because the own cushion is larger.

Footnotes

  1. SEC, press release 2023-29, “SEC Finalizes Rules to Reduce Risks in Clearance and Settlement”, February 15, 2023: “The compliance date for the final rules is May 28, 2024”. ↩

  2. AMF, “Transition to T+1 settlement of transactions” (updated on April 23, 2026). The text of the regulation on EUR-Lex could not be read automatically when this lesson was prepared. ↩

  3. 12 CFR 220.12 (Regulation T): “50 percent of the current market value of the security” for margin equity securities. ↩

  4. FINRA Rule 4210 (c)(1): “25 percent of the current market value of all margin securities … ‘long’ in the account”. FINRA notes that the broker can liquidate the account at any time to cover a deficiency. ↩

Each answer is folded under its question

Self-assessment

  1. A buy is executed at 52.76 when the prevailing midpoint is 52.755. What is its effective spread in basis points?

    • A1.90 basis points
    • B0.95 basis points
    • C0.5 cents
    • DIt cannot be calculated without the later quote
    Show answer

    Answer A. 1.90 basis points

    The effective spread is twice the distance between the price paid and the midpoint, relative to the midpoint: 2 × (52.76 − 52.755) / 52.755 = 0.000190, that is, 1.90 basis points. It is multiplied by two to compare it with the quoted spread, which is a round trip.

  2. In NOVA, the realized spread of the trades on the lit venues is positive at 1 second and negative at 1 minute. What does it mean?

    • AThat the data is wrong
    • BThat whoever provides liquidity earns the spread if they close right away, but loses if they hold the position: the aggressor flow anticipates the price
    • CThat commissions are negative
    • DThat the dark venue is more expensive
    Show answer

    Answer B. That whoever provides liquidity earns the spread if they close right away, but loses if they hold the position: the aggressor flow anticipates the price

    The realized spread measures what the liquidity provider keeps after the price moves. If the price keeps going in the aggressor's direction, the provider has sold cheap or bought dear: that is adverse selection. The difference between effective and realized is the price impact.

  3. A US stock is sold on Thursday, July 3, 2025. When does it settle?

    • AOn Friday, July 4
    • BOn Tuesday, July 8 (T+2)
    • CThe same day
    • DOn Monday, July 7, the next business day (T+1), because the 4th is a holiday
    Show answer

    Answer D. On Monday, July 7, the next business day (T+1), because the 4th is a holiday

    Since May 28, 2024 the standard cycle in the US is T+1. On Friday, July 4, 2025 the NYSE was closed for Independence Day, so the next business day is Monday the 7th.

  4. You buy stock at 53.12 USD with the maximum Reg T loan (50%) and the broker requires the FINRA minimum maintenance (25%). At what price is the margin call triggered?

    • AAt 39.84
    • BAt 26.56
    • CAt 35.41
    • DAt 13.28
    Show answer

    Answer C. At 35.41

    The call is triggered when the account equity falls to 25% of the position's value. With a loan of 50% of the purchase price, that happens at P0 × (1 − 0.50) / (1 − 0.25) = 53.12 × 2/3 = 35.41 USD, a 33% drop.

  5. Why can financing be the largest cost of a trade even though the daily rate looks small?

    • ABecause it is charged on every trade
    • BBecause it is paid every day the position stays open and on the borrowed amount, while spread and impact are paid once
    • CBecause it is an implicit cost
    • DIt cannot be
    Show answer

    Answer B. Because it is paid every day the position stays open and on the borrowed amount, while spread and impact are paid once

    Spread, impact and commission are paid when entering and when exiting. The loan interest accrues over time: in the lesson's example, five days on margin at an assumed 6% annual rate cost 4.2 basis points, almost as much as all the execution costs combined (5.6).

Key points

  • Execution costs are measured against the decision price: delay, half spread, impact and commission. In the 20,000-share NOVA order they add up to 5.6 basis points, and the commission is only one of them.
  • The effective spread measures what was paid against the prevailing midpoint; the realized spread, what the provider keeps after a few seconds. The difference is the impact, and its sign says whether the aggressor flow was informed.
  • Impact grows with size faster than linearly once the order goes past the first levels: from 1 basis point with 100 shares to 3.6 with 30,000 in the NOVA book.
  • The US settles on T+1 since May 28, 2024; the EU moves from T+2 to T+1 on October 11, 2027. Business days come from a calendar, not from adding days.
  • With Reg T (50% initial) and FINRA 4210 (25% maintenance), a fully margined purchase receives a call if the price falls by a third. The broker can require more and liquidate without notice.

Resources

Data