quantitative trading strategy · closing price 4 bars earlier and including the close of td buy...

1

Upload: others

Post on 11-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

QUANTITATIVE TRADING STRATEGIES

DEAN LEW | QIU JUNDA | JOEL CHONG | ROOBAN RAJ | ZHENG TIAN BAI

QF206 G1

Page 2: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

Tickers: MJNK (Osaka-Japan JPX)

Commissioned: July 18, 2006

Trading Hours: 08:00-14:10

Contract Unit: Nikkei 225 x ¥100

Tick Size: ¥5 (Value per tick: ¥500 per contract)

Settlement: Cash Settlement

NIKKEI 225 MINI

Sample period: 24th May 2016 – 29th Dec 2016

Sample Frequency: Intra-day minute data

Description of Data

Page 3: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

Design and Backtest De-Mark trading strategies toapply to our assigned index (Nikkei 225 Mini).

Identify the Optimal Holding Period and bestperforming strategy.

OBJECTIVES

Page 4: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

BEFORE WE BEGIN..

The frequency of the data is minute data, hence we cannot observe when exactly acondition is met intra minute.

Some strategies require us to compare successive bars, hence we need an entire minuteof data to aggregate before receiving and acting on a signal.

Both of these facts imply that our strategies will only ‘react’ to a signal at the start of thenext period.

Risk Management Policy: Square of any outstanding positions before the end of thetrading session daily & long positions only.

Transaction costs & Margin requirements (Interactive Brokers)

Page 5: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

Buy Setup

Camouflage

Clop

Clopwin

Open

Trap

Page 6: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

Buy Setup

Camouflage

Clop

Clopwin

Open

Trap

Page 7: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

TD Buy Setup’s prerequisite

a Bearish TD Price Flip 9 consecutive closes, each one less than the corresponding close four

bars earlier If at any point, the sequence of 9 consecutive closing prices less than the

closing price 4 bars earlier and including the close of TD Buy Setup Bar9 is interrupted, the developing TD Buy Setup must be cancelled andmust begin anew

Low of Bar 8 or Bar 9 of TD Buy Setup must be less than, or equal to,the lows of Bar 6 and Bar 7 of the TD Buy Setup

6

7

89

Page 8: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TD BUY SETUP

Page 9: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TD BUY SETUPOptimal Holding Period

= 2Performance

Sharpe Ratio -0.98

t-statistic -4.15

Max Drawdown -21.1%

Max Drawdown Duration 8200

Winning Probability 0.39

Reward Risk Ratio 0.82

Num Of Margin Calls 33

(¥)Avg Margin Top Up 656

Page 10: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

Buy Setup

Camouflage

Clop

Clopwin

Open

Trap

Page 11: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

TD Camouflage Buy’s prerequisite

1. The close of the current price bar must be below the close of theprevious price bar,

2. The close of the current price bar must be above the open of thecurrent price bar, and

3. The low of the current price bar must be lower than true low two pricebars earlier.

When this pattern is confirmed, you would initiate long positions on theclose.

1

2

3

ATL

Page 12: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TD CAMOUFLAGE BUY

Page 13: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TD CAMOUFLAGE BUYOptimal Holding Period

= 19Performance

Sharpe Ratio -1.91

t-statistic -4.26

Max Drawdown -39.0%

Max Drawdown Duration 21055

Winning Probability 0

Reward Risk Ratio 0

Num Of Margin Calls 28

(¥)Avg Margin Top Up 2336

Page 14: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

Buy Setup

Camouflage

Clop

Clopwin

Open

Trap

Page 15: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

TD Clop Buy’s prerequisite

A TD Clop buy signal works on the assumption that upside momentumwill continue when the market exceeds the open and close price of theprior price bar.

Requirements for a TD Clop Buy Signal1.The open of the current price bar must be below the close and open

of the previous price bar, and2.The market must subsequently trade above both the open and close

of the previous bar. If these conditions are met, there is a greater chance that upside

momentum will continue into the close.

1

2

Page 16: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TD CLOP BUY

Page 17: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TD CLOP BUYOptimal Holding Period

= 1Performance

Sharpe Ratio -0.42

t-statistic -4.88

Max Drawdown -176%

Max Drawdown Duration 12753

Winning Probability 0.32

Reward Risk Ratio 0.75

Num Of Margin Calls 232

(¥)Avg Margin Top Up 1051

Page 18: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

Buy Setup

Camouflage

Clop

Clopwin

