Presentation is loading. Please wait.

Presentation is loading. Please wait.

TD Strategies QF206: Quantitative Trading Strategies

Similar presentations


Presentation on theme: "TD Strategies QF206: Quantitative Trading Strategies"— Presentation transcript:

1 TD Strategies QF206: Quantitative Trading Strategies
Gui Feng | Darren Lew | Boon Hao | Charlton Tan | Shao Jie | T Kumereash

2 Introduction TD Strategies Equity Curves Order Flow

3 INTRODUCTION SGX Nikkei 225 Index Futures Key Information
1. Derivatives product offered by the Singapore Stock Exchange 2. Derived from Japan’s premiere stock index, the Nikkei 225 index 3.Nikkei 225 was established in 1950, and consists of 225 blue-chip companies listed on the Tokyo Stock Exchange Key Information Trading Hours: Monday to Friday, 0730 – 1430 (SGT) Trading Period: We define each trading bar as one minute, and each dataset as one day. Commission: Each market order (long/short) incurs a commission of ¥225. A total of ¥450 is incurred for each round trip. Contract specification: One contract size = ¥500 x Nikkei 225 Index Futures Price Minimum price fluctuation: Outright: 5 index points (¥2500) Trading conditions All positions must be closed at the end of each day Only one contract can be traded for each transaction Introduction TD Strategies Equity Curve Order Flow

4 Define theta as the holding period before position is squared off.
Procedure 1 2 3 4 Back test each strategy on the historical data. Identify the trading signals (long/short) based on each individual strategy’s conditions. Define theta as the holding period before position is squared off. 70% of the signals identified are used to find the optimal value of theta, which results in the highest level of profits. Using the previously identified optimal value of theta, measure the out-of-sample performance of the trading strategy in the other 30% of the signals. Introduction TD Strategies Equity Curve Order Flow

5 70% of signals to find theta
TD Strategies Interpretations of the 5 TD alternative strategies Number of buy/sell signals generated from data set: Strategy # of Buy Signals # of Sell Signals Total # of Signals 70% of signals to find theta TD Clop TD Camouflage 2 4 6 TD Clopwin 443 436 879 615 TD Open 494 473 967 677 TD Trap 1471 1527 2998 2099 Optimal holding period without commission factor We want to backtest without commission factor to identify any potential strategy that can perform without commission factor. Also, this helps us to identify any strategy that produce consistent negative PnL and t-distribution (without commission factor), so that we can flip the strategy around to create a viable strategy. Introduction TD Strategies Equity Curve Order Flow

6 Overall performance was poor, did not conduct further test on 30% data
Results TD Camouflage TD Clopwin Holding Period Number of Trades PnL Average gain Average loss Probability of win t-distribution 1 4 ¥2,500.00 -¥1,250.00 0.50 0.522 2 -¥7,500.00 ¥5,000.00 -¥4,166.67 0.25 -0.792 3 ¥0.00 -¥2,500.00 0.000 ¥10,000.00 1.732 5 1.414 6 ¥12,500.00 ¥4,166.67 0.75 1.987 7 8 -¥3,750.00 0.225 9 ¥6,250.00 -¥5,000.00 0.182 10 -¥12,500.00 -0.951 11 -¥10,000.00 -0.739 12 13 -¥22,500.00 -¥5,625.00 0.00 -1.711 14 -¥25,000.00 -¥6,250.00 -1.353 15 16 -¥20,000.00 -¥8,333.33 -1.414 17 -¥9,166.67 -1.362 18 -0.816 19 -0.174 20 ¥7,500.00 Holding Period Number of Trades PnL Average gain Average loss Probability of win t-distribution 1 615 -¥500.00 ¥74.33 -¥28.70 0.423 -0.162 2 614 -¥1,750.00 ¥74.62 -¥38.36 0.428 -0.480 3 605 -¥1,175.00 ¥86.40 -¥55.21 0.507 -0.233 4 592 ¥1,150.00 ¥102.91 -¥62.23 0.508 0.253 5 585 ¥1,300.00 ¥104.07 -¥71.52 0.525 0.276 6 568 ¥3,300.00 ¥114.14 -¥69.71 0.523 0.699 7 551 ¥3,550.00 ¥116.08 -¥78.71 0.544 0.728 8 535 ¥5,475.00 ¥127.72 -¥82.82 0.566 1.076 9 526 ¥2,800.00 ¥129.11 -¥89.16 0.532 0.554 10 516 ¥1,450.00 ¥129.02 -¥104.49 0.543 0.279 11 512 ¥1,525.00 ¥139.91 -¥97.96 0.518 0.289 12 502 ¥2,225.00 ¥146.47 -¥106.41 0.536 0.412 13 495 ¥1,100.00 ¥140.67 -¥123.26 0.590 0.197 14 488 ¥1,250.00 ¥167.57 -¥115.97 0.551 0.199 15 477 ¥725.00 ¥172.36 -¥125.43 0.537 0.121 16 469 -¥100.00 ¥169.11 -¥128.86 0.561 -0.017 17 462 ¥25.00 ¥180.88 -¥128.28 0.552 0.004 18 457 -¥50.00 ¥177.65 -¥136.92 0.578 -0.008 19 450 -¥250.00 ¥177.15 -¥138.17 0.569 -0.041 20 444 ¥425.00 ¥177.37 -¥148.19 0.595 0.069 Overall performance was poor, did not conduct further test on 30% data Introduction TD Strategies Equity Curve Order Flow

