SlideShare a Scribd company logo
1 of 65
Download to read offline
1
Session 2:
The Algorithmic Trading Process
Robert Kissell, Ph.D.
Robert.Kissell@KissellResearch.com
Kissell Research Group
www.KissellResearch.com
2
Session 2: Outline
1. Algorithmic Trading Process
β€’Strategy Selection (Macro & Micro)
β€’Order Submission Rules (LOM & SOR)
2. Trading Costs
β€’Formulas
β€’Data Requirements
3. Market Impact Models
β€’Market Observations
β€’Estimating MI Parameters
β€’Model Evaluation
4. Traders Dilemma
β€’ Minimizing Trade Cost
β€’ Efficient Trade Strategies
β€’ Optimal POV Rates
5. Python Examples
β€’ TCA Scripts
6. Examples
β€’ Trade Costs
7. Trading Analytics
β€’ Pre-Trade
β€’ Cost Curves
β€’ Post-Trade
3
Algorithmic Trading Process
4
Investment Cycle
5
Implementation
οƒ˜ Investment Goals
οƒ˜ Macro Decisions
οƒ˜ Micro Decisions
οƒ˜ Limit Order Models
οƒ˜ Smart Order Routing
6
Investment Goals
ο‚Ÿ This phase determines the investment portfolio and
ultimately the β€œtrade list” or β€œbasket” based on portfolio
rebalances, cash inflows, redemptions, or combinations of
all three.
7
Macro Decisions
ο‚Ÿ Macro Decisions = how the order is to be sliced into smaller pieces and traded over time.
ο‚Ÿ This is also known as the trading strategy, trading schedule, trade trajectory, etc.
ο‚Ÿ Investors manage the tradeoff between cost and timing risk.
ο‚Ÿ For a trade list (e.g., program), investors manage total portfolio risk (e.g., covariance &
volatility).
ο‚Ÿ Strategies are determined via an optimization process. These include:
ο‚Ÿ Traders Dilemma
ο‚Ÿ Cost Minimization
ο‚Ÿ Price Improvement
8
Micro Decisions
ο‚Ÿ Micro Decisions = determine when it is appropriate for an algorithm to deviate
from an optimally prescribed strategy and adapt to changing market conditions
(e.g., prices, volatility, momentum, etc.)
ο‚Ÿ Needs to be consistent with the Macro Trading Goal.
ο‚Ÿ Micro-level decisions require real-time market data, volatility, volumes, and
investors execution prices.
ο‚Ÿ Some Micro Decision criteria include:
ο‚Ÿ Target Price
ο‚Ÿ Passive-in-the-Money
ο‚Ÿ Aggressive-in-the-Money
9
Limit Order Models (LOM)
β€’ Limit Order Model = determine the best combination of limit and market
orders to send to the market in order to adhere to the higher-level macro goal.
β€’ For example, if the optimal trading rate is 10% and we forecast 10,000 shares
to trade in the next 1 min, we know we need to execute 1,000 shares.
β€’ The limit order model may determine that 300 shares to trade at the market,
300 at the bid+1, 300 at the current bid, and 100 at the bid -1.
β€’ The limit order model estimates are based on real-time market conditions and
expectations going forward.
10
Smart Order Router (SOR)
β€’ Smart Order Router = how and where child orders should be entered into the market. e.g.,
share quantities, limit or market, wait time between orders, selection of β€œdisplayed” vs.
β€œdark” markets.
β€’ The SOR continuously calculate in real-time the likelihood of transacting at the specified
prices (determined from the limit order model) at the different venues based on shares,
order book queue, and time (speed) of executing.
β€’ The SOR determines the venues to submit the orders.
β€’ The SOR needs to determine when and if it is appropriate to accelerate trading, as well as
the best venues submit these orders. The best prices are pre-determined by the Limit
Order Model.
11
Trading Process - Implementation
Investment Decision
Estimate Costs and Select
Strategy
Select Broker and
Algorithm
Transact in Market
Revise Strategy if
Necessary
Measure Cost and
Evaluate Performance
12
Trading Costs
13
Implementation Shortfall Components:
β€’ Delay Cost = price movement in the stock from the time of the
investment decision until the order is released to the market.
β€’ Execution Cost = price movement in the stock over the time the
order is being executed in the market.
β€’ Opportunity Cost = the missed profit opportunity of not being
able to execute all shares in the order.
β€’ Fixed Cost = all fixed fees charged during implementation of the
trade.
Implementation Shortfall (IS)
14
Formula:
𝐼𝑆$ = 𝑆 βˆ™ 𝑃0 βˆ’ 𝑃𝑑
π·π‘’π‘™π‘Žπ‘¦ πΆπ‘œπ‘ π‘‘
+ 𝑋 βˆ™ π‘ƒπ‘Žπ‘£π‘” βˆ’ 𝑃0
𝐸π‘₯π‘’π‘π‘’π‘‘π‘–π‘œπ‘› πΆπ‘œπ‘ π‘‘
+ 𝑅 βˆ™ 𝑃𝑛 βˆ’ 𝑃0
π‘‚π‘π‘π‘œπ‘Ÿπ‘‘π‘’π‘›π‘–π‘‘π‘¦ πΆπ‘œπ‘ π‘‘
+ 𝐹𝑖π‘₯𝑒𝑑 πΆπ‘œπ‘ π‘‘
Variables:
𝑆 = Order Shares
𝑋 = Executed Shares
𝑅 = Unexecuted Shares
𝑃0 = Arrival Price - mid-point of bid-ask spread at time of order entry
𝑃𝑑 = Decision Price - mid-point of bid-ask spread at time of decision
𝑃
𝑛 = End Price - mid-point of bid-ask spread at end time of (completion/cancel)
𝑃𝐴𝑣𝑔 = Average Execution Price of the Order
Fixed Cost = Commissions, Taxes, and Fees & Rebates
Spread Costs are embedded in the actual execution price of the stock
Fees & Rebates are often included in the broker commission
Implementation Shortfall (IS)
15
Historical (Past):
𝐼𝑆 =
π·π‘’π‘™π‘Žπ‘¦
πΆπ‘œπ‘ π‘‘π‘ 
+
π‘‡π‘Ÿπ‘Žπ‘‘π‘’
πΆπ‘œπ‘ π‘‘π‘ 
+
π‘‚π‘π‘π‘œπ‘Ÿπ‘‘π‘’π‘›π‘–π‘‘π‘¦
πΆπ‘œπ‘ π‘‘
+
𝐹𝑖π‘₯𝑒𝑑
πΆπ‘œπ‘ π‘‘π‘ 
Implementation Shortfall (IS)
Before During After Visible
16
Historical (Past):
𝐼𝑆 =
π·π‘’π‘™π‘Žπ‘¦
πΆπ‘œπ‘ π‘‘π‘ 
+
π‘‡π‘Ÿπ‘Žπ‘‘π‘’
πΆπ‘œπ‘ π‘‘π‘ 
+
π‘‚π‘π‘π‘œπ‘Ÿπ‘‘π‘’π‘›π‘–π‘‘π‘¦
πΆπ‘œπ‘ π‘‘
+
𝐹𝑖π‘₯𝑒𝑑
πΆπ‘œπ‘ π‘‘π‘ 
Forecast (Future):
π‘‡π‘Ÿπ‘Žπ‘‘π‘’
πΆπ‘œπ‘ π‘‘π‘ 
= 𝐸π‘₯𝑝𝑒𝑐𝑑𝑒𝑑
π‘†π‘π‘Ÿπ‘’π‘Žπ‘‘ πΆπ‘œπ‘ π‘‘π‘ 
π‘ƒπ‘Ÿπ‘–π‘π‘’ π΄π‘π‘π‘Ÿπ‘’π‘π‘–π‘Žπ‘‘π‘–π‘œπ‘›
π‘€π‘Žπ‘Ÿπ‘˜π‘’π‘‘ πΌπ‘šπ‘π‘Žπ‘π‘‘
π‘‡π‘–π‘šπ‘–π‘›π‘” π‘…π‘–π‘ π‘˜
Implementation Shortfall (IS)
Before During After Visible
Estimate/Forecast
17
β€’ Implementation Shortfall
β€’ Cost Measure
β€’ Single Value
β€’ Calculation:
β€’ π‘‡π‘Ÿπ‘Žπ‘‘π‘’ πΆπ‘œπ‘ π‘‘ =
π‘ƒπ‘Žπ‘£π‘”βˆ’π‘ƒ0
𝑃0
βˆ™ 104𝑏𝑝
Trade Cost / Transaction Cost Analysis (TCA)
β€’ Forecast/Estimation
β€’ Market Impact: MI
β€’ Price Appreciation: PA
β€’ Timing Risk: TR
β€’ Distribution of Costs
β€’ PDF and CDF Graphs
β€’ Mean = MI + PA
β€’ Std = TR
β€’ Optimization
β€’ Optimal Trading Rates
Forward
Past
18
Trading Cost Components
19
Spread Cost
οƒ˜ Spread = difference between best offer (ask) and best
bid price.
 Represent the round-trip cost of transacting small
orders, e.g., buying and immediately selling 100
shares.
 Does not accurately represent the cost of
transacting larger share quantities and blocks.
οƒ˜ Spread Cost = one-half of the Bid-Ask Spread. Measured
as the midpoint of the bid-ask spread to the market
price. The spread cost for buy and sell orders are:
 Buy Order = Ask Price – Mid Point of Bid Ask Spread
 Sell Order = Mid Point of Bid Ask Spread – Bid Price
