SlideShare a Scribd company logo
1 of 46
1
Unifying
Technical Analysis
and
Statistical Arbitrage
Zak Maymin
2
Fascinating Problem
Most people fall into one of two groups.
– Smaller group: Don’t know the difference
between technical analysis and statistical
arbitrage.
– Larger group: Don’t care about the
difference between technical analysis and
statistical arbitrage.
To me, unifying Technical Analysis and
Statistical Arbitrage is one of the most
fascinating problems in Finance Theory.
3
My qualifications with regard
to this subject
I’ve been developing quantitative trading strategies for
more than 30 years
Ph.D. from MIT in mathematics/statistics
Professor of mathematics at Northeastern University
and adjunct professor of finance at NYU
Developing trading strategies in several Wall street
companies such as Susquehanna
With Philip Maymin created and ran Equity Derivative
and Statistical Arbitrage desk at Ellington
With Philip Maymin founded and ran a hedge fund
5
Key Questions
What is Statistical Arbitrage?
What is Technical Analysis?
What do they have in common?
How do they differ?
What are their strengths and
weaknesses?
Can they be combined?
What does it mean to be honest in
developing trading strategies?
6
Statistical Arbitrage Language
SA Speak:
The magnitudes and
decay pattern of the
first twelve
autocorrelations
and the statistical
significance of the
Box-Pierce Q-statistic
suggest the presence
of a high-frequency
predictable component
in stock returns.
Campbell, Lo, MacKinlay 1997
Trades Discovery Language – Probabilistic Model
Performance Language
7
Technical Analysis Language
TA Speak:
The presence of clearly identified
support and resistance levels,
coupled with a one-third
retracement parameter when prices
lie between them, suggests the
presence of strong buying and
selling opportunities in the
near-term.
Campbell, Lo, and MacKinlay 1997
Trades Discovery Language - Charts:
Performance Language
8
Standard Definitions
TA SA
General
“based on statistical
analysis of variables such
as trading volume, price
changes, etc., to identify
patterns”
“mispricing of one or
more assets based on
the expected value of
these assets”
Academic
“predict the future
evolution of asset prices
from the observation of
past prices”
“a long horizon trading
opportunity that
generates a riskless
profit”
Too broad / irrelevant
9
My Definitions of TA and SA
Quantitative trading strategies predict future price action
using quantitative methods applied to historic prices.
Technical Analysis develops quantitative strategies:
– for a single market
– on one trade at a time
– based on visual patterns of historic prices formed on charts.
Statistical Arbitrage develops quantitative strategies:
– for a variety of markets
– on a large number of simultaneous trades
– based on statistical analysis applied to historic prices.
Technical Analysis Patterns 1/2
10
12
TA, SA Strengths and Weaknesses
TA SA
Statistical Language No Yes
TA Tools Language Yes No
Visual Charts Yes No
Probabilistic Model No Yes
Attention to real P&L Yes No
Strategies’
Comparison
No Yes
13
Statistical Arbitrage Example
Example: Momentum Strategy
General Results:
Positive for last 60 years in the U.S.
Profitable in major markets with
exception of Japan.
Jarrow et al., Journal of Financial Economics, 2004
14
Two major types of quantitative
strategies
Momentum Strategy:
– If market goes up – Buy.
– If market goes down – Sell.
Mean-Reversion Strategy:
– If market goes up – Sell.
– If market goes down – Buy.
15
Statistical Arbitrage Example
Example: Momentum Strategy
Specific Results:
Time: 1965 to 1989
Markets: NYSE, AMEX, and Nasdaq – ordinary common shares
Strategy Description:
Long stocks in the top return decile and
Short stocks in the bottom return decile.
Strategies based on formation period of 3m, 6m, 9m, or 12m,
and are held for 3m, 6m, 9m, or 12m.
Strategy includes overlapping holding periods.
Portfolio is rebalanced monthly.
Jegadeesh and Titman, Journal of Finance, 1993 : a famous groundbreaking paper on statistical arbitrage
16
Statistical Arbitrage Example
Example: Momentum Strategy
Specific Results:
Returns of all strategies were positive.
All returns were statistically significant except 3/3.
6-month formation period produces returns of about 1% per month
regardless of the holding period.
The best was 12/3 strategy yielding 1.3% per month.
Jegadeesh and Titman, Journal of Finance, 1993
17
Technical Analysis Example
Isakov and Hollistein, Financial Markets and Portfolio Management, 1999
Example: Crossing of Moving Averages
“One of the simplest, oldest and most widely used technical trading
rule is the moving average rule.”
18
Technical Analysis Example
Isakov and Hollistein, Financial Markets and Portfolio Management, 1999
Example: Crossing of Moving Averages
Time: 1969 to 1997
Markets: Stocks from Swiss Bank Corporation Central Index;
includes all available securities of the Swiss stock market.
Strategy Description:
Strategy is to buy the index when the short-term average crosses
above the long-term average,
and sell the index when it crosses below.
19
Technical Analysis Example
Isakov and Hollistein, Financial Markets and Portfolio Management, 1999
Example: Crossing of Moving Averages
Six various scenarios are reported:
(1,200), (1,100), (1,50), (1,30), (1,10), (1,5).
All are profitable.
The best (1,5) strategy produces 24.30% annually, compared to
6.25% of the buy-and hold strategy.
20
Combining TA and SA
Why not marry the formal science of SA with the
hot visual techniques of TA? What’s the risk?
21
Combining TA and SA
Why not marry the formal science of SA with the
hot visual techniques of TA? What’s the risk?
– Isadora Duncan once
said to George Bernard
Shaw that they should
have a child together.
– "Think of it!" she said,
"With your brains and my
body, what a wonder it
would be."
– Shaw thought for a
moment and replied, "Yes,
but what if it had my body
and your brains?"
22
Combining TA and SA
Is it possible to express the main tools of Technical
Analysis in statistical language?
Example: Moving Average
When technicians look at charts of moving averages,
maybe they study the difference between prices and
moving average?
23
A New Look at Moving Average
Let’s assume that price increments,
dPi = Pi+1 – Pi (non-traditional notations)
are independent.
Then (n=4) P4 – MA4 =
P4 – (P4 + P3 + P2 + P1)/4 =
((P4 – P4 ) + (P4 - P3 )+ (P4 - P2 )+(P4 - P1))/4 =
(( dP3 + (dP3 + dP2 )+(dP3 + dP2 + dP1))/4 =
(3dP3 + 2dP2 + dP1)/4, or
(P4 – MA4 )/(3/2) = 1/6 * dP1 + 2/6 * dP2 + 3/6 * dP3
24
A New Look at Moving Average
For a general n
(Pn – MAn )/((n-1)/2) = m =
1/(n*(n-1)/2) * dP1 + 2/(n*(n-1)/2) * dP2 + … + (n-1)/(n*(n-1)/2) * dPn-1
m is an estimate of expected value of price increment (drift).
The weights of dPi are linearly increasing as observations become
more recent.
Drift is the non-random part of price movement.
The main problem in trading is to discover the shift in the drift.
25
A New Look at Moving Average
Conjecture: This weighting scheme is optimal in the sense
that it minimizes the discovery of the shift in the drift.
In other words, if we know that price increments start with the
negative expected value and at some point during the last n
observations switch to a positive expected value, then, given
a fixed probability of making a wrong call, these weights will
beat any other scheme in the expected length of time passed
after the switch before detecting.
A point aside: If the weights are equal, then m becomes an
average of price increments, a standard function in statistics
for hypothesis testing about expected values. From technical
analysis point of view, the signal becomes proportional to the
difference between the current price and the price n time
periods ago, which is called momentum, an important
example of so-called oscillators.
26
New Stat Arb Trading Strategy
based on new interpretation of MA
Given those weights (probabilities), we can
calculate not only m, but also σ , an estimate of
standard deviation of price increments, and
τ = m / σ
Period: 9/10/1997 (since the start of e-Mini S&P
500 trading) to 9/30/2005.
Markets: Continuous e-Mini futures.
Description of strategy: Mean Reversion.
– Take n = 63 (3 months).
– Calculate t = τ √ (n/2), a normalized τ.
– When t >= 0.5, enter short, when t <= 0.25 exit short.
– When t <= -0.5, enter long, when t >= -0.25 exit long.
27
New Stat Arb Trading Strategy
based on new interpretation of MA
Results: Sharpe Ratio = 1.6, Annualized return = 48.2%,
based on initial capital = Margin + Max Drawdown.
Sharpe ratio definition:
(Expected return – Risk-free rate)/ Standard Deviation of returns
Or just
Expected return / Standard Deviation of returns
Example. Spy (risk-free about 1%)
3 Years 5 Years 10 Years
Mean Ann 14.54% 15.78% 9.68%
St Dev Ann 10.13% 9.52% 14.96%
Sharpe Ratio 1.35 1.56 0.67
28
P&L of the New Strategy
29
Reducing Noise of Market Prices
by SA and TA
Any quantitative trading strategy normally
tries to reduce the noise before producing
buy/sell signals
Two main approaches of SA:
1. Develop a pricing model and analyze
parameters of the resulting probabilistic
distribution of prices. Example: new model with MA
2. Combine together several markets and
trade the resulting portfolio that will have
less noise. Example: Jegadeesh and Titman
30
Reducing Noise of Market Prices
by SA and TA
Two main approaches of TA:
1. Use an Indicator: a smooth function of
prices.
– Example: Moving Average
2. Another approach is to reformat prices.
– Examples:
Point-and-Figure Charts
Renko Charts
31
Point-and-Figure Chart
Columns consists of a series of stacked X’s (rising) or O’s (falling)
Additional points are added once the price changes by more than
box size
New columns are placed to the right of the previous column and are
only added once the price changes direction by more than a
predefined reversal amount.
Box = 1
Reversal = 3
Day Price Move Reversal
P&F
chart
1 50Start ! 57
2 52 56 X
3 55 55X X
4 53 54X O X
5 5255-52=3 ! 53X O X
6 51 52X O X
7 53 51X O
8 5454-51=3 ! 50X
9 56 49
32
How P&F Charts are used
Trendlines
From tradesignal.com
Support and Resistance
33
Can we use P&F Chart in SA?
Can a formula be found that tells us when P&F has
momentum and when it is mean-reverting?
What this formula will produce when applied to a random
walk?
34
Japanese Candlesticks: Renko Charts
The following charts show Intel as a classic high-low-close bar chart and as
a 2.5-unit Renko chart.
From http://www.marketscreen.com
35
Japanese Candlesticks: Renko Charts
Renko chart is a particular case of Point-and-figure chart with a reversal
amount twice the box size.
You specify a "box size" which determines the minimum price change to display.
* If the closing price rises above the top of the previous brick by at least the box size,
one or more white bricks are drawn in new columns (buy).
* If the closing price falls below the bottom of the previous brick by at least the box
size, one or more black bricks are drawn in new columns (sell).
* The height of the bricks is always equal to the box size.
From http://www.marketscreen.com
37
Japanese Candlesticks as SA
Reference: Pastuchov, Theory Probab. Appl.,
2005
Define for Renko Charts
Ratio = Average (Column Length / Box
Size)
He proved that for a Wiener process (a random
walk)
Ratio ≈ 2
Therefore
If Ratio > 2, the market has momentum
If Ratio < 2, the market has mean-reversion
38
Japanese Candlesticks as SA
He tested a trading strategy based on this formula
Time Period: 2002-2003
Markets: Emini and Nasdaq100 futures, intraday prices.
Result: The ratio varies from 1.7 to 1.9. Both markets are
mean reverting.
39
Proof of the formula
Let’s prove that if prices form a random walk
Average Column Length / Box Size ≈ 2
for Renko Charts.
First we’ll check that in simulation
Then we’ll study an elementary proof
And then I’ll show you a formal proof
40
For a random walk,
Average Column Length / Box Size ≈ 2
Assume box size = 1
The main question: What’s the average
column length in Renko charts for a
random walk?
Random walk: we flip a coin.
Heads means market’s up, Value = 1.
Tails means market’s down, Value = 0.
What’s the average number of trials before
we flip heads after the start?
sim_coin = function(p = 1/2,
nsim = 10000, seed = 1){
set.seed(seed)
tosses_to_head <- 0
tails_to_head <- 0
for (i in 1:nsim) {
heads <- 0
tosses <- 0
tails <- 0
while (heads == 0) {
out = rbinom(1, 1, p)
heads <- heads + out
tosses <- tosses + 1
tails <- tails + (1-out)
}
tosses_to_head[i] <- tosses
tails_to_head[i] <- tails
}
ans =c(mean(tosses_to_head),
mean(tails_to_head))
names(ans) =
c("tosses_to_head","tails_to_hea
d")
ans
}
> sim_coin()
tosses_to_head tails_to_head
2.0097 1.0097
> sim_coin(p = 1/6)
tosses_to_head tails_to_head
5.9778 4.9778
41
42
Proofs
Elementary
An average number of trials before first head = an
average number of tails before first head + 1.
p is probability of getting heads. On average, in n throws
you get p*n heads. Therefore, it requires 1/p throws to
expect to get one head.
So, an average number of trials before first head is 1/p.
43
Proofs
Rigorous
p is probability of getting heads. X = the number of
trials before getting first heads.
P(X = k) = (1-p)k-1p
E(X) = 𝑘=0
∞
k(1−p)k−1p = p 𝑘=0
∞
k(1−p)k−1 =
= -p
𝑑
𝑑𝑝 𝑘=0
∞
(1−p)k = -p
𝑑
𝑑𝑝
1
1−(1−𝑝)
= -p
𝑑
𝑑𝑝
1
𝑝
= p
1
𝑝2 =
1
𝑝
44
What have we learned?
SA and TA are different languages dealing with
trading strategies.
TA is visual and analyzes random variables
SA is statistical and analyzes parameters
45
What have we learned?
Some TA strategies can be expressed as SA by
developing probabilistic models and using statistical
analysis.
– Moving averages
– Japanese candlesticks
Can some SA strategies be expressed as TA by finding
the right indicator to chart?
– Simple example: chart the ratio of a pair of securities.
So can TA and SA be combined?
– Almost always yes for a single market with a clear model.
47
Honesty
Hugh Everett in 1956 developed a theory of
parallel universes.
An event that looks strange or impossible to
occur, in our universe, could be explained if the
sample of universes is large enough.
48
Honesty
In trading, if enough strategies are considered, some of them will
become profitable by chance. It does not mean they are worth
pursuing.
Unfortunately, normally there is no way of checking what else was
considered.
Example: Levy(1967) claimed that a trading rule that buys stocks
with current prices that are substantially higher than their average
prices over the past 27 weeks realizes significant abnormal returns.
Jensen and Bennington (1970), however point out that Levy had
come up with his trading rule after examining 68 different trading
rules in his dissertation and because of this expressed skepticism
about his conclusions.
49
Honesty
The greatest problem in developing trading strategies is to
estimate whether the strategy will perform in the future.
Things to check:
– Simplicity of the strategy.
– Number of parameters used in model.
– Uniformity of performance in time.
– How it fits with the portfolio.
50
Unifying
Technical Analysis and Statistical Arbitrage
Zak Maymin

More Related Content

What's hot

Yield Curve Trading Strategies
Yield Curve Trading StrategiesYield Curve Trading Strategies
Yield Curve Trading StrategiesGreg Hunt
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Tradingnattyvirk
 
JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN
JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN
JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN ijcsit
 
Can we use Mixture Models to Predict Market Bottoms? by Brian Christopher - 2...
Can we use Mixture Models to Predict Market Bottoms? by Brian Christopher - 2...Can we use Mixture Models to Predict Market Bottoms? by Brian Christopher - 2...
Can we use Mixture Models to Predict Market Bottoms? by Brian Christopher - 2...QuantInsti
 
Statistical Arbitrage - Hedge Fund Strategies
Statistical Arbitrage - Hedge Fund StrategiesStatistical Arbitrage - Hedge Fund Strategies
Statistical Arbitrage - Hedge Fund StrategiesHedge Fund South Africa
 
Statistical Arbitrage Strategies
Statistical Arbitrage StrategiesStatistical Arbitrage Strategies
Statistical Arbitrage Strategiesguest8fde7a
 
Market behavior research @ bec doms
Market behavior research @ bec domsMarket behavior research @ bec doms
Market behavior research @ bec domsBabasab Patil
 
Trading Style Profile Simon Liu Xinyi
Trading Style Profile Simon Liu XinyiTrading Style Profile Simon Liu Xinyi
Trading Style Profile Simon Liu Xinyisimonliuxinyi
 
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an..."Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...Quantopian
 
Can Individual Investors Beat the Market?
Can Individual Investors Beat the Market?Can Individual Investors Beat the Market?
Can Individual Investors Beat the Market?David Hirshleifer
 
Portfolio management sessions 4&5 (1)
Portfolio management sessions 4&5 (1)Portfolio management sessions 4&5 (1)
Portfolio management sessions 4&5 (1)Aakash Kulkarni
 
Impact of capital asset pricing model (capm) on pakistan
Impact of capital asset pricing model (capm) on pakistanImpact of capital asset pricing model (capm) on pakistan
Impact of capital asset pricing model (capm) on pakistanAlexander Decker
 

What's hot (18)

Introduction to Scalping Futures
Introduction to Scalping FuturesIntroduction to Scalping Futures
Introduction to Scalping Futures
 
Yield Curve Trading Strategies
Yield Curve Trading StrategiesYield Curve Trading Strategies
Yield Curve Trading Strategies
 
Yield Curve Trading Strategies
Yield Curve Trading Strategies Yield Curve Trading Strategies
Yield Curve Trading Strategies
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Trading
 
Core Master Trading Strategies
Core Master Trading StrategiesCore Master Trading Strategies
Core Master Trading Strategies
 
JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN
JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN
JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN
 
Can we use Mixture Models to Predict Market Bottoms? by Brian Christopher - 2...
Can we use Mixture Models to Predict Market Bottoms? by Brian Christopher - 2...Can we use Mixture Models to Predict Market Bottoms? by Brian Christopher - 2...
Can we use Mixture Models to Predict Market Bottoms? by Brian Christopher - 2...
 
Market efficiency
Market efficiencyMarket efficiency
Market efficiency
 
Statistical Arbitrage - Hedge Fund Strategies
Statistical Arbitrage - Hedge Fund StrategiesStatistical Arbitrage - Hedge Fund Strategies
Statistical Arbitrage - Hedge Fund Strategies
 
Statistical Arbitrage Strategies
Statistical Arbitrage StrategiesStatistical Arbitrage Strategies
Statistical Arbitrage Strategies
 
Market behavior research @ bec doms
Market behavior research @ bec domsMarket behavior research @ bec doms
Market behavior research @ bec doms
 
Trading Style Profile Simon Liu Xinyi
Trading Style Profile Simon Liu XinyiTrading Style Profile Simon Liu Xinyi
Trading Style Profile Simon Liu Xinyi
 
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an..."Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
 
Can Individual Investors Beat the Market?
Can Individual Investors Beat the Market?Can Individual Investors Beat the Market?
Can Individual Investors Beat the Market?
 
Perspective on Active & Passive Manageemnt of Fund
Perspective on Active & Passive Manageemnt of FundPerspective on Active & Passive Manageemnt of Fund
Perspective on Active & Passive Manageemnt of Fund
 
Portfolio management sessions 4&5 (1)
Portfolio management sessions 4&5 (1)Portfolio management sessions 4&5 (1)
Portfolio management sessions 4&5 (1)
 
Impact of capital asset pricing model (capm) on pakistan
Impact of capital asset pricing model (capm) on pakistanImpact of capital asset pricing model (capm) on pakistan
Impact of capital asset pricing model (capm) on pakistan
 
Theories of nonrandom price motion
Theories of nonrandom price motionTheories of nonrandom price motion
Theories of nonrandom price motion
 

Similar to Unifying Technical Analysis and Statistical Arbitrage

Technical Trading Rules for the NASDAQ100
Technical Trading Rules for the NASDAQ100Technical Trading Rules for the NASDAQ100
Technical Trading Rules for the NASDAQ100Temi Vasco
 
Beginner's Guide to Technical Analysis
Beginner's Guide to Technical AnalysisBeginner's Guide to Technical Analysis
Beginner's Guide to Technical AnalysisSam Ghosh
 
Statistical Arbitrage Pairs Trading, Long-Short Strategy
Statistical Arbitrage Pairs Trading, Long-Short StrategyStatistical Arbitrage Pairs Trading, Long-Short Strategy
Statistical Arbitrage Pairs Trading, Long-Short Strategyz-score
 
Determination trading puchong
Determination trading puchongDetermination trading puchong
Determination trading puchongReza Sadeghdoost
 
CTAs - Which Trend Is Your Friend?
CTAs - Which Trend Is Your Friend?CTAs - Which Trend Is Your Friend?
CTAs - Which Trend Is Your Friend?Wilhelm Fritsche
 
Technical analysis on selected sectors
 Technical analysis on selected sectors  Technical analysis on selected sectors
Technical analysis on selected sectors Vikrant Pote
 
Intro_technical_Analysis_11_16_15
Intro_technical_Analysis_11_16_15Intro_technical_Analysis_11_16_15
Intro_technical_Analysis_11_16_15Allen Hahn
 
Technical Analysis
Technical AnalysisTechnical Analysis
Technical Analysisvijay popat
 
Melbourne Datathon Challenge 2019 (Buy Low Sell High)
Melbourne Datathon Challenge 2019 (Buy Low Sell High)Melbourne Datathon Challenge 2019 (Buy Low Sell High)
Melbourne Datathon Challenge 2019 (Buy Low Sell High)Vishva Abeyrathne
 
Mathematics for economics
Mathematics for economicsMathematics for economics
Mathematics for economics8891743524
 
Advance iq capital quantitative models
Advance iq capital quantitative modelsAdvance iq capital quantitative models
Advance iq capital quantitative modelsAndrew214
 
Technical analysis (2)
Technical analysis (2)Technical analysis (2)
Technical analysis (2)Anand Verma
 
2017 Why invest in Momentum as a Factor ?
2017 Why invest in Momentum as a Factor ?2017 Why invest in Momentum as a Factor ?
2017 Why invest in Momentum as a Factor ?Frederic Jamet
 
Stock market project for mba finance
Stock market project for mba financeStock market project for mba finance
Stock market project for mba financeMani Dan
 

Similar to Unifying Technical Analysis and Statistical Arbitrage (20)

Technical Trading Rules for the NASDAQ100
Technical Trading Rules for the NASDAQ100Technical Trading Rules for the NASDAQ100
Technical Trading Rules for the NASDAQ100
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Trading
 
Beginner's Guide to Technical Analysis
Beginner's Guide to Technical AnalysisBeginner's Guide to Technical Analysis
Beginner's Guide to Technical Analysis
 
Statistical Arbitrage Pairs Trading, Long-Short Strategy
Statistical Arbitrage Pairs Trading, Long-Short StrategyStatistical Arbitrage Pairs Trading, Long-Short Strategy
Statistical Arbitrage Pairs Trading, Long-Short Strategy
 
Determination trading puchong
Determination trading puchongDetermination trading puchong
Determination trading puchong
 
CTAs - Which Trend Is Your Friend?
CTAs - Which Trend Is Your Friend?CTAs - Which Trend Is Your Friend?
CTAs - Which Trend Is Your Friend?
 
Technical analysis on selected sectors
 Technical analysis on selected sectors  Technical analysis on selected sectors
Technical analysis on selected sectors
 
Statistical Arbitrage
Statistical Arbitrage Statistical Arbitrage
Statistical Arbitrage
 
Intro_technical_Analysis_11_16_15
Intro_technical_Analysis_11_16_15Intro_technical_Analysis_11_16_15
Intro_technical_Analysis_11_16_15
 
Technical Analysis
Technical AnalysisTechnical Analysis
Technical Analysis
 
Trading
TradingTrading
Trading
 
Melbourne Datathon Challenge 2019 (Buy Low Sell High)
Melbourne Datathon Challenge 2019 (Buy Low Sell High)Melbourne Datathon Challenge 2019 (Buy Low Sell High)
Melbourne Datathon Challenge 2019 (Buy Low Sell High)
 
Mathematics for economics
Mathematics for economicsMathematics for economics
Mathematics for economics
 
Economics for entrepreneurs
Economics for entrepreneurs Economics for entrepreneurs
Economics for entrepreneurs
 
Fundamental n Technical analysis
Fundamental n Technical analysisFundamental n Technical analysis
Fundamental n Technical analysis
 
Advance IQ Capital Quantitative Models
Advance IQ Capital Quantitative ModelsAdvance IQ Capital Quantitative Models
Advance IQ Capital Quantitative Models
 
Advance iq capital quantitative models
Advance iq capital quantitative modelsAdvance iq capital quantitative models
Advance iq capital quantitative models
 
Technical analysis (2)
Technical analysis (2)Technical analysis (2)
Technical analysis (2)
 
2017 Why invest in Momentum as a Factor ?
2017 Why invest in Momentum as a Factor ?2017 Why invest in Momentum as a Factor ?
2017 Why invest in Momentum as a Factor ?
 
Stock market project for mba finance
Stock market project for mba financeStock market project for mba finance
Stock market project for mba finance
 

Recently uploaded

call girls in Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in  Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in  Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Quantitative Analysis of Retail Sector Companies
Quantitative Analysis of Retail Sector CompaniesQuantitative Analysis of Retail Sector Companies
Quantitative Analysis of Retail Sector Companiesprashantbhati354
 
Vp Girls near me Delhi Call Now or WhatsApp
Vp Girls near me Delhi Call Now or WhatsAppVp Girls near me Delhi Call Now or WhatsApp
Vp Girls near me Delhi Call Now or WhatsAppmiss dipika
 
Economics, Commerce and Trade Management: An International Journal (ECTIJ)
Economics, Commerce and Trade Management: An International Journal (ECTIJ)Economics, Commerce and Trade Management: An International Journal (ECTIJ)
Economics, Commerce and Trade Management: An International Journal (ECTIJ)ECTIJ
 
Tenets of Physiocracy History of Economic
Tenets of Physiocracy History of EconomicTenets of Physiocracy History of Economic
Tenets of Physiocracy History of Economiccinemoviesu
 
Call Girls Near Delhi Pride Hotel, New Delhi|9873777170
Call Girls Near Delhi Pride Hotel, New Delhi|9873777170Call Girls Near Delhi Pride Hotel, New Delhi|9873777170
Call Girls Near Delhi Pride Hotel, New Delhi|9873777170Sonam Pathan
 
government_intervention_in_business_ownership[1].pdf
government_intervention_in_business_ownership[1].pdfgovernment_intervention_in_business_ownership[1].pdf
government_intervention_in_business_ownership[1].pdfshaunmashale756
 
NO1 WorldWide Love marriage specialist baba ji Amil Baba Kala ilam powerful v...
NO1 WorldWide Love marriage specialist baba ji Amil Baba Kala ilam powerful v...NO1 WorldWide Love marriage specialist baba ji Amil Baba Kala ilam powerful v...
NO1 WorldWide Love marriage specialist baba ji Amil Baba Kala ilam powerful v...Amil baba
 
原版1:1复刻温哥华岛大学毕业证Vancouver毕业证留信学历认证
原版1:1复刻温哥华岛大学毕业证Vancouver毕业证留信学历认证原版1:1复刻温哥华岛大学毕业证Vancouver毕业证留信学历认证
原版1:1复刻温哥华岛大学毕业证Vancouver毕业证留信学历认证rjrjkk
 
BPPG response - Options for Defined Benefit schemes - 19Apr24.pdf
BPPG response - Options for Defined Benefit schemes - 19Apr24.pdfBPPG response - Options for Defined Benefit schemes - 19Apr24.pdf
BPPG response - Options for Defined Benefit schemes - 19Apr24.pdfHenry Tapper
 
AfRESFullPaper22018EmpiricalPerformanceofRealEstateInvestmentTrustsandShareho...
AfRESFullPaper22018EmpiricalPerformanceofRealEstateInvestmentTrustsandShareho...AfRESFullPaper22018EmpiricalPerformanceofRealEstateInvestmentTrustsandShareho...
AfRESFullPaper22018EmpiricalPerformanceofRealEstateInvestmentTrustsandShareho...yordanosyohannes2
 
Classical Theory of Macroeconomics by Adam Smith
Classical Theory of Macroeconomics by Adam SmithClassical Theory of Macroeconomics by Adam Smith
Classical Theory of Macroeconomics by Adam SmithAdamYassin2
 
Stock Market Brief Deck FOR 4/17 video.pdf
Stock Market Brief Deck FOR 4/17 video.pdfStock Market Brief Deck FOR 4/17 video.pdf
Stock Market Brief Deck FOR 4/17 video.pdfMichael Silva
 
Bladex 1Q24 Earning Results Presentation
Bladex 1Q24 Earning Results PresentationBladex 1Q24 Earning Results Presentation
Bladex 1Q24 Earning Results PresentationBladex
 
Managing Finances in a Small Business (yes).pdf
Managing Finances  in a Small Business (yes).pdfManaging Finances  in a Small Business (yes).pdf
Managing Finances in a Small Business (yes).pdfmar yame
 
Governor Olli Rehn: Dialling back monetary restraint
Governor Olli Rehn: Dialling back monetary restraintGovernor Olli Rehn: Dialling back monetary restraint
Governor Olli Rehn: Dialling back monetary restraintSuomen Pankki
 
NO1 WorldWide online istikhara for love marriage vashikaran specialist love p...
NO1 WorldWide online istikhara for love marriage vashikaran specialist love p...NO1 WorldWide online istikhara for love marriage vashikaran specialist love p...
NO1 WorldWide online istikhara for love marriage vashikaran specialist love p...Amil Baba Dawood bangali
 
Financial Leverage Definition, Advantages, and Disadvantages
Financial Leverage Definition, Advantages, and DisadvantagesFinancial Leverage Definition, Advantages, and Disadvantages
Financial Leverage Definition, Advantages, and Disadvantagesjayjaymabutot13
 
(中央兰开夏大学毕业证学位证成绩单-案例)
(中央兰开夏大学毕业证学位证成绩单-案例)(中央兰开夏大学毕业证学位证成绩单-案例)
(中央兰开夏大学毕业证学位证成绩单-案例)twfkn8xj
 

Recently uploaded (20)

call girls in Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in  Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in  Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Quantitative Analysis of Retail Sector Companies
Quantitative Analysis of Retail Sector CompaniesQuantitative Analysis of Retail Sector Companies
Quantitative Analysis of Retail Sector Companies
 
Vp Girls near me Delhi Call Now or WhatsApp
Vp Girls near me Delhi Call Now or WhatsAppVp Girls near me Delhi Call Now or WhatsApp
Vp Girls near me Delhi Call Now or WhatsApp
 
Economics, Commerce and Trade Management: An International Journal (ECTIJ)
Economics, Commerce and Trade Management: An International Journal (ECTIJ)Economics, Commerce and Trade Management: An International Journal (ECTIJ)
Economics, Commerce and Trade Management: An International Journal (ECTIJ)
 
Tenets of Physiocracy History of Economic
Tenets of Physiocracy History of EconomicTenets of Physiocracy History of Economic
Tenets of Physiocracy History of Economic
 
Call Girls Near Delhi Pride Hotel, New Delhi|9873777170
Call Girls Near Delhi Pride Hotel, New Delhi|9873777170Call Girls Near Delhi Pride Hotel, New Delhi|9873777170
Call Girls Near Delhi Pride Hotel, New Delhi|9873777170
 
government_intervention_in_business_ownership[1].pdf
government_intervention_in_business_ownership[1].pdfgovernment_intervention_in_business_ownership[1].pdf
government_intervention_in_business_ownership[1].pdf
 
NO1 WorldWide Love marriage specialist baba ji Amil Baba Kala ilam powerful v...
NO1 WorldWide Love marriage specialist baba ji Amil Baba Kala ilam powerful v...NO1 WorldWide Love marriage specialist baba ji Amil Baba Kala ilam powerful v...
NO1 WorldWide Love marriage specialist baba ji Amil Baba Kala ilam powerful v...
 
原版1:1复刻温哥华岛大学毕业证Vancouver毕业证留信学历认证
原版1:1复刻温哥华岛大学毕业证Vancouver毕业证留信学历认证原版1:1复刻温哥华岛大学毕业证Vancouver毕业证留信学历认证
原版1:1复刻温哥华岛大学毕业证Vancouver毕业证留信学历认证
 
BPPG response - Options for Defined Benefit schemes - 19Apr24.pdf
BPPG response - Options for Defined Benefit schemes - 19Apr24.pdfBPPG response - Options for Defined Benefit schemes - 19Apr24.pdf
BPPG response - Options for Defined Benefit schemes - 19Apr24.pdf
 
AfRESFullPaper22018EmpiricalPerformanceofRealEstateInvestmentTrustsandShareho...
AfRESFullPaper22018EmpiricalPerformanceofRealEstateInvestmentTrustsandShareho...AfRESFullPaper22018EmpiricalPerformanceofRealEstateInvestmentTrustsandShareho...
AfRESFullPaper22018EmpiricalPerformanceofRealEstateInvestmentTrustsandShareho...
 
Classical Theory of Macroeconomics by Adam Smith
Classical Theory of Macroeconomics by Adam SmithClassical Theory of Macroeconomics by Adam Smith
Classical Theory of Macroeconomics by Adam Smith
 
Stock Market Brief Deck FOR 4/17 video.pdf
Stock Market Brief Deck FOR 4/17 video.pdfStock Market Brief Deck FOR 4/17 video.pdf
Stock Market Brief Deck FOR 4/17 video.pdf
 
Bladex 1Q24 Earning Results Presentation
Bladex 1Q24 Earning Results PresentationBladex 1Q24 Earning Results Presentation
Bladex 1Q24 Earning Results Presentation
 
Managing Finances in a Small Business (yes).pdf
Managing Finances  in a Small Business (yes).pdfManaging Finances  in a Small Business (yes).pdf
Managing Finances in a Small Business (yes).pdf
 
Governor Olli Rehn: Dialling back monetary restraint
Governor Olli Rehn: Dialling back monetary restraintGovernor Olli Rehn: Dialling back monetary restraint
Governor Olli Rehn: Dialling back monetary restraint
 
NO1 WorldWide online istikhara for love marriage vashikaran specialist love p...
NO1 WorldWide online istikhara for love marriage vashikaran specialist love p...NO1 WorldWide online istikhara for love marriage vashikaran specialist love p...
NO1 WorldWide online istikhara for love marriage vashikaran specialist love p...
 
Q1 2024 Newsletter | Financial Synergies Wealth Advisors
Q1 2024 Newsletter | Financial Synergies Wealth AdvisorsQ1 2024 Newsletter | Financial Synergies Wealth Advisors
Q1 2024 Newsletter | Financial Synergies Wealth Advisors
 
Financial Leverage Definition, Advantages, and Disadvantages
Financial Leverage Definition, Advantages, and DisadvantagesFinancial Leverage Definition, Advantages, and Disadvantages
Financial Leverage Definition, Advantages, and Disadvantages
 
(中央兰开夏大学毕业证学位证成绩单-案例)
(中央兰开夏大学毕业证学位证成绩单-案例)(中央兰开夏大学毕业证学位证成绩单-案例)
(中央兰开夏大学毕业证学位证成绩单-案例)
 

Unifying Technical Analysis and Statistical Arbitrage

  • 2. 2 Fascinating Problem Most people fall into one of two groups. – Smaller group: Don’t know the difference between technical analysis and statistical arbitrage. – Larger group: Don’t care about the difference between technical analysis and statistical arbitrage. To me, unifying Technical Analysis and Statistical Arbitrage is one of the most fascinating problems in Finance Theory.
  • 3. 3 My qualifications with regard to this subject I’ve been developing quantitative trading strategies for more than 30 years Ph.D. from MIT in mathematics/statistics Professor of mathematics at Northeastern University and adjunct professor of finance at NYU Developing trading strategies in several Wall street companies such as Susquehanna With Philip Maymin created and ran Equity Derivative and Statistical Arbitrage desk at Ellington With Philip Maymin founded and ran a hedge fund
  • 4. 5 Key Questions What is Statistical Arbitrage? What is Technical Analysis? What do they have in common? How do they differ? What are their strengths and weaknesses? Can they be combined? What does it mean to be honest in developing trading strategies?
  • 5. 6 Statistical Arbitrage Language SA Speak: The magnitudes and decay pattern of the first twelve autocorrelations and the statistical significance of the Box-Pierce Q-statistic suggest the presence of a high-frequency predictable component in stock returns. Campbell, Lo, MacKinlay 1997 Trades Discovery Language – Probabilistic Model Performance Language
  • 6. 7 Technical Analysis Language TA Speak: The presence of clearly identified support and resistance levels, coupled with a one-third retracement parameter when prices lie between them, suggests the presence of strong buying and selling opportunities in the near-term. Campbell, Lo, and MacKinlay 1997 Trades Discovery Language - Charts: Performance Language
  • 7. 8 Standard Definitions TA SA General “based on statistical analysis of variables such as trading volume, price changes, etc., to identify patterns” “mispricing of one or more assets based on the expected value of these assets” Academic “predict the future evolution of asset prices from the observation of past prices” “a long horizon trading opportunity that generates a riskless profit” Too broad / irrelevant
  • 8. 9 My Definitions of TA and SA Quantitative trading strategies predict future price action using quantitative methods applied to historic prices. Technical Analysis develops quantitative strategies: – for a single market – on one trade at a time – based on visual patterns of historic prices formed on charts. Statistical Arbitrage develops quantitative strategies: – for a variety of markets – on a large number of simultaneous trades – based on statistical analysis applied to historic prices.
  • 10. 12 TA, SA Strengths and Weaknesses TA SA Statistical Language No Yes TA Tools Language Yes No Visual Charts Yes No Probabilistic Model No Yes Attention to real P&L Yes No Strategies’ Comparison No Yes
  • 11. 13 Statistical Arbitrage Example Example: Momentum Strategy General Results: Positive for last 60 years in the U.S. Profitable in major markets with exception of Japan. Jarrow et al., Journal of Financial Economics, 2004
  • 12. 14 Two major types of quantitative strategies Momentum Strategy: – If market goes up – Buy. – If market goes down – Sell. Mean-Reversion Strategy: – If market goes up – Sell. – If market goes down – Buy.
  • 13. 15 Statistical Arbitrage Example Example: Momentum Strategy Specific Results: Time: 1965 to 1989 Markets: NYSE, AMEX, and Nasdaq – ordinary common shares Strategy Description: Long stocks in the top return decile and Short stocks in the bottom return decile. Strategies based on formation period of 3m, 6m, 9m, or 12m, and are held for 3m, 6m, 9m, or 12m. Strategy includes overlapping holding periods. Portfolio is rebalanced monthly. Jegadeesh and Titman, Journal of Finance, 1993 : a famous groundbreaking paper on statistical arbitrage
  • 14. 16 Statistical Arbitrage Example Example: Momentum Strategy Specific Results: Returns of all strategies were positive. All returns were statistically significant except 3/3. 6-month formation period produces returns of about 1% per month regardless of the holding period. The best was 12/3 strategy yielding 1.3% per month. Jegadeesh and Titman, Journal of Finance, 1993
  • 15. 17 Technical Analysis Example Isakov and Hollistein, Financial Markets and Portfolio Management, 1999 Example: Crossing of Moving Averages “One of the simplest, oldest and most widely used technical trading rule is the moving average rule.”
  • 16. 18 Technical Analysis Example Isakov and Hollistein, Financial Markets and Portfolio Management, 1999 Example: Crossing of Moving Averages Time: 1969 to 1997 Markets: Stocks from Swiss Bank Corporation Central Index; includes all available securities of the Swiss stock market. Strategy Description: Strategy is to buy the index when the short-term average crosses above the long-term average, and sell the index when it crosses below.
  • 17. 19 Technical Analysis Example Isakov and Hollistein, Financial Markets and Portfolio Management, 1999 Example: Crossing of Moving Averages Six various scenarios are reported: (1,200), (1,100), (1,50), (1,30), (1,10), (1,5). All are profitable. The best (1,5) strategy produces 24.30% annually, compared to 6.25% of the buy-and hold strategy.
  • 18. 20 Combining TA and SA Why not marry the formal science of SA with the hot visual techniques of TA? What’s the risk?
  • 19. 21 Combining TA and SA Why not marry the formal science of SA with the hot visual techniques of TA? What’s the risk? – Isadora Duncan once said to George Bernard Shaw that they should have a child together. – "Think of it!" she said, "With your brains and my body, what a wonder it would be." – Shaw thought for a moment and replied, "Yes, but what if it had my body and your brains?"
  • 20. 22 Combining TA and SA Is it possible to express the main tools of Technical Analysis in statistical language? Example: Moving Average When technicians look at charts of moving averages, maybe they study the difference between prices and moving average?
  • 21. 23 A New Look at Moving Average Let’s assume that price increments, dPi = Pi+1 – Pi (non-traditional notations) are independent. Then (n=4) P4 – MA4 = P4 – (P4 + P3 + P2 + P1)/4 = ((P4 – P4 ) + (P4 - P3 )+ (P4 - P2 )+(P4 - P1))/4 = (( dP3 + (dP3 + dP2 )+(dP3 + dP2 + dP1))/4 = (3dP3 + 2dP2 + dP1)/4, or (P4 – MA4 )/(3/2) = 1/6 * dP1 + 2/6 * dP2 + 3/6 * dP3
  • 22. 24 A New Look at Moving Average For a general n (Pn – MAn )/((n-1)/2) = m = 1/(n*(n-1)/2) * dP1 + 2/(n*(n-1)/2) * dP2 + … + (n-1)/(n*(n-1)/2) * dPn-1 m is an estimate of expected value of price increment (drift). The weights of dPi are linearly increasing as observations become more recent. Drift is the non-random part of price movement. The main problem in trading is to discover the shift in the drift.
  • 23. 25 A New Look at Moving Average Conjecture: This weighting scheme is optimal in the sense that it minimizes the discovery of the shift in the drift. In other words, if we know that price increments start with the negative expected value and at some point during the last n observations switch to a positive expected value, then, given a fixed probability of making a wrong call, these weights will beat any other scheme in the expected length of time passed after the switch before detecting. A point aside: If the weights are equal, then m becomes an average of price increments, a standard function in statistics for hypothesis testing about expected values. From technical analysis point of view, the signal becomes proportional to the difference between the current price and the price n time periods ago, which is called momentum, an important example of so-called oscillators.
  • 24. 26 New Stat Arb Trading Strategy based on new interpretation of MA Given those weights (probabilities), we can calculate not only m, but also σ , an estimate of standard deviation of price increments, and τ = m / σ Period: 9/10/1997 (since the start of e-Mini S&P 500 trading) to 9/30/2005. Markets: Continuous e-Mini futures. Description of strategy: Mean Reversion. – Take n = 63 (3 months). – Calculate t = τ √ (n/2), a normalized τ. – When t >= 0.5, enter short, when t <= 0.25 exit short. – When t <= -0.5, enter long, when t >= -0.25 exit long.
  • 25. 27 New Stat Arb Trading Strategy based on new interpretation of MA Results: Sharpe Ratio = 1.6, Annualized return = 48.2%, based on initial capital = Margin + Max Drawdown. Sharpe ratio definition: (Expected return – Risk-free rate)/ Standard Deviation of returns Or just Expected return / Standard Deviation of returns Example. Spy (risk-free about 1%) 3 Years 5 Years 10 Years Mean Ann 14.54% 15.78% 9.68% St Dev Ann 10.13% 9.52% 14.96% Sharpe Ratio 1.35 1.56 0.67
  • 26. 28 P&L of the New Strategy
  • 27. 29 Reducing Noise of Market Prices by SA and TA Any quantitative trading strategy normally tries to reduce the noise before producing buy/sell signals Two main approaches of SA: 1. Develop a pricing model and analyze parameters of the resulting probabilistic distribution of prices. Example: new model with MA 2. Combine together several markets and trade the resulting portfolio that will have less noise. Example: Jegadeesh and Titman
  • 28. 30 Reducing Noise of Market Prices by SA and TA Two main approaches of TA: 1. Use an Indicator: a smooth function of prices. – Example: Moving Average 2. Another approach is to reformat prices. – Examples: Point-and-Figure Charts Renko Charts
  • 29. 31 Point-and-Figure Chart Columns consists of a series of stacked X’s (rising) or O’s (falling) Additional points are added once the price changes by more than box size New columns are placed to the right of the previous column and are only added once the price changes direction by more than a predefined reversal amount. Box = 1 Reversal = 3 Day Price Move Reversal P&F chart 1 50Start ! 57 2 52 56 X 3 55 55X X 4 53 54X O X 5 5255-52=3 ! 53X O X 6 51 52X O X 7 53 51X O 8 5454-51=3 ! 50X 9 56 49
  • 30. 32 How P&F Charts are used Trendlines From tradesignal.com Support and Resistance
  • 31. 33 Can we use P&F Chart in SA? Can a formula be found that tells us when P&F has momentum and when it is mean-reverting? What this formula will produce when applied to a random walk?
  • 32. 34 Japanese Candlesticks: Renko Charts The following charts show Intel as a classic high-low-close bar chart and as a 2.5-unit Renko chart. From http://www.marketscreen.com
  • 33. 35 Japanese Candlesticks: Renko Charts Renko chart is a particular case of Point-and-figure chart with a reversal amount twice the box size. You specify a "box size" which determines the minimum price change to display. * If the closing price rises above the top of the previous brick by at least the box size, one or more white bricks are drawn in new columns (buy). * If the closing price falls below the bottom of the previous brick by at least the box size, one or more black bricks are drawn in new columns (sell). * The height of the bricks is always equal to the box size. From http://www.marketscreen.com
  • 34. 37 Japanese Candlesticks as SA Reference: Pastuchov, Theory Probab. Appl., 2005 Define for Renko Charts Ratio = Average (Column Length / Box Size) He proved that for a Wiener process (a random walk) Ratio ≈ 2 Therefore If Ratio > 2, the market has momentum If Ratio < 2, the market has mean-reversion
  • 35. 38 Japanese Candlesticks as SA He tested a trading strategy based on this formula Time Period: 2002-2003 Markets: Emini and Nasdaq100 futures, intraday prices. Result: The ratio varies from 1.7 to 1.9. Both markets are mean reverting.
  • 36. 39 Proof of the formula Let’s prove that if prices form a random walk Average Column Length / Box Size ≈ 2 for Renko Charts. First we’ll check that in simulation Then we’ll study an elementary proof And then I’ll show you a formal proof
  • 37. 40 For a random walk, Average Column Length / Box Size ≈ 2 Assume box size = 1 The main question: What’s the average column length in Renko charts for a random walk? Random walk: we flip a coin. Heads means market’s up, Value = 1. Tails means market’s down, Value = 0. What’s the average number of trials before we flip heads after the start?
  • 38. sim_coin = function(p = 1/2, nsim = 10000, seed = 1){ set.seed(seed) tosses_to_head <- 0 tails_to_head <- 0 for (i in 1:nsim) { heads <- 0 tosses <- 0 tails <- 0 while (heads == 0) { out = rbinom(1, 1, p) heads <- heads + out tosses <- tosses + 1 tails <- tails + (1-out) } tosses_to_head[i] <- tosses tails_to_head[i] <- tails } ans =c(mean(tosses_to_head), mean(tails_to_head)) names(ans) = c("tosses_to_head","tails_to_hea d") ans } > sim_coin() tosses_to_head tails_to_head 2.0097 1.0097 > sim_coin(p = 1/6) tosses_to_head tails_to_head 5.9778 4.9778 41
  • 39. 42 Proofs Elementary An average number of trials before first head = an average number of tails before first head + 1. p is probability of getting heads. On average, in n throws you get p*n heads. Therefore, it requires 1/p throws to expect to get one head. So, an average number of trials before first head is 1/p.
  • 40. 43 Proofs Rigorous p is probability of getting heads. X = the number of trials before getting first heads. P(X = k) = (1-p)k-1p E(X) = 𝑘=0 ∞ k(1−p)k−1p = p 𝑘=0 ∞ k(1−p)k−1 = = -p 𝑑 𝑑𝑝 𝑘=0 ∞ (1−p)k = -p 𝑑 𝑑𝑝 1 1−(1−𝑝) = -p 𝑑 𝑑𝑝 1 𝑝 = p 1 𝑝2 = 1 𝑝
  • 41. 44 What have we learned? SA and TA are different languages dealing with trading strategies. TA is visual and analyzes random variables SA is statistical and analyzes parameters
  • 42. 45 What have we learned? Some TA strategies can be expressed as SA by developing probabilistic models and using statistical analysis. – Moving averages – Japanese candlesticks Can some SA strategies be expressed as TA by finding the right indicator to chart? – Simple example: chart the ratio of a pair of securities. So can TA and SA be combined? – Almost always yes for a single market with a clear model.
  • 43. 47 Honesty Hugh Everett in 1956 developed a theory of parallel universes. An event that looks strange or impossible to occur, in our universe, could be explained if the sample of universes is large enough.
  • 44. 48 Honesty In trading, if enough strategies are considered, some of them will become profitable by chance. It does not mean they are worth pursuing. Unfortunately, normally there is no way of checking what else was considered. Example: Levy(1967) claimed that a trading rule that buys stocks with current prices that are substantially higher than their average prices over the past 27 weeks realizes significant abnormal returns. Jensen and Bennington (1970), however point out that Levy had come up with his trading rule after examining 68 different trading rules in his dissertation and because of this expressed skepticism about his conclusions.
  • 45. 49 Honesty The greatest problem in developing trading strategies is to estimate whether the strategy will perform in the future. Things to check: – Simplicity of the strategy. – Number of parameters used in model. – Uniformity of performance in time. – How it fits with the portfolio.
  • 46. 50 Unifying Technical Analysis and Statistical Arbitrage Zak Maymin