Open

Trap

Page 19: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

TD Clopwin Buy’s prerequisite

A TD Clopwin buy signal examines the relationship between the openand close of the current price bar and the open and close of theprevious price bar.

Requirements for a TD Clopwin Buy Signal1. The open and close of the current price bar must be contained

within the open and close range of the previous price bar, and2. The close of the current price bar must be above the close of the

prior price bar. Meeting these conditions increases the probability that upside

momentum will be sustained into the next price bar, thereby reinforcingthe TD Sequential buy signal.

21

Page 20: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TD CLOPWIN BUY

Page 21: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TD CLOPWIN BUYOptimal Holding Period

= 3Performance

Sharpe Ratio 1.28

t-statistic 15.52

Max Drawdown -79.0%

Max Drawdown Duration 7676

Winning Probability 0.26

Reward Risk Ratio 0.89

Num Of Margin Calls 346

(¥)Avg Margin Top Up 1479

Page 22: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

Buy Setup

Camouflage

Clop

Clopwin

Open

Trap

Page 23: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

TD Open Buy’s prerequisite

1. The current price bar’s open must be less than the low of theprior price bar

2. it must then trade above that low.

1

2

Page 24: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TD OPEN BUY

Page 25: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TD OPEN BUYOptimal Holding Period

= 1Performance

Sharpe Ratio -1.01

t-statistic -4.16

Max Drawdown -35.6%

Max Drawdown Duration 11070

Winning Probability 0.35

Reward Risk Ratio 0.47

Num Of Margin Calls 28

(¥)Avg Margin Top Up 1379

Page 26: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

Buy Setup

Camouflage

Clop

Clopwin

Open

Trap

Page 27: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TOM DEMARK (TD)’S INDICATORS

TDTrap Buy’s prerequisite

1. The open of the current price bar must be within the range ofthe previous price bar

2. The open of the current price bar must then break above thehigh of that range. (upside breakout beyond the confines of thatprice range)

1

2

Page 28: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TD TRAP BUY

Page 29: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

TD TRAP BUYOptimal Holding Period

= 1Performance

Sharpe Ratio 0.70

t-statistic 15.48

Max Drawdown -222%

Max Drawdown Duration 11825

Winning Probability 0.32

Reward Risk Ratio 1.03

Num Of Margin Calls 834

(¥)Avg Margin Top Up 1202.06

Page 30: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

Order Flow Volume Positive volume (buyer-initiated) less negative volume (seller initiated)

Reverse MomentumTrading via Order Flow Aggregate order flow volume to get order flow signal

If for the past x periods order flow signal is positive, sell at the beginning of thenext bar

Position held until order flow signal changes to negative

No positions are held overnight

1810

403

- 1810

ORDER FLOW REVERSION

Page 31: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

ORDER FLOW REVERSION

Page 32: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

ORDER FLOW REVERSIONOptimal Holding Period

= 5Performance

Sharpe Ratio -1.16

t-statistic -43.89

Max Drawdown -183%

Max Drawdown Duration 374

Winning Probability 0.292

Reward Risk Ratio 0.943

Num Of Margin Calls 2680

(¥)Avg Margin Top Up 1152.27

Page 33: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

1. Sharp movements around the November 8th 2016 period and this can be attributed to the increased volatility during the U.S. Presidential Elections.

KEY FINDINGS2. VIX index during this same period was at

its highest since the British Referendumand 44.2% above its 24-day movingaverage.

SUMMARY OF PERFORMANCE METRICS

Page 34: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

LIMITATIONS & IMPROVEMENTS

1. As with all forms of technical analysis, it provides a lagged signal.

2. The past is no guarantee of the future

3. Look at the excel spreadsheet to examine each tradeindividually and tweak the strategy ( Maybe trading one barearlier each time would change the results considerably)

4. Include a stop loss rather than solely based on optimal holdingperiod.This mitigates against black swan events.

Page 35: Quantitative Trading Strategy · closing price 4 bars earlier and including the close of TD Buy Setup Bar 9 is interrupted, the developing TD Buy Setup must be cancelled and must

CONCLUSION

Deeper research into the assigned index is required in orderto formulate a strategy that gives a consistent alpha andproduces acceptable figures in terms of drawdown and Margincalls.

With a high quality tick data, difference in results will besignificant. But often they are costly and difficult to obtain.

Back-testing in reality is very different as it requiresoptimization of parameters and the consideration of allscenarios in order to come up with a suitable approach