Modeling Transaction Costs for Algorithmic Strategies

18
Modeling Transaction Costs for Algorithmic Strategies Tomas Bok [email protected] Boston Algorithmic Trading Meetup April 24, 2013 © 2013 Tomas Bok Tuesday, May 28, 13

description

Discussion of this presentation, and custom slippage model for you to test with, can be found at https://www.quantopian.com/posts/custom-slippage-modeling-transaction-costs-for-algorithmic-strategies If you're interested in learning more about modeling transaction costs, we've scheduled a webinar with Tom for June 26 at 2PM EDT. The webinar will be a Q&A based on this presentation. Bring your modeling questions to the webinar, and Tom will answer any questions you have. Please RSVP at https://attendee.gotowebinar.com/register/3673417022478449920 .

Transcript of Modeling Transaction Costs for Algorithmic Strategies

Page 1: Modeling Transaction Costs for Algorithmic Strategies

ModelingTransaction Costsfor Algorithmic Strategies

Tomas Bok [email protected]

Boston Algorithmic Trading MeetupApril 24, 2013

© 2013 Tomas Bok

Tuesday, May 28, 13

Page 2: Modeling Transaction Costs for Algorithmic Strategies

Taxonomy of T-CostsExplicit Costs

Broker CommissionsFees & TaxesTicket Charges

Benchmark Slippage

Opportunity Cost

} mostly independentof execution style

} highly dependenton execution style

Tuesday, May 28, 13

Page 3: Modeling Transaction Costs for Algorithmic Strategies

Algorithmic Trading Stack

Smart Order Router

Exchanges, ECNs, & Dark Pools

DirectOrders

Execution Algorithm

Investment StrategyParentOrders

ChildOrders

Tuesday, May 28, 13

Page 4: Modeling Transaction Costs for Algorithmic Strategies

Benchmark Slippage

timedecision

benchmark price}slippage

price

average realized price

Tuesday, May 28, 13

Page 5: Modeling Transaction Costs for Algorithmic Strategies

Factors that Drive Slippage

Small Orders: Large Orders:slippage is

primarily due tomarket impact

slippage isprimarily due to

spread

Price Actionaffects all orders

+luck𝛼 decay

Tuesday, May 28, 13

Page 6: Modeling Transaction Costs for Algorithmic Strategies

Forecasting Slippage

timedecision

benchmark price}slippage

price

average price

order size and sideexecution horizonstock-specific liquidity details(volume, spread, volatility, ...)price action (over trade horizon)

Typical Model Inputs

Tuesday, May 28, 13

Page 7: Modeling Transaction Costs for Algorithmic Strategies

Buy 200 DIS over 1m(1% participation)

Buy 2,000 DIS over 1m(10% participation)

Buy 20,000 DIS over 10m(10% participation)

Buy 120,000 DIS over 1h(10% participation)

0.9 bps

0.9 - 1.5 bps

2.9 bps

8.8 bps

Sample Slippage ForecastsBuy X shares of DIS at 10:00am

Source:ITG, Inc.

Tuesday, May 28, 13

Page 8: Modeling Transaction Costs for Algorithmic Strategies

Slippage Forecasting Methods

timedecision

benchmark price}slippage

price

average price

Generatepoint-estimateof slippage

Method A:Equation-Based

Generate bottom-up slippage estimate based on individually-simulated fills

Method B:Simulate Fills

Tuesday, May 28, 13

Page 9: Modeling Transaction Costs for Algorithmic Strategies

Slippage Forecasting Methods

Execution Algorithm

