Gold and the Stock Market and a Curve-Fitted Strategy

16May09

I’m doing a little playing around with the short-term interaction between the price of gold and the stock market. Some semi-interesting observations…

20090515.01

The table above shows the next-day performance of GLD (gold ETF) depending on whether gold and the S&P 500 closed up or down on the day, from November of 2004.

The three sets of numbers in each box are (1) the average return, (2) return relative to standard deviation (an overly-simple measure of risk-adjusted return), and (3) the % of days that were positive. Geek note: I’ve detrended the average returns by subtracting from them the average of all days in the sample.

Hold that table in the memory bank for just a moment. The next table shows the same test, but looks at the next day performance of the S&P 500 rather than gold.

20090515.02

I’ve highlighted the squares where each asset was, based on these numbers, particularly predictable (green for bullish, red for bearish).

Note how gold’s next-day performance became much more predictable when it diverged from the S&P 500 (one closed up, the other down). In contrast, note how the S&P 500 was more predictable when it moved in line with gold.

In both instances, the asset being tested was contrarian (up closes tended to follow down closes, and vice-versa).

Next, let’s look at an entirely curve-fitted (and NOT to be traded) strategy that just trades each of those highlighted squares (long when green, short when red). The squares are mutually exclusive, so the strategy will always invest in one asset trading one direction.

Geek note: this test is frictionless (doesn’t account for transaction costs/slippage).

20090515.03
[logarithmically-scaled]

I say that this strategy is not trade-worthy because (1) the sample size is way too small (less than 5 years), (2) my whole approach reeks of data-mining, and (3) even over this very short test results were inconsistent.

But it’s an interesting observation and one that I think deserves me getting off my rear end and digging up some more gold data to put through the paces. More to follow.

Happy Trading,
ms

 

To stay up to date with what’s happening at the MarketSci Blog, we recommend subscribing to our RSS Feed or Email Feed.



10 Responses to “Gold and the Stock Market and a Curve-Fitted Strategy”

  1. 1 tescela

    Michael, I love your analysis so much that I think I may be developing a “man-crush.”

    ;)

    • 2 marketsci

      RE to tescela: I think that takes the top spot for best compliment ever received at the blog =)

  2. 3 Josh

    Hi Michael,

    Very interesting finding!

    So let me see if I got this right. If S&P is down & GLD is down you go long S&P for one day? And if S&P is up & GLD is down you go long GLD? Are you holding from close to close or from the next day’s open till close?

    Thanks,

    Josh

    • 4 marketsci

      RE: to Josh: Correct. And it’s from close to close.

      P.S. would just like to reiterate my warning – I took a very curve-fitting approach to the problem, so I don’t want to get too gung ho about the results. I think the idea needs a lot more fleshing out.

      michael

  3. 5 Blue cat

    That’s quite an amazing set of observations!

  4. 6 whartonite

    I am carefully reading your blog, and your statistic tests are more or less valid. As you said, I don’t think you have enough to set this as an idea, I don’t even think you have reason to get optimistic about your findings so far. I am eager to see a more detailed test though. Gold ETFs are relatively new though, I don’t know what security you can use that mimics the price of gold except for this ETF that has a longer data range.

  5. Michael,

    Interesting results. Quite a few years back I had looked at the often claimed inverse relationship of the market and gold and didn’t find much. But that was on a long term scale, not short term as you looked at here.

    How much trading does this system do? I realize it is over fitted but just curious how much of these gains would be eaten up by slippage?

    Matt

    • 8 marketsci

      RE to Matt: almost daily (once per day). The average daily return in the graph above was 0.22% so commissions would be a real concern. The S&P 500 leg could be traded with actively-traded mutual funds (http://marketsci.wordpress.com/2009/03/09/faq-why-i-trade-leveraged-mutual-funds/) so that leg would be near frictionless. The gold leg could not so just a rough estimate for friction to breakeven would be 0.44% per gold round trip (0.22% x 2) or $43.38 per $10k traded. michael

  6. 9 Anton

    Michael,

    You have mentioned the small sample size, data-mining approach and inconsistent results (BTW, they do look consistent to me on the graph). Not trade-worthy. OK.

    Well, is not the same true, for example, for the SP 500 vs Energy Sector theme that you suggested for the SOTM as potentially tradeable: inconsistent results, small sample, the idea might be a result of playing with data?

    http://marketsci.wordpress.com/2008/11/19/bear-market-theme-sp-500-vs-energy-sector-strategy/

    What criteria, in your opinion, makes the latter theme potentially tradeable??
    Consistency? NO. Return relative to standard deviation? YES (but, it is pretty high in the example shown on the graph above, too). What else?

    Thank you very much for sharing your thoughts.

    • 10 marketsci

      RE to Anton: good question – the difference is that that that S&P 500 vs Energy Sector strategy was a very specific theme for a very specific market…I wrote:

      “I call this a theme (implying that it’s temporary) because prior to the start of this bear market it didn’t provide any consistent edge.”

      I think this one has the potential to be a full semi-robust strategy that one could commit capital towards directly, but would require more testing to know that.

      Short answer? Higher benchmark.

      michael


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 )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

Join 48 other followers