7 Results TD Open – on 70% data TD Open (Reversed) – on 70% data
Holding Period Number of Trades PnL Average gain Average loss Probability of win t-distribution 1 677 -¥112,500.00 ¥4,297.24 -¥2,271.74 0.321 -0.671 2 674 -¥50,000.00 ¥5,746.12 -¥3,683.89 0.383 -0.214 3 661 -¥150,000.00 ¥6,564.75 -¥5,156.66 0.421 -0.535 4 648 -¥312,500.00 ¥7,527.88 -¥6,167.55 0.415 -1.015 5 627 -¥342,500.00 ¥9,077.95 -¥7,500.00 0.419 -0.818 6 609 -¥400,000.00 ¥9,767.21 -¥7,769.34 0.406 -0.902 7 593 -¥442,500.00 ¥9,783.46 -¥8,635.69 0.428 -0.879 8 577 -¥320,000.00 ¥10,396.83 -¥9,046.15 0.437 -0.643 9 564 -¥407,500.00 ¥10,873.49 -¥9,888.89 0.441 -0.804 10 556 -¥555,000.00 ¥11,097.56 -¥10,596.77 0.442 -1.068 11 547 -¥637,500.00 ¥11,336.03 -¥11,458.33 0.452 -1.190 12 543 -¥415,000.00 ¥12,076.77 -¥12,050.17 0.468 -0.763 13 538 -¥520,000.00 ¥13,119.83 -¥12,483.11 0.450 -0.927 14 529 -¥597,500.00 ¥14,008.44 -¥13,416.10 0.448 -0.975 15 518 -¥307,500.00 ¥15,240.17 -¥13,140.14 -0.498 16 506 -¥490,000.00 ¥15,010.87 -¥14,284.42 0.455 -0.784 17 498 -¥425,000.00 ¥15,443.72 -¥14,953.18 0.464 -0.678 18 486 -¥667,500.00 ¥15,136.36 -¥15,028.20 0.453 -1.116 19 480 -¥837,500.00 ¥15,271.23 -¥15,205.22 -1.371 20 472 -¥215,000.00 ¥16,040.72 -¥14,980.08 -0.358 Holding Period Number of Trades PnL Average gain Average loss Probability of win t-distribution 1 677 ¥112,500 ¥4,624 -¥2,068 0.334 0.671 2 674 ¥35,000 ¥5,984 -¥3,536 0.377 0.150 3 664 ¥202,500 ¥7,586 -¥4,440 0.395 0.729 4 646 ¥297,500 ¥8,666 -¥5,357 0.415 0.967 5 627 ¥295,000 ¥10,000 -¥6,690 0.429 0.708 6 604 ¥352,500 ¥10,277 -¥7,305 0.449 0.795 7 596 ¥445,000 ¥11,327 -¥7,440 0.436 0.884 8 576 ¥290,000 ¥11,163 -¥8,267 0.451 0.584 9 562 ¥405,000 ¥12,500 -¥8,583 0.441 0.800 10 554 ¥575,000 ¥13,236 -¥8,848 0.448 1.107 11 550 ¥585,000 ¥14,053 -¥9,218 0.442 1.093 12 542 ¥490,000 ¥15,281 -¥9,775 0.426 0.901 13 536 ¥535,000 ¥15,657 -¥10,533 0.440 0.954 14 525 ¥517,500 ¥15,861 -¥11,637 0.459 0.850 15 518 ¥272,500 ¥15,985 -¥12,411 0.456 16 505 ¥485,000 ¥17,270 -¥12,464 0.776 17 498 ¥425,000 ¥17,124 -¥13,453 0.468 0.678 18 488 ¥772,500 ¥17,608 -¥12,939 0.475 1.266 19 482 ¥707,500 ¥17,731 -¥13,010 0.471 1.157 20 476 ¥180,000 ¥16,883 -¥14,170 0.299 As for TD Open, the P&L and t-distribution is consistently negative, hence we flip over the buy and sell conditions for another round of backtesting. For the reversed TD Open, the results were fair, with consistent positive P&L and t-distribution. The optimal holding period is around 10, so we’ve carried out the reversed TD Open on the remaining 30% of the data to test whether it is true that optimal theta is at 10 Since the TD open strategy consistently generates negative P&L and t-distribution, the buy and sell strategy are flipped for another round of backtesting Introduction TD Strategies Equity Curve Order Flow