Investment StrategyParentOrders {Method A

Simulation Scope

ChildOrders

{Method BSimulation Scope

ParentOrders

Execution Algorithm

Investment Strategy

Generatepoint-estimateof slippage

Method A:Equation-Based

Generate bottom-up slippage estimate based on individually-simulated fills

Method B:Simulate Fills

Tuesday, May 28, 13

Page 10: Modeling Transaction Costs for Algorithmic Strategies

Method A: Equation-BasedAvg Price = Baseline Price +/- [ f(spread) + g(size,...) ]

Last PriceNext PriceBid-Ask Midpoint

BaselinePrice

✓4 bpsf(typical spread)f(starting spread)f(TWA spread)

SpreadCost

✓✓

0g(size, horizon, volume, volatility)

Impact

✓Horizon CloseHorizon VWAPHorizon TWA-Mid

✓✓✓

[basic f( ) = 0.5 x spread]

Tuesday, May 28, 13

Page 11: Modeling Transaction Costs for Algorithmic Strategies

Method B: Simulate Fills1. Generate stream of child orders: { time, size }

2. Generate stream of simulated fills: { size, price }

3. Avg Price = VWAP of fills

Ability to create child ordersTick dataLimit order modelMarket order modelImpact memory function

Requirementssizei x pricei

sizei

∑i

∑i

Tuesday, May 28, 13

Page 12: Modeling Transaction Costs for Algorithmic Strategies

Defining Strategy TimescaleStrategy Holding Period

milliseconds seconds minutes hours days weeks months

IntradayAlpha

HP = minutes to hoursExpected profit: ≤1 x spreadAlpha decay = fastTrading concern: ‘gas pedal’

High FrequencyTrading

HP = milliseconds to minutesExpected profit: .05 -.10 ¢Alpha decay = immediateTrading concern: latency

Low FrequencyQuant

HP = days to monthsExpected profit: ≥1%Alpha decay = slowTrading concern: liquidity

Tuesday, May 28, 13

Page 13: Modeling Transaction Costs for Algorithmic Strategies

Slippage Model SelectionLow Freq Method A (simulate parent order fills)

Use the data you have availableBe conservative

Intraday Method B (simulate child order fills)Bring execution algo into backtest...or break into 2 step process

HFT Method B+ (simulate direct order fills)Incorporate Level 2 dataIncumbents may find it easier to live-test

Tuesday, May 28, 13

Page 14: Modeling Transaction Costs for Algorithmic Strategies

Keeping It SimpleFocusing on ‘slippage-safe’ strategies

1. Avoid strategies that are overly cost-sensitive:intraday holding periodsexpected paper PNL ≤ 2 x spreadonly profitable with optimistic cost assumptionsrapid alpha decay

2. Stick to a liquid stock universe

3. Cap order sizes (≤ 25% 1-minute participation rate)

4. Assume at least a minute to execute orders

Tuesday, May 28, 13

Page 15: Modeling Transaction Costs for Algorithmic Strategies

Explicit Costs (US Equities)

Broker Commission

Taxes & Fees

Ticket Charges

TOTAL (1-way)

.05 - .20 cents+ net fees (.06¢) 0.5 - 1.0 cents

~.05 cents included

NA $1+ (or NA)

.15 - .30 cents 1 cent + tickets

Low FreqIntradayHFT

Tuesday, May 28, 13

Page 16: Modeling Transaction Costs for Algorithmic Strategies

Opportunity Cost

timedecision

price

price limit}+25 bps

Opportunity cost: effect of unexecuted shares on PNL

If you plan to trade with price limits or conditional execution strategies, backtest accordingly

Tuesday, May 28, 13

Page 17: Modeling Transaction Costs for Algorithmic Strategies

Golden Rules1. Think about transaction costs early and often

2. A simple cost framework is fine as long as you make conservative assumptions and “stay on the path”

3. To run more cost-sensitive strategies, be prepared to invest in a more sophisticated t-cost framework

4. Account for all three kinds of transaction costs

5. Backtest at full scale

Tuesday, May 28, 13

Page 18: Modeling Transaction Costs for Algorithmic Strategies

Image creditsSlides 3, 9: rack servers from dell.com; order tickets from www.silexx.comSlide 5: supermarket scale from www.racoindustries.com

© 2013 Tomas Bok

[email protected]

Tuesday, May 28, 13