Blending noncorrelated (or anti-correlated) equity curves

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
MarkS
Roundtable Fellow
Roundtable Fellow
Posts: 70
Joined: Wed Dec 15, 2010 12:10 pm
Location: Chicago, IL

Post by MarkS »

sluggo wrote:I hope you realize that we are measuring the correlation of Equity Curves
Yes, I did read your original post.
sluggo wrote:Therefore the correlation of their outputs (equity curves) is very different than the correlation of their inputs (price data). This is a second, underappreciated, free lunch on Wall Street.

System 1 trading portfolio P produces equity curve 1. System 2 trading the same portfolio P produces equity curve 2. The correlation between (equity curve 1 and equity curve 2) is VERY different than the correlation between (prices of the various instruments in portfolio P).
And I'm stating that just like the inputs, the outputs also change over time. In the most simplistic version, take two markets, say oil and S&P. Make them move in opposite direction so your correlation is -1.0. Then overlay two systems, which take opposite signals, so that they are also -1.0 in correlation. If you change the correlation of the inputs to 1.0, you will also change the correlation of the outputs; unless your system is dynamic enough to recognize the change in correlation and make self-adjustments.
Eventhorizon
Roundtable Knight
Roundtable Knight
Posts: 229
Joined: Thu Jul 08, 2010 2:36 pm
Location: Boulder, CO
Contact:

Post by Eventhorizon »

Mark, there are some things going on here that are worth drawing attention to: the time frames of one's analysis are a key element here.

An error I continue to make because this stuff is not intuitive to me yet, is to assume that because two instruments are correlated, they move the same direction. Look at Sluggo's original equity curves, they both move the same direction (up) but may have low, even negative correlations.

Consider two instruments, one is alternating +2%, -1%, while the other is alternating -1%, +2%. Both are rising 0.49% per day (continuously compounding), but they have -ve correlation (-1, in fact). So, over 5 days both rise 2.5%. If this performance continued for a year and you examined their correlation on a weekly basis it would be +1 !!!

My point is, in this situation TWO long term systems, hopefully, would be long both assets even though their daily correlation is -1. Their daily correlations could swing all the way back to +1 and both systems should still be long. The correlation characteristics of the systems' equity curves would not necessarily change much.

This is, I hope, an illustration of Sluggo's point that your system's equity curves are a transform of price. Transforms can be complicated, subtle and non-linear.

The correlation characteristics one examines have to be related to the actionable time-frame of your systems.
Macro
Roundtable Fellow
Roundtable Fellow
Posts: 70
Joined: Sat Dec 03, 2011 11:22 am

Post by Macro »

I'm new to TB and this is by far the most interesting thread I've read till now- I must take my hat off to Sluggo.
tigertaco
Full Member
Full Member
Posts: 23
Joined: Fri Feb 27, 2009 1:50 am

Post by tigertaco »

One question about this. We don't have any guarantees that these equity curve return correlations are stable. More precisely the best fit lines may change their slopes when future data is added. To address this issue one simple suggestion (or maybe you already done this?)

Anyway, suggestion is two split past data 50/50. Compute all the correlations on one of the halves, get the slopes of best fit lines and then see how much slopes change when the other half is added. Any other validation method is fine too provided it gives some error for out-of-sample data; probably only average error is realistic.

Or since its time series data, maybe order points by time and see how slope changes as we add new points.
ifyousayso
Full Member
Full Member
Posts: 20
Joined: Sun Feb 19, 2012 11:47 am
Location: UK

Post by ifyousayso »

Thanks very much for setting it out so simply, Ian. Your last sentence seems to me the take-home message.

<quote="Eventhorizon">Mark, there are some things going on here that are worth drawing attention to: the time frames of one's analysis are a key element here.

An error I continue to make because this stuff is not intuitive to me yet, is to assume that because two instruments are correlated, they move the same direction. Look at Sluggo's original equity curves, they both move the same direction (up) but may have low, even negative correlations.

Consider two instruments, one is alternating +2%, -1%, while the other is alternating -1%, +2%. Both are rising 0.49% per day (continuously compounding), but they have -ve correlation (-1, in fact). So, over 5 days both rise 2.5%. If this performance continued for a year and you examined their correlation on a weekly basis it would be +1 !!!

My point is, in this situation TWO long term systems, hopefully, would be long both assets even though their daily correlation is -1. Their daily correlations could swing all the way back to +1 and both systems should still be long. The correlation characteristics of the systems' equity curves would not necessarily change much.

This is, I hope, an illustration of Sluggo's point that your system's equity curves are a transform of price. Transforms can be complicated, subtle and non-linear.

The correlation characteristics one examines have to be related to the actionable time-frame of your systems.</quote>
trackstar
Roundtable Fellow
Roundtable Fellow
Posts: 76
Joined: Sun Mar 09, 2008 11:03 pm
Location: Houston Texas

Post by trackstar »

First off I need to say thanks to Sluggo for posting this goldmine of data. I have a few questions that I am having a hard time resolving myself.