8 Overall performance was poor
Results TD Open (Reversed) – on 30% data Holding Period Number of Trades PnL Average gain Average loss Probability of win t-distribution 1 290 ¥210,000.00 ¥5,024.75 -$1,574.07 0.348 1.762 2 288 ¥200,000.00 ¥5,491.45 -$2,587.72 0.406 1.547 3 283 ¥162,500.00 ¥6,080.00 -$3,781.65 0.442 0.928 4 278 -¥35,000.00 ¥6,320.00 -$5,392.16 0.450 -0.143 5 276 ¥27,500.00 ¥7,747.93 -$5,870.97 0.438 0.103 6 268 -¥137,500.00 ¥8,557.69 -$6,265.24 0.388 -0.506 7 260 ¥0.00 ¥9,086.96 -$7,206.90 0.000 8 256 -¥72,500.00 ¥9,791.67 -$7,635.14 0.422 -0.249 9 252 ¥5,000.00 ¥10,044.25 -$8,129.50 0.448 0.017 10 249 -¥107,500.00 ¥10,514.02 -$8,679.58 0.430 -0.352 11 246 -¥97,500.00 ¥10,306.60 -$8,500.00 0.431 -0.331 12 241 -¥105,000.00 ¥11,480.58 -$9,329.71 0.427 -0.317 13 238 -¥60,000.00 ¥11,533.02 -$9,715.91 0.445 -0.182 14 234 -¥92,500.00 ¥12,075.00 -$9,701.49 -0.276 15 228 -¥50,000.00 ¥13,421.05 -$9,962.41 0.417 -0.146 16 222 -¥52,500.00 ¥12,500.00 -$10,120.00 0.437 -0.159 17 221 -¥142,500.00 ¥13,152.17 -$10,484.50 0.416 -0.435 18 219 -¥312,500.00 ¥12,419.35 -$11,646.83 0.425 -0.941 19 217 -¥307,500.00 ¥11,975.00 -$12,863.25 0.461 -0.900 20 213 -¥147,500.00 ¥13,385.42 -$12,243.59 0.451 -0.432 However, on the 30% of the data, when holding period is at 10, it produces huge amount of losses and the t-distribution is negative at Hence due to the inconsistency of the optimal holding period we’ve conlcuded from different sets of data, the reversed TD Open will not be a viable strategy Overall performance was poor Introduction TD Strategies Equity Curve Order Flow

