Welcome to the AlphaNova Community
Welcome everyone! This is the official community forum for AlphaNova. Share strategies, ask questions, and collaborate with fellow quants.
Rules
40 Replies
Great analysis! I've been using a similar approach with rolling z-scores and it's been working well for mean reversion signals.
One thing to watch out for: survivorship bias in the training data. Make sure you include delisted securities.
Great analysis! I've been using a similar approach with rolling z-scores and it's been working well for mean reversion signals.
I ran a quick backtest on this idea and got a Sharpe of about 1.2 before costs. Not bad for a simple strategy.
Thanks for sharing! This is exactly the kind of insight that helps the community grow. Bookmarking this thread.
The data quality in this competition is actually quite good compared to real-world datasets. In practice, you'd spend 60%+ of your time cleaning data.
import numpy as np
from scipy import optimize
def max_sharpe_portfolio(returns, rf=0.0):
n = returns.shape[1]
init_w = np.ones(n) / n
bounds = [(0.0, 0.1)] * n
constraints = {'type': 'eq', 'fun': lambda w: np.sum(w) - 1.0}
result = optimize.minimize(
lambda w: -(np.mean(returns @ w) - rf) / np.std(returns @ w),
init_w, bounds=bounds, constraints=constraints
)
return result.x
Here's a simple max-Sharpe optimizer for reference.