Getting started with the submission API
New here and having trouble understanding how to submit predictions via the API. The docs mention a JSON format but I keep getting validation errors.
Here's what I'm sending:
{
"predictions": [["AAPL", 0.02], ["MSFT", -0.01]]
}
Is this the right format? Any help appreciated!
58 Replies
I ran a quick backtest on this idea and got a Sharpe of about 1.2 before costs. Not bad for a simple strategy.
Anyone else noticing that momentum factors have been working particularly well in the last month of competition data?
For time-series cross-validation, I've found that 5 expanding windows with a 21-day embargo works well for daily data.
Turnover control is crucial. My best performing model has a turnover of only 8% daily. High turnover strategies rarely survive transaction costs.
I'd recommend reading "Quantitative Portfolio Management" by Michael Isichenko. It's the best practical guide I've found.
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.
Have you considered using PCA to reduce the dimensionality of the feature space? I found that the first 10 components capture 80%+ of the variance.
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.
I think the platform should add a paper trading mode so we can test strategies in a more realistic setting between competitions.
The key insight is that most alpha signals decay rapidly. You need to focus on signals with a half-life of at least 5-10 days.