Trading leveraged derivatives using only technical analysis or speculative analysis can lead to windfall losses for even the most disciplined trader and investor. Statistics are often an ignored area of work when it comes to derivatives trading. Our talk shall focus upon how volatility can be used for dynamically adjusting the stop losses. It will talk about how correlation is an essential method to diversify the class of derivatives being traded or hedged. It will focus on co-integration as a key method to distinguish a mean reverting time series to a non-mean reverting time series. It will touch upon other essential time series econometrics like OU process, VRT as well as statistical tools like PCA, ARCH, GARCH etc. which are essential for derivatives pricing and forecasting the volatility.
Statistics - The Missing Link Between Technical Analysis and Algorithmic Trading by Manish Jalan at QuantCon 2016
1. Statistics:
Missing Link between Technical Analysis and
Algorithmic Trading
Manish Jalan
Managing Partner and Quantitative Research Head
SG Analytics, Pune/Mumbai, India
APRIL, 2016
2. The statistical modeling
building blocks
Define End Goal Define Set of Rules
Collect
Data
Back-test Optimize Simulate
Connect to
OMS
Connect to
Exchange
Manage Risk
Improve and Maintain
Modeling Building
2Statistics: Missing Link between Technical Analysis and Algorithmic Trading
3. Why Mathematics & Statistics?
Pure Technical Models
Moderate ROI when model is working
Large draw-downs when model stops
Long stretch of continuous bleeding in
returns
User might lose confidence
Technical & Statistical Models
Superior ROI when model is working
Flattish ROI when model stops
Shorter stretch of continuous flattish
period
User can diversify and make multi-models
3Statistics: Missing Link between Technical Analysis and Algorithmic Trading
5. The Volatility
5
2
1
1
( )
n
i
i
x
n
Volatility
Is deviation from mean
in daily, 5 min, 10 min etc.
5Statistics: Missing Link between Technical Analysis and Algorithmic Trading
6. The normal distribution
Normal
Distribution
Most popular data distribution
Standard normal distribution curve
Source: Wikipedia
6Statistics: Missing Link between Technical Analysis and Algorithmic Trading
7. Mean ix
n
Standard
deviation
2
1
1
( )
n
i
i
x
n
Variance
2 2
1
1
( )
n
i
i
x
n
Correlation
( , )
x y
Cov x y
r
Beta
( , )
( )
s p
s
p
Cov r r
Var r
The normal distribution
7Statistics: Missing Link between Technical Analysis and Algorithmic Trading
8. Normal vs. other distributions
CAUCHY
DISTRIBUTION
BETA
DISTRIBUTION
BINOMIAL
DISTRIBUTION
CHI-SQUARE
DISTRIBUTION
LAPLACE
DISTRIBUTION
POISSON
DISTRIBUTION
EXPONENTIAL
DISTRIBUTION
8Statistics: Missing Link between Technical Analysis and Algorithmic Trading
9. Behavior of the time-series of data
– Mean reverting, Trending or Random Walk
– 50-60% time series is random walk
– Focus should be on the other 40%
Key elements: Mean and Variance
Different behaviors
– Mean reverting (E.g.: Pairs Trading)
– Non-mean reverting (E.g.: Trend)
– Constant variance (E.g.: Pairs Trading)
– Increasing variance (E.g.: Trend)
Time series modeling
9Statistics: Missing Link between Technical Analysis and Algorithmic Trading
10. Mean and Variance
0
2
4
6
8
10
12
Constant Mean
0
2
4
6
8
10
Constant Variance
0
10
20
30
40
Increasing Mean
0
5
10
15
20
25
30
Increasing Variance
10Statistics: Missing Link between Technical Analysis and Algorithmic Trading
11. Mean reversion modeling
Co-integration: Stationary mean and variance
Time series is stationary when
– The mean is constant
– The variance is constant
Test for co-integration
– If |r| < 1, the series is stationary
– If |r| = 1, it is non-stationary (Random walk)
Most popular test: ADF (Augmented Dickey
Fuller)
If ADF < -3.2 (95% probability of co-integrated
series)
1t t ty ry e
11Statistics: Missing Link between Technical Analysis and Algorithmic Trading
12. Variance Ratio Test: Test for variance alone
Useful when mean is varying w.r.t to the time
Ornstein-Uhlenbeck Process: Test for mean reversion alone
Useful when only mean reversion rate matters
Generic time series modeling
( )
( )
( )
k t
t
Variance r
VR k
k Variance r
( )t t tdx x dt dW
12Statistics: Missing Link between Technical Analysis and Algorithmic Trading
19. 1055.00 2
1054.00 7
1053.00 15
1052.00 25
1051.00 31
1050.00
42 1049.00
20 1048.00
15 1047.00
11 1046.00
6 1045.00
1 2 1 3 1 4 1 5
0 1 2 3 5( ) ( ) ( ) ( )eqVB B B B B B
1 2 1 3 1 4 1 5
0 1 2 3 5( ) ( ) ( ) ( )eqVA A A A A A
( , ) eq
eq
VA
f Bid Ask
VB
High frequency example – for execution
Bid-Ask Density function using equivalent volumes
19Statistics: Missing Link between Technical Analysis and Algorithmic Trading
20. High frequency example
Short Term Upward
Momentum
10:00:00 10:00:30 10:01:00
Trades hitting the Bid
Trades lifted on the Offer
10:01:30
20Statistics: Missing Link between Technical Analysis and Algorithmic Trading
21. 21
Conclusion
Statistical modeling can help you reduce draw-downs in technical analysis
Statistics can help filter for high probability trades
Statistics can enhance the returns on capital deployed
Technical analysis can be used for entry / exits and statistics can be used
for filtering those entries and exits
Statistics can help you re-fine your stop losses and portfolio optimization
Statistics can help in making trade execution better and reduce slippages
per trade
Statistics: Missing Link between Technical Analysis and Algorithmic Trading
22. 22
Recommended referrals
Prop trading
• Statistical Arbitrage:
Algorithmic Trading
Insights and Techniques
by Andrew Pole
• High-Frequency Trading: A
Guide to Algorithmic
Strategies and Trading
Systems by Irene Aldridge
• The Encyclopedia of
Trading Strategies by
Jeffrey Owen and Donna
McCormick
Agency trading
• Algorithmic Trading and
DMA: An introduction to
direct access trading
strategies by Barry
Johnson
• Quantitative Trading:
How to Build Your Own
Algorithmic Trading
Business by Ernset P. Chan
Web forums
Wilmott forum:
www.wilmott.com
Nuclear Phynance:
www.nuclearphynance.com
Statistics: Missing Link between Technical Analysis and Algorithmic Trading