9 Relatively consistent and solid PnL returns
Results TD Trap without commission – on 70% data Holding Period Number of Trades PnL Average gain Average loss Probability of win t-distribution 1 2099 ¥840,000.00 ¥7,658.47 -¥3,831.07 0.368 1.659 2 1709 ¥825,000.00 ¥9,531.95 -¥5,395.75 0.394 1.304 3 1494 ¥315,000.00 ¥10,927.62 -¥7,001.68 0.402 0.477 4 1339 ¥1,132,500.00 ¥12,678.25 -¥7,686.38 0.419 1.641 5 1218 ¥982,500.00 ¥13,372.09 -¥8,429.49 0.424 1.389 6 1125 ¥420,000.00 ¥13,713.24 -¥9,410.63 0.423 0.604 7 1060 ¥430,000.00 ¥14,682.02 -¥10,372.52 0.430 0.544 8 989 -¥177,500.00 ¥14,133.72 -¥11,189.62 0.435 -0.238 9 932 ¥60,000.00 ¥14,782.08 -¥11,647.40 0.443 0.081 10 878 ¥67,500.00 ¥15,693.72 -¥11,950.60 0.089 11 838 ¥490,000.00 ¥16,554.23 -¥12,538.04 0.451 0.634 12 810 ¥15,000.00 ¥16,764.71 -¥14,346.33 0.462 0.019 13 769 ¥1,482,500.00 ¥18,180.59 -¥13,222.36 0.482 1.908 14 742 -¥52,500.00 ¥17,478.45 -¥15,571.07 0.469 -0.064 15 716 ¥610,000.00 ¥19,489.49 -¥15,352.48 0.465 0.754 16 689 ¥390,000.00 ¥19,283.54 -¥16,440.44 0.476 17 663 ¥272,500.00 ¥20,538.08 -¥16,426.59 0.456 0.317 18 649 ¥890,000.00 ¥21,599.33 -¥15,696.02 0.458 1.074 19 628 ¥537,500.00 ¥20,790.82 -¥16,691.62 0.468 0.664 20 607 ¥337,500.00 ¥20,955.36 -¥16,911.31 0.461 0.415 Relatively consistent and solid PnL returns Introduction TD Strategies Equity Curve Order Flow

10 Results TD Trap without commission – on 30% data
Holding Period Trades PnL Average gain Average loss Probability of win t-distribution 1 899 ¥1,005,000.00 ¥8,856.30 -$3,611.11 0.379 1.818 2 748 ¥875,000.00 ¥10,289.97 -$5,611.89 0.426 1.438 3 656 ¥1,152,500.00 ¥12,282.99 -$6,480.98 0.439 1.759 4 591 ¥882,500.00 ¥13,541.67 -$7,463.13 1.319 5 553 ¥657,500.00 ¥13,000.00 -$8,206.17 0.443 0.983 From 70% data, we observe that optimal theta is between the range of 1 to 5 Results from 30% for theta between the range of 1 to 5 further proves this: Relatively consistent and high positive PnL Highest PnL of ¥1,152, at theta = 3 High t-distribution with an average of 1.46 Highest t-distribution of at theta = 1 Introduction TD Strategies Equity Curve Order Flow

