Impact of Risk Management Features on Performance

0 downloads 0 Views 302KB Size Report
ATS without application of any exit strategy will be presented as well. The testing ... conducted on optimized version of simplified trading system, using Stochastics technical analysis indicator. Key-Words: ... Automated trading is in principle the same as manual trading: ... same way as if MACD indicator and its signal curve.
Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications

Impact of Risk Management Features on Performance of Automated Trading System in GRAINS Futures Segment PETR TUCNIK Department of Information Technologies University of Hradec Kralove Rokitanskeho 62, Hradec Kralove CZECH REPUBLIC [email protected] http://www.fim.uhk.cz Abstract: Automated trading requires protection against loss in the same manner as manual trading does. Automated trading systems (ATS) have to be acceptable, easy to implement and transparent from the user’s perspective. From the perspective of a small speculator, this paper is focused on testing ATS’s performance while applying selected exit techniques – maximum loss, profit target, trailing stop and their combination. To allow comparison, performance of ATS without application of any exit strategy will be presented as well. The testing will be conducted using simplified trading system on commodities of GRAINS segment (corn, wheat, oats), using real commodity data. Tests will be conducted on optimized version of simplified trading system, using Stochastics technical analysis indicator. Key-Words: automated trading system, futures, commodities, grains, exit strategy And main disadvantages are:

1 Introduction Automated trading systems (ATS) are widely used today, by both professional and amateur traders. Automated trading is in principle the same as manual trading: methods, tools, risk and portfolio management follows the same general rules. Often, beginner traders overestimate role of ATS in trading. Its main purpose is to ease trader`s workload, and also possibly increase precision of placing business orders (see below). But it is also necessary to keep system`s performance at optimal level and periodically monitor its function. Due to everchanging nature of markets, it is necessary to adjust ATS to these changes. User (trader) is also expected to have full understanding of ATS`s functions. It is important to avoid (or be careful with) third party solutions, especially those of black-box paradigm. Trading principles will not be described in detail here as it is not purpose of this paper, but reader may find useful information in this regard in [1], [2], [3] and especially [4]. There are generally accepted pros and cons involved in automated system trading, see [4]. Main advantages of mechanical trading are: • • • •

• • • •



However, the problem we are focused on in this text is related to risk management issues of such system. More detailed description of ATS can be found in [2], [6] or [4]. The example (intentionally simplified) ATS will be tested on GRAINS segment of futures markets, which includes corn, wheat and oats markets. The ATS will be optimized in order to obtain its maximum efficiency and this optimized system`s effectiveness will be compared to the same system with implemented exit strategies: maximum loss, profit target, trailing stop and combination of all three.

Emotional trading elimination Greater discipline in following strategy rules and more consistent behavior Participation is virtually guaranteed in the direction of every important trend Losses are minimized (rules of money/risk management are precisely followed)

ISBN: 978-1-61804-028-2

Most mechanical systems are trend-following Trend-following systems rely on major trends in order to be profitable Non-trending markets are non-profitable (selection of market is important) Occurrence of long periods of non-trending are rendering mechanical system useless or nonprofitable It is difficult to mechanically recognize that market is not trending (system is not able to turn itself off)

2 Technical analysis Most common approach in mechanical trading is application of technical analysis indicators. As we are trying to test the system`s performance in standard settings, this will be also our approach. Please note that

186

Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications

the goal here is not to design functioning system or introduce some form of functional trading system. We are interested in functioning and principles only, namely use of risk management features in trading system and its impact on the system`s performance. There are literally dozens on technical analysis indicators available and these can be further modified by the user. We will use one of standard indicators Stochastics. Its principle is based on commonly accepted observation that close prices tend to resist when resistance or support levels or last few days are breached. Indicator is similar to oscillator indicators like Relative Strength Index or Momentum. Its difference is in calculation, where not only closing price is used, but also a price`s high and low. There are three components based on measure how stochastic the price behavior is: %K, %D and %D-slow. %D is often used independently, but also in combination with %D-slow. For today`s values (t), following formulas are used [2]:

   5  5

(1)

%  %  % ∑ %  3 3

(2)

 % 100

%D

%D‐ !

∑ %" 

3.1 Maximum loss In principle, losses cannot be avoided completely in futures trading. This is given by the stochastic nature of markets. However, it is possible to avoid large losses by application of stop-loss orders (SL) as it is one of protective tools that can be applied. In case of maximum loss (ML) approach, the SL is triggered (and position closed) when price moves in wrong direction and reaches pre-defined amount of loss. This is always related to entry level of price.

