Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Trading strategy - experiment with covariance and cross sectional mean

A simple algorithm based on cross sectional mean of a bunch of stocks and their covariance. It works great from 2003 until July 2008 but after that fails to work. I think it can be improved by using a different bunch of stocks and also possibly changing the hedge security. Please keep me posted if you manage to find a better composition or trick to get it working.

3 responses

Could you please write down the equations (formulas) that you are using to get the score for a given security?

Tim,

I am taking weekly log returns (WSR) and then finding the cross sectional mean return (MR) for each day. Then excess returns are defined as the return on top of the MR.

Excess return (ER) = WSR - MR
Weight = covariance(delta(WSR), delta(ER))

where delta is the first difference.

Hope that helps.

Best regards,
Pravin

While trying to understand what this algorithm was doing, I added some comments and changed some of the variable names, etc. I'm attaching my result of this - I shouldn't have changed anything about what this algo actually does. Thought others might find this useful..