Two critical pieces are stop size (assuming one is sizing their trade based on this risk) and fractional bet per trade. Both of these have links to "leverage" but reading through these posts has confused me as to how each apply in this analysis.

Sluggo posted a link to another thread that showed how he stepped through stop size in .2 ATR increments. I am wondering why this is the method used to equalize Annual Volatility as changes in stop size can have a drastic impact on many other system performance outputs.....
squaredQ
Full Member
Full Member
Posts: 23
Joined: Wed Feb 01, 2012 5:27 pm

Post by squaredQ »

This is a very useful study. However, IMO, it is 100% curve fit.
Every parameter that is used to develop the study (e.g. std)
would need to be updated in an online fashion in order to have significant usefulness.
I would be thrilled to see the same study started at some anchor window
(example 10 years) and then walked forward on some periodic basis,
with parameters apriori estimated and observations updated out of sample, accordingly.

The resulting equity curve would far more likely represent a realistic basis.
I would expect volatility to be less smooth with this pragmatic approach.
Not in any way to discredit the tremendously useful work you shared,
but very important to clarify and hopefully everyone here understands why.

Looking back through this thread, I see that some have already touched upon the stability issue.The same issue that plagues mean reversion/ARB or momentum strategies.
The results only make practical sense looked at from some type of cross validated perspective.

Here's one of my favorite graphical illustrations of this problem:
Image

As for the equity–curve based application, the theoretical concepts will work on any multivariate time series.An intuitive illustration is to simply take two sine wave signals 180° out of phase and add them; the net result will be a perfect cancellation of excursions about the mean, leaving only the underlying mean present.
Jake Carriker
Site Admin
Site Admin
Posts: 1493
Joined: Fri Sep 12, 2003 10:32 am
Location: Austin, Texas

Post by Jake Carriker »

Hi SquaredQ,
I would be thrilled to see the same study started at some anchor window
(example 10 years) and then walked forward on some periodic basis
Prepare to be very excited when you look upon figures 1-A and 2-A on page 13 of a white paper that we published when I was head of research at Fall River Capital. The paper is titled, "Evolution of a Mechanical Trader," and is available for the public to download at the FRC website. The link to the White Papers page is http://www.fallrivercapital.com/WhitePapers.html

As with any research of this type, there are plenty of choices to make along the path. Choices that a different researcher might make differently. I invite a different researcher to by all means do so and to publish the results if it pleases them to share.
squaredQ
Full Member
Full Member
Posts: 23
Joined: Wed Feb 01, 2012 5:27 pm

Post by squaredQ »

Jake,
I am absolutely excited, thrilled, and delighted that you shared this paper. It is one of the best contributions I've seen on any public form in a long time. For one, it tends to corroborate my earlier suspicions about the cross validated sharpe ratio correlations.
I also find it interesting that such strong IS/OOS weak signal correlation correlations did not translate to high sharpe ratio correlations. Perhaps it is the unstable drift components of the underlying series that cause such a mismatch-- (come to think of it, volatility clusters and is far more related to nearby volatility windows than mean returns, so it makes sense). That being said, I hope you don't mind if I ask some probing questions.

1) I assume all of the initial studies (sharpe dist) are only related to the MMS component (as the hundred percent continuous long or short exposure component would add a very large outlier to the number of average days traded distribution). If that is the case, are all of the trades of the MMS strategy continuously exposed over the entire 25 year period? Or are some strategies only activated over a smaller portion of the total window (example-30% exposure with average nine-day trade length).
2) Is there a particular fitness metric that the in sample results were optimize towards? For instance, were pre sub strategy candidates optimized towards sharpe then selection candidates were optimized/pruned towards minimizing mean correlation across assets?
3) how did the MMS system perform over the 2007 mini quant crash (see Lo, et al)? It seems that many systems designed to combat correlation were simultaneously flipped in the wrong directions during that period as correlated long/short hedge funds scrambled to liquidate?
4) what years were the 20/5 periods over and what were the CAGRs?
5) do the 500MMA sub-strategies each operate on the entire MMA asset set (or surrogate therof)? Or do they operate on selected sub-sets of that universe?
6) The scatterplot only shows correlations to some benchmark... Do the scatterplot of pairwise sub-strategy correlations show a similar R^2 IS vs. OOS?
7) Does the first equity curve reflect 5 yr OOS (unfitted data) on the last five years?

I don't expect 100% of answers, but thanks for any illumination you can provide.

SQ
Last edited by squaredQ on Sun Jul 22, 2012 5:35 pm, edited 11 times in total.
sluggo
Roundtable Knight
Roundtable Knight
Posts: 2987
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo »

I have shared my research. Jake has shared his research. It's now time for others to do the same.
akhoury
Roundtable Knight
Roundtable Knight
Posts: 113
Joined: Mon Feb 28, 2011 11:07 am
Location: Stuart, Florida

Post by akhoury »

Jake / Sluggo

Thanks very much for this. It was a real treat. Thanks again..
Post Reply