quantitative trading strategies · institutional algorithmic trading (1) algorithmic trading (also...
TRANSCRIPT
1 of 46 January 7, 2017
QF206 Week 1
Quantitative Trading Strategies
Introduction
© Christopher Ting
2 of 46 January 7, 2017
QF206 Week 1
What is Quantitative Trading?
Also known as algorithmic trading
Trading based on buy-or-sell signals generated by algorithms, which are implemented on computer systems for automated executions
Algorithmic signals are highly data driven.
Macroeconomic news: non-farm payroll, FOMC policy etc.
Fundamentals: revenue, cash flow, earnings-per-share etc.
Technical: Moving averages, stochastic indicator, etc.
High-frequency: state of the limit-order book
Algorithmic executions are highly technology driven.
© Christopher Ting
3 of 46 January 7, 2017
QF206 Week 1
The Gist of Quantitative Trading
As long as you can represent relevant information into bits and bytes that the computer system can operate on by the algorithms, it can be regarded as a part of quantitative trading.
Technical analysis
Fundamentals
News
© Christopher Ting
4 of 46 January 7, 2017
QF206 Week 1
In a Nutshell
Algorithmic trading refers to procedural trading rules or strategies
From technical analysis to complex neural network strategies.
Trading horizon can be intraday (high frequency) or longer
Based on trading signals toOpen a position
Close a position, either to take profit or stop loss
© Christopher Ting
5 of 46 January 7, 2017
QF206 Week 1
Institutional Algorithmic Trading (1)
Algorithmic trading (also called automated trading, black box trading and robo-trading) is used to break up large orders into smaller orders to
reduce execution risk
preserve anonymity,
minimize the price impact of a trade.
Hidden portions of large institutional orders are sometimes referred to as dark liquidity pools.
Orders are often partially revealed, in which case they are called iceberg or hidden-size orders.
© Christopher Ting
6 of 46 January 7, 2017
QF206 Week 1
Institutional Algorithmic Trading (2)
The use of programs and computers to generate and execute orders in
markets with electronic access.
Orders come from institutional investors, hedge funds and trading desks.
Institutional clients need to trade large amounts of stocks. These
amounts are often larger than what the market can absorb without
impacting the price.
The main objective of institutional algo trading is not necessarily to
maximize profits but rather to control execution costs and market risk.
The demand for a large amount of liquidity will typically affect the cost
of the trade in a negative fashion (slippage).
Large orders need to be split into smaller orders, to be executed
electronically over the course of minutes, hours and days.
© Christopher Ting
7 of 46 January 7, 2017
QF206 Week 1
Institutional Algo Strategies
Algorithmic trading results from mathematical models that analyze quotes and trades, identify liquidity opportunities, and use the information to make intelligent trading decisions so as to
Trade at or better than the average price over a day (e.g. VWAP, volume weighted average price)
Execute optimally so as to have minimal price impact.
Trade more at market opens and closes when volume is high, and less during slower periods such as around lunch.
Exploit arbitrage opportunities or price spreads between correlated securities.
© Christopher Ting
8 of 46 January 7, 2017
QF206 Week 1
Algo Trading in General
Algorithmic trading is also used in a more general
sense to include “Alpha Models” used to make
trading decisions to generate trading profits or
control risk.
Thus, more generally, algorithmic trading can be
defined as trading based on the use of computer
programs and sophisticated trading analytics to
execute orders according to pre-defined strategies.
© Christopher Ting
9 of 46 January 7, 2017
QF206 Week 1
Who Can Be a Retail Quant Trader?
It is true that most institutional quant traders have advanced degrees in mathematics, science, and engineering.
But trading is deceptively simple: Buy low sell high
Sell high buy low
The crux of the matter is to consistently achieve profitability (after costs, taxes, etc.) quarter after quarter.
If you have taken a few courses in math, statistics, and programming, you are probably as qualified as anyone to tackle some of the basic statistical arbitrage strategies.
© Christopher Ting
10 of 46 January 7, 2017
QF206 Week 1
Who Cannot Be a Retail Quant Trader?
No savings to take care of family commitments
Need immediate profits to sustain daily living
No discipline
Crave for adrenalin pumps
Exuberate over-confidence bordering hubris in character
Hope, delay, and then cut losses in despair
Blame others for losses
Addicted to trading!
No emotional intelligence
Extreme greed: too much risk
Extreme fear: too risk averse
No capacity to conduct independent research
© Christopher Ting
12 of 46 January 7, 2017
QF206 Week 1
What to Trade?
Stock
ETF
ES
Structured Warrant
ADR
Rights
REIT
Futures
Options
Fixed Income
Gold
USD/SGD
© Christopher Ting
13 of 46 January 7, 2017
QF206 Week 1
Four Major Asset Classes and Derivatives
Stocks or equities
Currencies or forex
Commodities
Fixed income instruments
Forward and futures
Options
underlying asset
Funds
© Christopher Ting
14 of 46 January 7, 2017
QF206 Week 1
© Christopher Ting
Four Major Asset Classes
and Derivatives
Cash Markets
Derivative Markets
15 of 46 January 7, 2017
QF206 Week 1
With versus Without Maturity
Stocks, currencies, and commodities are asset classes that have no maturity.
Derivatives and fixed income instruments have maturities.
For a plain vanilla security with maturity, it is possible to compute its fair price.
The fair price constitutes a reference price for trading futures and options.
© Christopher Ting
16 of 46 January 7, 2017
QF206 Week 1
Linear Price-Profit Plot
Profit
price of underlying
at maturity, STK
0
ST – K
K – ST
© Christopher Ting
17 of 46 January 7, 2017
QF206 Week 1
© Christopher Ting
P-P Plot: Nonlinear Payoffs of Options
K = Strike price, ST = Price of asset
Payoff
STK
Long a call Payoff
ST
K
Short a call
Payoff
ST
K
Short a putPayoff
STK
Long a put
22 of 46 January 7, 2017
QF206 Week 1
20070430 20080212 20081125 20090914 20100630 20110414 20120131 20121115 20130904 201406231
1.5
2
2.5
3
3.5
4
4.5
5
Copper, High Grade: Comex Spot Price $ per lb.
Source: WSJ
© Christopher Ting
24 of 46 January 7, 2017
QF206 Week 1
Observations
© Christopher Ting
Every asset class has its own price dynamics.
In fact, at the market microstructure level,
every tradable product exhibits a different market behavior
just like no two people are 100% alike, even for “twins”
Example: Nikkei futures
So, which product to trade?
25 of 46 January 7, 2017
QF206 Week 1
Cash Market versus Derivative Market
Cash index
Singapore MSCI Index
Nikkei 225 Index
Spot rates
EUR/USD
GBP/USD
Futures contracts
SIMSCI futures contracts
Nikkei futures
Futures contracts
EUR-USD
USD-JPY
© Christopher Ting
26 of 46 January 7, 2017
QF206 Week 1
When to Trade?
Big news like non-farm payroll will cause short-term wild swing
When market opens and closes, short-term swings tend to happen
Ever heard of quadruple witching?
“Sell in May and go away,” is it true?
End-of-year tends to be more quiet.
The keywords are, Seasonality, Episodes
© Christopher Ting
27 of 46 January 7, 2017
QF206 Week 1
Where to Trade?
Regulated exchanges
Dark pools
Self-regulatory
Brokered market
Over-the-counter (OTC) market
© Christopher Ting
28 of 46 January 7, 2017
QF206 Week 1
Controversies
Controversy 1: It is a zero-sum game.
Controversy 2: Market is “efficient” in impounding information into prices.
Controversy 3: Big (HFT) player has an “unfair” advantage.
Controversy 4: MARKET is a gigantic Casino.
Money And Return Keep Everybody Trading
© Christopher Ting
29 of 46 January 7, 2017
QF206 Week 1
Why Trade?
In the face of these controversies, why trade?
To invest
To divest
To rebalance the portfolio
To conduct market timing
To encourage entrepreneurship, capital market is needed.
But have we been brainwashed by capitalism?
To hedge against price fluctuation
To manage risks
To make a living!?
Scalping
Market making
© Christopher Ting
30 of 46 January 7, 2017
QF206 Week 1
How to Trade?
This course is mainly about how to trade, and also how not to trade.
Trading strategies, plans, discipline, realistic expectations, common sense are needed
© Christopher Ting
31 of 46 January 7, 2017
QF206 Week 1
© Christopher Ting
Who trade?
How to trade?
+ How many units per trade?
+ How to set the entry and exit points?
5
When to trade?
+ Market opening
+ Market closing
4
Where to trade?
+ SGX
+ Eurex
+ CME
3
What to trade?
+ Alternative
+ Bond
+ Commodity
+ Derivative
+ Equity
+ FX
2
Why trade?
+ Hobby
+ Extra $
+ Bring home the bacon
1
Seek, test, implement
33 of 46 January 7, 2017
QF206 Week 1
Value versus Price
``It is not a case of choosing those that, to the best of one’s judgment, are really the prettiest, nor even those that average opinion genuinely thinks the prettiest. We have reached the third degree where we devote our intelligences to anticipating what average opinion expects the average opinion to be. And there are some, I believe, who practice the fourth, fifth and higher degrees.’’
Image Source: http://bd-beckyblog.blogspot.sg/2011/12/keynes-economics.html
© Christopher Ting
34 of 46 January 7, 2017
QF206 Week 1
Experiment
Pick a number between 1 to 12 you think is the month of birth of instructor’s son.
Pick a number between 1 to 12 you think the majority will pick.
© Christopher Ting
35 of 46 January 7, 2017
QF206 Week 1
Trading focuses more on short-term profit and loss (P&L)
P&L = selling price – buying price
Investment focuses more on medium- to long-term return
Trading versus Investment
price buying
price buying - price sellingReturn
© Christopher Ting
36 of 46 January 7, 2017
QF206 Week 1
A Numerical Illustration
Suppose you sold 3 contracts of SIMSCI futures @ 366.00 and closed your position within the same day @ 365.50.
The P&L would be, per contract, 366.00 – 365.50 = 0.50 index point, which is 10 ticks.
For SIMSCI futures, each index point is S$100.
Therefore, the total profit before costs is
3 × 0.50 × S$100 = S$150.
Suppose your equity, the fund deposited at your broker, is $30,000. The return on equity (ROE) of this trade is 0.5%.
© Christopher Ting
38 of 46 January 7, 2017
QF206 Week 1
Major Types of Buy-side Stock Investors
Institutional investors Mutual fund
Passive exchange trade fund (ETF)
Pension fund
Sovereign wealth fund
Hedge fund
Insurance company
Bank
Corporate nominee
Retail Start-up investor
Family business
Household/individual
© Christopher Ting
39 of 46 January 7, 2017
QF206 Week 1
© Christopher Ting
Types of Traders
Who is at the other side of
my trade?
Source: Trading and Exchanges: Market Microstructure for Practitioners
40 of 46 January 7, 2017
QF206 Week 1
Treachery Thin Lines
Investors are lured into the “speculative mode.”
Often times, profit-seeking speculative traders are lured into the “gambling mode”
© Christopher Ting
41 of 46 January 7, 2017
QF206 Week 1
Market Making
Dealers constantly buy and sell in the market. Post quotes and stand ready to trade, and thereby provide
immediacy and liquidity to the market.
Market makers need capital to finance their inventories. The capital available to them thus limits their ability to offer liquidity.
Because market making is very risky, investors generally do not like to invest in market-making operations.
Market-making firms that have significant external financing typically have excellent risk-management systems that prevent their dealers from generating large losses.
© Christopher Ting
42 of 46 January 7, 2017
QF206 Week 1
Scalping
Dealers often are known by other names. At futures exchanges, dealers are often called scalpers, day traders, locals, or market makers. At many stock exchanges and options exchanges, they are known as designated market makers instead.
Scalpers are dealers who buy and sell for their own account. They try not to hold large positions for more than a few minutes. They are continuously acquiring and unwinding their positions.
© Christopher Ting
43 of 46 January 7, 2017
QF206 Week 1
Trading Strategy 1: Scalping
Intra-day indicators as buy/sell signal from charts
Market making
Picking up nickels in front of a steamroller
http://www.westminster-consulting.com/Files/Blog/Images/steam_roller3.png
© Christopher Ting
44 of 46 January 7, 2017
QF206 Week 1
Portfolio Rebalancing
As time goes on, a portfolio's current asset allocation will drift away from an investor's original target asset allocation. If left unadjusted, the portfolio will either become too risky, or too conservative.
The goal of rebalancing is to move the current asset allocation back in line to the originally planned asset allocation.
In portfolio rebalancing, investors need to trade large quantity, and a liquid market is beneficial.
© Christopher Ting
45 of 46 January 7, 2017
QF206 Week 1
Market Timing
The act of attempting to predict the future direction of the market, typically through the use of technical indicators or economic data.
The practice of switching among mutual fund asset classes in an attempt to profit from the changes in their market outlook. Example: Allocate more into bond market if equity risk increases
Many hedge funds and active mutual funds are trying to beat the market. But on average, their performances are dismal, as academicians would want you to think.
© Christopher Ting
46 of 46 January 7, 2017
QF206 Week 1
Takeaways
Algorithmic/Quantitative trading is about using data, machine learning (Artificial Intelligence), and automation to trade.
Seek and test algo trading strategies using the art and science of statistics to determine what, where, when, and how to trade.
Every listed tradable is unique.
Trading is not about you and other market participants. Remember Keynes’ beauty contest metaphor.
Scalpers provides liquidity.
© Christopher Ting