11 Results TD Trap - Optimal holding period with commission factor
By applying the optimal value of theta = 1 to 5 to the 70% of dataset (with commission), we obtain the following results: Holding Period Number of Trades PnL Average gain Average loss Probability of win t-distribution 1 2099 -¥94,055.00 ¥7,213.47 -$4,276.07 0.368 -0.186 2 1709 ¥64,495.00 ¥9,086.95 -$5,840.75 0.394 0.102 3 1494 -¥349,830.00 ¥10,482.62 -$7,446.68 0.402 -0.529 4 1339 ¥536,645.00 ¥12,233.25 -$8,131.38 0.419 0.778 5 1218 ¥440,490.00 ¥12,927.09 -$8,874.49 0.424 0.623 6 1125 -¥80,625.00 ¥13,268.24 -$9,855.63 0.423 -0.116 7 1060 -¥41,700.00 ¥14,237.02 -$10,817.52 0.430 -0.053 8 989 -¥617,605.00 ¥13,688.72 -$11,634.62 0.435 -0.827 9 932 -¥354,740.00 ¥14,337.08 -$12,092.40 0.443 -0.478 10 878 -¥323,210.00 ¥15,248.72 -$12,395.60 -0.428 11 838 ¥117,090.00 ¥16,109.23 -$12,983.04 0.451 0.152 12 810 -¥345,450.00 ¥16,319.71 -$14,791.33 0.462 -0.429 13 769 ¥1,140,295.00 ¥17,735.59 -$13,667.36 0.482 1.468 14 742 -¥382,690.00 ¥17,033.45 -$16,016.07 0.469 -0.468 15 716 ¥291,380.00 ¥19,044.49 -$15,797.48 0.465 0.360 16 689 ¥83,395.00 ¥18,838.54 -$16,885.44 0.476 17 663 -¥22,535.00 ¥20,093.08 -$16,871.59 0.456 -0.026 18 649 ¥601,195.00 ¥21,154.33 -$16,141.02 0.458 0.725 19 628 ¥258,040.00 ¥20,345.82 -$17,136.62 0.468 0.319 20 607 ¥67,385.00 ¥20,510.36 -$17,356.31 0.461 0.083 With the addition of the commission factor, the P&L for the TD Trap strategy reflects its infeasibility for the 70% data Introduction TD Strategies Equity Curve Order Flow

12 Results TD Trap - Optimal holding period with commission factor
By applying the optimal value of theta = 1 to 5 to the 30% of dataset (with commission), we obtain the following results: Holding Period Number of Trades PnL Average gain Average loss Probability of win t-distribution 1 899 ¥600,450.00 ¥8,406.30 -$4,061.11 0.379 1.086 2 748 ¥538,400.00 ¥9,839.97 -$6,061.89 0.426 0.885 3 656 ¥857,300.00 ¥11,832.99 -$6,930.98 0.439 1.308 4 591 ¥616,550.00 ¥13,091.67 -$7,913.13 0.921 5 553 ¥408,650.00 ¥12,550.00 -$8,656.17 0.443 0.611 6 520 ¥311,000.00 ¥13,870.18 -$9,765.07 0.438 0.456 7 480 -¥1,053,500.00 ¥11,512.62 -$13,222.56 0.446 -1.554 8 445 -¥600,250.00 ¥11,816.36 -$13,545.24 0.481 -0.883 9 427 ¥972,850.00 ¥15,763.94 -$10,529.91 0.487 1.472 10 412 ¥1,037,100.00 ¥16,502.74 -$10,805.45 0.488 1.559 11 393 ¥860,650.00 ¥17,547.31 -$11,609.42 0.473 1.257 12 382 ¥555,600.00 ¥16,983.16 -$13,437.18 0.490 0.794 13 365 ¥508,250.00 ¥17,944.89 -$14,021.43 0.482 0.741 14 358 -¥183,600.00 ¥15,552.82 -$16,223.48 0.494 -0.268 15 350 -¥460,000.00 ¥15,762.12 -$16,544.59 0.471 -0.676 16 345 -¥462,750.00 ¥16,153.77 -$16,296.77 0.461 -0.678 17 336 ¥473,800.00 ¥20,388.82 -$14,267.93 0.452 0.664 18 322 -¥824,900.00 ¥16,101.72 -$17,851.13 0.450 -1.245 19 306 -¥675,200.00 ¥17,264.29 -$18,627.71 0.458 -0.983 20 297 -¥211,150.00 ¥19,242.03 -$18,028.62 0.465 -0.299 With the addition of the commission factor, the P&L for the TD Trap strategy shows promise for the 30% data Introduction TD Strategies Equity Curve Order Flow

