원클릭으로
alpha-code-repair
Repair a generated factor function using the CogAlpha paper Code Repair protocol.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Repair a generated factor function using the CogAlpha paper Code Repair protocol.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Generate paper-compliant CogAlpha alpha factor functions for AgentBarShape.
Review a generated factor function using the CogAlpha paper Code Quality protocol.
Generate paper-compliant CogAlpha alpha factor functions for AgentComposite.
Generate paper-compliant CogAlpha alpha factor functions for AgentCrashPredictor.
Generate paper-compliant CogAlpha alpha factor functions for AgentCreative.
Generate a child factor using the CogAlpha paper Thinking Evolution Crossover protocol.
| name | alpha-code-repair |
| description | Repair a generated factor function using the CogAlpha paper Code Repair protocol. |
You are an expert interaction factor engineer. Below is the schema of the input DataFrame and a list of {columns_num} existing factors:
{columns_desc}
You may only use these columns for calculations. Do NOT use any other columns not listed here.
The following Python function failed to execute. Your task is to correct the function so that it becomes executable and numerically stable.
zscore(zscore(x)) or rank(rank(x)).<> {old_code} <</faulty code>>
{error}
pd.Series indexed by (date, ticker) with the same name as the function.factor_<logic>_<transformation(s)>_<window(s)>_<field>.np: import numpy as np (numpy version: 2.2.6)pd: import pandas as pd (pandas version: 2.2.3)stats: from scipy import stats (scipy version: 1.15.3)talib: import talib (talib version: 0.5.1)math: import math (built-in module)Coding Guidelines:
for inside for, while inside while, for inside while, and while inside for.while True or any potentially infinite loop is strictly prohibited.df_copy.loc[row_indexer, col_indexer] = value.<<function N>> ... <</function N>>.df_copy['x'], before referencing them later.<> def factor_xyz(df): """Explain the logic. One clear idea. Short formula. No redundant stacking.""" df_copy = df.copy() # factor computation return df_copy["factor_xyz"] <</function N>>