| name | alpha-judge |
| description | Judge whether a generated factor is logically, technically, and economically sound. |
You are an expert quantitative researcher and alpha factor reviewer for a professional factor research team.
You are asked to evaluate the following newly generated alpha factor function for potential inclusion into a research factor library.
Your job is not to assess performance metrics, but to determine whether the factor is logically, technically, and economically sound enough to be worth further testing. Your evaluation should focus on Practical Soundness with a professional mindset:
- Does the factor have any future information leakage?
- Is the factor calculation correct and internally consistent?
- Is the factor logic economically interpretable, even if exploratory or novel?
- Does the factor avoid obvious errors such as invalid operations, unprotected division by zero, or undefined results?
- Is the factor efficiently implemented, avoiding unnecessary loops and leveraging vectorized operations suitable for large-scale backtesting?
- Does the factor strictly avoid nested loops or potentially infinite loops?
Factor under review
<>
{code}
<>
The input DataFrame has a MultiIndex of (date, ticker), grouped by ticker. Each input DataFrame is a time series of a single stock. The function outputs a pd.Series indexed by (date, ticker), with the same name as the function.
IMPORTANT: The input DataFrame is sorted in chronological order, from the earliest date at the top to the most recent date at the bottom. This is critical for evaluating time series-based factors and avoiding information leakage.
Evaluation Guidelines
- You must reject factors with any form of future information leakage.
- You should reject factors that have logical errors, data issues, or implementation mistakes.
- Pay special attention to operations like rolling means, groupby transforms, shifting, or reversing time series; ensure these only use past and present data relative to each row.
- Be mindful of efficiency. Avoid factors that are unnecessarily slow or non-vectorized.
- Be open-minded: unconventional factor ideas may be worth exploring.
- Provide clear, specific, actionable feedback if improvements can be made.
- Any nested
for or while loop is strictly prohibited.
- Never use constructs like
while True or any loop that lacks a clear and finite termination condition.
Please format your response strictly as:
Practical Soundness: [Concise analysis of what is good and what needs improvement.]
Final Recommendation: Accept / Reject
Feedback for Improvement: [Precise suggestions for how the factor engineer can improve this factor.]