Quantcast
Channel: System Trader Success
Viewing all articles
Browse latest Browse all 323

Statistical Analysis For Exits

$
0
0

As system designers, we hit the problem that whilst it seems relatively straightforward to develop entries and then test them against arbitrary exits, the reverse is a lot trickier. I have found out that doing some very simple statistical analysis can help in exit rule development. Over the years it has appeared to me that some markets seem far choppier than others in their intraday price action and I use that observation here to do one of those analyses. What I am looking at in this piece is the tendency of markets to finish the day within a certain percentage of the high or low for the day.

To ‘close at the close’ The time of day can be a very useful building block in system development. This applies to the time of entry of trades, of exits, the inputs of many indicators used, and also using individually tailored trading sessions. In developing rules for algorithmic trading, the timing of exits are frequently neglected or ignored. Commonly systems enter on some type of signal and then exit during the last few bars leading into the close, or some subsequent close. This tendency of both systems and discretionary traders, both big and small, to ‘close at the close’ is one of the factors leading to a spike in trading volumes that is seen across most products at the end of the trading session, or the end of the old pit trading session.

Liquidity Profile For large fund managers and CTAs, the key factor to take into consideration on timing of entries and exits is liquidity and this will trump the improvements in performance that can be gained by timing trades optimally. All the clever execution algorithms in the world will only help so much and these players tend to bunch their trading at the open or close as the ‘liquidity tax’ of slippage would be too high to trade much at other times. This is because most contracts generally have a ‘U’-shaped liquidity profile during the day where trade liquidity (volumes) peak at the open and at the close. Indices and rates are usually quite a symmetric clean U shape whereas some products such as metals and energies have persistent volume bulges, but even then most have a significant volume spike at the close.

Click to enlarge

Click to enlarge

For most retail traders though, trading has relatively few contracts at a time, liquidity should be much less an issue. For systems designers, the tendency in the design of trading rules doesn’t seem to take any particular consideration as to whether closing a trade during these final minutes is optimal.

Compulsory and Optional Trading Rules Personally, I think of trading rules in terms of being either compulsory or optional. Compulsory rules are any forms of stop loss, which should be executed immediately as they occur, no matter what the timing is. Optional rules would be almost any other types such as profit targets or length of trade exit rules, and potentially most types of entry rules where there is a greater degree of freedom to design when the rules should execute. For these rules, adding a timing element can markedly improve performance.

How to Use This in Rule Design This has obvious implications in systems design. For those products that most likely to close at the extreme of the day, the closing bars of whichever day would appear to be the optimal time to exit those trades, assuming the trade is in the correct direction (such as trend following methodologies). However, for those contracts less likely to close at the extreme of the day, then optimizing time of day for exits through the usual rigorous testing processes would seem a much better way to develop those optional rules.

Methodology: I took a variety of products and assumed entry at the close of the first 10-minute bar of the trading session and exit on the 2nd to last 10-minute bar of the trading session. Using this method gives actual trading levels rather than exchange closes which have ruined many good trading system designer’s day. I did not choose a fixed number of bars, as this of course varies according to product, although many are almost open 24 hours a day which would theoretically be 144 10-minute bars. The likelihood of the exit price being within 10% of the high or low of the entire trading session was measured. Setting multiple series of random data as a check, unsurprisingly the results tend to approximate to 20% and because of the number of data points, generally very close indeed to this number. The data was run from 2007 to 2016, generating roughly 2,300 data points for each product. It doesn’t really matter whether each product has moved significantly up or down over the period covered by the test, as this is simply a test of closing at the extreme of the day, either high or low.

Results For me there were a couple of interesting facts that came from the results:

Results_Table
* Within product types. Gasoline is more likely to close at an extreme than WTI crude and Natural Gas even more likely than Gasoline. This fact ties directly to my own experience where I have always found it easier to develop day trading trend type systems that close at the close for Natural Gas and Gasoline than is true for WTI Crude. The eMini Russell 2000 is more likely than the eMini S&P to finish at an extreme and whilst the Russell is obviously highly correlated to the S&P, it appears to exhibit less ‘chop’ in its daily movements.

Group1
* The other interesting takeaway is the correlation between the results of different product groups, so the energies and stock indices and rates were all significantly more likely to close near the extreme for the day. All things being equal, we could conclude that these contracts would lend themselves more to day trading trend system than any other products.

Group2 The metals and most of the currencies were significantly less likely to close at the extreme for the day and this has some important implications for systems developers:
* These are the products that would be the most difficult to develop day trading trend systems exiting at the close for.
* The corollary of this difficulty is that for systems that do close at the close, these are probably the most fruitful contracts to explore for day trading counter-trend systems.
* For exits in general, these are the contracts where greater attention effort should be invested in time-of-the-day exits as exiting at the close may well not be the best way to go. A statistical bias for a single contract can be interesting but a lot more weight can be attached when we see a similar bias across multiple difference but related contracts such as the equity indices or the metals. As with any very simple statistical analysis such as that above, we are not going to get hard and fast rules, just a much better road map of where and how to direct research in our system development.

The post Statistical Analysis For Exits appeared first on System Trader Success.


Viewing all articles
Browse latest Browse all 323

Trending Articles