οƒ˜ Spread Cost is often incorporated into the Market
Impact Cost estimate, i.e., arrival price P0 is taken as the
mid-point of the bid-ask spread.
20
Price Appreciation (PA)
οƒ˜ Price Appreciation (PA) is the natural price movement of the
stock. It represents how stock price would evolve in a
market without any uncertainty.
οƒ˜ Price appreciation is also referred to as price trend,
momentum, drift, or alpha.
οƒ˜ Buy Order = It represents a cost when buying stock in a
rising market and a savings when buying stock in a falling
market.
οƒ˜ Sell Order = It represents a cost when selling stock in a
falling market and a savings when selling stock in a rising
market.
οƒ˜ AlphaBp = the estimated price appreciation over one-day
expressed in basis points.
οƒ˜ Side = +1 for Buy order, -1 for a Sell order.
οƒ˜ Size = Shares divided by Stock Average Daily Volume (ADV)
Time:
𝑃𝐴 = 𝑆𝑖𝑑𝑒 βˆ™
1
2
βˆ™ π΄π‘™π‘β„Žπ‘Žπ΅π‘ βˆ™ π‘‡π‘–π‘šπ‘’
POV Rate:
𝑃𝐴 = 𝑆𝑖𝑑𝑒 βˆ™
1
2
βˆ™ π΄π‘™π‘β„Žπ‘Žπ΅π‘ βˆ™ 𝑆𝑖𝑧𝑒 βˆ™
1 βˆ’ 𝑃𝑂𝑉
𝑃𝑂𝑉
Time-POV Relationship:
π‘‡π‘Ÿπ‘Žπ‘‘π‘’ π‘‡π‘–π‘šπ‘’ = 𝑆𝑖𝑧𝑒 βˆ™
1 βˆ’ 𝑃𝑂𝑉
𝑃𝑂𝑉
21
Market Impact (MI)
οƒ˜ Market Impact (MI)is the price movement in a stock caused by
the order or trade. It consists of two components:
οƒ˜ Temporary Impact = due to the liquidity needs of the
investor.
οƒ˜ Permanent Impact = due to the information content of the
trade.
οƒ˜ Mathematically, MI is defined as the difference between the
path of the stock with and without the order.
οƒ˜ Heisenberg Uncertainty Principal of Trading.
οƒ˜ Linear Regression Model: Y = b0 + b1*x1 + b2*x2
Market Impact (MI)
𝐼𝑏𝑝
βˆ—
= π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2
βˆ™ πœŽπ‘Ž3
𝑀𝐼𝑏𝑝 = 𝐼𝑏𝑝
βˆ—
βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4
+ 1 βˆ’ 𝑏1
22
Timing Risk (TR)
οƒ˜ Timing Risk (TR) refers to the uncertainty surrounding
the estimated trading cost. Timing risk can result in the
execution price being higher or lower than the arrival
price.
οƒ˜ It consists of three components
 Price Volatility
 Volume Uncertainty (Liquidity Risk)
 Parameter Estimation Error