13 Equity Curve TD Open – with vs without commission
The max drawdown duration for TD Open is 99 days (August – November The max drawdown duration for TD Open is 113 days (July – November ). The Max drawdown for TD Open strategy is -90,750 – (-236,100) = 145,350 The Max drawdown for TD Open strategy is 152,500 – 52,500 = 100,000 Introduction TD Strategies Equity Curve Order Flow

14 Equity Curve TD Trap – with vs without commission
1,670,000 August 12, :01 AM November 9, :41 PM The max drawdown duration for TD Trap is 56 days (September – November ). The max drawdown duration for TD Trap is 90 days (August – November ). The Max drawdown for TD trap strategy is ,450 – 408,450 = 399,000 The Max drawdown for TD trap strategy is 1,720,000 – 1,312,500 = 407,500 Introduction TD Strategies Equity Curve Order Flow

15 Intermediate Summary of TD Strategies
Strategy Remarks TD Clop No Signal TD Camouflage Poor Performance TD Clopwin TD Open Original Strategy gave consistent negative PnL  Flipped signals to give Reversed Open Strategy Results were however, poor when tested on 30% Data TD Trap Most promising Strategy in term of Consistency as well as Significant of positive PnL results for Theta = 1-5 min However, commission factors continues to weight down on strategy feasibility  Reduce the number of trades by making the conditions more stringent? Drawbacks of TD alternative strategy Through the analysis of the back testing results, it is observed that the profit to commission ratio is not ideal. This results in lacklustre net profit numbers even for the strategy (TD Trap) with the optimal theta and the most consistent t-statistic. Introduction TD Strategies Equity Curve Order Flow

16 Order Flow Strategy TD Trap with order flow strategy
In order to decrease the impact of the commission factor, Order flow is utilised as an additional condition, to decrease the number of signals Interpretation of order flow strategy The order flow strategy has the following conditions: Entry If the order flow sign over the last x trades is positive, buy one lot at the ask immediately If the order flow sign over the last x trades is negative, sell one lot at the bid immediately Exit Due to the use of the TD trap in tandem with the order flow strategy, exit signal is contingent on the holding period theta. Procedure Run the TD Trap with order flow strategy for theta between 1-12 and for X between 5 to 20 and determine which value for X generates the best results Introduction TD Strategies Equity Curve Order Flow

17 Order Flow Strategy Results
Holding Period Number of Trades PnL Average gain Average loss Probability of win t-distribution x bar order flow 1 142 -¥26,400.00 ¥5,582.61 -$2,950.00 0.324 -0.398 9 2 120 ¥241,000.00 ¥10,670.69 -$6,095.16 0.483 1.380 3 132 ¥68,100.00 ¥11,587.04 -$7,148.72 0.409 0.414 4 130 -¥11,000.00 ¥12,790.74 -$9,232.89 0.415 -0.055 5 125 ¥371,250.00 ¥21,088.46 -$9,936.30 0.416 1.351 6 113 ¥21,650.00 ¥15,519.39 -$11,543.75 0.434 0.086 7 117 ¥204,850.00 ¥19,341.67 -$10,486.23 0.410 0.791 8 124 ¥64,200.00 ¥18,860.34 -$15,601.52 0.468 0.210 104 ¥315,700.00 ¥24,161.11 -$13,077.12 0.433 0.981 10 127 ¥322,850.00 ¥18,550.00 -$14,240.32 0.512 1.116 11 ¥521,000.00 ¥19,586.76 -$15,594.23 0.567 1.515 12 122 ¥347,600.00 ¥27,915.38 -$15,771.43 0.426 0.829 100% of data used due to decreased number of signals cased by additional condition Introduction TD Strategies Equity Curve Order Flow

18 Order Flow Assignment Order flow strategy Results
This is with commission. ( to ) Results Aggregate 16 1-min bars ~ t-stat of 1.1 Passes sensitivity analysis Stop loss strategy? X value might change over time Introduction TD Strategies Equity Curve Order Flow

19 Conclusion and Recommendation
Problems The 5 alternative TD strategies have soft conditions that resulted in large numbers of trading signals. Due to the constraint of trading only 1 contract per trade, the commission factor played a big part in negating the PnL effect from the back testing results. Solutions The order flow strategy was used in the tandem with the TD trap strategy to increase the number of conditions and lower the number of trading signals, thus lowering the commission factor effect Results & Recommendations Through further back testing, results for holding period = 11 for X = 9 showed most promise; PnL was high, t-statistic was significant, and number of trades were significantly lower. Therefore, our group recommends the TD trap strategy in tandem with the order flow strategy. Introduction TD Strategies Equity Curve Order Flow


Download ppt "TD Strategies QF206: Quantitative Trading Strategies"

Similar presentations


Ads by Google