3.2 Profit target Profit targets (PT) are used for further elimination of emotions from trading process. Its application is based on previous observation of price movements. Many markets tend to behave in repeating patterns – price is moving in trend channel and it is possible to estimate (predict) the price peak level, with some reasonable level of reliability. Trade is exited shortly before peak, at preset level, generating profit. Of course, some trades could possibly bring more profit than is estimated, but when used correctly, PT will allow user to exploit most opportunities. Main advantage lies in elimination of emotions – trader does not have to care about consequent price movement once the position is closed. In testing, constant level of PT will be used for comparability reasons. In practice, MFE/MAE analysis may be used for better timing of PT orders, for detailed explanation of this approach, see [5].

(3)

3

Ct represents today`s closing price, Lt(5) price low for the last 5 days and Rt(5) is price range for last 5 days (highest high minus lowest low) including today`s values. Kaufman [2] describes common use of Stochastics as combination of slower and faster form of equation or combination of extremal values and trend. When used independently, %D and %D-slow curves are in position of faster indicator and slower curve is applied in the same way as if MACD indicator and its signal curve were used. Indicated signal (buy/sell) is recognized by the crossover of curves. There are several variants of crossovers, for more details see [2].

3.3 Trailing stop More sophisticated method of trade exit is trailing stop (TS). The trigger level of SL order is continuously moving with price, when its movement is in profitable direction. E.g. in case of long trade, the SL is placed slightly below the entry price and in case of upward (favorable) movement, SL is following the price. This could lead to better results than constant settings of SL, but difference between price and SL level must be carefully set which requires certain level of experience. Again, for comparability reasons, TS will be set to constant value during tests (but will be moving with price, as it was described above).

3 Exit strategies

3.4 Comments

There are three trading strategies that will be used in testing system`s performance: maximum loss, profit target and trailing stop. All three are used to protect trader against large losses, but each approach is slightly different. More detailed description is presented in following subsections of this part of the text.

ISBN: 978-1-61804-028-2

The list of used exit strategies is obviously not complete, but covers main approaches. In general, every trading system tends to have series of losses which cannot be avoided, but may be profitable in the long run. It is a careful backtesting and even paper trading training which gives us statistical support for construction of

187

Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications

4. For comparability reasons, combination of all methods will be used in testing as well (labeled “Combined approach”) 5. No commission or transaction costs for individual trades are introduced into system 6. Total number of tests = 15 (3 markets, 5 strategies each), all GRAINS segment markets are tested 7. Every testing cycle consists of 336 optimizing steps on data from 1994 to 2008 (see below).

trading system. Automation of system`s functions does not eliminate role of trader from the trading process; system`s performance must be monitored and evaluated continuously.

4 Testing There are three trading strategies (plus their combination) used in testing. System`s performance in generating profit is maximized by optimizing technical analysis indicator (TAI) settings of parameters, although some parameters of functioning are omitted or eliminated from testing results. Whole procedure will be described in detail in this part of the text.

4.3 Data For testing purposes, real (commercial) commodity data are used. Timeframe for all commodities of Grains segment is the same. Used range is from 1st Jan 1994 to 31st Dec 2008. Data are in format: Date (US), Time, O (opening price), H (price high), L (price low), C (closing price), U (volume).