Timing Risk (TR)
𝑇𝑅𝑏𝑝 = 𝜎 βˆ™
1
250
βˆ™
1
3
βˆ™
π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘ 
𝐴𝐷𝑉
βˆ™
1 βˆ’ 𝑃𝑂𝑉
𝑃𝑂𝑉
βˆ™ 10𝑏𝑝
4
23
Trade Cost Equations
24
Trade Cost Equations
Market Impact (MI):
𝐼𝑏𝑝
βˆ—
= π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2
βˆ™ πœŽπ‘Ž3
𝑀𝐼𝑏𝑝 = 𝑏1 βˆ™ 𝐼𝑏𝑝
βˆ—
βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4
+ 1 βˆ’ 𝑏1 βˆ™ 𝐼𝑏𝑝
βˆ—
Timing Risk (TR):
𝑇𝑅𝑏𝑝 = 𝜎 βˆ™
1
250
βˆ™
1
3
βˆ™ 𝑆𝑖𝑧𝑒 βˆ™
1 βˆ’ 𝑃𝑂𝑉
𝑃𝑂𝑉
βˆ™ 10𝑏𝑝
4
Price Appreciation (PA):
𝑃𝐴𝑏𝑝 = 𝑆𝑖𝑑𝑒 βˆ™
1
2
βˆ™ π΄π‘™π‘β„Žπ‘Žπ΅π‘ βˆ™ 𝑆𝑖𝑧𝑒 βˆ™
1 βˆ’ 𝑃𝑂𝑉
𝑃𝑂𝑉
25
Trade Cost Equations
Market Impact (MI):
𝐼𝑏𝑝
βˆ—
= π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3
𝑀𝐼𝑏𝑝 = 𝑏1 βˆ™ 𝐼𝑏𝑝
βˆ—
βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4
+ 1 βˆ’ 𝑏1 βˆ™ 𝐼𝑏𝑝
βˆ—
Timing Risk (TR):
𝑇𝑅𝑏𝑝 = 𝜎 βˆ™
1
250
βˆ™
1
3
βˆ™ 𝑆𝑖𝑧𝑒 βˆ™
1 βˆ’ 𝑃𝑂𝑉
𝑃𝑂𝑉
βˆ™ 10𝑏𝑝
4
Price Appreciation (PA):
𝑃𝐴𝑏𝑝 = 𝑆𝑖𝑑𝑒 βˆ™
1
2
βˆ™ π΄π‘™π‘β„Žπ‘Žπ΅π‘ βˆ™ 𝑆𝑖𝑧𝑒 βˆ™
1 βˆ’ 𝑃𝑂𝑉
𝑃𝑂𝑉
Model Parameters:
β€’ π‘Ž1, π‘Ž2, π‘Ž3, π‘Ž4, 𝑏1
Variables:
β€’ Size
β€’ Volatility
β€’ Side
β€’ AlphaBp
Decision Variables:
β€’ POV Rate
β€’ Trade Time
26
Trade Cost Equations
Forecasting Equations - Data
MI TR PA
Parameters yes no no
Size yes yes yes
Volatility yes yes no
AlphaBp no no yes
Side no no yes
POV yes yes yes
Trade Time yes yes yes
27
Input Variables & Calculations
Trade Quantity:
𝑆𝑖𝑧𝑒 =
π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘ 
𝐴𝐷𝑉
(%𝐴𝑑𝑣, π‘‘π‘’π‘π‘–π‘šπ‘Žπ‘™)
Percentage of Volume:
𝑃𝑂𝑉 =
π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘ 
π΄π‘π‘‘π‘’π‘Žπ‘™ π‘‰π‘œπ‘™π‘’π‘šπ‘’ π‘œπ‘£π‘’π‘Ÿ π‘‡π‘Ÿπ‘Žπ‘‘π‘’ π‘ƒπ‘’π‘Ÿπ‘–π‘œπ‘‘
(π‘‘π‘’π‘π‘–π‘šπ‘Žπ‘™)
(Actual/Historical)
𝑃𝑂𝑉 =
π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘ 
π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  + 𝑉 𝑑
=
𝑆𝑖𝑧𝑒
𝑆𝑖𝑧𝑒 + π‘‡π‘–π‘šπ‘’
(π‘‘π‘’π‘π‘–π‘šπ‘Žπ‘™)
(Forecasted/Predicted)
Trade Time:
π‘‡π‘–π‘šπ‘’ = 𝑆𝑖𝑧𝑒 βˆ™
1 βˆ’ 𝑃𝑂𝑉
𝑃𝑂𝑉
Definitions:
𝑆𝑖𝑧𝑒 = π‘‚π‘Ÿπ‘‘π‘’π‘Ÿ 𝑆𝑖𝑧𝑒 𝑒π‘₯π‘π‘Ÿπ‘’π‘ π‘ π‘’π‘‘ π‘Žπ‘  𝑝𝑐𝑑 π‘œπ‘“ 𝐴𝐷𝑉
𝐴𝐷𝑉 = π΄π‘£π‘’π‘Ÿπ‘Žπ‘”π‘’ π·π‘Žπ‘–π‘™π‘¦ π‘‰π‘œπ‘™π‘’π‘šπ‘’ (π‘€π‘œπ‘£π‘–π‘›π‘” π΄π‘£π‘’π‘Ÿπ‘Žπ‘”π‘’)
𝑃𝑂𝑉 = π‘ƒπ‘’π‘Ÿπ‘π‘’π‘›π‘‘π‘Žπ‘”π‘’ π‘œπ‘“ π‘€π‘Žπ‘Ÿπ‘˜π‘’π‘‘ π‘‰π‘œπ‘™π‘’π‘šπ‘’
π‘‡π‘Ÿπ‘Žπ‘‘π‘’ π‘‡π‘–π‘šπ‘’ = π‘‰π‘œπ‘™π‘’π‘šπ‘’ π‘‡π‘–π‘šπ‘’
𝑉 𝑑 = π‘ƒπ‘Ÿπ‘’π‘‘π‘–π‘π‘‘π‘’π‘‘ π‘‰π‘œπ‘™π‘’π‘šπ‘’ 𝑖𝑛 π‘‡π‘–π‘šπ‘’ π‘ƒπ‘’π‘Ÿπ‘–π‘œπ‘‘
𝜎 = π΄π‘›π‘›π‘’π‘Žπ‘™π‘–π‘§π‘’π‘‘ π‘‰π‘œπ‘™π‘Žπ‘‘π‘–π‘™π‘–π‘‘π‘¦ π‘€π‘œπ‘£π‘–π‘›π‘” 𝐴𝑣𝑔, π‘‘π‘’π‘π‘–π‘šπ‘Žπ‘™
𝑆𝑖𝑑𝑒 = π‘‚π‘Ÿπ‘‘π‘’π‘Ÿ 𝑆𝑖𝑑𝑒, +1 = 𝐡𝑒𝑦, βˆ’1 = 𝑆𝑒𝑙𝑙
28
Input Variables & Calculations
Average Daily Volume:
𝐴𝐷𝑉 𝑑 =
1
𝑛
βˆ™
𝑖=1
𝑛
π‘‰π‘œπ‘™π‘’π‘šπ‘’ 𝑑 βˆ’ 𝑖
Median Daily Volume:
𝑀𝐷𝑉 𝑑 = π‘€π‘’π‘‘π‘–π‘Žπ‘› π‘‰π‘œπ‘™π‘’π‘šπ‘’ 𝑑 βˆ’ 1 , … , π‘‰π‘œπ‘™π‘’π‘šπ‘’ 𝑑 βˆ’ 𝑛
Annualized Volatility
π‘Ÿπ‘‘ = ln
𝑃𝑑
π‘ƒπ‘‘βˆ’1
𝜎(𝑑) = 250 βˆ™
1
𝑛 βˆ’ 1
βˆ™
𝑑=1
𝑛
π‘Ÿπ‘‘ βˆ’ π‘Ÿ 2
Forecasted Period Volume:
𝑉 𝑑 = 𝐴𝐷𝑉 βˆ™ 𝑓 𝑣 𝑑 βˆ™ 𝐴𝑑𝑗
Definitions
𝐴𝐷𝑉 = π΄π‘£π‘’π‘Ÿπ‘Žπ‘”π‘’ π·π‘Žπ‘–π‘™π‘¦ π‘‰π‘œπ‘™π‘’π‘šπ‘’ (π‘€π‘œπ‘£π‘–π‘›π‘” π΄π‘£π‘’π‘Ÿπ‘Žπ‘”π‘’)
𝑀𝐷𝑉 = π‘€π‘’π‘‘π‘–π‘Žπ‘›π·π‘Žπ‘–π‘™π‘¦ π‘‰π‘œπ‘™π‘’π‘šπ‘’ (π‘€π‘œπ‘£π‘–π‘›π‘” π΄π‘£π‘’π‘Ÿπ‘Žπ‘”π‘’)
π‘‰π‘œπ‘™π‘’π‘šπ‘’ 𝑑 βˆ’ 𝑖 = Actual Total Volume on day t-i
𝑉 𝑑 = π‘ƒπ‘Ÿπ‘’π‘‘π‘–π‘π‘‘π‘’π‘‘ π‘‰π‘œπ‘™π‘’π‘šπ‘’ 𝑖𝑛 π‘‡π‘–π‘šπ‘’ π‘ƒπ‘’π‘Ÿπ‘–π‘œπ‘‘
𝑃𝑑 = π‘ƒπ‘Ÿπ‘–π‘π‘’ π‘œπ‘› π‘‘π‘Žπ‘¦ 𝑑
π‘Ÿπ‘‘ = πΏπ‘œπ‘” π‘…π‘’π‘‘π‘’π‘Ÿπ‘› π‘œπ‘› π‘‘π‘Žπ‘¦ 𝑑
𝜎 = π΄π‘›π‘›π‘’π‘Žπ‘™π‘–π‘§π‘’π‘‘ π‘‰π‘œπ‘™π‘Žπ‘‘π‘–π‘™π‘–π‘‘π‘¦ (π‘€π‘œπ‘£π‘–π‘›π‘” π΄π‘£π‘’π‘Ÿπ‘Žπ‘”π‘’ π‘Žπ‘  π‘‘π‘’π‘π‘–π‘šπ‘Žπ‘™)
𝑛 = β„Žπ‘–π‘ π‘‘π‘œπ‘Ÿπ‘–π‘π‘Žπ‘™ π‘π‘’π‘Ÿπ‘–π‘œπ‘‘, π‘π‘œπ‘šπ‘šπ‘œπ‘›π‘™π‘¦ 30 π‘‘π‘Žπ‘¦π‘ 
𝑓 𝑣 𝑑 = percentage of historical daily volume in period t
𝐴𝑑𝑗 = volume adjustment due to Day of Week, Month or
Quarter End, Earnings, Fed Day, Special Event.
29
Measuring Model Performance
𝑀𝑆𝐸 =
1
π‘š
𝑖=1
π‘š
𝑦𝑖 βˆ’ 𝑦𝑖
2
𝑅𝑀𝑆𝐸 =
1
π‘š
𝑖=1
π‘š
𝑦𝑖 βˆ’ 𝑦𝑖
2
𝑀𝐴𝐷 =
1
π‘š
𝑖=1
π‘š
𝑦𝑖 βˆ’ 𝑦𝑖
30
Shares to Trade from POV Rate
POV Formula:
𝑃𝑂𝑉 =
π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘ 
π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  + 𝑉 𝑑
=
π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘ 
π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  + 𝐴𝐷𝑉 βˆ™ 𝑓 𝑣 𝑑 βˆ™ 𝐴𝑑𝑗
Solve for Shares (in above Formula) :
π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  =
𝑃𝑂𝑉
1 βˆ’ 𝑃𝑂𝑉
βˆ™ 𝑉 𝑑 =
𝑃𝑂𝑉
1 βˆ’ 𝑃𝑂𝑉
βˆ™ 𝐴𝐷𝑉 βˆ™ 𝑓 𝑣 𝑑 βˆ™ 𝐴𝑑𝑗
31
Market Observations
32
What MI Explanatory Factors are Important?
β€’ Share Quantity
β€’ Size (%Adv)
β€’ Volatility
β€’ Annualized
β€’ POV
β€’ Trading Rate
33
Historical Trade Cost Data
34
Grouped Trade Cost Data
35
Developing Market Impact Model
36
I-Star Model
𝐼𝑏𝑝
βˆ—
= π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2
βˆ™ πœŽπ‘Ž3
37
I-Star Model
𝐼𝑏𝑝
βˆ—
= π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2
βˆ™ πœŽπ‘Ž3
𝑀𝐼𝑏𝑝 = 𝑏1 βˆ™ 𝐼𝑏𝑝
βˆ—
βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4
+ 1 βˆ’ 𝑏1 βˆ™ 𝐼𝑏𝑝
βˆ—
Temporary Impact Permanent Market
38
I-Star Market Impact Model
𝐼𝑏𝑝
βˆ—
= π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2
βˆ™ πœŽπ‘Ž3
𝑀𝐼𝑏𝑝 = 𝑏1 βˆ™ 𝐼𝑏𝑝
βˆ—
βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 βˆ™ 𝐼𝑏𝑝
βˆ—
39
I-Star Market Impact Model
𝐼𝑏𝑝
βˆ—
= π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2
βˆ™ πœŽπ‘Ž3
𝑀𝐼𝑏𝑝 = 𝑏1 βˆ™ 𝐼𝑏𝑝
βˆ—
βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 βˆ™ 𝐼𝑏𝑝
βˆ—
𝑀𝐼𝑏𝑝 = 𝐼𝑏𝑝
βˆ—
βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1
40
I-Star Market Impact Model
𝐼𝑏𝑝
βˆ—
= π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2
βˆ™ πœŽπ‘Ž3
𝑀𝐼𝑏𝑝 = 𝑏1 βˆ™ 𝐼𝑏𝑝
βˆ—
βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 βˆ™ 𝐼𝑏𝑝
βˆ—
𝑀𝐼𝑏𝑝 = 𝐼𝑏𝑝
βˆ—
βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1
𝑀𝐼𝑏𝑝 = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1
41
Estimating MI Parameters: Non-Linear Regression
I-Star Model:
𝑀𝐼 = πΌβˆ— βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1
𝑀𝐼 = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2
βˆ™ πœŽπ‘Ž3
βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4
+ 1 βˆ’ 𝑏1
Non-Linear Regression:
𝑀𝑖𝑛 𝑓 = πΆπ‘œπ‘ π‘‘ βˆ’ 𝑀𝐼 2
𝑀𝑖𝑛 𝑓 = πΆπ‘œπ‘ π‘‘ βˆ’ π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2
βˆ™ πœŽπ‘Ž3
βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4
+ 1 βˆ’ 𝑏1
2
Subject to:
0 ≀ b1 ≀ 1
π‘Ž1, π‘Ž2, π‘Ž3, π‘Ž4 β‰₯ 0
where,
Cost = Measured Trade Cost (difference between execution price and arrival price)
42
Example: Python #1
Estimate Market Impact Parameters using Python
β€’ Python Script: KRG_Est MI_Parameters.ipynb
β€’ File: MIData_KRG.csv
43
Estimating MI Parameters: Results
I-Star Model:
πΌβˆ—
= π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2
βˆ™ πœŽπ‘Ž3
𝑀𝐼 = πΌβˆ—
βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4
+ 1 βˆ’ 𝑏1
πΌβˆ—
= 883.25 βˆ™ 𝑆𝑖𝑧𝑒0.35
βˆ™ 𝜎0.76
𝑀𝐼 = πΌβˆ—
βˆ™ 0.96 βˆ™ 𝑃𝑂𝑉0.83
+ 1 βˆ’ 0.96
44
Comparison of Actual to Estimated
45
Market Impact Relationships
0.0
10.0
20.0
30.0
40.0
50.0
60.0
70.0
80.0
90.0
0% 10% 20% 30% 40% 50% 60%
Market
Impact
(bp)
Order Size (%ADV)
Market Impact Cost as function of Size
0.0
20.0
40.0
60.0
80.0
100.0
120.0
0% 20% 40% 60% 80% 100% 120%
Market
Impact
(bp)
POV Rate
Market Impact Cost as function of POV Rate
0.0
20.0
40.0
60.0
80.0
100.0
120.0
140.0
160.0
0% 20% 40% 60% 80% 100% 120%
Market
Impact
(bp)
Volatility
Market Impact as function of Volatility
0.0
20.0
40.0
60.0
80.0
100.0
120.0
0.00 0.50 1.00 1.50 2.00 2.50 3.00 3.50
Market
Impact
(bp) Trade Time
Market Impact Cost as function of Time
46
Traders Dilemma
47
Traders Dilemma
Traders Dilemma:
β€’ Trade too fast and I will move the
market. Trade too slow and the
market will move me.
β€’ Market Impact and Timing Risk
are conflicting expressions.
48
Solving Traders Dilemma:
β€’ Traders seek to manage the tradeoff
between market impact cost (MI) and
timing risk (TR) at a specified level of risk
aversion .
β€’ Lambda  is specified by the investor
and is often 0 ≀ πœ† ≀ 3.
β€’ Solve via Optimization
β€’ Solution provides optimal POV rate
β€’ Each value of Lambda will have a
different β€œOptimal” solution.
Solving Trader Dilemma
𝑀𝑖𝑛 𝑀𝐼 + πœ† βˆ™ 𝑇𝑅
49
Efficient Trading Frontier
Source: Kissell Research Group (2022)
Efficient Trading Frontier: Almgren & Chriss (1997)
50
Efficient Trading Frontier
Source: Kissell Research Group (2022)
A = Inefficient Strategy
Z
Y
X
X, Y, Z = Efficient Strategies
51
Where are the Expected Costs?
Source: Kissell Research Group (2022)
MI=26 bp
TR = 86 bp
MI=26 bp
TR = 86 bp
MI=26 bp
TR = 86 bp
52
Example: Python
β€’ Solve Traders Dilemma
β€’ Optimization using Python
β€’ Python Script:
β€’ Using Estimated Market Impact Parameters
53
Example: Python #2
Python Trade Cost Scripts:
β€’ KRG_Calc_TradeCosts.ipynb
β€’ KRG_TraderDilemma.ipynb
β€’ KRG_Optimal_POV.ipynb
54
Examples
55
Trade Cost Functions with MI Parameters
Iβˆ—
(𝑏𝑝) = 883.35 βˆ™ 𝑆𝑖𝑧𝑒0.35
βˆ™ 𝜎0.76
𝑀𝐼(𝑏𝑝) = 0.96 βˆ™ πΌβˆ—
βˆ™ 𝑃𝑂𝑉0.83
+ 0.04 βˆ™ πΌβˆ—
𝑇𝑅(𝑏𝑝) = 𝜎 βˆ™
1
250
βˆ™
1
3
βˆ™ 𝑆𝑖𝑧𝑒 βˆ™
1 βˆ’ 𝑃𝑂𝑉
𝑃𝑂𝑉
βˆ™ 10𝑏𝑝
4
β€’ Trading Costs will be expressed in basis points (bp) unless otherwise noted.
β€’ Market Impact and Timing Risk is always an expected value (e.g., forward looking).
β€’ Market Impact Parameters are estimated via market data and non-linear regression techniques.
β€’ Timing Risk is calculated based on Order Characteristics (Size and Volatility) and specified Trading Strategy
(POV).
β€’ Trading Strategy can be specified as: POV, Time, Schedule.
56
Questions
Q1) A trader received an order with the following characteristics: 𝑆𝑖𝑧𝑒 = 15%,
𝜎 = 25%, and 𝑃𝑂𝑉 = 20%. What is the MI & TR of this order?
Q2) A trader received a buy order for 75,000 shares of stock RLK with instructions
to transact the order over one-full day, e.g., 1-day VWAP Strategy. The statistics
for RLK are: 𝐴𝐷𝑉 = 500,000 and 𝜎 = 25%. What is the MI & TR of this order?
Q3) A trader received an order to sell 100,000 shares of RLK using a POV=15%
strategy. The stock characteristics are: 𝐴𝐷𝑉 = 1,000,000 and 𝜎 = 20%.
β€’ How long will it take to trade this order (e.g., Time=Volume Time)?
β€’ What is the MI & TR of this order?
Q4) A trader received an order with the following characteristics: 𝑆𝑖𝑧𝑒 = 15%,
and 𝜎 = 25%. The trader has a risk aversion of πœ† = 0.35. What is the optimal
POV rate that balances the tradeoff of MI & TR of this order at the specified level
of risk aversion?
Q5) A trader will execute the order using a POV=20% strategy during a period
where the expected period volume is 50,000 shares. How The stock has
ADV=1,000,000 shares. How many shares will the trader during this period?
Trade Cost Equations:
Iβˆ—
(𝑏𝑝) = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2
βˆ™ πœŽπ‘Ž3
𝑀𝐼(𝑏𝑝) = 𝑏1 βˆ™ πΌβˆ—
βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4
+ 1 βˆ’ 𝑏1 βˆ™ πΌβˆ—
𝑇𝑅(𝑏𝑝) = 𝜎 βˆ™
1
250
βˆ™
1
3
βˆ™ 𝑆𝑖𝑧𝑒 βˆ™
1 βˆ’ 𝑃𝑂𝑉
𝑃𝑂𝑉
βˆ™ 10𝑏𝑝
4
π‘‡π‘–π‘šπ‘’ = 𝑆𝑖𝑧𝑒 βˆ™
1 βˆ’ 𝑃𝑂𝑉
𝑃𝑂𝑉
57
Trading Analytics
58
Pre-Trade
β€’ Cost Curves
β€’ Basket Analysis
Intra-Day
β€’ Real-Time
Post-Trade
β€’ Cost Curves
β€’ Basket Analysis
Demonstrate how to develop each analytic in Excel using KRG Analytics Suite
Trading Analytics
59
Pre-Trade Analysis
Pre-Trade Analysis: Pre-trade analysis provides investors with the estimated trading costs of an order.
This includes the expected market impact, price appreciation, and timing risk. Traders also use pre-
trade analysis to evaluate different trading strategies and algorithms based on trading cost and risk.
They also allow investors to incorporate their own market views and proprietary alpha forecasts
directly into the analyses so that investors can develop a customized analysis for their specified order.
Traders use these functions to perform single stock and portfolio multi-period trade schedule
optimization.
ο‚· The goal of pre-trade TCA is to provide traders with the necessary information to select the most
appropriate algorithm and strategy based on the underlying investment objectives of the fund.
60
Pre-Trade Analysis
61
Intra-Day Analysis
Intra-Day Analysis: Intra-day analysis provides investors with the necessary real-time analytics to
monitor transaction costs during trading. These models provide investors with point in time trading
costs estimates (for executed shares) and the projected trading costs that will result from completing
the order (for those shares that still need to be executed). This is accomplished by incorporating
market momentum and actual market conditions (volume, volatility, and aggregated imbalances)
directly into the analysis.
ο‚· The goal of Intra-Day analysis is to provide investors with the necessary information to determine
when it is advantageous to take advantage of changing market conditions and favorable
opportunities.
62
Cost Curve
Cost Curve: A cost curve provides the Portfolio Manager with insight into the cost of executing a
specified number of shares utilizing a specified trading strategy commonly expressed in terms of
percentage of volume (POV) or trade time (Time).
ο‚· The goal of cost curves is to provide investors with the necessary information to determine how
many shares can be absorbed into the market at the managers level of price sensitivity.
63
Cost Curves
64
Post-Trade Analysis
Post-Trade Analysis: Post-trade analysis serves as a report card on the trade. It provides investors with the cost
of the trade and an evaluation of the trading performance. Post-trade analysis will include a cost comparison
to various price benchmarks (e.g., Arrival, Open, VWAP, Close, T-1, and T+1) as will also compare actual costs
to a pre-trade trading cost estimate for the selected strategy.
Post-trade analysis allows funds to determine how well their brokers and algorithms performed given actual
market conditions. Investors can rank their brokers and their algorithms to determine which brokers and
algorithms are adding value to the fund and determine which algorithms and which brokers may be
underperforming expectations and causing the fund to incur unnecessary higher trading costs. Investors can
compute additional statistics related to the trade such as the relative performance measure (RPM) to help
determine which brokers are adding value to the trading process and which brokers are causing funds to incur
unnecessary trading costs. Customized post trade reports provide clients with the ability to sort, filter, and
evaluate different trading situations right on their own desktop.
ο‚· The goal of Post-Trade analysis is to help investors measure trading costs and evaluate trade performance.
ο‚· It also helps investors determine which broker and which broker algorithms provide the best results based
on order characteristics and market conditions.
65
Post-Trade Analysis

