Cracking The Code of Algorithmic Trading HFLv2
Cracking The Code of Algorithmic Trading HFLv2
Algorithmic Trading
By Jeremy Klein
The Frommer Group
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
Chat questions to our Live Member Chat on
www hedgefundlive com
www.hedgefundlive.com
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
Site Opinion Disclaimer
By accessing the TFG Trading Matrix website or webinar (the “Site”), you acknowledge and accept the terms of this Site Opinion Disclaimer.
You understand and acknowledge that no piece of content published on the Site represents a recommendation that a particular trade, trading strategy, or
investment is suitable for you. In addition, you acknowledge that any information or opinion published on the Site will be used for informational purposes only
and should not be deemed to be a recommendation to buy or sell any security. No person or party providing or publishing content on the Site, nor TFG Trading
Matrix, LLC itself, should be considered your investment adviser or consultant. You acknowledge that affiliates of TFG Trading Matrix, LLC may have positions
or be involved with transactions relating to the securities discussed on the Site.
Any opinions published on the Site are solely the opinion of the person or party publishing the content on the Site and may not reflect the opinions of TFG. Such
opinions
i i may have
h b
been previously
i l disseminated
di i t d on the
th internet
i t t or through
th h another
th medium
di and
d have
h nott been
b t il d to
tailored t any particular
ti l person’s ’ or group’s
’
circumstances. Persons rendering such opinions may have positions in or be involved with transactions relating to securities mentioned on the Site. However,
you should not treat any opinion or information published on the Site as a specific inducement to make a particular investment or follow a particular investment
strategy, but only as an expression of such person’s personal opinion. You are not being offered any securities, either directly or indirectly, from this Site.
The opinions on this Site are based upon information considered to be reliable, but we do not warrant the completeness or accuracy of those opinions, and they
should not be relied upon as such. You may not spread false rumors based on any information found or heard on the Site. We are under no obligation to
update or correct any information or opinion provided on the Site.
Site Any opinions are subject to change without notice.
notice TFG
TFG’ss compensation,
compensation to third parties that
provide opinions, is not, in any way, related to the specific opinions expressed by those third parties.
TFG does not guarantee any specific outcomes or profits from using the Site or its content. You should be aware of the real risk of serious or total loss in
following any strategy or investment discussed on the Site. Strategies or investments discussed may fluctuate in price or value, and past performance of any
strategy or investment is not indicative of its future performance.
Any or all investments or strategies mentioned on the Site may not be suitable for you.
you This material does not take into account your particular investment
objectives, financial situation, or financial needs and is not intended as recommendations appropriate for you. Furthermore, because markets are perpetually
changing, the content on the Site may not be current, and therefore should not be relied upon. You must make independent decisions regarding investments or
strategies mentioned on the Site. Before acting on information or opinions published on the Site, you should consider whether the opinions are suitable for your
particular circumstances and strongly consider seeking advice from your financial or investment adviser. You also acknowledge that you will make your own
investment decisions at all times.
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
Lecture Outline
I. Introduction
II. Background
B k d
III. Basics of Execution Algorithms
IV. Advanced Execution Algorithms
V. Black
ac Boxes
o es vs.
s Fundamental
u da e ta Machines
ac es
VI. Conclusion
VII Q&A
VII.
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
I. Introduction
Algorithmic trading provides opportunities for
money managers to increase performance
“Algo”, or computer driven, trading divides into
two categories:
Execution models
Investment based models
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
II. Background
How algo trading arose
Expansion
p of electronic order routing
g to equity
q y and futures
exchanges
Steady increase in program trading
Because decomposing the basket to numerous single
stock executions was onerous, computer models were
written to offer the option of producing transactions that
accomplished the task with reasonable slippage
Enabled the trader to be more productive by focusing on
other areas of the portfolio
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
II. Background
Complexity of algos deepened
Execution algos:
g competition
p amonggqquant research desks at
most broker-dealers to determine who could supply clients with
the best prices
Investment based algos: large,
large successful hedge funds
emerged as “black boxes” spawned high frequency trading
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
III. Basics of Execution Algorithms
Slicing
Parameter: start and end time of
transaction
Based on Volume Weighted Average
Price ((VWAP)) curves
Operate on intraday basis
Duration: a few minutes to a full
trading session
Pre- or post-market algos do not
exist due to lack of liquidity and
consistency
Optimal duration of trade determined
by projected market impact given the
time of day and intraday thesis for
stock performance
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
III. Basics of Execution Algorithms
Slicing
Liquidity is thickest around Open and Close and
thinnest in middle of the day
Time frame with heaviest execution: 9:30-10:30AM and
3:00-4:00PM
Time Weighted Average Price (TWAP)
Liquidity is not a concern
Trade stock in equal amounts over a period of time
Gaining
gppopularity
p y in futures and F/X markets
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
III. Basics of Execution Algorithms
Participatory
Parameter: percentage of volume
Ex: “Sell IBM at market and be 15% of
the volume”
Calculate overall volume during
algorithm
l ith run titime
Sell the amount of shares equivalent
to 15% of that volume
Model that trades less than 10% of
stock’s volume = “passive” participation
Model that trades greater than 20% of
stock’s
stock s volume = “active”
active participation
and has potential of pushing prices
around
Order that calls for greater than 33%
should only be used in extreme cases
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
IV. Advanced Execution Algorithms
Need for prices that beat a
new standard for execution-
VWAP
Examples of additional
parameters: strict price
limits, rules to buy only on
downtick or “zero plus tick”
(requirement for company
b b k via
buybacks i RRule
l 10b
10b-18)
18)
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
IV. Advanced Execution Algorithms
Pegging programs
Force all orders to always remain at or within a fixed
price relative to current bid-ask quote
Scaling
g models
Allow for heavier than expected transactions vs. a
standard volume curve at a price at or better than the
VWAP ((or some fifixed
d price)
i ) while
hil lilightening
ht i up when
h
prices become less favorable
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
IV. Advanced Execution Algorithms
Other recent programs
Coordinate level of activity to fluctuate with how stock performs against a
predefined or hand selected index
Use stock-specific VWAP curves based on assumption that each stock
has common group of market players who return to the name daily and
thus transact in its own specific manner
Keep portfolio of thousands of stocks sector, beta, and/or dollar neutral
throughout the trade (which often last days)
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
IV. Advanced Execution Algorithms
Pairs or spread trading
Based on M&As
M&As, minority stake one company has in
another, or some fundamental correlation
Calculate ratios for which buy/sell levels for the pair are
id ifi d
identified
Provides speed in:
Calculation of current ratio level
Execution of multiple legs of trade
Order generation and updates
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
V. Black Boxes vs. Fundamental Machines
Black boxes
Seek “statistical arbitrage”
g
Models will trade a variety of reversionary or momentum based
strategies
Models will transact based on fundamentals
fundamentals, technicals
technicals, or both
Expected value of every positions is very small so models can
easily execute thousands of trades per day
Slippage low commission costs
Slippage, costs, and scalability are paramount for
success
Not unusual for quant funds to be source of many trading errors,
which if identified early can offer others tremendous opportunity
opportunity,
since models are only as good as the humans who program them
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
V. Black Boxes vs. Fundamental Machines
Market making models
Machines sit on bids and offers
offers,
calculating average historical
quotes for optimum placement to
realize
li th
the spread dbby simply
i l
offering liquidity
Can be highly profitable since
ECNs typically pay firm for
supplying liquidity
C b
Can be id
identified
tifi d when
h a currentt
bid or offer is “pennied”,
p
especiallyy in less liquid,
q , small
cap names
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
V. Black Boxes vs. Fundamental Machines
Index arbitrage
Process of trading equity index futures and the
underlying perfectly weighted basket of stocks when
the two equivalent positions have minute price
discrepancies
Only used by prop desks at a handful of broker-
dealers because access to cheap capital is a
requirement for being successful
Not risk free since a fast market can cause
significant losses as algos get caught long futures
while not having the time to sell stocks fast enough
to flatten positions
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
VI. Conclusion
Along with advances in technology, the use of algorithmic
trading has expanded to be a dominant means to execute and
invest
While it may be uncomfortable to embrace quantitative
modeling, one can be fully confident that the other side of a
countless number of his or her trades has been a machine
Consequently, understanding how these models are designed
and implemented can be an important tool in any trader’s
trader s kit
whether he or she plans to utilize algorithms or not
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com
VII. Q&A
Chat questions to our Live Member Chat on
www hedgefundlive com
www.hedgefundlive.com
Copyright © 2010 TFG Trading Matrix, LLC Inc. All Rights Reserved. Please direct questions to our Live Member Chat on
www.hedgefundlive.com www.hedgefundlive.com