Reporting By Market Type
April 15, 2019

One of the many interesting ideas put forth by Dr. Van K. Tharp is that you should not try to find a trading strategy that works in every type of market. Instead, he advises trading only those strategies that have performed well in the past under conditions similar to the current ones.

If you choose to adopt this approach to trading system development and selection, then the first step is to define a set of market types or conditions. One way to do this is to combine price action (bullish, neutral, bearish) with volatility (quiet, normal, volatile). For example, in today’s article I will use a six-month lookback on the S&P 500 index (SPX) to determine whether the market is bullish, neutral or bearish, and the CBOE Volatility Index (VIX) to determine whether the market is quiet or volatile (we won’t use “normal” as a volatility type here). The factors you choose to incorporate into your own market type definition will depend on your beliefs about the market and how you think those factors impact your trading results. Similarly, the timeframe over which you calculate your market type will be influenced by the type of trading you do. A day trader will likely have a very different way of defining the market type than a swing trader or momentum trader.

To illustrate the concept of reporting by market type, let’s consider a very simple mean reversion system based on the 2-period RSI, or RSI(2). The entry rules for long trades are:

  1. Stock is a member of the S&P 500 Index
  2. Market Value (Closing Price x Volume) > $5M
  3. RSI(2) < [5,10,15,20]

And the exit condition is:

  1. RSI(2) > [60,70,80]

Both entry and exit will take place at the close of the day on which the signal occurs, and the back tests will cover the 10-year period from 1/1/2006 through 12/31/2015.

The table below shows a few key metrics for each of the 12 strategy variations: 4 RSI(2) entry values combined with 3 RSI(2) exit values. This was an “all trades” test, meaning that we took every available entry signal without regard to portfolio considerations like position sizing or capital constraints. The only restriction was that only one open trade per symbol was allowed at any given time.

LongSummary

We can see that the percentage of profitable trades (% of Winners) was very close to 69% for every variation. Therefore, let’s focus on the average gain per trade. The table entries are sorted from highest to lowest Avg % P/L, with the best performing variation (No. 21) producing a 0.83% gain by entering trades on an RSI(2) value below 5 and exiting when RSI(2) moves above 80. As we move across the top row from left to right, we see that variation 21 did not perform equally in all market types. In Bear and Neutral markets, the gain per trade was usually around 1.0%, but in Bull markets the gain fell to 0.44% when the market was Volatile and 0.79% when the Bull market was Quiet. So, if variation 21 was the only one we were trading, we might choose not to trade in Bull market types.

Now let’s focus on the column for each market type. In each of these six columns, the highest Avg % P/L is highlighted green. For the Volatile Bear market type, the highest Avg % P/L was produced by the same variation (21) that generated the best overall Avg % P/L. However, for the Quiet Bear market type, variation 24 produced a superior gain per trade of 1.62%. Although this is a simplified example which focuses on only one metric, it’s clear that we can extend this concept to help us to determine when to trade our base strategy, when to tweak our rule parameters, and when to consider sitting out altogether.

If we reverse the long rules to create a short system, we observe even more differentiation between the market types. On an overall basis, none of these variations comes out much above break even, despite the fact that the test did not account for commissions. However, the two Bear market types each identified some interesting variations of the strategy, while both Neutral market types and the Quiet Bull type would clearly not be worth trading as the strategy is currently written.

ShortSummary

Please feel free to contact me if you’d like a copy of the Excel spreadsheet or if you need assistance adding this type of reporting to your AmiBroker back tests and optimizations.

Copyright 2024 Quant Alpha – ‘Quant Alpha’ and ‘Quantive Alpha’ are Trade Marks of Quantive Alpha – all rights reserved.

All the information contained on this website is general in nature and does not constitute personal or investment advice. Quant Alpha produces algorithms and software only and does not trade or arrange any trading on your behalf. Quant Alpha will not accept liability for any loss or damage, including without limitation, any loss which may arise directly or indirectly from the use of, or reliance on: its algorithms; the information on this site; or information provided by its managers, partners or affiliates. You should seek independent financial advice and conduct your due diligence prior to acquiring any Quant Alpha technology. Quant Alpha is neither a registered investment advisor nor an investment advisory service and does not provide any recommendations to buy or sell particular financial products. 
Before engaging in any trading activities, you should understand the nature and extent of your rights and obligations and be aware of the risks involved. Don’t trade with money you can’t afford to lose. Your trading and investing decisions are entirely your own responsibility. All securities and financial product transactions involve risks. Where Quant Alpha provides hypothetical representations of what the technology has achieved in the past, this has been done with the greatest know-how, data and expert technology that is available, but still, Quant Alpha cannot guarantee that these results have any likelihood whatsoever of being achieved in future. Where records have been provided of how the software has performed on management’s own accounts, whilst these are an accurate and true record of what has taken place in the past, they are not necessarily indicative of future results – the future is as unknown to Quant Alpha management as it is to anyone else. The past performance of any trading system or methodology is not necessarily indicative of future results.