More Related Content

Similar to MMT-04The-Algorithmic-Trading-Process.pdf

Affecting Market Efficiency by Increasing Speed of Order Matching Systems on ...
Affecting Market Efficiency by Increasing Speed of Order Matching Systems on ...Affecting Market Efficiency by Increasing Speed of Order Matching Systems on ...
Affecting Market Efficiency by Increasing Speed of Order Matching Systems on ...Takanobu Mizuta
Β 
Quant congressusa2011algotradinglast
Quant congressusa2011algotradinglastQuant congressusa2011algotradinglast
Quant congressusa2011algotradinglastTomasz Waszczyk
Β 
Algorithmic and high-frequency_trading 2011
Algorithmic and high-frequency_trading 2011Algorithmic and high-frequency_trading 2011
Algorithmic and high-frequency_trading 2011jy Torres
Β 
How to design quant trading strategies using β€œR”?
How to design quant trading strategies using β€œR”?How to design quant trading strategies using β€œR”?
How to design quant trading strategies using β€œR”?QuantInsti
Β 
2. Module II (1) FRM.pdf
2. Module II (1) FRM.pdf2. Module II (1) FRM.pdf
2. Module II (1) FRM.pdfItzGA
Β 
OptionGreeks-SR.pdf
OptionGreeks-SR.pdfOptionGreeks-SR.pdf
OptionGreeks-SR.pdfScallionRice
Β 
technical_analysis.ppt
technical_analysis.ppttechnical_analysis.ppt
technical_analysis.pptJaswinder Parhar
Β 
How Many Orders does a Spoofer Need? - Investigation by Agent-Based Model -
How Many Orders does a Spoofer Need?  - Investigation by Agent-Based Model -How Many Orders does a Spoofer Need?  - Investigation by Agent-Based Model -
How Many Orders does a Spoofer Need? - Investigation by Agent-Based Model -Takanobu Mizuta
Β 
2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...
2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...
2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...Masanori HIRANO
Β 
MCR WORLD Periodical
MCR WORLD PeriodicalMCR WORLD Periodical
MCR WORLD PeriodicalMcr World
Β 
Strategy Part 3 - Combined Models
Strategy Part 3 - Combined ModelsStrategy Part 3 - Combined Models
Strategy Part 3 - Combined Modelsdemarcog
Β 
Presentation (2).pptx
Presentation (2).pptxPresentation (2).pptx
Presentation (2).pptxPunitTewani2
Β 
Chapter iii
Chapter iiiChapter iii
Chapter iiiartipradhan
Β 
Derivatives
DerivativesDerivatives
DerivativesDayasagar S
Β 
Quant Trader Expert
Quant Trader ExpertQuant Trader Expert
Quant Trader Expertbzinchenko
Β 
Fundamental of technical analysis
Fundamental of technical analysisFundamental of technical analysis
Fundamental of technical analysisparshuram2455
Β 
Maximize your return rate by autochartist signal
Maximize your return rate by autochartist signalMaximize your return rate by autochartist signal
Maximize your return rate by autochartist signalShih-Hsin Chen
Β 
Vocabulary and terminology
Vocabulary and terminologyVocabulary and terminology
Vocabulary and terminologyeminiexecutors
Β 