4.1 Optimizing system`s performance The optimization procedure consists of following steps: 1. Selection of market (CZ9, OZ9, WZ9) 2. Parameters (Range, %K, %D) of Stochastics indicator are optimized in ranges derived from the default (most often used) settings of the indicator: a. “Range” is an array 5-20 b. %K curve is an array 2-4 c. %D curve is an array 4-10 3. Every optimization cycle consists of 336 combinations 4. Every setting is tested and results are obtained in a form of graph and table

4.4 Test results Results of testing are presented in form of tables. Tab. 1 explains meaning of symbols used in result tables 2-16.

Symbol CZ9 OZ9 WZ9 MTDD MSDD Exposure

System`s results using optimized settings without any special exit strategy is labeled “BASIC” in test results. In optimization procedure, there are below 40 criteria that can be used to describe system`s performance, but are not presented here (less important). Test results will be limited only to most important of them. Optimization procedure is described in more detail in [7].

Pay-off # Trades

Tables 2-16 show only part of obtained results, i.e. three best results in selected parameters of system`s performance. Tables 2-6 are results of testing on corn market, 7-11 on oats market and 12-16 on wheat market. Interpretation of results is in following part of the text. Parameters Net Profit, MTDD and MSDD are in USD, Exposure is represented in percents. Important is comparison of trading system`s performance using basic settings (Tab. 2, 7, 12) to the rest of results.

4.2 Testing parameters Testing is done using these parameters and settings: 1. Only long positions are used (this is for clarification of results, incorporation of short positioning poses no technical problem and will be done in other phase of testing) 2. Starting capital of the ATS is 10 000 USD 3. Settings of exit strategies is set to these fixed values (for comparability of results): a. ML is set to 5 points b. PT is set to 5 points c. TS is set to 5 points

ISBN: 978-1-61804-028-2

Table 1: Symbols Meaning Corn market Oats market Wheat market Maximum trade drawdown Maximum system drawdown Trading account exposure during ATS use Ratio of average winning trade and average losing trade Number of trades

188

Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications

# 1 2 3 # 1 2 3

# 1 2 3 # 1 2 3

# 1 2 3 # 1 2 3

# 1 2 3 # 1 2 3

# 1 2 3 # 1 2 3

Table 2: CZ9 Basic settings Net Profit MTDD MSDD 39 274,65 34 898,37 28 165,17

-4 039,44 -3 242,19 -3 036,44

Exposure (%)

Pay-off Ratio

49,21 49,61 49,37

2,17 1,89 2,06

# 1 2 3 # 1 2 3

-9 618,53 -9 923,78 -6 719,14

# Trades 483 528 493

Table 3: CZ9 Maximum loss Net Profit MTDD MSDD 43 567,48 37 467,83 35 507,39

-3 868,20 -3 891,32 -3 452,30

Exposure (%)

Pay-off Ratio

47,34 47,03 47,09

1,98 2,14 2,19

# 1 2 3 # 1 2 3

-8 759,48 -10 842,50 -7 517,09

# Trades 528 483 493

Table 4: CZ9 Profit target Net Profit MTDD MSDD 20 464,71 17 844,40 14 355,20

-1 086,01 -2 051,68 -1 854,13

Exposure (%)

Pay-off Ratio

28,61 28,84 36,54

1,58 1,56 1,44

# 1 2 3 # 1 2 3

-5 473,95 -4 953,34 -5 046,67

# Trades 343 341 528

Table 5: CZ9 Trailing stop Net Profit MTDD MSDD 27 035,78 26 799,59 20 105,79

-2 588,87 -2 597,94 -2 104,45

Exposure (%)

Pay-off Ratio

40,41 39,28 39,97

1,90 2,13 1,94

# 1 2 3 # 1 2 3

-4 893,73 -6 567,55 -4 146,07

# Trades 528 483 514

Table 6: CZ9 Combined approach Net Profit MTDD MSDD 21 911,90 18 875,09 18 846,57

-1 090,46 -1 649,23 -1 765,39

Exposure (%)

Pay-off Ratio

22,16 19,24 18,81

1,96 1,79 1,71

ISBN: 978-1-61804-028-2

# 1 2 3 # 1 2 3

-3 565,33 -3 198,42 -2 919,71

# Trades 329 261 261

189

Table 7: OZ9 Basic settings Net Profit MTDD MSDD 30 127,81 29 157,44 28 741,06

-5 667,07 -2 965,45 -2 965,45

Exposure (%)

Pay-off Ratio

32,76 37,43 34,58

1,82 2,11 1,97

-7 285,54 -5 528,50 -8 613,52

# Trades 485 349 477

Table 8: OZ9 Maximum loss Net Profit MTDD MSDD 29 043,51 28 381,82 26 639,80

-2 872,05 -5 613,05 -2 932,50

Exposure (%)

Pay-off Ratio

35,58 32,23 34,12

2,17 1,82 1,92

-5 455,10 -7 544,36 -8 392,20

# Trades 349 485 461

Table 9: OZ9 Profit target Net Profit MTDD MSDD 48 768,25 48 058,34 45 454,97

-2 092,20 -2 189,78 -2 337,97

Exposure (%)

Pay-off Ratio

20,67 20,59 21,23

2,09 2,05 1,86

-4 504,88 -4 541,88 -5 559,59

# Trades 469 477 488

Table 10: OZ9 Trailing stop Net Profit MTDD MSDD 29 152,42 28 219,44 27 689,67

-2 932,50 -1 531,72 -2 932,50

Exposure (%)

Pay-off Ratio

27,55 27,58 29,15

1,85 1,92 2,00

-5 346,52 -6 345,72 -4 699,79

# Trades 485 488 461

Table 11: OZ9 Combined approach Net Profit MTDD MSDD 37 609,22 35 989,46 35 567,83

-2 899,32 -1 426,90 -1 744,36

Exposure (%)

Pay-off Ratio

19,21 20,49 19,40

1,85 2,02 1,90

-4 379,73 -4 406,02 -4 746,38

# Trades 485 461 488

Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications

# 1 2 3 # 1 2 3

# 1 2 3 # 1 2 3

# 1 2 3 # 1 2 3

# 1 2 3 # 1 2 3

# 1 2 3 # 1 2 3

Table 12: WZ9 Basic settings Net Profit MTDD MSDD 10 295,36 9 658,38 9 179,33

-1 945,63 -4 528,67 -4 603,12

Exposure (%)

Pay-off Ratio

49,34 50,00 50,14

1,84 1,85 1,97

5 Interpretation of results Before testing, a hypothesis existed that trading systems act (i.e. trade) more aggressively before implementation of risk management exit strategies. This tendency is obvious especially in exposure and drawdown parameters. System is using every opportunity and this behavior leads to high-risk portfolio allocation. In corn market, the implementation of exit strategies leads to reduced profit, but system is obviously more stable, which can be deduced from reduction of values of exposure and draw down parameters. There is also a slight tendency to reduce pay-off ratio, which is negative phenomena. On the other hand, number of trades is also reduced, especially when combined or profit target strategies are used. The general tendency of used exit strategies to reduce exposure and draw downs is confirmed in both oats and wheat markets. There is no significant change in number of trades while trading oats, but risk-protection features surprisingly lead to increased profit, especially in profit target strategy. Wheat market results are conclusive only in tendency for exposure and draw downs reductions. Extremely poor system`s performance while using trailing stop strategy is probably result of use of inappropriate tool; Stochastics indicator is ineffective here and better results can be possibly obtained when other indicator(s) will be used instead. Results leads to conclusion the net profit is not predictably influenced by implementation of exit strategies into ATS. Similar effects have given exit strategies on pay-off ratio or number of trades. Significant impact is shown in exposure and draw down parameters of the system (both are negative aspects and both are reduced). Overall effect of implementing risk management exit strategies of maximum loss, profit target or trailing stop type leads to stabilization of the trading system.

-9 933,34 -14 758,99 -16 951,15

# Trades 506 213 253

Table 13: WZ9 Maximum loss Net Profit MTDD MSDD 10 010,90 8 253,51 7 862,20

-1 820,35 -1 677,41 -1 576,44

Exposure (%)

Pay-off Ratio

44,58 45,24 43,52

1,97 1,90 2,03

-8 768,80 -8 097,14 -6 436,88

# Trades 501 497 451

Table 14: WZ9 Profit target Net Profit MTDD MSDD 15 156,35 14 529,77 14 449,02

-1 960,91 -3 234,30 -2 064,09

Exposure (%)

Pay-off Ratio

27,06 31,61 31,30

1,12 1,18 1,26

-6 931,24 -5 729,68 -5 423,72

# Trades 406 519 511

Table 15: WZ9 Trailing stop Net Profit MTDD MSDD 421,02 218,93 -639,22

-777,92 -710,59 -801,22

Exposure (%)

Pay-off Ratio

29,95 29,07 13,82

1,52 1,66 1,58

-3 669,41 -2 634,25 -3 826,08

# Trades 537 501 236

6 Conclusion and future work Conducted tests leads to following conclusion: risk management techniques (special exit strategies in this case) tend to stabilize an ATS. System using given exit strategies has, in general, significantly better exposure and lowered draw downs. The transaction costs were not implemented into system during testing, but it is reasonable to assume it could be other important factor in evaluating system performance because of commission costs included in each trade. This will be part of future work. Future work is to be focused on testing non-constant setting of exit strategies parameters, verification of results with different indicators and including more exit

Table 16: WZ9 Combined approach Net Profit MTDD MSDD 10 738,52 9 994,57 6 741,73

-1 092,29 -1 489,72 -677,11

Exposure (%)

Pay-off Ratio

21,48 22,70 17,35

1,55 1,50 1,78

ISBN: 978-1-61804-028-2

-2 729,80 -4 054,51 -4 954,11

# Trades 501 537 412

190

Recent Advances in Applied & Biomedical Informatics and Computational Engineering in Systems Applications

strategies. Obtained results are important for better understanding of ATS functioning and impact of implementation of risk management methods in such systems.

Acknowledgement This article was supported (1) by the project No. CZ.1.07/2.3.00/20.0001 Information, cognitive, and interdisciplinary research support, financed from EU and Czech Republic funds, and Specific Research Project “Automated Trading Systems for Futures Trading”.

References: [1] Carter, J. F., Mastering the Trade – Proven Techniques for Profiting from Intraday and Swing Trading Setups. McGraw-Hill, 2006 [2] Kaufman, P. J., New Trading Systems and Methods (4th Ed.), John Wiley & Sons, 2005 [3] Kirkpatrick, C. D., Dahlquist, J. R., Technical Analysis – The Complete Resource for Financial Market Technicians, Pearson Education, 2007 [4] Murphy, J. J., Technical Analysis of the Financial Markets – A Comprehensive Guide to Trading Methods and Applications, New York Institute of Finance, 1999 [5] Sweeny, J. & Sweeny, J., Maximum adverse excursion: analyzing price fluctuations for trading management, John Wiley and Sons, 1997 [6] Tinghino, M., Technical Analysis Tools – Creating a Profitable Trading System, Bloomberg Press, 2008 [7] Tucnik, P., Optimization of Automated Trading System`s Interaction with Market Environment, Perspectives in business informatics research: 9th international conference (BIR 2010), Springer, 2010, pp. 55-61

ISBN: 978-1-61804-028-2

191