σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
Market Structure skill›Module 4 · Rules, costs and data›Topic 4.2·~45 minIntermediate

Trading costs (spread, fees, impact)

Skill positionModule 4 of 4 · Topic 2 of 4
4.2 Trading costs (spread, fees, impact)
—Lab score— / 100Total XP—Streak—

What trading really costs

Costs come in two kinds. Explicit costs are charged on a statement: commissions, exchange and clearing fees, regulatory fees and taxes. Implicit costs never appear as a line item but are usually larger: the bid-ask spread, the price move your own order causes (market impact), and the drift in price while you wait or work the order (slippage).

Crossing the spread costs half of it: buying at the ask instead of the mid price loses ask − mid, and a round trip (buy at the ask, sell at the bid) costs the whole spread. In basis points, the half-spread is spread / (2 × mid) × 10,000. Market impact grows with the size of your order compared with the stock's average daily volume, roughly with its square root: ten times the size does not cost ten times as much per share, but it costs more per share.

The standard measure of total cost for one decision is the implementation shortfall: how much worse the result is than if you had traded everything instantly at the decision price.

shortfall (buy)=Q (Pˉexec−Pdecision)\text{shortfall (buy)} = Q\,\left(\bar P_{\text{exec}} - P_{\text{decision}}\right)shortfall (buy)=Q(Pˉexec​−Pdecision​)(1)
  • Explicit costs: commissions, exchange and clearing fees, regulatory fees, taxes.
  • Spread: the gap between best ask and best bid; crossing it costs half.
  • Market impact: the price move caused by your own order.
  • Slippage: the gap between the decision price and what you actually get.
Spread and shortfall by handA stock has mid 50.00 and a spread of 0.02. The half-spread is 0.01, or 0.01 / 50 × 10,000 = 2 basis points. Buying 1,000 shares at the ask costs 1,000 × 0.01 = 10 USD relative to the mid. Separately, a fund decides to buy 5,000 shares when the price is 100.00 and ends up paying an average of 100.12: the shortfall is 5,000 × 0.12 = 600 USD, or 12 basis points.
Costs are not constantSpreads are wider at the open and close and in stressed markets, and impact depends on volatility and liquidity at the moment you trade. A single average cost number is only a starting point for a model.

Lab · what's graded

  • Kinds of cost20 pts
  • An explicit cost10 pts
  • Reducing market impact15 pts
  • Half-spread in basis points15 pts
  • Implementation shortfall20 pts
  • Costs in backtests20 pts
0/ 6 answered
Tasks
1Match20 ptsNot answered

Match each cost to its description.

Pick the partner of each item on the left.

Commission
Spread
Market impact
Slippage
2Choice10 ptsNot answered

Which of these is an explicit cost?

3Choice15 ptsNot answered

Select every action that tends to reduce market impact.

4Numeric answer15 ptsNot answered

A stock has a mid price of 50.00 and a bid-ask spread of 0.02. What is the half-spread in basis points of the mid price?

half-spread=\text{half-spread} =half-spread=accepted: ± 0.01
5Numeric answer20 ptsNot answered

A fund decides to buy when the price is 100.00 and pays an average of 100.12. Express the implementation shortfall in basis points of the decision price.

shortfall=\text{shortfall} =shortfall=accepted: ± 0.05
6Explain in words20 ptsNot answered

In two or three sentences, explain why a backtest that ignores trading costs overstates a strategy's performance, especially for fast strategies.

Math modeKeyboard or LaTeX inputTask 1 of 6 · Ctrl ⏎ to check

Log in to run your code.

Every lecture is free to read. Create an account or log in to run code, run tests and submit this lab.

  • In-browser IDE with a bash terminal — nothing to install
  • Instant grading, XP and your place on the skill
Create an accountLog in
OR
Continue with GitHub