Skip to content

Part 2: Using a Self-Similarity Metric with Intraday Data to Define Market Regimes

April 17, 2015

The Self-Similarity metric has been a popular series. Recently the original post was shared on Jeff Swanson’s popular site System Trader Success which covers a wide variety of thought provoking articles on trading system development and is worth reading. Jeff has also posted some TradeStation code for the indicator which some readers may find valuable. In a great example of vertical blogging, a very interesting analysis on the Self-similarity metric was done by Mike Harris on his Price Action Blog which also has a lot of very interesting articles and is worth following.

I have to say that one of the most rewarding aspects of this blog has been my interaction with readers (and fellow bloggers) at various levels. I have developed several relationships over the years, and some of these developed into new business opportunities. Many years ago while actively running CSS Analytics, I was fortunate to work with a core group of very talented and dedicated people. It has been nice to see that many of these individuals have become quite successful in the quant world. One of the original members of that talented group was David Abrams. We have spent a lot of time on system development over the years, and although we no longer actively collaborate we still manage to keep in touch. David reached out to me with some visuals and analysis on the chaos/stability self-similarity indicator I recently presented on the blog. I suggested that we post this for CSSA readers, and he was kind enough to agree to share.

Dave Abrams is Director of Quantitative Strategies at Wilbanks, Smith and Thomas Asset Management (www.wstam.com) in Norfolk, VA, where they design risk managed fund models and S&P indices (about 400M of the firm’s 2.5B in AUM is quant). He was formerly part of a group doing quant research at CSS Analytics.

Visualizing The Chaos Stability Indicator

It is useful to visualize DV’s new self-similarity regime method in a Tradestation chart. Here is the strategy and indicator using the default parameters (N = 10 day, 60 day average, 252 percent rank length). I transformed the indicator by subtracting 0.5 to center the values around 0 and displayed with a color coded histogram.

Here is what the Chaos Stability as a buy/sell indicator on the SPY looks like:

pic 1

The indicator is currently in a new “sell” position as the value is below zero.
This perhaps reflects the more random and sideways market movement that we have had over the past few months. As with any indicator, this bearish signal is not perfect and in April through early July of 2014 the market made good upward progress despite the chaos stability values being mired deep in the red. It is useful to look at some other charts to get a sense of when the buy and sell signals occur.

pic2

pic3

pic 1

pic4

It is hard to discern what is going on without careful inspection, but it seems as if the chaos/stability indicator flashes buy signals at swing lows- where the market is moving persistently downward or in persistent bull moves upward out of corrections or at the top of established rallies. Sell signals tend to occur near market tops where things get choppy or in areas of congestion where the market is moving sideways within its long-term trend. Since persistency occurs both in up and down moves, signals are uncorrelated or even negatively correlated to a trend-following strategy as highlighted in the original post. This is important to those looking to diversify a trend strategy on a single asset.

Smoothed Chaos Stability Metric

One of the challenges I noticed when looking at the charts was that the indicator frequently switched from buy to sell- especially as the value hovered close to zero. Smoothing seemed to be a logical approach to reduce some of the whipsaw trades and reduce turnover. To address this issue, I applied John Ehler’s Super Smoother method (http://traders.com/Documentation/FEEDbk_docs/2014/01/TradersTips.html) to to the Chaos Stability measure. Notice the indicator below. This reduced the number of trades by 11% and the Profit Factor went up by 6 %.

pic5

Walk Forward Analysis

One of the challenges of new indicators is that they tend to promise a lot but fail to deliver in the real world. Often the reason this happens is because the examples presented by the developer are tuned to a specific set of parameters- in other words the indicator is over fit and is not robust. So is DV’s innovative new indicator just lucky or is it stable? One of the best ways to evaluate whether an indicator has any predictive power is to perform a walk forward test. An indicator with no predictive power will tend to fail using such tests. For this evaluation, I did a walk-forward test in Tradestation. This module continuously re-optimizes the parameters so that at each period of time we are using out-of-sample results. We can get greater confidence in the strategy if it performs well using walk-forward. The results are below :

pic 6

Based on these criteria for evaluation, the DV Chaos/Stability indicator passes with flying colors. In addition to passing the walk-forward test the logic of indicator is also sound- which is an often overlooked but important qualitative assessment. In our quantitative research methodology we always apply a walk-forward analysis and qualitative assessment. The hypothetical equity curve from the walk-forward results showing each out-of-sample period over time are presented below.

pic7

Tradestation Walk Forward Analyzer Performance Graph. The results are hypothetical results and are NOT an indicator of future results and do NOT represent returns that any investor actually attained

Good quantitative research is a combination of different but stable ideas which either confirms each other or adds diversity to the overall model. I agree with Ray Dalio that 15 uncorrelated return streams is the holy grail of investing (
http://www.businessinsider.com/heres-the-most-genius-thing-ray-dalio-said-2011-9). DV’s chaos stability regime model could be a viable uncorrelated candidate.

Disclosure

The research discussion presented above is intended for discussion purposes only and is not intended as investment advice, recommendation of any particular investment strategy including any of the depicted models. There are inherent limitations of showing portfolio performance based on hypothetical & back-tested results. Unlike an actual record, hypothetical results cannot accurately reflect the effect of material economic or market factors on the price of the securities, and therefore, results may be over or under-stated due to the impact of these factors. Since hypothetical results do not represent actual trading and may not accurately reflect the impact of material economic and market factors, it is unknown what effect these factors might have had on the model depicted above. Past performance, whether based on hypothetical models or actual investment results, is not indicative of future performance.

3 Comments leave one →
  1. omar permalink
    April 17, 2015 5:18 pm

    I have recreated the data in excel with Bloomberg data, and my chart over the past year looks nothing like the one above, either with percent rank or z scores. Maybe my calc’s are wrong but it seems pretty straight forward. Take the H – L for 10 days, sum those up. Take the highest high minus the lowest low over those 10 days. Divide the first by second. Average those over 60 days. Then calc either z score or percent rank over 252 days. Happy to share the spreadsheet if anyone wants a look. thanks

  2. omar permalink
    April 17, 2015 5:46 pm

    Now I’m really confused, I thought the lower the percent rank number, the greater “stability” and the higher the number reflected more “chaos.” The article above is doing the opposite as he says the indictor just gave a sell signal by crossing under zero (or crossing below .5 without this transformation).

Trackbacks

  1. Quantocracy's Daily Wrap for 04/17/2015 | Quantocracy

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: