S&C Article "Using Correlations to trade the SP500" Feb 2017 issue
Author: lkirsch
Creation Date: 2/26/2017 10:17 PM
profile picture

lkirsch

#1
Dear Ms Wang,

I was impressed by the performance of your model in S&C in Feb "Using Correlations
to trade the SP500". I tried to reproduce the result in Wealth-Lab Pro using Yahoo
data and the 13 week correlation with an 8 week SMA as you specified. My results
are quite different with an APR of 8.05% compared to your 11.9%. I used the same time
window as you specified (1/2/2003-8/16/2016). This has some problem in the some of the Guggenheim funds that you used do not begin until about 2007, so I assume they
cannot contribute to the correlation until they appear. Has anyone reproduced your
results?

I am enclosing some details of my result

Yours truly,

Lawrence Kirsch
profile picture

Eugene

#2
Lawrence,

Reasons can be numerous:

1. The most obvious one is "seed data". Unlike some backtesting packages, indicator values in WLP are generally not available on the first date of the backtesting range e.g. 1/2/2003. If this is the case, author's trading could have started around that date and WLP is waiting for 13 weeks as presumably the longest indicator period. Fortunately, to work around it we have developed a method in Community Components library - it's called GetAllDataForSymbol. If your DataSet contains enough data before 1/2/2003, trading can start on that date without having to wait.

2. Difference in the data. Yahoo! data can be dividend- and split-adjusted, others not. Different vendors can have slightly different data or even bogus bars (like Yahoo! has for German stocks - compare it to the clean and precise Wealth-Data) etc.

3. The effect of commission. This can be excluded because commissions aren't applied in your backtest.

3. Different indicator formula. We use Pearson's correlation which matches Excel whereas the author might have used some other formula?

And more.
profile picture

lkirsch

#3
Eugene,

Thanks for the comments.
I think the missing 13 weeks can't be the problem since when you compare her annual results with mine
in years after 2000, they are vastly different. The yahoo data could in fact be different, but that is what
she specified.

Since you often code strategies for S&C, I wondered if you had tried a comparison with this article. If
she is fundamentally wrong, we owe it to S&C readers to make them aware of it. If I am wrong then
I would appreciate knowing my error. That's how we learn.

Lawrence
profile picture

Eugene

#4
Lawrence,

Sorry, I haven't seen this article.
profile picture

lkirsch

#5
I have the article, but I don't want to post it. If you don't get S&C, I can send it to you personally, if
you send me your email address.

Lawrence

This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).