Similar to MMT-04The-Algorithmic-Trading-Process.pdf (20)

Affecting Market Efficiency by Increasing Speed of Order Matching Systems on ...
Affecting Market Efficiency by Increasing Speed of Order Matching Systems on ...Affecting Market Efficiency by Increasing Speed of Order Matching Systems on ...
Affecting Market Efficiency by Increasing Speed of Order Matching Systems on ...
Β 
Quant congressusa2011algotradinglast
Quant congressusa2011algotradinglastQuant congressusa2011algotradinglast
Quant congressusa2011algotradinglast
Β 
Algorithmic and high-frequency_trading 2011
Algorithmic and high-frequency_trading 2011Algorithmic and high-frequency_trading 2011
Algorithmic and high-frequency_trading 2011
Β 
How to design quant trading strategies using β€œR”?
How to design quant trading strategies using β€œR”?How to design quant trading strategies using β€œR”?
How to design quant trading strategies using β€œR”?
Β 
2. Module II (1) FRM.pdf
2. Module II (1) FRM.pdf2. Module II (1) FRM.pdf
2. Module II (1) FRM.pdf
Β 
OptionGreeks-SR.pdf
OptionGreeks-SR.pdfOptionGreeks-SR.pdf
OptionGreeks-SR.pdf
Β 
technical_analysis.ppt
technical_analysis.ppttechnical_analysis.ppt
technical_analysis.ppt
Β 
How Many Orders does a Spoofer Need? - Investigation by Agent-Based Model -
How Many Orders does a Spoofer Need?  - Investigation by Agent-Based Model -How Many Orders does a Spoofer Need?  - Investigation by Agent-Based Model -
How Many Orders does a Spoofer Need? - Investigation by Agent-Based Model -
Β 
2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...
2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...
2020/11/19 PRIMA2020: Implementation of Real Data for Financial Market Simula...
Β 
MCR WORLD Periodical
MCR WORLD PeriodicalMCR WORLD Periodical
MCR WORLD Periodical
Β 
Strategy Part 3 - Combined Models
Strategy Part 3 - Combined ModelsStrategy Part 3 - Combined Models
Strategy Part 3 - Combined Models
Β 
Presentation (2).pptx
Presentation (2).pptxPresentation (2).pptx
Presentation (2).pptx
Β 
Chapter iii
Chapter iiiChapter iii
Chapter iii
Β 
Derivatives
DerivativesDerivatives
Derivatives
Β 
DERIVATIVES LESSONS
DERIVATIVES LESSONSDERIVATIVES LESSONS
DERIVATIVES LESSONS
Β 
Unit 2 Technical Analysis
Unit 2 Technical Analysis Unit 2 Technical Analysis
Unit 2 Technical Analysis
Β 
Quant Trader Expert
Quant Trader ExpertQuant Trader Expert
Quant Trader Expert
Β 
Fundamental of technical analysis
Fundamental of technical analysisFundamental of technical analysis
Fundamental of technical analysis
Β 
Maximize your return rate by autochartist signal
Maximize your return rate by autochartist signalMaximize your return rate by autochartist signal
Maximize your return rate by autochartist signal
Β 
Vocabulary and terminology
Vocabulary and terminologyVocabulary and terminology
Vocabulary and terminology
Β 

Recently uploaded

CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
Β 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
Β 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
Β 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
Β 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
Β 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
Β 
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈcall girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ9953056974 Low Rate Call Girls In Saket, Delhi NCR
Β 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
Β 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
Β 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
Β 
18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdfssuser54595a
Β 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
Β 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
Β 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
Β 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
Β 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)Dr. Mazin Mohamed alkathiri
Β 

Recently uploaded (20)

CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
Β 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
Β 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
Β 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
Β 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
Β 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
Β 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
Β 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
Β 
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈcall girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
Β 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
Β 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Β 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
Β 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
Β 
18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAΠ‘Y_INDEX-DM_23-1-final-eng.pdf
Β 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
Β 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
Β 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Β 
Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”
Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”
Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”
Β 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
Β 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
Β 

