Commissions: Brokers charge for providing infrastructure, routing orders, regulatory compliance. Why it matters: even "zero-commission" brokers make money via payment-for-order-flow, which often results in worse execution (hidden slippage).
Slippage: Markets move between when you decide to trade and when your order fills. Why it matters: in volatile markets or with slow execution, slippage can exceed0.5% per trade. A market order during low liquidity might fill 2-3 ticks away from the midpoint.
Market Impact: Large orders move prices against you—buying pushes prices up, selling pushes them down. Why it matters: for big positions relative to daily volume, your order becomes visible and other traders adjust. A 1Mbuyinastockwith10M daily volume creates measurable impact.
Why this formula? Brokers charge the greater of a minimum fee or a percentage. For small trades, you hit the minimum. For large trades, the percentage kicks in.
Example:
Trade: Buy 100 shares at $50
Broker: $1 fixed or 0.1% of trade value
Trade = 50×100=5,000
Percentage fee = 0.001 × 5,000=5
Commission = max(1,5) = $5
Why this step? We take the maximum because broker always charges at least the fixed fee, but switches to percentage for bigger trades to earn more.
Spread component (α×spread×Q): Market orders cross the spread. You pay the ask when buying (instead of the mid), so you lose half the spread per share as baseline.
Volatility component (β×σ×Q): In volatile markets, prices move while your order fills. The Q captures that larger orders take longer to fill (more time = more price drift). This is empirically observed in order execution data.
Why this step? The spread cost dominates because we're crossing from bid to ask. The volatility term is small here but grows in fast markets or with larger orders.
Why this formula? This is the Almgren-Chriss market impact model, derived from empirical observations:
Square-root of order fraction: Impact isn't linear. A 1% order doesn't cause 10× the impact of a 0.1% order—liquidity pools absorb small orders better. The square root models diminishing marginal impact.
Volatility scaling: In volatile stocks, price moves are already large, so your order's contribution blends in. In calm stocks, your order stands out more.
Proportional to order value: Bigger dollar amounts = more impact.
Derivation intuition: Think of market depth as a resource that gets "used up" by your order. The first100 shares barely move the price (lots of resting orders at the best bid/ask). The next 1,000 shares eat through several price levels. The rate of price change per share increases as you go deeper—but sublinearly (square root).
Why this step? We're computing how much the price moves against us as we execute. The square root (0.01)0.5=0.1 shows that a 1% order causes 10% of the impact you'd naively expect from linear scaling.
Imagine you're trading Pokémon cards at school. You want to buy a Charizard.
Commission = The $2 you pay the card shop owner to let you use his table and inventory system.
Slippage = The Charizard was listed at 50,butwhileyouweregettingyourmoney,someoneelseboughtit.Nowthecheapestoneis52. You lost $2 to timing.
Market Impact = You want to buy 10Charizards. The first one is 50.Buttheshopownerseesyoubuyingalot,andheraisesthepriceto51for the next one, $52 for the one after that. Your big order pushed the price up.
So you thought'd spend10 × 50=500, but you actually spent 2(commission)+2 (slippage) + 15(impact)extra=∗∗519**. That extra $19 is what transaction costs mean—the hidden costs of actually doing the trade.
6.2.01-Choose-backtesting-platform - Your platform must support custom cost models
6.2.03-Implement-realistic-order-fills - Transaction costs couple with fill assumptions
6.2.04-Handle-corporate-actions-splits-dividends - Costs change around corporate actions (wider spreads)
6.3.02-CalculateSharpe-Sortino-ratios - Returns must be net of transaction costs
6.4.01-Paper-trade-validate-backtest - Paper trading reveals if your cost model was accurate
5.1.03-Set-position-size-limits - Position sizing affects market impact costs
#flashcards/stock-market
What are the three components of transaction costs? :: Commission (broker fees), Slippage (price movement during execution), Market Impact (price movement caused by your order)
Why does the market impact formula use a square root instead of linear scaling?
Because liquidity absorbs small orders easily but depletes for large orders at diminishing rate. A 1% order doesn't cause 10x the impact of a 0.1% order—empirically it follows (Q/V)0.5
If a backtest shows 2% monthly return but the strategy trades 100 times/month with 0.1% cost per trade, what is the real return?
Net return = 2% - (100 trades × 0.1%) = 2% - 10% = -8% per month. The strategy is actually losing money after costs.
Why is using midpoint prices for backtest execution wrong?
Because market orders don't execute at the midpoint—you buy at the ask and sell at the bid. Using midpoint ignores the spread cost, which is a guaranteed loss on every trade.
A stock has 10Mdailyvolume.Youwanttobuy500k worth. Is market impact significant?
Yes. 500k/10M = 5% of daily volume. At this size, the square-root law predicts measurable impact: (0.05)0.5=0.224 relative to a 1% baseline. You'll move the price noticeably.
Why do high-frequency strategies fail most often in live trading after successful backtests?
Because they generate many trades with small edge per trade. If your edge is 10/tradebuttransactioncostsare8/trade, you lose 80% of your profit. Backtests that ignore costs dramatically overestimate profitability.
Transaction cost modeling stock market backtesting ka sabse important part hai, kyunki ye bata hai ki paper pe jo profit dikh raha hai, real trading mein kitna kam ho jayega. Jab ap ek backtest run karte ho aur strategy dikhati hai ki "100 trades mein $5,000 profit," lekin ap transaction costs add nahi kiye, toh ye realistic nahi hai. Real mein har trade pe apko teen tarah ke costs face karne padte hain: pehla commission (broker ko fee), dusra slipage (jis price pe sochte the utne pe execute nahi hota), aur tesra market impact (apka bada order khud price ko move kar deta hai).
Agar apki strategy high-frequency hai—matlab bahut zyada trades kar rahi hai—toh transaction costs apka sara profit kha jayenge. Example ke liye,agar har trade pe 10edgehailekincost8 aa raha hai, toh net profit sirf 2pertrade.Paperpeye10 lag raha tha! Isliye modelling mein realistic parameters use karna zaruri hai: liquid stocks mein impact kam hoga, illiquid stocks mein zyada. Calibration bhi zaroori hai—real execution data se compare karke apne model ko tune karo. Ye effort karne se aapki backtest live trading ke results keareb ayegi, aur ap over-optimistic strategies se bach jaoge jo paper pe to superhit lagte hain par real mein flop ho jate hain.