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.

Clone Algorithm
487
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 55f139ef90d0160df5871e56
There was a runtime error.
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..

Clone Algorithm
39
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 55f703b75222120dfe95db5e
There was a runtime error.