MMT-04The-Algorithmic-Trading-Process.pdf

  • 1. 1 Session 2: The Algorithmic Trading Process Robert Kissell, Ph.D. Robert.Kissell@KissellResearch.com Kissell Research Group www.KissellResearch.com
  • 2. 2 Session 2: Outline 1. Algorithmic Trading Process β€’Strategy Selection (Macro & Micro) β€’Order Submission Rules (LOM & SOR) 2. Trading Costs β€’Formulas β€’Data Requirements 3. Market Impact Models β€’Market Observations β€’Estimating MI Parameters β€’Model Evaluation 4. Traders Dilemma β€’ Minimizing Trade Cost β€’ Efficient Trade Strategies β€’ Optimal POV Rates 5. Python Examples β€’ TCA Scripts 6. Examples β€’ Trade Costs 7. Trading Analytics β€’ Pre-Trade β€’ Cost Curves β€’ Post-Trade
  • 5. 5 Implementation οƒ˜ Investment Goals οƒ˜ Macro Decisions οƒ˜ Micro Decisions οƒ˜ Limit Order Models οƒ˜ Smart Order Routing
  • 6. 6 Investment Goals ο‚Ÿ This phase determines the investment portfolio and ultimately the β€œtrade list” or β€œbasket” based on portfolio rebalances, cash inflows, redemptions, or combinations of all three.
  • 7. 7 Macro Decisions ο‚Ÿ Macro Decisions = how the order is to be sliced into smaller pieces and traded over time. ο‚Ÿ This is also known as the trading strategy, trading schedule, trade trajectory, etc. ο‚Ÿ Investors manage the tradeoff between cost and timing risk. ο‚Ÿ For a trade list (e.g., program), investors manage total portfolio risk (e.g., covariance & volatility). ο‚Ÿ Strategies are determined via an optimization process. These include: ο‚Ÿ Traders Dilemma ο‚Ÿ Cost Minimization ο‚Ÿ Price Improvement
  • 8. 8 Micro Decisions ο‚Ÿ Micro Decisions = determine when it is appropriate for an algorithm to deviate from an optimally prescribed strategy and adapt to changing market conditions (e.g., prices, volatility, momentum, etc.) ο‚Ÿ Needs to be consistent with the Macro Trading Goal. ο‚Ÿ Micro-level decisions require real-time market data, volatility, volumes, and investors execution prices. ο‚Ÿ Some Micro Decision criteria include: ο‚Ÿ Target Price ο‚Ÿ Passive-in-the-Money ο‚Ÿ Aggressive-in-the-Money
  • 9. 9 Limit Order Models (LOM) β€’ Limit Order Model = determine the best combination of limit and market orders to send to the market in order to adhere to the higher-level macro goal. β€’ For example, if the optimal trading rate is 10% and we forecast 10,000 shares to trade in the next 1 min, we know we need to execute 1,000 shares. β€’ The limit order model may determine that 300 shares to trade at the market, 300 at the bid+1, 300 at the current bid, and 100 at the bid -1. β€’ The limit order model estimates are based on real-time market conditions and expectations going forward.
  • 10. 10 Smart Order Router (SOR) β€’ Smart Order Router = how and where child orders should be entered into the market. e.g., share quantities, limit or market, wait time between orders, selection of β€œdisplayed” vs. β€œdark” markets. β€’ The SOR continuously calculate in real-time the likelihood of transacting at the specified prices (determined from the limit order model) at the different venues based on shares, order book queue, and time (speed) of executing. β€’ The SOR determines the venues to submit the orders. β€’ The SOR needs to determine when and if it is appropriate to accelerate trading, as well as the best venues submit these orders. The best prices are pre-determined by the Limit Order Model.
  • 11. 11 Trading Process - Implementation Investment Decision Estimate Costs and Select Strategy Select Broker and Algorithm Transact in Market Revise Strategy if Necessary Measure Cost and Evaluate Performance
  • 13. 13 Implementation Shortfall Components: β€’ Delay Cost = price movement in the stock from the time of the investment decision until the order is released to the market. β€’ Execution Cost = price movement in the stock over the time the order is being executed in the market. β€’ Opportunity Cost = the missed profit opportunity of not being able to execute all shares in the order. β€’ Fixed Cost = all fixed fees charged during implementation of the trade. Implementation Shortfall (IS)
  • 14. 14 Formula: 𝐼𝑆$ = 𝑆 βˆ™ 𝑃0 βˆ’ 𝑃𝑑 π·π‘’π‘™π‘Žπ‘¦ πΆπ‘œπ‘ π‘‘ + 𝑋 βˆ™ π‘ƒπ‘Žπ‘£π‘” βˆ’ 𝑃0 𝐸π‘₯π‘’π‘π‘’π‘‘π‘–π‘œπ‘› πΆπ‘œπ‘ π‘‘ + 𝑅 βˆ™ 𝑃𝑛 βˆ’ 𝑃0 π‘‚π‘π‘π‘œπ‘Ÿπ‘‘π‘’π‘›π‘–π‘‘π‘¦ πΆπ‘œπ‘ π‘‘ + 𝐹𝑖π‘₯𝑒𝑑 πΆπ‘œπ‘ π‘‘ Variables: 𝑆 = Order Shares 𝑋 = Executed Shares 𝑅 = Unexecuted Shares 𝑃0 = Arrival Price - mid-point of bid-ask spread at time of order entry 𝑃𝑑 = Decision Price - mid-point of bid-ask spread at time of decision 𝑃 𝑛 = End Price - mid-point of bid-ask spread at end time of (completion/cancel) 𝑃𝐴𝑣𝑔 = Average Execution Price of the Order Fixed Cost = Commissions, Taxes, and Fees & Rebates Spread Costs are embedded in the actual execution price of the stock Fees & Rebates are often included in the broker commission Implementation Shortfall (IS)
  • 16. 16 Historical (Past): 𝐼𝑆 = π·π‘’π‘™π‘Žπ‘¦ πΆπ‘œπ‘ π‘‘π‘  + π‘‡π‘Ÿπ‘Žπ‘‘π‘’ πΆπ‘œπ‘ π‘‘π‘  + π‘‚π‘π‘π‘œπ‘Ÿπ‘‘π‘’π‘›π‘–π‘‘π‘¦ πΆπ‘œπ‘ π‘‘ + 𝐹𝑖π‘₯𝑒𝑑 πΆπ‘œπ‘ π‘‘π‘  Forecast (Future): π‘‡π‘Ÿπ‘Žπ‘‘π‘’ πΆπ‘œπ‘ π‘‘π‘  = 𝐸π‘₯𝑝𝑒𝑐𝑑𝑒𝑑 π‘†π‘π‘Ÿπ‘’π‘Žπ‘‘ πΆπ‘œπ‘ π‘‘π‘  π‘ƒπ‘Ÿπ‘–π‘π‘’ π΄π‘π‘π‘Ÿπ‘’π‘π‘–π‘Žπ‘‘π‘–π‘œπ‘› π‘€π‘Žπ‘Ÿπ‘˜π‘’π‘‘ πΌπ‘šπ‘π‘Žπ‘π‘‘ π‘‡π‘–π‘šπ‘–π‘›π‘” π‘…π‘–π‘ π‘˜ Implementation Shortfall (IS) Before During After Visible Estimate/Forecast
  • 17. 17 β€’ Implementation Shortfall β€’ Cost Measure β€’ Single Value β€’ Calculation: β€’ π‘‡π‘Ÿπ‘Žπ‘‘π‘’ πΆπ‘œπ‘ π‘‘ = π‘ƒπ‘Žπ‘£π‘”βˆ’π‘ƒ0 𝑃0 βˆ™ 104𝑏𝑝 Trade Cost / Transaction Cost Analysis (TCA) β€’ Forecast/Estimation β€’ Market Impact: MI β€’ Price Appreciation: PA β€’ Timing Risk: TR β€’ Distribution of Costs β€’ PDF and CDF Graphs β€’ Mean = MI + PA β€’ Std = TR β€’ Optimization β€’ Optimal Trading Rates Forward Past
  • 19. 19 Spread Cost οƒ˜ Spread = difference between best offer (ask) and best bid price.  Represent the round-trip cost of transacting small orders, e.g., buying and immediately selling 100 shares.  Does not accurately represent the cost of transacting larger share quantities and blocks. οƒ˜ Spread Cost = one-half of the Bid-Ask Spread. Measured as the midpoint of the bid-ask spread to the market price. The spread cost for buy and sell orders are:  Buy Order = Ask Price – Mid Point of Bid Ask Spread  Sell Order = Mid Point of Bid Ask Spread – Bid Price οƒ˜ Spread Cost is often incorporated into the Market Impact Cost estimate, i.e., arrival price P0 is taken as the mid-point of the bid-ask spread.
  • 20. 20 Price Appreciation (PA) οƒ˜ Price Appreciation (PA) is the natural price movement of the stock. It represents how stock price would evolve in a market without any uncertainty. οƒ˜ Price appreciation is also referred to as price trend, momentum, drift, or alpha. οƒ˜ Buy Order = It represents a cost when buying stock in a rising market and a savings when buying stock in a falling market. οƒ˜ Sell Order = It represents a cost when selling stock in a falling market and a savings when selling stock in a rising market. οƒ˜ AlphaBp = the estimated price appreciation over one-day expressed in basis points. οƒ˜ Side = +1 for Buy order, -1 for a Sell order. οƒ˜ Size = Shares divided by Stock Average Daily Volume (ADV) Time: 𝑃𝐴 = 𝑆𝑖𝑑𝑒 βˆ™ 1 2 βˆ™ π΄π‘™π‘β„Žπ‘Žπ΅π‘ βˆ™ π‘‡π‘–π‘šπ‘’ POV Rate: 𝑃𝐴 = 𝑆𝑖𝑑𝑒 βˆ™ 1 2 βˆ™ π΄π‘™π‘β„Žπ‘Žπ΅π‘ βˆ™ 𝑆𝑖𝑧𝑒 βˆ™ 1 βˆ’ 𝑃𝑂𝑉 𝑃𝑂𝑉 Time-POV Relationship: π‘‡π‘Ÿπ‘Žπ‘‘π‘’ π‘‡π‘–π‘šπ‘’ = 𝑆𝑖𝑧𝑒 βˆ™ 1 βˆ’ 𝑃𝑂𝑉 𝑃𝑂𝑉
  • 21. 21 Market Impact (MI) οƒ˜ Market Impact (MI)is the price movement in a stock caused by the order or trade. It consists of two components: οƒ˜ Temporary Impact = due to the liquidity needs of the investor. οƒ˜ Permanent Impact = due to the information content of the trade. οƒ˜ Mathematically, MI is defined as the difference between the path of the stock with and without the order. οƒ˜ Heisenberg Uncertainty Principal of Trading. οƒ˜ Linear Regression Model: Y = b0 + b1*x1 + b2*x2 Market Impact (MI) 𝐼𝑏𝑝 βˆ— = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 𝑀𝐼𝑏𝑝 = 𝐼𝑏𝑝 βˆ— βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1
  • 22. 22 Timing Risk (TR) οƒ˜ Timing Risk (TR) refers to the uncertainty surrounding the estimated trading cost. Timing risk can result in the execution price being higher or lower than the arrival price. οƒ˜ It consists of three components  Price Volatility  Volume Uncertainty (Liquidity Risk)  Parameter Estimation Error Timing Risk (TR) 𝑇𝑅𝑏𝑝 = 𝜎 βˆ™ 1 250 βˆ™ 1 3 βˆ™ π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  𝐴𝐷𝑉 βˆ™ 1 βˆ’ 𝑃𝑂𝑉 𝑃𝑂𝑉 βˆ™ 10𝑏𝑝 4
  • 24. 24 Trade Cost Equations Market Impact (MI): 𝐼𝑏𝑝 βˆ— = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 𝑀𝐼𝑏𝑝 = 𝑏1 βˆ™ 𝐼𝑏𝑝 βˆ— βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 βˆ™ 𝐼𝑏𝑝 βˆ— Timing Risk (TR): 𝑇𝑅𝑏𝑝 = 𝜎 βˆ™ 1 250 βˆ™ 1 3 βˆ™ 𝑆𝑖𝑧𝑒 βˆ™ 1 βˆ’ 𝑃𝑂𝑉 𝑃𝑂𝑉 βˆ™ 10𝑏𝑝 4 Price Appreciation (PA): 𝑃𝐴𝑏𝑝 = 𝑆𝑖𝑑𝑒 βˆ™ 1 2 βˆ™ π΄π‘™π‘β„Žπ‘Žπ΅π‘ βˆ™ 𝑆𝑖𝑧𝑒 βˆ™ 1 βˆ’ 𝑃𝑂𝑉 𝑃𝑂𝑉
  • 25. 25 Trade Cost Equations Market Impact (MI): 𝐼𝑏𝑝 βˆ— = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 𝑀𝐼𝑏𝑝 = 𝑏1 βˆ™ 𝐼𝑏𝑝 βˆ— βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 βˆ™ 𝐼𝑏𝑝 βˆ— Timing Risk (TR): 𝑇𝑅𝑏𝑝 = 𝜎 βˆ™ 1 250 βˆ™ 1 3 βˆ™ 𝑆𝑖𝑧𝑒 βˆ™ 1 βˆ’ 𝑃𝑂𝑉 𝑃𝑂𝑉 βˆ™ 10𝑏𝑝 4 Price Appreciation (PA): 𝑃𝐴𝑏𝑝 = 𝑆𝑖𝑑𝑒 βˆ™ 1 2 βˆ™ π΄π‘™π‘β„Žπ‘Žπ΅π‘ βˆ™ 𝑆𝑖𝑧𝑒 βˆ™ 1 βˆ’ 𝑃𝑂𝑉 𝑃𝑂𝑉 Model Parameters: β€’ π‘Ž1, π‘Ž2, π‘Ž3, π‘Ž4, 𝑏1 Variables: β€’ Size β€’ Volatility β€’ Side β€’ AlphaBp Decision Variables: β€’ POV Rate β€’ Trade Time
  • 26. 26 Trade Cost Equations Forecasting Equations - Data MI TR PA Parameters yes no no Size yes yes yes Volatility yes yes no AlphaBp no no yes Side no no yes POV yes yes yes Trade Time yes yes yes
  • 27. 27 Input Variables & Calculations Trade Quantity: 𝑆𝑖𝑧𝑒 = π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  𝐴𝐷𝑉 (%𝐴𝑑𝑣, π‘‘π‘’π‘π‘–π‘šπ‘Žπ‘™) Percentage of Volume: 𝑃𝑂𝑉 = π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  π΄π‘π‘‘π‘’π‘Žπ‘™ π‘‰π‘œπ‘™π‘’π‘šπ‘’ π‘œπ‘£π‘’π‘Ÿ π‘‡π‘Ÿπ‘Žπ‘‘π‘’ π‘ƒπ‘’π‘Ÿπ‘–π‘œπ‘‘ (π‘‘π‘’π‘π‘–π‘šπ‘Žπ‘™) (Actual/Historical) 𝑃𝑂𝑉 = π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  + 𝑉 𝑑 = 𝑆𝑖𝑧𝑒 𝑆𝑖𝑧𝑒 + π‘‡π‘–π‘šπ‘’ (π‘‘π‘’π‘π‘–π‘šπ‘Žπ‘™) (Forecasted/Predicted) Trade Time: π‘‡π‘–π‘šπ‘’ = 𝑆𝑖𝑧𝑒 βˆ™ 1 βˆ’ 𝑃𝑂𝑉 𝑃𝑂𝑉 Definitions: 𝑆𝑖𝑧𝑒 = π‘‚π‘Ÿπ‘‘π‘’π‘Ÿ 𝑆𝑖𝑧𝑒 𝑒π‘₯π‘π‘Ÿπ‘’π‘ π‘ π‘’π‘‘ π‘Žπ‘  𝑝𝑐𝑑 π‘œπ‘“ 𝐴𝐷𝑉 𝐴𝐷𝑉 = π΄π‘£π‘’π‘Ÿπ‘Žπ‘”π‘’ π·π‘Žπ‘–π‘™π‘¦ π‘‰π‘œπ‘™π‘’π‘šπ‘’ (π‘€π‘œπ‘£π‘–π‘›π‘” π΄π‘£π‘’π‘Ÿπ‘Žπ‘”π‘’) 𝑃𝑂𝑉 = π‘ƒπ‘’π‘Ÿπ‘π‘’π‘›π‘‘π‘Žπ‘”π‘’ π‘œπ‘“ π‘€π‘Žπ‘Ÿπ‘˜π‘’π‘‘ π‘‰π‘œπ‘™π‘’π‘šπ‘’ π‘‡π‘Ÿπ‘Žπ‘‘π‘’ π‘‡π‘–π‘šπ‘’ = π‘‰π‘œπ‘™π‘’π‘šπ‘’ π‘‡π‘–π‘šπ‘’ 𝑉 𝑑 = π‘ƒπ‘Ÿπ‘’π‘‘π‘–π‘π‘‘π‘’π‘‘ π‘‰π‘œπ‘™π‘’π‘šπ‘’ 𝑖𝑛 π‘‡π‘–π‘šπ‘’ π‘ƒπ‘’π‘Ÿπ‘–π‘œπ‘‘ 𝜎 = π΄π‘›π‘›π‘’π‘Žπ‘™π‘–π‘§π‘’π‘‘ π‘‰π‘œπ‘™π‘Žπ‘‘π‘–π‘™π‘–π‘‘π‘¦ π‘€π‘œπ‘£π‘–π‘›π‘” 𝐴𝑣𝑔, π‘‘π‘’π‘π‘–π‘šπ‘Žπ‘™ 𝑆𝑖𝑑𝑒 = π‘‚π‘Ÿπ‘‘π‘’π‘Ÿ 𝑆𝑖𝑑𝑒, +1 = 𝐡𝑒𝑦, βˆ’1 = 𝑆𝑒𝑙𝑙
  • 28. 28 Input Variables & Calculations Average Daily Volume: 𝐴𝐷𝑉 𝑑 = 1 𝑛 βˆ™ 𝑖=1 𝑛 π‘‰π‘œπ‘™π‘’π‘šπ‘’ 𝑑 βˆ’ 𝑖 Median Daily Volume: 𝑀𝐷𝑉 𝑑 = π‘€π‘’π‘‘π‘–π‘Žπ‘› π‘‰π‘œπ‘™π‘’π‘šπ‘’ 𝑑 βˆ’ 1 , … , π‘‰π‘œπ‘™π‘’π‘šπ‘’ 𝑑 βˆ’ 𝑛 Annualized Volatility π‘Ÿπ‘‘ = ln 𝑃𝑑 π‘ƒπ‘‘βˆ’1 𝜎(𝑑) = 250 βˆ™ 1 𝑛 βˆ’ 1 βˆ™ 𝑑=1 𝑛 π‘Ÿπ‘‘ βˆ’ π‘Ÿ 2 Forecasted Period Volume: 𝑉 𝑑 = 𝐴𝐷𝑉 βˆ™ 𝑓 𝑣 𝑑 βˆ™ 𝐴𝑑𝑗 Definitions 𝐴𝐷𝑉 = π΄π‘£π‘’π‘Ÿπ‘Žπ‘”π‘’ π·π‘Žπ‘–π‘™π‘¦ π‘‰π‘œπ‘™π‘’π‘šπ‘’ (π‘€π‘œπ‘£π‘–π‘›π‘” π΄π‘£π‘’π‘Ÿπ‘Žπ‘”π‘’) 𝑀𝐷𝑉 = π‘€π‘’π‘‘π‘–π‘Žπ‘›π·π‘Žπ‘–π‘™π‘¦ π‘‰π‘œπ‘™π‘’π‘šπ‘’ (π‘€π‘œπ‘£π‘–π‘›π‘” π΄π‘£π‘’π‘Ÿπ‘Žπ‘”π‘’) π‘‰π‘œπ‘™π‘’π‘šπ‘’ 𝑑 βˆ’ 𝑖 = Actual Total Volume on day t-i 𝑉 𝑑 = π‘ƒπ‘Ÿπ‘’π‘‘π‘–π‘π‘‘π‘’π‘‘ π‘‰π‘œπ‘™π‘’π‘šπ‘’ 𝑖𝑛 π‘‡π‘–π‘šπ‘’ π‘ƒπ‘’π‘Ÿπ‘–π‘œπ‘‘ 𝑃𝑑 = π‘ƒπ‘Ÿπ‘–π‘π‘’ π‘œπ‘› π‘‘π‘Žπ‘¦ 𝑑 π‘Ÿπ‘‘ = πΏπ‘œπ‘” π‘…π‘’π‘‘π‘’π‘Ÿπ‘› π‘œπ‘› π‘‘π‘Žπ‘¦ 𝑑 𝜎 = π΄π‘›π‘›π‘’π‘Žπ‘™π‘–π‘§π‘’π‘‘ π‘‰π‘œπ‘™π‘Žπ‘‘π‘–π‘™π‘–π‘‘π‘¦ (π‘€π‘œπ‘£π‘–π‘›π‘” π΄π‘£π‘’π‘Ÿπ‘Žπ‘”π‘’ π‘Žπ‘  π‘‘π‘’π‘π‘–π‘šπ‘Žπ‘™) 𝑛 = β„Žπ‘–π‘ π‘‘π‘œπ‘Ÿπ‘–π‘π‘Žπ‘™ π‘π‘’π‘Ÿπ‘–π‘œπ‘‘, π‘π‘œπ‘šπ‘šπ‘œπ‘›π‘™π‘¦ 30 π‘‘π‘Žπ‘¦π‘  𝑓 𝑣 𝑑 = percentage of historical daily volume in period t 𝐴𝑑𝑗 = volume adjustment due to Day of Week, Month or Quarter End, Earnings, Fed Day, Special Event.
  • 29. 29 Measuring Model Performance 𝑀𝑆𝐸 = 1 π‘š 𝑖=1 π‘š 𝑦𝑖 βˆ’ 𝑦𝑖 2 𝑅𝑀𝑆𝐸 = 1 π‘š 𝑖=1 π‘š 𝑦𝑖 βˆ’ 𝑦𝑖 2 𝑀𝐴𝐷 = 1 π‘š 𝑖=1 π‘š 𝑦𝑖 βˆ’ 𝑦𝑖
  • 30. 30 Shares to Trade from POV Rate POV Formula: 𝑃𝑂𝑉 = π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  + 𝑉 𝑑 = π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  + 𝐴𝐷𝑉 βˆ™ 𝑓 𝑣 𝑑 βˆ™ 𝐴𝑑𝑗 Solve for Shares (in above Formula) : π‘†β„Žπ‘Žπ‘Ÿπ‘’π‘  = 𝑃𝑂𝑉 1 βˆ’ 𝑃𝑂𝑉 βˆ™ 𝑉 𝑑 = 𝑃𝑂𝑉 1 βˆ’ 𝑃𝑂𝑉 βˆ™ 𝐴𝐷𝑉 βˆ™ 𝑓 𝑣 𝑑 βˆ™ 𝐴𝑑𝑗
  • 32. 32 What MI Explanatory Factors are Important? β€’ Share Quantity β€’ Size (%Adv) β€’ Volatility β€’ Annualized β€’ POV β€’ Trading Rate
  • 36. 36 I-Star Model 𝐼𝑏𝑝 βˆ— = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3
  • 37. 37 I-Star Model 𝐼𝑏𝑝 βˆ— = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 𝑀𝐼𝑏𝑝 = 𝑏1 βˆ™ 𝐼𝑏𝑝 βˆ— βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 βˆ™ 𝐼𝑏𝑝 βˆ— Temporary Impact Permanent Market
  • 38. 38 I-Star Market Impact Model 𝐼𝑏𝑝 βˆ— = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 𝑀𝐼𝑏𝑝 = 𝑏1 βˆ™ 𝐼𝑏𝑝 βˆ— βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 βˆ™ 𝐼𝑏𝑝 βˆ—
  • 39. 39 I-Star Market Impact Model 𝐼𝑏𝑝 βˆ— = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 𝑀𝐼𝑏𝑝 = 𝑏1 βˆ™ 𝐼𝑏𝑝 βˆ— βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 βˆ™ 𝐼𝑏𝑝 βˆ— 𝑀𝐼𝑏𝑝 = 𝐼𝑏𝑝 βˆ— βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1
  • 40. 40 I-Star Market Impact Model 𝐼𝑏𝑝 βˆ— = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 𝑀𝐼𝑏𝑝 = 𝑏1 βˆ™ 𝐼𝑏𝑝 βˆ— βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 βˆ™ 𝐼𝑏𝑝 βˆ— 𝑀𝐼𝑏𝑝 = 𝐼𝑏𝑝 βˆ— βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 𝑀𝐼𝑏𝑝 = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1
  • 41. 41 Estimating MI Parameters: Non-Linear Regression I-Star Model: 𝑀𝐼 = πΌβˆ— βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 𝑀𝐼 = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 Non-Linear Regression: 𝑀𝑖𝑛 𝑓 = πΆπ‘œπ‘ π‘‘ βˆ’ 𝑀𝐼 2 𝑀𝑖𝑛 𝑓 = πΆπ‘œπ‘ π‘‘ βˆ’ π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 2 Subject to: 0 ≀ b1 ≀ 1 π‘Ž1, π‘Ž2, π‘Ž3, π‘Ž4 β‰₯ 0 where, Cost = Measured Trade Cost (difference between execution price and arrival price)
  • 42. 42 Example: Python #1 Estimate Market Impact Parameters using Python β€’ Python Script: KRG_Est MI_Parameters.ipynb β€’ File: MIData_KRG.csv
  • 43. 43 Estimating MI Parameters: Results I-Star Model: πΌβˆ— = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 𝑀𝐼 = πΌβˆ— βˆ™ 𝑏1 βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 πΌβˆ— = 883.25 βˆ™ 𝑆𝑖𝑧𝑒0.35 βˆ™ 𝜎0.76 𝑀𝐼 = πΌβˆ— βˆ™ 0.96 βˆ™ 𝑃𝑂𝑉0.83 + 1 βˆ’ 0.96
  • 44. 44 Comparison of Actual to Estimated
  • 45. 45 Market Impact Relationships 0.0 10.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 0% 10% 20% 30% 40% 50% 60% Market Impact (bp) Order Size (%ADV) Market Impact Cost as function of Size 0.0 20.0 40.0 60.0 80.0 100.0 120.0 0% 20% 40% 60% 80% 100% 120% Market Impact (bp) POV Rate Market Impact Cost as function of POV Rate 0.0 20.0 40.0 60.0 80.0 100.0 120.0 140.0 160.0 0% 20% 40% 60% 80% 100% 120% Market Impact (bp) Volatility Market Impact as function of Volatility 0.0 20.0 40.0 60.0 80.0 100.0 120.0 0.00 0.50 1.00 1.50 2.00 2.50 3.00 3.50 Market Impact (bp) Trade Time Market Impact Cost as function of Time
  • 47. 47 Traders Dilemma Traders Dilemma: β€’ Trade too fast and I will move the market. Trade too slow and the market will move me. β€’ Market Impact and Timing Risk are conflicting expressions.
  • 48. 48 Solving Traders Dilemma: β€’ Traders seek to manage the tradeoff between market impact cost (MI) and timing risk (TR) at a specified level of risk aversion . β€’ Lambda  is specified by the investor and is often 0 ≀ πœ† ≀ 3. β€’ Solve via Optimization β€’ Solution provides optimal POV rate β€’ Each value of Lambda will have a different β€œOptimal” solution. Solving Trader Dilemma 𝑀𝑖𝑛 𝑀𝐼 + πœ† βˆ™ 𝑇𝑅
  • 49. 49 Efficient Trading Frontier Source: Kissell Research Group (2022) Efficient Trading Frontier: Almgren & Chriss (1997)
  • 50. 50 Efficient Trading Frontier Source: Kissell Research Group (2022) A = Inefficient Strategy Z Y X X, Y, Z = Efficient Strategies
  • 51. 51 Where are the Expected Costs? Source: Kissell Research Group (2022) MI=26 bp TR = 86 bp MI=26 bp TR = 86 bp MI=26 bp TR = 86 bp
  • 52. 52 Example: Python β€’ Solve Traders Dilemma β€’ Optimization using Python β€’ Python Script: β€’ Using Estimated Market Impact Parameters
  • 53. 53 Example: Python #2 Python Trade Cost Scripts: β€’ KRG_Calc_TradeCosts.ipynb β€’ KRG_TraderDilemma.ipynb β€’ KRG_Optimal_POV.ipynb
  • 55. 55 Trade Cost Functions with MI Parameters Iβˆ— (𝑏𝑝) = 883.35 βˆ™ 𝑆𝑖𝑧𝑒0.35 βˆ™ 𝜎0.76 𝑀𝐼(𝑏𝑝) = 0.96 βˆ™ πΌβˆ— βˆ™ 𝑃𝑂𝑉0.83 + 0.04 βˆ™ πΌβˆ— 𝑇𝑅(𝑏𝑝) = 𝜎 βˆ™ 1 250 βˆ™ 1 3 βˆ™ 𝑆𝑖𝑧𝑒 βˆ™ 1 βˆ’ 𝑃𝑂𝑉 𝑃𝑂𝑉 βˆ™ 10𝑏𝑝 4 β€’ Trading Costs will be expressed in basis points (bp) unless otherwise noted. β€’ Market Impact and Timing Risk is always an expected value (e.g., forward looking). β€’ Market Impact Parameters are estimated via market data and non-linear regression techniques. β€’ Timing Risk is calculated based on Order Characteristics (Size and Volatility) and specified Trading Strategy (POV). β€’ Trading Strategy can be specified as: POV, Time, Schedule.
  • 56. 56 Questions Q1) A trader received an order with the following characteristics: 𝑆𝑖𝑧𝑒 = 15%, 𝜎 = 25%, and 𝑃𝑂𝑉 = 20%. What is the MI & TR of this order? Q2) A trader received a buy order for 75,000 shares of stock RLK with instructions to transact the order over one-full day, e.g., 1-day VWAP Strategy. The statistics for RLK are: 𝐴𝐷𝑉 = 500,000 and 𝜎 = 25%. What is the MI & TR of this order? Q3) A trader received an order to sell 100,000 shares of RLK using a POV=15% strategy. The stock characteristics are: 𝐴𝐷𝑉 = 1,000,000 and 𝜎 = 20%. β€’ How long will it take to trade this order (e.g., Time=Volume Time)? β€’ What is the MI & TR of this order? Q4) A trader received an order with the following characteristics: 𝑆𝑖𝑧𝑒 = 15%, and 𝜎 = 25%. The trader has a risk aversion of πœ† = 0.35. What is the optimal POV rate that balances the tradeoff of MI & TR of this order at the specified level of risk aversion? Q5) A trader will execute the order using a POV=20% strategy during a period where the expected period volume is 50,000 shares. How The stock has ADV=1,000,000 shares. How many shares will the trader during this period? Trade Cost Equations: Iβˆ— (𝑏𝑝) = π‘Ž1 βˆ™ π‘†π‘–π‘§π‘’π‘Ž2 βˆ™ πœŽπ‘Ž3 𝑀𝐼(𝑏𝑝) = 𝑏1 βˆ™ πΌβˆ— βˆ™ π‘ƒπ‘‚π‘‰π‘Ž4 + 1 βˆ’ 𝑏1 βˆ™ πΌβˆ— 𝑇𝑅(𝑏𝑝) = 𝜎 βˆ™ 1 250 βˆ™ 1 3 βˆ™ 𝑆𝑖𝑧𝑒 βˆ™ 1 βˆ’ 𝑃𝑂𝑉 𝑃𝑂𝑉 βˆ™ 10𝑏𝑝 4 π‘‡π‘–π‘šπ‘’ = 𝑆𝑖𝑧𝑒 βˆ™ 1 βˆ’ 𝑃𝑂𝑉 𝑃𝑂𝑉
  • 58. 58 Pre-Trade β€’ Cost Curves β€’ Basket Analysis Intra-Day β€’ Real-Time Post-Trade β€’ Cost Curves β€’ Basket Analysis Demonstrate how to develop each analytic in Excel using KRG Analytics Suite Trading Analytics
  • 59. 59 Pre-Trade Analysis Pre-Trade Analysis: Pre-trade analysis provides investors with the estimated trading costs of an order. This includes the expected market impact, price appreciation, and timing risk. Traders also use pre- trade analysis to evaluate different trading strategies and algorithms based on trading cost and risk. They also allow investors to incorporate their own market views and proprietary alpha forecasts directly into the analyses so that investors can develop a customized analysis for their specified order. Traders use these functions to perform single stock and portfolio multi-period trade schedule optimization. ο‚· The goal of pre-trade TCA is to provide traders with the necessary information to select the most appropriate algorithm and strategy based on the underlying investment objectives of the fund.
  • 61. 61 Intra-Day Analysis Intra-Day Analysis: Intra-day analysis provides investors with the necessary real-time analytics to monitor transaction costs during trading. These models provide investors with point in time trading costs estimates (for executed shares) and the projected trading costs that will result from completing the order (for those shares that still need to be executed). This is accomplished by incorporating market momentum and actual market conditions (volume, volatility, and aggregated imbalances) directly into the analysis. ο‚· The goal of Intra-Day analysis is to provide investors with the necessary information to determine when it is advantageous to take advantage of changing market conditions and favorable opportunities.
  • 62. 62 Cost Curve Cost Curve: A cost curve provides the Portfolio Manager with insight into the cost of executing a specified number of shares utilizing a specified trading strategy commonly expressed in terms of percentage of volume (POV) or trade time (Time). ο‚· The goal of cost curves is to provide investors with the necessary information to determine how many shares can be absorbed into the market at the managers level of price sensitivity.
  • 64. 64 Post-Trade Analysis Post-Trade Analysis: Post-trade analysis serves as a report card on the trade. It provides investors with the cost of the trade and an evaluation of the trading performance. Post-trade analysis will include a cost comparison to various price benchmarks (e.g., Arrival, Open, VWAP, Close, T-1, and T+1) as will also compare actual costs to a pre-trade trading cost estimate for the selected strategy. Post-trade analysis allows funds to determine how well their brokers and algorithms performed given actual market conditions. Investors can rank their brokers and their algorithms to determine which brokers and algorithms are adding value to the fund and determine which algorithms and which brokers may be underperforming expectations and causing the fund to incur unnecessary higher trading costs. Investors can compute additional statistics related to the trade such as the relative performance measure (RPM) to help determine which brokers are adding value to the trading process and which brokers are causing funds to incur unnecessary trading costs. Customized post trade reports provide clients with the ability to sort, filter, and evaluate different trading situations right on their own desktop. ο‚· The goal of Post-Trade analysis is to help investors measure trading costs and evaluate trade performance. ο‚· It also helps investors determine which broker and which broker algorithms provide the best results based on order characteristics and market conditions.