Jack 1 month ago
parent 11e585b71b
commit 2d265949d7
  1. 39
      generated_alpha/2025-12-28/154826.txt
  2. 39
      generated_alpha/2025-12-28/154918.txt
  3. 39
      generated_alpha/2025-12-28/195436.txt
  4. 20
      generated_alpha/2025-12-28/195522.txt
  5. 13
      generated_alpha/2026-01-01/161032.txt
  6. 19
      generated_alpha/2026-01-01/161057.txt
  7. 60
      generated_alpha/2026-01-01/164625.txt
  8. 19
      generated_alpha/2026-01-01/164654.txt
  9. 8
      main.py
  10. 301
      manual_prompt/manual_prompt_20251227164318.txt
  11. 173
      manual_prompt/manual_prompt_20251228152413.txt
  12. 329
      manual_prompt/manual_prompt_20251228154538.txt
  13. 329
      manual_prompt/manual_prompt_20251228154739.txt
  14. 210
      manual_prompt/manual_prompt_20251228195359.txt
  15. 181
      manual_prompt/manual_prompt_20260101150133.txt
  16. 181
      manual_prompt/manual_prompt_20260101161024.txt
  17. 181
      manual_prompt/manual_prompt_20260101164547.txt
  18. 130
      prepare_prompt/alpha_prompt.txt
  19. 21
      手动获取数据集词根.txt

@ -0,0 +1,39 @@
ts_corr(ts_backfill(fscore_total,44), ts_backfill(divide(fnd6_spce,add(call_breakeven_120,put_breakeven_120)),44),528)
ts_corr(ts_backfill(ts_delta(fscore_total,132),44), ts_backfill(subtract(fnd6_spce,divide(add(call_breakeven_120,put_breakeven_120),2)),44),792)
ts_corr(ts_backfill(ts_zscore(fscore_total,22),66), ts_backfill(ts_zscore(fnd6_spce,66),66),756)
ts_corr(ts_backfill(ts_rank(fscore_total,22),66), ts_backfill(ts_rank(fnd6_spce,66),66),504)
ts_corr(ts_backfill(multiply(sign(ts_delta(fscore_total,66)),sqrt(abs(ts_delta(fscore_total,66)))),66), ts_backfill(divide(fnd6_spce,call_breakeven_120),66),630)
ts_corr(ts_backfill(ts_sum(fscore_total,66),66), ts_backfill(ts_sum(fnd6_spce,66),66),1008)
ts_corr(ts_backfill(ts_mean(fscore_total,44),66), ts_backfill(ts_mean(fnd6_spce,44),66),880)
ts_corr(ts_backfill(subtract(fscore_total,ts_delay(fscore_total,132)),44), ts_backfill(subtract(fnd6_spce,ts_delay(fnd6_spce,132)),44),660)
ts_corr(ts_backfill(ts_regression(fscore_total,ts_step(1),66,0,0),66), ts_backfill(ts_regression(fnd6_spce,ts_step(1),66,0,0),66),924)
ts_corr(ts_backfill(ts_decay_linear(fscore_total,44),66), ts_backfill(ts_decay_linear(fnd6_spce,44),66),572)
ts_corr(ts_backfill(group_neutralize(fscore_total,top1000),44), ts_backfill(group_neutralize(divide(fnd6_spce,call_breakeven_120),top1000),44),616)
ts_corr(ts_backfill(ts_scale(fscore_total,44),44), ts_backfill(ts_scale(fnd6_spce,44),44),704)
ts_corr(ts_backfill(ts_av_diff(fscore_total,44),44), ts_backfill(ts_av_diff(fnd6_spce,44),44),528)
ts_corr(ts_backfill(ts_std_dev(fscore_total,22),66), ts_backfill(ts_std_dev(fnd6_spce,22),66),792)
ts_corr(ts_backfill(if_else(ts_delta(fscore_total,22)>0,ts_delta(fscore_total,22),0),66), ts_backfill(if_else(ts_delta(fnd6_spce,22)>0,ts_delta(fnd6_spce,22),0),66),504)
ts_corr(ts_backfill(ts_product(fscore_total,22),66), ts_backfill(ts_product(fnd6_spce,22),66),396)
ts_corr(ts_backfill(divide(ts_delta(fscore_total,22),ts_std_dev(fscore_total,66)),66), ts_backfill(divide(ts_delta(fnd6_spce,22),ts_std_dev(fnd6_spce,66)),66),840)
ts_corr(ts_backfill(signed_power(ts_delta(fscore_total,44),0.5),66), ts_backfill(signed_power(ts_delta(fnd6_spce,44),0.5),66),660)
ts_corr(ts_backfill(add(ts_zscore(fscore_total,22),ts_rank(fscore_total,22)),44), ts_backfill(add(ts_zscore(fnd6_spce,22),ts_rank(fnd6_spce,22)),44),880)
ts_corr(ts_backfill(subtract(ts_zscore(fscore_total,44),ts_delay(ts_zscore(fscore_total,44),22)),44), ts_backfill(subtract(ts_zscore(fnd6_spce,44),ts_delay(ts_zscore(fnd6_spce,44),22)),44),616)

@ -0,0 +1,39 @@
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756)
ts_corr(ts_backfill(fscore_momentum,50), ts_backfill(fscore_value,50),756)
ts_corr(ts_backfill(fscore_momentum,80), ts_backfill(fscore_value,80),756)
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),500)
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),1000)
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756) * ts_std_dev(fscore_momentum,66)
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756) * ts_std_dev(fscore_value,66)
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756) * ts_zscore(fscore_momentum,66)
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756) * ts_zscore(fscore_value,66)
group_neutralize(ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756), pv13_h_min2_focused_sector)
group_neutralize(ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756), pv13_h_min24_500_sector)
group_neutralize(ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756), pv13_h_min22_1000_sector)
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756) * if_else(ts_count_nans(fscore_momentum,66) > 0, 0, 1)
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756) * if_else(ts_count_nans(fscore_value,66) > 0, 0, 1)
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756) * sign(ts_delta(fscore_momentum,1))
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756) * sign(ts_delta(fscore_value,1))
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756) * ts_rank(fscore_momentum,66)
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756) * ts_rank(fscore_value,66)
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756) * winsorize(ts_delta(fscore_momentum,66),4)
ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756) * winsorize(ts_delta(fscore_value,66),4)

@ -0,0 +1,39 @@
ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10)
group_neutralize(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), group)
winsorize(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), 3)
if_else(ts_std_dev(subtract(implied_volatility_call_120, implied_volatility_put_90), 10) > 10, 0, ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10))
ts_zscore(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), 20)
ts_rank(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), 20)
scale(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10))
scale(group_neutralize(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), group))
scale(group_neutralize(ts_zscore(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), 20), group))
winsorize(group_neutralize(ts_zscore(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), 20), group), 3)
ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 5)
ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 15)
ts_sum(subtract(implied_volatility_call_120, ts_mean(implied_volatility_put_90, 5)), 10)
ts_sum(subtract(ts_mean(implied_volatility_call_120, 5), implied_volatility_put_90), 10)
ts_sum(ts_delta(subtract(implied_volatility_call_120, implied_volatility_put_90), 1), 10)
ts_sum(ts_zscore(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), 10)
ts_sum(ts_rank(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), 10)
ts_sum(ts_scale(subtract(implied_volatility_call_120, implied_volatility_put_90), 5), 10)
ts_sum(divide(subtract(implied_volatility_call_120, implied_volatility_put_90), ts_std_dev(implied_volatility_call_120, 10)), 10)
ts_sum(ts_backfill(subtract(implied_volatility_call_120, implied_volatility_put_90), 5), 10)

@ -0,0 +1,20 @@
ts_sum(winsorize(subtract(implied_volatility_call_120, implied_volatility_put_90), std=3), 10)
ts_zscore(subtract(implied_volatility_call_120, implied_volatility_put_90), 10)
group_neutralize(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), "subindustry")
rank(ts_sum(winsorize(subtract(implied_volatility_call_120, implied_volatility_put_90), std=4), 10))
ts_rank(subtract(implied_volatility_call_120, implied_volatility_put_90), 10)
ts_scale(subtract(implied_volatility_call_120, implied_volatility_put_90), 10)
ts_av_diff(subtract(implied_volatility_call_120, implied_volatility_put_90), 10)
hump(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), hump=0.02)
ts_decay_linear(subtract(implied_volatility_call_120, implied_volatility_put_90), 10)
group_zscore(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), "subindustry")
normalize(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), useStd=true)
ts_std_dev(subtract(implied_volatility_call_120, implied_volatility_put_90), 10)
multiply(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), sign(ts_delta(implied_volatility_call_120, 1)))
rank(ts_zscore(subtract(implied_volatility_call_120, implied_volatility_put_90), 10))
ts_quantile(subtract(implied_volatility_call_120, implied_volatility_put_90), 10, driver="uniform")
winsorize(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), std=3.5)
group_scale(ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10), "subindustry")
ts_correlation(subtract(implied_volatility_call_120, implied_volatility_put_90), implied_volatility_call_60, 10)
ts_arg_max(subtract(implied_volatility_call_120, implied_volatility_put_90), 10)
ts_delta(ts_sum(winsorize(subtract(implied_volatility_call_120, implied_volatility_put_90), std=4), 10), 1)

@ -0,0 +1,13 @@
gross_margin = divide(fnd6_newqeventv110_spceepsq, fnd6_newqeventv110_spcedq)
industry_zscore = group_zscore(gross_margin, group_sw)
zscore_trend = ts_regression(industry_zscore, ts_step(1), 4, 0, 0)
revenue_growth = ts_delta(fnd6_newqeventv110_spcedq, 4)
signal = if_else(revenue_growth >= 0, zscore_trend, 0)
ranked_signal = rank(signal)
final_alpha = subtract(ranked_signal, 0.5)

@ -0,0 +1,19 @@
divide(fnd6_spce, fnd6_newqv1300_spceepsq)
group_zscore(divide(fnd6_spce, fnd6_newqv1300_spceepsq),申万行业分类)
ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqv1300_spceepsq),申万行业分类),4)
sign(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqv1300_spceepsq),申万行业分类),4))
rank(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqv1300_spceepsq),申万行业分类),4))
if_else(fnd6_newqv1300_spceepsq >= 0, ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqv1300_spceepsq),申万行业分类),4), NaN)
multiply(sign(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqv1300_spceepsq),申万行业分类),4)), rank(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqv1300_spceepsq),申万行业分类),4)))
winsorize(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqv1300_spceepsq),申万行业分类),4),4)
group_rank(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqv1300_spceepsq),申万行业分类),4),申万行业分类)
normalize(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqv1300_spceepsq),申万行业分类),4))

@ -0,0 +1,60 @@
gross_margin = divide(fnd6_acdo, fnd6_newqeventv110_spcepd12)
industry_zscore = group_zscore(gross_margin, swsector)
slope = ts_decay_linear(industry_zscore, 4)
alpha_raw = if_else(industry_zscore > 0, reverse(slope), slope)
gross_margin = divide(fnd6_acdo, fnd6_newqeventv110_spcepd12)
industry_zscore = group_zscore(gross_margin, swsector)
slope = ts_decay_linear(industry_zscore, 4)
alpha_raw = multiply(slope, reverse(industry_zscore))
alpha = rank(alpha_raw)
gross_margin = divide(fnd6_acdo, fnd6_newqeventv110_spcepd12)
industry_zscore = group_zscore(gross_margin, swsector)
slope = ts_decay_linear(industry_zscore, 4)
signal = if_else(slope > 0, 1, if_else(slope < 0, -1, 0))
alpha = multiply(signal, industry_zscore)
gross_margin = divide(fnd6_acdo, fnd6_newqeventv110_spcepd12)
industry_zscore = group_zscore(gross_margin, swsector)
slope = ts_decay_linear(industry_zscore, 4)
alpha_raw = ts_zscore(slope, 8)
alpha = reverse(alpha_raw)
gross_margin = divide(fnd6_acdo, fnd6_newqeventv110_spcepd12)
industry_zscore = group_zscore(gross_margin, swsector)
slope = ts_decay_linear(industry_zscore, 4)
combined_score = add(industry_zscore, slope)
alpha = rank(combined_score)
gross_margin = divide(fnd6_acdo, fnd6_newqeventv110_spcepd12)
industry_zscore = group_zscore(gross_margin, swsector)
slope = ts_decay_linear(industry_zscore, 4)
alpha_raw = multiply(industry_zscore, slope)
alpha_rank = rank(alpha_raw)
alpha = subtract(alpha_rank, 0.5)
gross_margin = divide(fnd6_acdo, fnd6_newqeventv110_spcepd12)
industry_zscore = group_zscore(gross_margin, swsector)
slope = ts_decay_linear(industry_zscore, 4)
trend_strength = ts_std_dev(slope, 4)
alpha = multiply(slope, trend_strength)
gross_margin = divide(fnd6_acdo, fnd6_newqeventv110_spcepd12)
industry_zscore = group_zscore(gross_margin, swsector)
slope = ts_decay_linear(industry_zscore, 4)
baseline = ts_mean(industry_zscore, 8)
alpha_raw = subtract(slope, baseline)
alpha = rank(alpha_raw)
gross_margin = divide(fnd6_acdo, fnd6_newqeventv110_spcepd12)
industry_zscore = group_zscore(gross_margin, swsector)
slope = ts_decay_linear(industry_zscore, 4)
pos_alpha = if_else(industry_zscore <= 0, reverse(slope), multiply(slope, -1))
alpha = rank(pos_alpha)
gross_margin = divide(fnd6_acdo, fnd6_newqeventv110_spcepd12)
industry_zscore = group_zscore(gross_margin, swsector)
slope = ts_decay_linear(industry_zscore, 4)
raw_signal = if_else(industry_zscore > 0, if_else(slope < 0, 1, -1), if_else(slope > 0, 1, -1))
alpha = multiply(raw_signal, industry_zscore)

@ -0,0 +1,19 @@
divide(fnd6_spce, fnd6_newqeventv110_spceepsq)
group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业)
ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业), 4)
sign(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业), 4))
multiply(sign(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业), 4)), rank(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业), 4)))
if_else(greater_equal(fnd6_newqeventv110_spceepsq, 0), multiply(sign(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业), 4)), rank(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业), 4))), 0)
ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业), 4, dense=false)
if_else(greater_equal(ts_delta(fnd6_newqeventv110_spceepsq, 1), 0), multiply(sign(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业), 4)), rank(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业), 4))), 0)
winsorize(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业), 4), std=3)
normalize(multiply(sign(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业), 4)), rank(ts_decay_linear(group_zscore(divide(fnd6_spce, fnd6_newqeventv110_spceepsq), group=申万行业), 4))), useStd=true)

@ -62,7 +62,11 @@ def load_keys_text():
print('关键词文本无数据, 程序退出') print('关键词文本无数据, 程序退出')
exit(1) exit(1)
return process_text(';'.join(text_list)) result_str = process_text(';'.join(text_list))
print(f'\n关键词文本处理结果: {result_str}\n')
return result_str
def txtFileLoader(file_path): def txtFileLoader(file_path):
if not os.path.exists(file_path): if not os.path.exists(file_path):
@ -261,7 +265,7 @@ def main():
data_sets = 0 data_sets = 0
print(f'从数据集中提取了 {len(result_data_sets)} 条数据') print(f'从数据集中提取了 {len(result_data_sets)} 条数据')
if len(result_data_sets) > 500: if len(result_data_sets) > 500:
data_sets = random.sample(my_list, 10) data_sets = random.sample(result_data_sets, 10)
else: else:
data_sets = result_data_sets data_sets = result_data_sets

@ -0,0 +1,301 @@
任务指令
【策略类型】优化因子
-ts_corr(ts_backfill(fscore_momentum,66),ts_backfill(fscore_value,66),756)
估值偏离波动空头策略
[[假设]]
价值因子与动量因子在股票中通常不相关,若某只股票同时呈现高动量与高价值评分相关性,则表明其股价与内在价值存在偏离——据此我们对这类股票建立空头仓位。
[[实施方案]]
使用ts_corr()函数测算过去三年间估值评分与动量评分的相关性,通过ts_backfill()算子对前期缺失数据进行回填。
[[阿尔法因子优化建议]]
建议运用分组算子与模型数据,在同类股票组内进行横向比较分析。
*=========================================================================================*
输出格式:
输出必须是且仅是纯文本。
每一行是一个完整、独立、语法正确的WebSim表达式。
严禁任何形式的解释、编号、标点包裹(如引号)、Markdown格式或额外文本。
===================== !!! 重点(输出方式) !!! =====================
现在,请严格遵守以上所有规则,开始生成可立即在WebSim中运行的复合因子表达式。
**输出格式**(一行一个表达式, 每个表达式中间需要添加一个空行, 只要表达式本身, 不要解释, 不需要序号, 也不要输出多余的东西):
表达式
表达式
表达式
...
表达式
=================================================================
重申:请确保所有表达式都使用WorldQuant WebSim平台函数,不要使用pandas、numpy或其他Python库函数。输出必须是一行有效的WQ表达式。
以下是我的账号有权限使用的操作符, 请严格按照操作符, 以及我提供的数据集, 进行生成,组合 10 个alpha:
以下是我的账号有权限使用的操作符, 请严格按照操作符, 进行生成,组合因子
========================= 操作符开始 =======================================注意: Operator: 后面的是操作符,
Description: 此字段后面的是操作符对应的描述或使用说明, Description字段后面的内容是使用说明, 不是操作符
特别注意!!!! 必须按照操作符字段Operator的使用说明生成 alphaOperator: abs(x)
Description: Absolute value of x
Operator: add(x, y, filter = false)
Description: Add all inputs (at least 2 inputs required). If filter = true, filter all input NaN to 0 before adding
Operator: densify(x)
Description: Converts a grouping field of many buckets into lesser number of only available buckets so as to make working with grouping fields computationally efficient
Operator: divide(x, y)
Description: x / y
Operator: inverse(x)
Description: 1 / x
Operator: log(x)
Description: Natural logarithm. For example: Log(high/low) uses natural logarithm of high/low ratio as stock weights.
Operator: max(x, y, ..)
Description: Maximum value of all inputs. At least 2 inputs are required
Operator: min(x, y ..)
Description: Minimum value of all inputs. At least 2 inputs are required
Operator: multiply(x ,y, ... , filter=false)
Description: Multiply all inputs. At least 2 inputs are required. Filter sets the NaN values to 1
Operator: power(x, y)
Description: x ^ y
Operator: reverse(x)
Description: - x
Operator: sign(x)
Description: if input > 0, return 1; if input < 0, return -1; if input = 0, return 0; if input = NaN, return NaN;
Operator: signed_power(x, y)
Description: x raised to the power of y such that final result preserves sign of x
Operator: sqrt(x)
Description: Square root of x
Operator: subtract(x, y, filter=false)
Description: x-y. If filter = true, filter all input NaN to 0 before subtracting
Operator: and(input1, input2)
Description: Logical AND operator, returns true if both operands are true and returns false otherwise
Operator: if_else(input1, input2, input 3)
Description: If input1 is true then return input2 else return input3.
Operator: input1 < input2
Description: If input1 < input2 return true, else return false
Operator: input1 <= input2
Description: Returns true if input1 <= input2, return false otherwise
Operator: input1 == input2
Description: Returns true if both inputs are same and returns false otherwise
Operator: input1 > input2
Description: Logic comparison operators to compares two inputs
Operator: input1 >= input2
Description: Returns true if input1 >= input2, return false otherwise
Operator: input1!= input2
Description: Returns true if both inputs are NOT the same and returns false otherwise
Operator: is_nan(input)
Description: If (input == NaN) return 1 else return 0
Operator: not(x)
Description: Returns the logical negation of x. If x is true (1), it returns false (0), and if input is false (0), it returns true (1).
Operator: or(input1, input2)
Description: Logical OR operator returns true if either or both inputs are true and returns false otherwise
Operator: days_from_last_change(x)
Description: Amount of days since last change of x
Operator: hump(x, hump = 0.01)
Description: Limits amount and magnitude of changes in input (thus reducing turnover)
Operator: kth_element(x, d, k)
Description: Returns K-th value of input by looking through lookback days. This operator can be used to backfill missing data if k=1
Operator: last_diff_value(x, d)
Description: Returns last x value not equal to current x value from last d days
Operator: ts_arg_max(x, d)
Description: Returns the relative index of the max value in the time series for the past d days. If the current day has the max value for the past d days, it returns 0. If previous day has the max value for the past d days, it returns 1
Operator: ts_arg_min(x, d)
Description: Returns the relative index of the min value in the time series for the past d days; If the current day has the min value for the past d days, it returns 0; If previous day has the min value for the past d days, it returns 1.
Operator: ts_av_diff(x, d)
Description: Returns x - tsmean(x, d), but deals with NaNs carefully. That is NaNs are ignored during mean computation
Operator: ts_backfill(x,lookback = d, k=1, ignore="NAN")
Description: Backfill is the process of replacing the NAN or 0 values by a meaningful value (i.e., a first non-NaN value)
Operator: ts_corr(x, y, d)
Description: Returns correlation of x and y for the past d days
Operator: ts_count_nans(x ,d)
Description: Returns the number of NaN values in x for the past d days
Operator: ts_covariance(y, x, d)
Description: Returns covariance of y and x for the past d days
Operator: ts_decay_linear(x, d, dense = false)
Description: Returns the linear decay on x for the past d days. Dense parameter=false means operator works in sparse mode and we treat NaN as 0. In dense mode we do not.
Operator: ts_delay(x, d)
Description: Returns x value d days ago
Operator: ts_delta(x, d)
Description: Returns x - ts_delay(x, d)
Operator: ts_mean(x, d)
Description: Returns average value of x for the past d days.
Operator: ts_product(x, d)
Description: Returns product of x for the past d days
Operator: ts_quantile(x,d, driver="gaussian" )
Description: It calculates ts_rank and apply to its value an inverse cumulative density function from driver distribution. Possible values of driver (optional ) are "gaussian", "uniform", "cauchy" distribution where "gaussian" is the default.
Operator: ts_rank(x, d, constant = 0)
Description: Rank the values of x for each instrument over the past d days, then return the rank of the current value + constant. If not specified, by default, constant = 0.
Operator: ts_regression(y, x, d, lag = 0, rettype = 0)
Description: Returns various parameters related to regression function
Operator: ts_scale(x, d, constant = 0)
Description: Returns (x - ts_min(x, d)) / (ts_max(x, d) - ts_min(x, d)) + constant. This operator is similar to scale down operator but acts in time series space
Operator: ts_std_dev(x, d)
Description: Returns standard deviation of x for the past d days
Operator: ts_step(1)
Description: Returns days' counter
Operator: ts_sum(x, d)
Description: Sum values of x for the past d days.
Operator: ts_zscore(x, d)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean: (x - tsmean(x,d)) / tsstddev(x,d). This operator may help reduce outliers and drawdown.
Operator: normalize(x, useStd = false, limit = 0.0)
Description: Calculates the mean value of all valid alpha values for a certain date, then subtracts that mean from each element
Operator: quantile(x, driver = gaussian, sigma = 1.0)
Description: Rank the raw vector, shift the ranked Alpha vector, apply distribution (gaussian, cauchy, uniform). If driver is uniform, it simply subtract each Alpha value with the mean of all Alpha values in the Alpha vector
Operator: rank(x, rate=2)
Description: Ranks the input among all the instruments and returns an equally distributed number between 0.0 and 1.0. For precise sort, use the rate as 0
Operator: scale(x, scale=1, longscale=1, shortscale=1)
Description: Scales input to booksize. We can also scale the long positions and short positions to separate scales by mentioning additional parameters to the operator
Operator: winsorize(x, std=4)
Description: Winsorizes x to make sure that all values in x are between the lower and upper limits, which are specified as multiple of std.
Operator: zscore(x)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean
Operator: vec_avg(x)
Description: Taking mean of the vector field x
Operator: vec_sum(x)
Description: Sum of vector field x
Operator: bucket(rank(x), range="0, 1, 0.1" or buckets = "2,5,6,7,10")
Description: Convert float values into indexes for user-specified buckets. Bucket is useful for creating group values, which can be passed to GROUP as input
Operator: trade_when(x, y, z)
Description: Used in order to change Alpha values only under a specified condition and to hold Alpha values in other cases. It also allows to close Alpha positions (assign NaN values) under a specified condition
Operator: group_backfill(x, group, d, std = 4.0)
Description: If a certain value for a certain date and instrument is NaN, from the set of same group instruments, calculate winsorized mean of all non-NaN values over last d days
Operator: group_mean(x, weight, group)
Description: All elements in group equals to the mean
Operator: group_neutralize(x, group)
Description: Neutralizes Alpha against groups. These groups can be subindustry, industry, sector, country or a constant
Operator: group_rank(x, group)
Description: Each elements in a group is assigned the corresponding rank in this group
Operator: group_scale(x, group)
Description: Normalizes the values in a group to be between 0 and 1. (x - groupmin) / (groupmax - groupmin)
Operator: group_zscore(x, group)
Description: Calculates group Z-score - numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean. zscore = (data - mean) / stddev of x for each instrument within its group.
========================= 操作符结束 =======================================
========================= 数据字段开始 =======================================注意: data_set_name: 后面的是数据字段(可以使用), description: 此字段后面的是数据字段对应的描述或使用说明(不能使用), description_cn字段后面的内容是中文使用说明(不能使用)
{'id': 'id', 'data_set_name': 'name', 'description': 'description', 'description_cn': 'description_cn'}
{'id': '15', 'data_set_name': 'forward_price_120', 'description': 'Forward price at 120 days derived from a synthetic long option with payoff similar to long stock + option dynamics. Combination of long ATM call and short ATM put.', 'description_cn': '行权价格_120天_合成多头看涨期权_ATM看涨+看跌动态_long_ATM看涨_short_ATM看跌'}
{'id': '35', 'data_set_name': 'option_breakeven_720', 'description': "Price at which a stock's options with expiration 720 days in the future break even based on its recent bid/ask mean.", 'description_cn': '基于最近的_bid_emean_盈亏平衡点_720天后到期的股票期权价格'}
{'id': '98', 'data_set_name': 'fnd6_acdo', 'description': 'Current Assets of Discontinued Operations', 'description_cn': '已终止经营current资产'}
{'id': '113', 'data_set_name': 'fnd6_capxv', 'description': 'Capital Expend Property, Plant and Equipment Schd V', 'description_cn': '资本支出资产、 plant 和设备计划表 V'}
{'id': '119', 'data_set_name': 'fnd6_cicurr', 'description': 'Comp Inc - Currency Trans Adj', 'description_cn': '-comp_inc_currency_trans_adj'}
{'id': '123', 'data_set_name': 'fnd6_ciother', 'description': 'Comp. Inc. - Other Adj.', 'description_cn': '-comp_inc_other_adj_'}
{'id': '125', 'data_set_name': 'fnd6_cisecgl', 'description': 'Comp Inc - Securities Gains/Losses', 'description_cn': '-comp_inc_securities_gains_losses'}
{'id': '239', 'data_set_name': 'fnd6_eventv110_gdwlidq', 'description': 'Impairment of Goodwill Diluted EPS Effect', 'description_cn': 'goodwill损耗后稀释每股收益影响'}
{'id': '240', 'data_set_name': 'fnd6_eventv110_gdwlieps12', 'description': 'Impairment of Goodwill Basic EPS Effect 12MM', 'description_cn': 'goodwill_impairment_basic_eps_effect_12m'}
{'id': '241', 'data_set_name': 'fnd6_eventv110_gdwliepsq', 'description': 'Impairment of Goodwill Basic EPS Effect', 'description_cn': 'goodwill impairment basic_eps_effect'}
{'id': '310', 'data_set_name': 'fnd6_lol2', 'description': 'Liabilities Level 2 (Observable)', 'description_cn': 'Level2 observable 负债'}
{'id': '312', 'data_set_name': 'fnd6_lqpl1', 'description': 'Liabilities Level 1 (Quoted Prices)', 'description_cn': 'Level_1_负债(报价价格)'}
{'id': '313', 'data_set_name': 'fnd6_lul3', 'description': 'Liabilities Level 3 (Unobservable)', 'description_cn': 'Level_3_Liability_Unobservable'}
{'id': '413', 'data_set_name': 'fnd6_newa2v1300_oiadp', 'description': 'Operating Income After Depreciation', 'description_cn': '营业净利润 after depreciation 不变,无需翻译。请提供需要翻译的专业字段名。'}
{'id': '473', 'data_set_name': 'fnd6_newqeventv110_cibegniq', 'description': 'Comp Inc - Beginning Net Income', 'description_cn': 'comp_inc_beginning_net_income'}
{'id': '474', 'data_set_name': 'fnd6_newqeventv110_cicurrq', 'description': 'Comp Inc - Currency Trans Adj', 'description_cn': '-comp_inc_currency_trans_adj'}
{'id': '478', 'data_set_name': 'fnd6_newqeventv110_cipenq', 'description': 'Comp Inc - Minimum Pension Adj', 'description_cn': '-compIncMinPensionAdj'}
{'id': '510', 'data_set_name': 'fnd6_newqeventv110_gdwlamq', 'description': 'Amortization of Goodwill', 'description_cn': 'goodwill摊销'}
{'id': '511', 'data_set_name': 'fnd6_newqeventv110_gdwlia12', 'description': 'Impairments of Goodwill After-Tax - 12MM', 'description_cn': 'goodwill_减值税后_12M'}
{'id': '512', 'data_set_name': 'fnd6_newqeventv110_gdwliaq', 'description': 'Impairment of Goodwill After-tax', 'description_cn': 'goodwill_ impairment_after_tax'}
{'id': '513', 'data_set_name': 'fnd6_newqeventv110_gdwlipq', 'description': 'Impairment of Goodwill Pretax', 'description_cn': 'goodwill impairment pretax'}
{'id': '517', 'data_set_name': 'fnd6_newqeventv110_glceaq', 'description': 'Gain/Loss on Sale (Core Earnings Adjusted) After-tax', 'description_cn': '税后核心 earnings 润亏'}
{'id': '543', 'data_set_name': 'fnd6_newqeventv110_lol2q', 'description': 'Liabilities Level 2 (Observable)', 'description_cn': 'Level_2_Liab_Observable'}
{'id': '546', 'data_set_name': 'fnd6_newqeventv110_lqpl1q', 'description': 'Liabilities Level 1 (Quoted Prices)', 'description_cn': 'Level_1_负债(报价价格)'}
{'id': '549', 'data_set_name': 'fnd6_newqeventv110_lul3q', 'description': 'Liabilities Level 3 (Unobservable)', 'description_cn': 'Level_3_Liability_Unobservable'}
{'id': '623', 'data_set_name': 'fnd6_newqeventv110_spcedpq', 'description': 'S&P Core Earnings EPS Diluted - Preliminary', 'description_cn': 'SP_Core_Earnings_EPS_Diluted_Preliminary'}
{'id': '624', 'data_set_name': 'fnd6_newqeventv110_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': 'SPCE earnings per share diluted'}
{'id': '625', 'data_set_name': 'fnd6_newqeventv110_spceeps12', 'description': 'S&P Core Earnings EPS Basic 12MM', 'description_cn': '标普核心 earnings 每股基本值_12M'}
{'id': '628', 'data_set_name': 'fnd6_newqeventv110_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings 每股基本值'}
{'id': '629', 'data_set_name': 'fnd6_newqeventv110_spcep12', 'description': 'S&P Core Earnings 12MM - Preliminary', 'description_cn': '标普核心 earnings 12个月 - 预liminary'}
{'id': '630', 'data_set_name': 'fnd6_newqeventv110_spcepd12', 'description': 'S&P Core Earnings 12MM EPS Diluted - Preliminary', 'description_cn': 'S&P核心 earnings_12个月稀释后每股盈亏平衡点_初步'}
{'id': '687', 'data_set_name': 'fnd6_newqv1300_cicurrq', 'description': 'Comp Inc - Currency Trans Adj', 'description_cn': '-comp_inc_currency_trans_adj'}
{'id': '688', 'data_set_name': 'fnd6_newqv1300_ciderglq', 'description': 'Comp Inc - Derivative Gains/Losses', 'description_cn': '-comp_inc_derivative_gains_losses'}
{'id': '690', 'data_set_name': 'fnd6_newqv1300_ciotherq', 'description': 'Comp Inc - Other Adj', 'description_cn': '-compIncOtherAdj'}
{'id': '691', 'data_set_name': 'fnd6_newqv1300_cipenq', 'description': 'Comp Inc - Minimum Pension Adj', 'description_cn': '-comp_inc_min_pension_adj'}
{'id': '704', 'data_set_name': 'fnd6_newqv1300_dilavq', 'description': 'Dilution Available - Excluding Extraordinary Items', 'description_cn': '稀释潜力(非 extraordinay 项目)'}
{'id': '737', 'data_set_name': 'fnd6_newqv1300_lol2q', 'description': 'Liabilities Level 2 (Observable)', 'description_cn': 'Level2 observable 负债'}
{'id': '740', 'data_set_name': 'fnd6_newqv1300_lqpl1q', 'description': 'Liabilities Level 1 (Quoted Prices)', 'description_cn': 'Level_1_负债价格水平'}
{'id': '743', 'data_set_name': 'fnd6_newqv1300_lul3q', 'description': 'Liabilities Level 3 (Unobservable)', 'description_cn': 'Level_3_Liability_Unobservable'}
{'id': '773', 'data_set_name': 'fnd6_newqv1300_spcedpq', 'description': 'S&P Core Earnings EPS Diluted - Preliminary', 'description_cn': 'SPCEEPSDilPrel'}
{'id': '774', 'data_set_name': 'fnd6_newqv1300_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': '标准普尔核心 earnings 每股稀释后利润'}
{'id': '775', 'data_set_name': 'fnd6_newqv1300_spceepsp12', 'description': 'S&P Core 12MM EPS - Basic - Preliminary', 'description_cn': 'S&P_core_12MM_EPS_Basic_Preliminary'}
{'id': '777', 'data_set_name': 'fnd6_newqv1300_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings EPS 基本'}
{'id': '816', 'data_set_name': 'fnd6_oiadps', 'description': 'Operating Income after Depreciation', 'description_cn': '净利润_after折旧'}
{'id': '872', 'data_set_name': 'fnd6_spce', 'description': 'S&P Core Earnings', 'description_cn': '标准普尔核心 earnings'}
{'id': '915', 'data_set_name': 'fnd6_txtubpospinc', 'description': 'Increase - Prior Tax Positions', 'description_cn': '增加- prior税后位置'}
{'id': '936', 'data_set_name': 'goodwill', 'description': 'Goodwill (net)', 'description_cn': 'goodwill_净额'}
{'id': '958', 'data_set_name': 'sales_ps', 'description': 'Sales per Share (Quarterly)', 'description_cn': '每-share销售(季度)'}
{'id': '989', 'data_set_name': 'fscore_bfl_total', 'description': 'The final score M-Score is a weighted average of both the Pentagon surface score and the Pentagon acceleration score.', 'description_cn': '最终得分M-_score=五角大楼表面评分与五角加速评分加权平均值'}
{'id': '997', 'data_set_name': 'fscore_total', 'description': 'The final score M-Score is a weighted average of both the Pentagon surface score and the Pentagon acceleration score.', 'description_cn': '最终得分M-Score是pentagon表面分数和pentagon加速度分数的加权平均值。'}
{'id': '1000', 'data_set_name': 'multi_factor_acceleration_score_derivative', 'description': 'Change in the acceleration of multi-factor score compared to previous period.', 'description_cn': '多因子评分加速度变化 Compared_to_Previous_Period_Multi_Factor_Score_Acceleration_Change'}
{'id': '1005', 'data_set_name': 'beta_last_30_days_spy', 'description': 'Beta to SPY in 30 Days', 'description_cn': 'Beta_到SPY_30天'}
{'id': '1007', 'data_set_name': 'beta_last_60_days_spy', 'description': 'Beta to SPY in 60 Days', 'description_cn': 'SPDY_60D_Beta'}
{'id': '1008', 'data_set_name': 'beta_last_90_days_spy', 'description': 'Beta to SPY in 90 Days', 'description_cn': 'SPDY_90D_Beta'}
{'id': '1029', 'data_set_name': 'anl4_ads1detailafv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1033', 'data_set_name': 'anl4_ads1detailqfv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1106', 'data_set_name': 'anl4_basicdetaillt_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1110', 'data_set_name': 'anl4_basicdetailqfv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1114', 'data_set_name': 'anl4_basicdetailrec_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1120', 'data_set_name': 'anl4_baz1v110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1197', 'data_set_name': 'anl4_eaz1laf_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1201', 'data_set_name': 'anl4_eaz1lqfv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1205', 'data_set_name': 'anl4_eaz2lafv110_bk', 'description': 'Broker name (int)', 'description_cn': '经纪商名称(int)'}
{'id': '1209', 'data_set_name': 'anl4_eaz2lltv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1213', 'data_set_name': 'anl4_eaz2lqfv110_bk', 'description': 'Broker name (int)', 'description_cn': '经纪商名称(int)'}
{'id': '1217', 'data_set_name': 'anl4_eaz2lrec_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1292', 'data_set_name': 'anl4_netdebt_flag', 'description': 'Net debt - forecast type (revision/new/...)', 'description_cn': '净负债-预测类型(修正值/新值/....ImageAlign\n<|im_start|>user\nstrike price'}
{'id': '1397', 'data_set_name': 'anl4_totgw_high', 'description': 'Total Goodwill - The highest estimation', 'description_cn': '总 goodwill - 最高估计值'}
{'id': '1400', 'data_set_name': 'anl4_totgw_median', 'description': 'Total Goodwill - median of estimations', 'description_cn': '总 goodwill - 估计值中位数'}
{'id': '1564', 'data_set_name': 'min_ebit_guidance', 'description': 'Minimum guidance value for Earnings Before Interest and Taxes (EBIT)', 'description_cn': 'Minimum_EBIT_盈利指导值'}
{'id': '1584', 'data_set_name': 'min_reported_eps_guidance', 'description': 'Reported Earnings Per Share - Minimum guidance value for the annual period', 'description_cn': 'Reported Earnings Per Share - 年度期最低指导值'}
{'id': '1660', 'data_set_name': 'sg_and_admin_min_guidance_value', 'description': 'Minimum guidance value for Selling, General & Administrative Expense on an annual basis.', 'description_cn': '年度销售、 geral 及管理费用看涨期权最低指导价值'}
{'id': '1672', 'data_set_name': 'total_goodwill_amount', 'description': 'Total Goodwill - Value', 'description_cn': '总 goodwill - 值'}
{'id': '1682', 'data_set_name': 'pv13_com_rk_au', 'description': 'the HITS authority score of competitors', 'description_cn': '竞品 Hits 权重分'}
{'id': '1686', 'data_set_name': 'pv13_h2_min2_1k_sector', 'description': 'Grouping fields for top 1000', 'description_cn': '分组字段_top1000'}
{'id': '1693', 'data_set_name': 'pv13_h_min22_1000_sector', 'description': 'Grouping fields for top 1000', 'description_cn': '分组字段_top1000'}
{'id': '1694', 'data_set_name': 'pv13_h_min24_500_sector', 'description': 'Grouping fields for top 500', 'description_cn': '分组字段_top500'}
{'id': '1697', 'data_set_name': 'pv13_h_min2_focused_sector', 'description': 'Grouping fields for top 200', 'description_cn': '分组字段_top200'}
{'id': '1700', 'data_set_name': 'pv13_h_min52_1k_sector', 'description': 'Grouping fields for top 1000', 'description_cn': '分组字段_top1000'}
{'id': '1861', 'data_set_name': 'implied_volatility_call_60', 'description': 'At-the-money option-implied volatility for call Option for 60 days', 'description_cn': '看涨期权60天 atm 隐含波动率'}
{'id': '1894', 'data_set_name': 'implied_volatility_put_270', 'description': 'At-the-money option-implied volatility for Put Option for 270 days', 'description_cn': '看跌期权270天 atm 默克尔波动率'}
{'id': '1927', 'data_set_name': 'news_max_up_amt', 'description': 'The after the news high minus the price at the time of the news', 'description_cn': '新闻后 highs 减去 新闻时 price 的差值'}
{'id': '1931', 'data_set_name': 'news_mins_10_pct_up', 'description': 'Number of minutes that elapsed before price went up 10 percentage points', 'description_cn': '价格上升10个百分点前elapsed分钟数'}
{'id': '1933', 'data_set_name': 'news_mins_1_pct_dn', 'description': 'Number of minutes that elapsed before price went down 1 percentage point', 'description_cn': '价格下跌1个百分点前elapsed分钟数'}
{'id': '1934', 'data_set_name': 'news_mins_1_pct_up', 'description': 'Number of minutes that elapsed before price went up 1 percentage point', 'description_cn': '价格上升1个百分点前elapsed的分钟数'}
{'id': '1938', 'data_set_name': 'news_mins_2_chg', 'description': 'The minimum of L or S above for 2-minute bucket', 'description_cn': '看涨期权或看跌期权执行价_above_2分钟_bucket盈亏平衡点'}
{'id': '1942', 'data_set_name': 'news_mins_3_pct_dn', 'description': 'Number of minutes that elapsed before price went down 3 percentage points', 'description_cn': '价格下跌3个百分点前 elapsed_分钟数'}
{'id': '1945', 'data_set_name': 'news_mins_4_pct_dn', 'description': 'Number of minutes that elapsed before price went down 4 percentage points', 'description_cn': '价格下跌4个百分点前elapsed分钟数'}
{'id': '1946', 'data_set_name': 'news_mins_4_pct_up', 'description': 'Number of minutes that elapsed before price went up 4 percentage points', 'description_cn': '价格上漲4個百分點前 elapsed 分钟数'}
{'id': '1982', 'data_set_name': 'news_vol_stddev', 'description': '(CurrentVolume - AvgVol)/VolStDev, where AvgVol is the average of the daily volume, and VolStdDev is one standard deviation for the daily volume, both for 30 calendar days', 'description_cn': '(当前成交量-平均日成交量)/日成交量标准差_30天_calendar'}
{'id': '1985', 'data_set_name': 'nws12_afterhsz_01s', 'description': 'Number of minutes that elapsed before price went down 10 percentage points', 'description_cn': '价格下跌至低于初始水平10个百分点前elapsed分钟数'}
{'id': '1992', 'data_set_name': 'nws12_afterhsz_1l', 'description': 'Number of minutes that elapsed before price went up 1 percentage points', 'description_cn': '涨价至1个百分点前elapsed分钟数'}
{'id': '1999', 'data_set_name': 'nws12_afterhsz_3l', 'description': 'Number of minutes that elapsed before price went up 3 percentage points', 'description_cn': '价格上涨3个百分点前elapsed的分钟数'}
{'id': '2001', 'data_set_name': 'nws12_afterhsz_3s', 'description': 'Number of minutes that elapsed before price went down 3 percentage points', 'description_cn': '价格下跌3个百分点前elapsed分钟数'}
{'id': '2003', 'data_set_name': 'nws12_afterhsz_4l', 'description': 'Number of minutes that elapsed before price went up 4 percentage points', 'description_cn': '价格上升4个百分点前elapsed分钟数'}
{'id': '2057', 'data_set_name': 'nws12_afterhsz_tonhigh', 'description': 'Highest price reached during the session before the time of news', 'description_cn': '新闻公布前交易session中最高价'}
{'id': '2067', 'data_set_name': 'nws12_allz_result2', 'description': 'Percent change between the price at the time of the news release and the price at the close of the session', 'description_cn': '新闻发布日至交易session结束期间价格百分比变化'}
{'id': '2086', 'data_set_name': 'nws12_mainz_3p', 'description': 'The minimum of L or S above for 3-minute bucket', 'description_cn': '看涨期权或看跌期权执行价_above_3分钟_bucket_盈亏平衡点'}
{'id': '2089', 'data_set_name': 'nws12_mainz_4l', 'description': 'Number of minutes that elapsed before price went up 4 percentage points', 'description_cn': '价格上涨4个百分点前elapsed分钟数'}
{'id': '2144', 'data_set_name': 'nws12_mainz_tonhigh', 'description': 'Highest price reached during the session before the time of news', 'description_cn': '新闻发布时间前交易session中最高价'}
{'id': '2153', 'data_set_name': 'nws12_prez_02p', 'description': 'The minimum of L or S above for 20-minute bucket', 'description_cn': '20分钟桶上限值(min_of_L_or_S)'}
{'id': '2154', 'data_set_name': 'nws12_prez_02s', 'description': 'Number of minutes that elapsed before price went down 20 percentage points', 'description_cn': '价格下跌20个百分点前elapsed分钟数'}
{'id': '2168', 'data_set_name': 'nws12_prez_3s', 'description': 'Number of minutes that elapsed before price went down 3 percentage points', 'description_cn': '价格下跌3个百分点前elapsed分钟数'}
{'id': '2172', 'data_set_name': 'nws12_prez_4s', 'description': 'Number of minutes that elapsed before price went down 4 percentage points', 'description_cn': '价格下跌4个百分点前elapsed分钟数'}
{'id': '2173', 'data_set_name': 'nws12_prez_57l', 'description': 'Number of minutes that elapsed before price went up 7.5 percentage points', 'description_cn': '价格上升7.5个百分点前elapsed分钟数'}
{'id': '2179', 'data_set_name': 'nws12_prez_5s', 'description': 'Number of minutes that elapsed before price went down 5 percentage points', 'description_cn': '价格下跌5个百分点前elapsed分钟数'}
{'id': '2194', 'data_set_name': 'nws12_prez_highexcstddev', 'description': '(EODHigh - TONLast)/StdDev, where StdDev is one standard deviation for the close price for 30 calendar days', 'description_cn': '(EOD高-当日最后价)/标准差_30天 Wrest-Day收盘价'}
{'id': '2248', 'data_set_name': 'nws18_sse', 'description': 'Sentiment of phrases impacting the company', 'description_cn': '公司情绪影响短语_sentiment'}
{'id': '2306', 'data_set_name': 'rp_nip_ratings', 'description': 'News impact projection of analyst ratings-related news', 'description_cn': '分析师评级相关新闻的/news_impact_projection'}
{'id': '2354', 'data_set_name': 'fn_comp_not_rec_a', 'description': 'Unrecognized cost of unvested share-based compensation awards.', 'description_cn': '未兑现股份薪酬 award 的 unrecognized cost'}
{'id': '2356', 'data_set_name': 'fn_comp_not_rec_stock_options_a', 'description': 'Unrecognized cost of unvested stock option awards.', 'description_cn': '未行权股票期权 unrecognized_cost_of_unvested_stock_options'}
{'id': '2357', 'data_set_name': 'fn_comp_not_rec_stock_options_q', 'description': 'Unrecognized cost of unvested stock option awards.', 'description_cn': '未行权股票期权 unrecognized_cost_of_unvested_stock_options'}
{'id': '2359', 'data_set_name': 'fn_comp_number_of_shares_authorized_q', 'description': 'The maximum number of shares (or other type of equity) originally approved (usually by shareholders and board of directors), net of any subsequent amendments and adjustments, for awards under the equity-based compensation plan. As stock or unit options and equity instruments other than options are awarded to participants, the shares or units remain authorized and become reserved for issuance under outstanding awards (not necessarily vested).', 'description_cn': '股票期权授权总数(净减去任何后续修正和调整)用于股权激励计划下的奖励。当股票或单位期权以及其他类型的股权工具(除期权外)授予参与者时,这些股份或单位仍被授权并预留用于未来奖励的发行(不一定立即 vest)。'}
{'id': '2393', 'data_set_name': 'fn_def_tax_assets_liab_net_q', 'description': 'Amount, after allocation of valuation allowances and deferred tax liability, of deferred tax asset attributable to deductible differences and carryforwards, without jurisdictional netting.', 'description_cn': '扣除减值准备和递延税负债后,attributable_to_deferred_tax_asset_amount'}
{'id': '2396', 'data_set_name': 'fn_def_tax_liab_a', 'description': 'Amount, after deferred tax asset, of deferred tax liability attributable to taxable differences without jurisdictional netting.', 'description_cn': '递延税负债(扣除递延税资产后),attributable_to_税务差异_without_地域抵消的盈亏平衡点'}
{'id': '2410', 'data_set_name': 'fn_entity_common_stock_shares_out_a', 'description': "Indicate number of shares or other units outstanding of each of registrant's classes of capital or common stock or other ownership interests, if and as stated on cover of related periodic report. Where multiple classes or units exist define each class/interest by adding class of stock items such as Common Class A [Member], Common Class B [Member] or Partnership Interest [Member] onto the Instrument [Domain] of the Entity Listings, Instrument.", 'description_cn': '标明每个注册类别资本或普通股票或其他所有权利益的已发行股份数量或其他单位数量,如相关定期报告封面上所示。如有多个类别或单位存在,则通过在实体列表Instrument[Domain]项下添加类似于Common Class A [Member]、Common Class B [Member]或Partnership Interest [Member]的分类来定义每个类别/利益。'}
{'id': '2411', 'data_set_name': 'fn_entity_common_stock_shares_out_q', 'description': "Indicate number of shares or other units outstanding of each of registrant's classes of capital or common stock or other ownership interests, if and as stated on cover of related periodic report. Where multiple classes or units exist define each class/interest by adding class of stock items such as Common Class A [Member], Common Class B [Member] or Partnership Interest [Member] onto the Instrument [Domain] of the Entity Listings, Instrument.", 'description_cn': '标明每个注册类别资本或普通股或其他所有权利益的发行在外量,如相关定期报告封面所示。如有多个类别或单位存在,请在实体列表Instrument[Domain]中通过添加如CommonClassA[Member]、CommonClassB[Member]或PartnershipInterest[Member]等类别/利益项来定义每个类别/利益。'}
{'id': '2436', 'data_set_name': 'fn_liab_fair_val_a', 'description': 'Liabilities Fair Value, Recurring, Total', 'description_cn': '看涨期权负债公允价值_ recurring_total'}
{'id': '2437', 'data_set_name': 'fn_liab_fair_val_l1_a', 'description': 'Liabilities Fair Value, Recurring, Level 1', 'description_cn': '看涨期权负债公允价值_ recurring_level_1'}
{'id': '2438', 'data_set_name': 'fn_liab_fair_val_l1_q', 'description': 'Liabilities Fair Value, Recurring, Level 1', 'description_cn': '看涨期权公允价值_ recurring_level_1'}
{'id': '2439', 'data_set_name': 'fn_liab_fair_val_l2_a', 'description': 'Liabilities Fair Value, Recurring, Level 2', 'description_cn': '看涨期权公允价值_ recurring_level_2'}
{'id': '2440', 'data_set_name': 'fn_liab_fair_val_l2_q', 'description': 'Liabilities Fair Value, Recurring, Level 2', 'description_cn': '看涨期权负债公允价值_ recurring_level_2'}
{'id': '2442', 'data_set_name': 'fn_liab_fair_val_l3_q', 'description': 'Liabilities Fair Value, Recurring, Level 3', 'description_cn': '看涨期权负债公允价值_ recurring_ 水平3'}
{'id': '2443', 'data_set_name': 'fn_liab_fair_val_q', 'description': 'Liabilities Fair Value, Recurring, Total', 'description_cn': '看涨期权负债公允价值_ recurring_ 总计_ 看跌期权负债公允价值_ recurring_ 总计_ 盈亏平衡点_ 权益方_ 总计'}
{'id': '2454', 'data_set_name': 'fn_op_lease_min_pay_due_in_2y_a', 'description': 'Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of 1 year due in the 2nd fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '所需最低租赁付款额_经营租赁_初始或剩余不可撤销租期超过1年且在最新财政年度后第二财年末到期_excluding_不包含按滚动期间报告的中间及全年期间_from_最新资产负债表日'}
{'id': '2468', 'data_set_name': 'fn_oth_income_loss_fx_transaction_and_tax_translation_adj_q', 'description': 'Amount after tax and reclassification adjustments of gain (loss) on foreign currency translation adjustments, foreign currency transactions designated and effective as economic hedges of a net investment in a foreign entity and intra-entity foreign currency transactions that are of a long-term-investment nature.', 'description_cn': '所得税及重分类后外币translation调整、外币交易指定并有效作为净投资经济套期和长期投资性质的内部外币交易产生的损益金额'}
{'id': '2501', 'data_set_name': 'fn_treasury_stock_shares_a', 'description': 'Number of common and preferred shares that were previously issued and that were repurchased by the issuing entity and held in treasury on the financial statement date. This stock has no voting rights and receives no dividends.', 'description_cn': 'treasury_repossession_shares_num'}
{'id': '2524', 'data_set_name': 'fnd2_a_fedstyitxrt', 'description': 'Effective Income Tax Rate Reconciliation - Federal Statutory Income Tax Rate %', 'description_cn': '有效所得税率 reconciliation - 国家法定所得税率 %'}
{'id': '2533', 'data_set_name': 'fnd2_a_frtandfixturesg', 'description': 'Amount before accumulated depreciation of equipment commonly used in offices and stores that have no permanent connection to the structure of a building or utilities. Examples include, but are not limited to, desks, chairs, tables, and bookcases.', 'description_cn': '办公和 store 无固定连接于建筑结构或公用设施的常用设备折旧前金额。例如但不限于,桌椅、柜台及书架等。'}
{'id': '2543', 'data_set_name': 'fnd2_a_ltrmdmrepopliny5', 'description': 'Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the 5th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '长期债务应付金额, sinking fund要求,及其他可由持有者在固定或可确定价格及日期于第5个财政年度内赎回的其他证券,不包括采用滚动期间报告的中间和年度期段从最新资产负债表日期起的期间。'}
{'id': '2580', 'data_set_name': 'fnd2_dbplanepdfbnfpnext12m', 'description': 'Amount of benefits from a defined benefit plan expected to be paid in the next fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '下一会计年度预计支付的defined benefit计划收益金额(截至最近资产负债表日,滚动期间除外)'}
========================= 数据字段结束 =======================================

@ -0,0 +1,173 @@
任务指令
【策略类型】优化因子
trade_when(pcr_oi_270 < 1, (implied_volatility_call_270-implied_volatility_put_270), -1)
[[假设]]
若看涨期权未平仓量高于看跌期权未平仓量,基于隐含波动率价差强度指标,股票可能出现上涨行情;反之则可能下跌。
[[实施方案]]
使用'trade_when'算子,以看涨-看跌期权未平仓量比值为条件。当该比值小于1时,基于隐含波动率价差强度指标建立股票多头仓位(采用期权数据)。
[[阿尔法因子优化建议]]
基于自建分组(如历史波动率分组)对阿尔法因子进行自定义中性化处理,能否提升细分市场的策略表现?可结合分档算子或分层算子与排序算子实现自定义中性化。
*=========================================================================================*
输出格式:
输出必须是且仅是纯文本。
每一行是一个完整、独立、语法正确的WebSim表达式。
严禁任何形式的解释、编号、标点包裹(如引号)、Markdown格式或额外文本。
===================== !!! 重点(输出方式) !!! =====================
现在,请严格遵守以上所有规则,开始生成可立即在WebSim中运行的复合因子表达式。
**输出格式**(一行一个表达式, 每个表达式中间需要添加一个空行, 只要表达式本身, 不要解释, 不需要序号, 也不要输出多余的东西):
表达式
表达式
表达式
...
表达式
=================================================================
重申:请确保所有表达式都使用WorldQuant WebSim平台函数,不要使用pandas、numpy或其他Python库函数。输出必须是一行有效的WQ表达式。
以下是我的账号有权限使用的操作符, 请严格按照操作符, 以及我提供的数据集, 进行生成,组合 10 个alpha:
以下是我的账号有权限使用的操作符, 请严格按照操作符, 进行生成,组合因子
========================= 操作符开始 =======================================注意: Operator: 后面的是操作符,
Description: 此字段后面的是操作符对应的描述或使用说明, Description字段后面的内容是使用说明, 不是操作符
特别注意!!!! 必须按照操作符字段Operator的使用说明生成 alphaOperator: abs(x)
Description: Absolute value of x
Operator: add(x, y, filter = false)
Description: Add all inputs (at least 2 inputs required). If filter = true, filter all input NaN to 0 before adding
Operator: densify(x)
Description: Converts a grouping field of many buckets into lesser number of only available buckets so as to make working with grouping fields computationally efficient
Operator: divide(x, y)
Description: x / y
Operator: inverse(x)
Description: 1 / x
Operator: log(x)
Description: Natural logarithm. For example: Log(high/low) uses natural logarithm of high/low ratio as stock weights.
Operator: max(x, y, ..)
Description: Maximum value of all inputs. At least 2 inputs are required
Operator: min(x, y ..)
Description: Minimum value of all inputs. At least 2 inputs are required
Operator: multiply(x ,y, ... , filter=false)
Description: Multiply all inputs. At least 2 inputs are required. Filter sets the NaN values to 1
Operator: power(x, y)
Description: x ^ y
Operator: reverse(x)
Description: - x
Operator: sign(x)
Description: if input > 0, return 1; if input < 0, return -1; if input = 0, return 0; if input = NaN, return NaN;
Operator: signed_power(x, y)
Description: x raised to the power of y such that final result preserves sign of x
Operator: sqrt(x)
Description: Square root of x
Operator: subtract(x, y, filter=false)
Description: x-y. If filter = true, filter all input NaN to 0 before subtracting
Operator: and(input1, input2)
Description: Logical AND operator, returns true if both operands are true and returns false otherwise
Operator: if_else(input1, input2, input 3)
Description: If input1 is true then return input2 else return input3.
Operator: input1 < input2
Description: If input1 < input2 return true, else return false
Operator: input1 <= input2
Description: Returns true if input1 <= input2, return false otherwise
Operator: input1 == input2
Description: Returns true if both inputs are same and returns false otherwise
Operator: input1 > input2
Description: Logic comparison operators to compares two inputs
Operator: input1 >= input2
Description: Returns true if input1 >= input2, return false otherwise
Operator: input1!= input2
Description: Returns true if both inputs are NOT the same and returns false otherwise
Operator: is_nan(input)
Description: If (input == NaN) return 1 else return 0
Operator: not(x)
Description: Returns the logical negation of x. If x is true (1), it returns false (0), and if input is false (0), it returns true (1).
Operator: or(input1, input2)
Description: Logical OR operator returns true if either or both inputs are true and returns false otherwise
Operator: days_from_last_change(x)
Description: Amount of days since last change of x
Operator: hump(x, hump = 0.01)
Description: Limits amount and magnitude of changes in input (thus reducing turnover)
Operator: kth_element(x, d, k)
Description: Returns K-th value of input by looking through lookback days. This operator can be used to backfill missing data if k=1
Operator: last_diff_value(x, d)
Description: Returns last x value not equal to current x value from last d days
Operator: ts_arg_max(x, d)
Description: Returns the relative index of the max value in the time series for the past d days. If the current day has the max value for the past d days, it returns 0. If previous day has the max value for the past d days, it returns 1
Operator: ts_arg_min(x, d)
Description: Returns the relative index of the min value in the time series for the past d days; If the current day has the min value for the past d days, it returns 0; If previous day has the min value for the past d days, it returns 1.
Operator: ts_av_diff(x, d)
Description: Returns x - tsmean(x, d), but deals with NaNs carefully. That is NaNs are ignored during mean computation
Operator: ts_backfill(x,lookback = d, k=1, ignore="NAN")
Description: Backfill is the process of replacing the NAN or 0 values by a meaningful value (i.e., a first non-NaN value)
Operator: ts_corr(x, y, d)
Description: Returns correlation of x and y for the past d days
Operator: ts_count_nans(x ,d)
Description: Returns the number of NaN values in x for the past d days
Operator: ts_covariance(y, x, d)
Description: Returns covariance of y and x for the past d days
Operator: ts_decay_linear(x, d, dense = false)
Description: Returns the linear decay on x for the past d days. Dense parameter=false means operator works in sparse mode and we treat NaN as 0. In dense mode we do not.
Operator: ts_delay(x, d)
Description: Returns x value d days ago
Operator: ts_delta(x, d)
Description: Returns x - ts_delay(x, d)
Operator: ts_mean(x, d)
Description: Returns average value of x for the past d days.
Operator: ts_product(x, d)
Description: Returns product of x for the past d days
Operator: ts_quantile(x,d, driver="gaussian" )
Description: It calculates ts_rank and apply to its value an inverse cumulative density function from driver distribution. Possible values of driver (optional ) are "gaussian", "uniform", "cauchy" distribution where "gaussian" is the default.
Operator: ts_rank(x, d, constant = 0)
Description: Rank the values of x for each instrument over the past d days, then return the rank of the current value + constant. If not specified, by default, constant = 0.
Operator: ts_regression(y, x, d, lag = 0, rettype = 0)
Description: Returns various parameters related to regression function
Operator: ts_scale(x, d, constant = 0)
Description: Returns (x - ts_min(x, d)) / (ts_max(x, d) - ts_min(x, d)) + constant. This operator is similar to scale down operator but acts in time series space
Operator: ts_std_dev(x, d)
Description: Returns standard deviation of x for the past d days
Operator: ts_step(1)
Description: Returns days' counter
Operator: ts_sum(x, d)
Description: Sum values of x for the past d days.
Operator: ts_zscore(x, d)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean: (x - tsmean(x,d)) / tsstddev(x,d). This operator may help reduce outliers and drawdown.
Operator: normalize(x, useStd = false, limit = 0.0)
Description: Calculates the mean value of all valid alpha values for a certain date, then subtracts that mean from each element
Operator: quantile(x, driver = gaussian, sigma = 1.0)
Description: Rank the raw vector, shift the ranked Alpha vector, apply distribution (gaussian, cauchy, uniform). If driver is uniform, it simply subtract each Alpha value with the mean of all Alpha values in the Alpha vector
Operator: rank(x, rate=2)
Description: Ranks the input among all the instruments and returns an equally distributed number between 0.0 and 1.0. For precise sort, use the rate as 0
Operator: scale(x, scale=1, longscale=1, shortscale=1)
Description: Scales input to booksize. We can also scale the long positions and short positions to separate scales by mentioning additional parameters to the operator
Operator: winsorize(x, std=4)
Description: Winsorizes x to make sure that all values in x are between the lower and upper limits, which are specified as multiple of std.
Operator: zscore(x)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean
Operator: vec_avg(x)
Description: Taking mean of the vector field x
Operator: vec_sum(x)
Description: Sum of vector field x
Operator: bucket(rank(x), range="0, 1, 0.1" or buckets = "2,5,6,7,10")
Description: Convert float values into indexes for user-specified buckets. Bucket is useful for creating group values, which can be passed to GROUP as input
Operator: trade_when(x, y, z)
Description: Used in order to change Alpha values only under a specified condition and to hold Alpha values in other cases. It also allows to close Alpha positions (assign NaN values) under a specified condition
Operator: group_backfill(x, group, d, std = 4.0)
Description: If a certain value for a certain date and instrument is NaN, from the set of same group instruments, calculate winsorized mean of all non-NaN values over last d days
Operator: group_mean(x, weight, group)
Description: All elements in group equals to the mean
Operator: group_neutralize(x, group)
Description: Neutralizes Alpha against groups. These groups can be subindustry, industry, sector, country or a constant
Operator: group_rank(x, group)
Description: Each elements in a group is assigned the corresponding rank in this group
Operator: group_scale(x, group)
Description: Normalizes the values in a group to be between 0 and 1. (x - groupmin) / (groupmax - groupmin)
Operator: group_zscore(x, group)
Description: Calculates group Z-score - numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean. zscore = (data - mean) / stddev of x for each instrument within its group.
========================= 操作符结束 =======================================
========================= 数据字段开始 =======================================注意: data_set_name: 后面的是数据字段(可以使用), description: 此字段后面的是数据字段对应的描述或使用说明(不能使用), description_cn字段后面的内容是中文使用说明(不能使用)
{'id': '688', 'data_set_name': 'fnd6_newqv1300_ciderglq', 'description': 'Comp Inc - Derivative Gains/Losses', 'description_cn': '-comp_inc_derivative_gains_losses'}
{'id': '1000', 'data_set_name': 'multi_factor_acceleration_score_derivative', 'description': 'Change in the acceleration of multi-factor score compared to previous period.', 'description_cn': '多因子评分加速度变化 Compared_to_Previous_Period_Multi_Factor_Score_Acceleration_Change'}
{'id': '1887', 'data_set_name': 'implied_volatility_mean_skew_90', 'description': 'At-the-money option-implied volatility mean skew for 90 days', 'description_cn': '90天平价隐含波动率均值-skew'}
{'id': '2356', 'data_set_name': 'fn_comp_not_rec_stock_options_a', 'description': 'Unrecognized cost of unvested stock option awards.', 'description_cn': '未行权股票期权 unrecognized_cost_of_unvested_stock_options'}
{'id': '2357', 'data_set_name': 'fn_comp_not_rec_stock_options_q', 'description': 'Unrecognized cost of unvested stock option awards.', 'description_cn': '未行权股票期权 unrecognized_cost_of_unvested_stock_options'}
========================= 数据字段结束 =======================================

@ -0,0 +1,329 @@
任务指令
核心因子表达式:ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756)
核心逻辑:计算“基本面动量”(fscore_momentum,衡量公司基本面持续改善程度)与“基本面价值”(fscore_value,衡量公司基本面优质且估值偏低程度)这两个序列在756个交易日(约3年)滚动窗口内的相关系数。该因子不直接交易基本面本身,而是交易“市场对这两种投资风格的协同定价逻辑”——即捕捉两种风格是同向强化还是背离,并假设这种动态关系蕴含未来收益信息。
关键假设:
1. 风格协同性(相关性变化)具有预测能力
2. 使用的F-Score类基本面指标能有效识别公司质量与改善趋势
3. 66天财务数据向前填充(backfill)是合理的低频数据对齐方式
优化/设计目标(请重点考虑以下方向):
1. **参数优化**:尝试调整66天(填充窗口)和756天(相关窗口)的参数敏感性与经济逻辑合理性
2. **定义优化**:如何更精细定义“fscore_momentum”与“fscore_value”?例如,动量是否应侧重近期变化率?价值是否应结合估值指标?
3. **结构优化**:是否应引入其他元素(如波动率调整、行业中性化、结合短期动量)来增强因子稳健性?
4. **失效预防**:如何避免风格极端切换时因子的失效?是否应引入动态加权或条件开关?
5. **组合增强**:该因子与哪些其他类型因子(如流动性、情绪、微观结构)逻辑互补?
*=========================================================================================*
输出格式:
输出必须是且仅是纯文本。
每一行是一个完整、独立、语法正确的WebSim表达式。
严禁任何形式的解释、编号、标点包裹(如引号)、Markdown格式或额外文本。
===================== !!! 重点(输出方式) !!! =====================
现在,请严格遵守以上所有规则,开始生成可立即在WebSim中运行的复合因子表达式。
**输出格式**(一行一个表达式, 每个表达式中间需要添加一个空行, 只要表达式本身, 不要解释, 不需要序号, 也不要输出多余的东西):
表达式
表达式
表达式
...
表达式
=================================================================
重申:请确保所有表达式都使用WorldQuant WebSim平台函数,不要使用pandas、numpy或其他Python库函数。输出必须是一行有效的WQ表达式。
以下是我的账号有权限使用的操作符, 请严格按照操作符, 以及我提供的数据集, 进行生成,组合 20 个alpha:
以下是我的账号有权限使用的操作符, 请严格按照操作符, 进行生成,组合因子
========================= 操作符开始 =======================================注意: Operator: 后面的是操作符,
Description: 此字段后面的是操作符对应的描述或使用说明, Description字段后面的内容是使用说明, 不是操作符
特别注意!!!! 必须按照操作符字段Operator的使用说明生成 alphaOperator: abs(x)
Description: Absolute value of x
Operator: add(x, y, filter = false)
Description: Add all inputs (at least 2 inputs required). If filter = true, filter all input NaN to 0 before adding
Operator: densify(x)
Description: Converts a grouping field of many buckets into lesser number of only available buckets so as to make working with grouping fields computationally efficient
Operator: divide(x, y)
Description: x / y
Operator: inverse(x)
Description: 1 / x
Operator: log(x)
Description: Natural logarithm. For example: Log(high/low) uses natural logarithm of high/low ratio as stock weights.
Operator: max(x, y, ..)
Description: Maximum value of all inputs. At least 2 inputs are required
Operator: min(x, y ..)
Description: Minimum value of all inputs. At least 2 inputs are required
Operator: multiply(x ,y, ... , filter=false)
Description: Multiply all inputs. At least 2 inputs are required. Filter sets the NaN values to 1
Operator: power(x, y)
Description: x ^ y
Operator: reverse(x)
Description: - x
Operator: sign(x)
Description: if input > 0, return 1; if input < 0, return -1; if input = 0, return 0; if input = NaN, return NaN;
Operator: signed_power(x, y)
Description: x raised to the power of y such that final result preserves sign of x
Operator: sqrt(x)
Description: Square root of x
Operator: subtract(x, y, filter=false)
Description: x-y. If filter = true, filter all input NaN to 0 before subtracting
Operator: and(input1, input2)
Description: Logical AND operator, returns true if both operands are true and returns false otherwise
Operator: if_else(input1, input2, input 3)
Description: If input1 is true then return input2 else return input3.
Operator: input1 < input2
Description: If input1 < input2 return true, else return false
Operator: input1 <= input2
Description: Returns true if input1 <= input2, return false otherwise
Operator: input1 == input2
Description: Returns true if both inputs are same and returns false otherwise
Operator: input1 > input2
Description: Logic comparison operators to compares two inputs
Operator: input1 >= input2
Description: Returns true if input1 >= input2, return false otherwise
Operator: input1!= input2
Description: Returns true if both inputs are NOT the same and returns false otherwise
Operator: is_nan(input)
Description: If (input == NaN) return 1 else return 0
Operator: not(x)
Description: Returns the logical negation of x. If x is true (1), it returns false (0), and if input is false (0), it returns true (1).
Operator: or(input1, input2)
Description: Logical OR operator returns true if either or both inputs are true and returns false otherwise
Operator: days_from_last_change(x)
Description: Amount of days since last change of x
Operator: hump(x, hump = 0.01)
Description: Limits amount and magnitude of changes in input (thus reducing turnover)
Operator: kth_element(x, d, k)
Description: Returns K-th value of input by looking through lookback days. This operator can be used to backfill missing data if k=1
Operator: last_diff_value(x, d)
Description: Returns last x value not equal to current x value from last d days
Operator: ts_arg_max(x, d)
Description: Returns the relative index of the max value in the time series for the past d days. If the current day has the max value for the past d days, it returns 0. If previous day has the max value for the past d days, it returns 1
Operator: ts_arg_min(x, d)
Description: Returns the relative index of the min value in the time series for the past d days; If the current day has the min value for the past d days, it returns 0; If previous day has the min value for the past d days, it returns 1.
Operator: ts_av_diff(x, d)
Description: Returns x - tsmean(x, d), but deals with NaNs carefully. That is NaNs are ignored during mean computation
Operator: ts_backfill(x,lookback = d, k=1, ignore="NAN")
Description: Backfill is the process of replacing the NAN or 0 values by a meaningful value (i.e., a first non-NaN value)
Operator: ts_corr(x, y, d)
Description: Returns correlation of x and y for the past d days
Operator: ts_count_nans(x ,d)
Description: Returns the number of NaN values in x for the past d days
Operator: ts_covariance(y, x, d)
Description: Returns covariance of y and x for the past d days
Operator: ts_decay_linear(x, d, dense = false)
Description: Returns the linear decay on x for the past d days. Dense parameter=false means operator works in sparse mode and we treat NaN as 0. In dense mode we do not.
Operator: ts_delay(x, d)
Description: Returns x value d days ago
Operator: ts_delta(x, d)
Description: Returns x - ts_delay(x, d)
Operator: ts_mean(x, d)
Description: Returns average value of x for the past d days.
Operator: ts_product(x, d)
Description: Returns product of x for the past d days
Operator: ts_quantile(x,d, driver="gaussian" )
Description: It calculates ts_rank and apply to its value an inverse cumulative density function from driver distribution. Possible values of driver (optional ) are "gaussian", "uniform", "cauchy" distribution where "gaussian" is the default.
Operator: ts_rank(x, d, constant = 0)
Description: Rank the values of x for each instrument over the past d days, then return the rank of the current value + constant. If not specified, by default, constant = 0.
Operator: ts_regression(y, x, d, lag = 0, rettype = 0)
Description: Returns various parameters related to regression function
Operator: ts_scale(x, d, constant = 0)
Description: Returns (x - ts_min(x, d)) / (ts_max(x, d) - ts_min(x, d)) + constant. This operator is similar to scale down operator but acts in time series space
Operator: ts_std_dev(x, d)
Description: Returns standard deviation of x for the past d days
Operator: ts_step(1)
Description: Returns days' counter
Operator: ts_sum(x, d)
Description: Sum values of x for the past d days.
Operator: ts_zscore(x, d)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean: (x - tsmean(x,d)) / tsstddev(x,d). This operator may help reduce outliers and drawdown.
Operator: normalize(x, useStd = false, limit = 0.0)
Description: Calculates the mean value of all valid alpha values for a certain date, then subtracts that mean from each element
Operator: quantile(x, driver = gaussian, sigma = 1.0)
Description: Rank the raw vector, shift the ranked Alpha vector, apply distribution (gaussian, cauchy, uniform). If driver is uniform, it simply subtract each Alpha value with the mean of all Alpha values in the Alpha vector
Operator: rank(x, rate=2)
Description: Ranks the input among all the instruments and returns an equally distributed number between 0.0 and 1.0. For precise sort, use the rate as 0
Operator: scale(x, scale=1, longscale=1, shortscale=1)
Description: Scales input to booksize. We can also scale the long positions and short positions to separate scales by mentioning additional parameters to the operator
Operator: winsorize(x, std=4)
Description: Winsorizes x to make sure that all values in x are between the lower and upper limits, which are specified as multiple of std.
Operator: zscore(x)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean
Operator: vec_avg(x)
Description: Taking mean of the vector field x
Operator: vec_sum(x)
Description: Sum of vector field x
Operator: bucket(rank(x), range="0, 1, 0.1" or buckets = "2,5,6,7,10")
Description: Convert float values into indexes for user-specified buckets. Bucket is useful for creating group values, which can be passed to GROUP as input
Operator: trade_when(x, y, z)
Description: Used in order to change Alpha values only under a specified condition and to hold Alpha values in other cases. It also allows to close Alpha positions (assign NaN values) under a specified condition
Operator: group_backfill(x, group, d, std = 4.0)
Description: If a certain value for a certain date and instrument is NaN, from the set of same group instruments, calculate winsorized mean of all non-NaN values over last d days
Operator: group_mean(x, weight, group)
Description: All elements in group equals to the mean
Operator: group_neutralize(x, group)
Description: Neutralizes Alpha against groups. These groups can be subindustry, industry, sector, country or a constant
Operator: group_rank(x, group)
Description: Each elements in a group is assigned the corresponding rank in this group
Operator: group_scale(x, group)
Description: Normalizes the values in a group to be between 0 and 1. (x - groupmin) / (groupmax - groupmin)
Operator: group_zscore(x, group)
Description: Calculates group Z-score - numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean. zscore = (data - mean) / stddev of x for each instrument within its group.
========================= 操作符结束 =======================================
========================= 数据字段开始 =======================================注意: data_set_name: 后面的是数据字段(可以使用), description: 此字段后面的是数据字段对应的描述或使用说明(不能使用), description_cn字段后面的内容是中文使用说明(不能使用)
{'id': 'id', 'data_set_name': 'name', 'description': 'description', 'description_cn': 'description_cn'}
{'id': '1', 'data_set_name': 'call_breakeven_10', 'description': "Price at which a stock's call options with expiration 10 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在10天后到期的看涨期权基于最近bid/ask均价的盈亏平衡点价格'}
{'id': '2', 'data_set_name': 'call_breakeven_1080', 'description': "Price at which a stock's call options with expiration 1080 days in the future break even based on its recent bid/ask mean.", 'description_cn': '基于最近bid/ask均价,距今1080天后到期的股票看涨期权盈亏平衡点价格'}
{'id': '3', 'data_set_name': 'call_breakeven_120', 'description': "Price at which a stock's call options with expiration 120 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票距今120天到期的看涨期权盈亏平衡点价格基于最近bid/ask均价'}
{'id': '4', 'data_set_name': 'call_breakeven_150', 'description': "Price at which a stock's call options with expiration 150 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在150日后到期的看涨期权基于最近bid/ask均价的盈亏平衡点价格'}
{'id': '5', 'data_set_name': 'call_breakeven_180', 'description': "Price at which a stock's call options with expiration 180 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在距今180天到期的看涨期权盈亏平衡点价格基于最近bid/ask均价'}
{'id': '6', 'data_set_name': 'call_breakeven_20', 'description': "Price at which a stock's call options with expiration 20 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在20日后到期的看涨期权基于近期bid/ask均价的盈亏平衡点价格'}
{'id': '7', 'data_set_name': 'call_breakeven_270', 'description': "Price at which a stock's call options with expiration 270 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在270天后到期的看涨期权基于近期bid/ask平均价的盈亏平衡点价格'}
{'id': '8', 'data_set_name': 'call_breakeven_30', 'description': "Price at which a stock's call options with expiration 30 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在30天后到期的看涨期权基于近期bid/ask均价的盈亏平衡价格'}
{'id': '10', 'data_set_name': 'call_breakeven_60', 'description': "Price at which a stock's call options with expiration 60 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在60天后到期的看涨期权基于近期bid/ask均价的盈亏平衡点价格'}
{'id': '15', 'data_set_name': 'forward_price_120', 'description': 'Forward price at 120 days derived from a synthetic long option with payoff similar to long stock + option dynamics. Combination of long ATM call and short ATM put.', 'description_cn': '行权价格_120天_合成多头看涨期权_ATM看涨+看跌动态_long_ATM看涨_short_ATM看跌'}
{'id': '27', 'data_set_name': 'option_breakeven_120', 'description': "Price at which a stock's options with expiration 120 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在距今120天到期的期权基于最近 Bid/Ask平均价盈亏平衡点价格'}
{'id': '32', 'data_set_name': 'option_breakeven_30', 'description': "Price at which a stock's options with expiration 30 days in the future break even based on its recent bid/ask mean.", 'description_cn': '未来30天到期股票期权基于最近bid/ask均价的盈亏平衡点价格'}
{'id': '33', 'data_set_name': 'option_breakeven_360', 'description': "Price at which a stock's options with expiration 360 days in the future break even based on its recent bid/ask mean.", 'description_cn': '基于近期bid/ask平均价,在未来360天到期的股票期权盈亏平衡点价格'}
{'id': '35', 'data_set_name': 'option_breakeven_720', 'description': "Price at which a stock's options with expiration 720 days in the future break even based on its recent bid/ask mean.", 'description_cn': '基于最近的_bid_emean_盈亏平衡点_720天后到期的股票期权价格'}
{'id': '63', 'data_set_name': 'put_breakeven_10', 'description': "Price at which a stock's put options with expiration 10 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在未来10天到期的看跌期权基于近期 Bid/Ask 平均价的盈亏平衡点价格'}
{'id': '64', 'data_set_name': 'put_breakeven_1080', 'description': "Price at which a stock's put options with expiration 1080 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在未来1080天到期的看跌期权基于近期_bid_和问价均价的盈亏平衡点价格'}
{'id': '65', 'data_set_name': 'put_breakeven_120', 'description': "Price at which a stock's put options with expiration 120 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在距今120天到期的看跌期权盈亏平衡点价格基于最近bid/ask均价'}
{'id': '66', 'data_set_name': 'put_breakeven_150', 'description': "Price at which a stock's put options with expiration 150 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在150日后到期的看跌期权基于最近bid/ask平均价的盈亏平衡点价格'}
{'id': '67', 'data_set_name': 'put_breakeven_180', 'description': "Price at which a stock's put options with expiration 180 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在最近_bid_报价均值基础上,距今180天到期的看跌期权盈亏平衡点价格'}
{'id': '71', 'data_set_name': 'put_breakeven_360', 'description': "Price at which a stock's put options with expiration 360 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在最近 Bid/Ask 平均价下,距今360天到期的看跌期权盈亏平衡点价格'}
{'id': '73', 'data_set_name': 'put_breakeven_720', 'description': "Price at which a stock's put options with expiration 720 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在未来到期日为720天的看跌期权基于近期bid/ask均价的盈亏平衡点价格'}
{'id': '74', 'data_set_name': 'put_breakeven_90', 'description': "Price at which a stock's put options with expiration 90 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在最近Bid/Ask平均价基础上,距离90天到期的看跌期权盈亏平衡点的价格'}
{'id': '98', 'data_set_name': 'fnd6_acdo', 'description': 'Current Assets of Discontinued Operations', 'description_cn': '已终止经营current资产'}
{'id': '113', 'data_set_name': 'fnd6_capxv', 'description': 'Capital Expend Property, Plant and Equipment Schd V', 'description_cn': '资本支出资产、 plant 和设备计划表 V'}
{'id': '119', 'data_set_name': 'fnd6_cicurr', 'description': 'Comp Inc - Currency Trans Adj', 'description_cn': '-comp_inc_currency_trans_adj'}
{'id': '123', 'data_set_name': 'fnd6_ciother', 'description': 'Comp. Inc. - Other Adj.', 'description_cn': '-comp_inc_other_adj_'}
{'id': '125', 'data_set_name': 'fnd6_cisecgl', 'description': 'Comp Inc - Securities Gains/Losses', 'description_cn': '-comp_inc_securities_gains_losses'}
{'id': '130', 'data_set_name': 'fnd6_cld4', 'description': 'Capitalized Leases - Due in 4th Year', 'description_cn': '融资租赁费-第4年到期'}
{'id': '201', 'data_set_name': 'fnd6_dd4', 'description': 'Debt Due in 4th Year', 'description_cn': '债务到期(第4年)'}
{'id': '240', 'data_set_name': 'fnd6_eventv110_gdwlieps12', 'description': 'Impairment of Goodwill Basic EPS Effect 12MM', 'description_cn': 'goodwill_impairment_basic_eps_effect_12m'}
{'id': '241', 'data_set_name': 'fnd6_eventv110_gdwliepsq', 'description': 'Impairment of Goodwill Basic EPS Effect', 'description_cn': 'goodwill impairment basic_eps_effect'}
{'id': '310', 'data_set_name': 'fnd6_lol2', 'description': 'Liabilities Level 2 (Observable)', 'description_cn': 'Level2 observable 负债'}
{'id': '312', 'data_set_name': 'fnd6_lqpl1', 'description': 'Liabilities Level 1 (Quoted Prices)', 'description_cn': 'Level_1_负债(报价价格)'}
{'id': '313', 'data_set_name': 'fnd6_lul3', 'description': 'Liabilities Level 3 (Unobservable)', 'description_cn': 'Level_3_Liability_Unobservable'}
{'id': '341', 'data_set_name': 'fnd6_mrc4', 'description': 'Rental Commitments - Minimum - 4th Year', 'description_cn': '租金承诺_最低_第4年'}
{'id': '413', 'data_set_name': 'fnd6_newa2v1300_oiadp', 'description': 'Operating Income After Depreciation', 'description_cn': '营业净利润 after depreciation 不变,无需翻译。请提供需要翻译的专业字段名。'}
{'id': '473', 'data_set_name': 'fnd6_newqeventv110_cibegniq', 'description': 'Comp Inc - Beginning Net Income', 'description_cn': 'comp_inc_beginning_net_income'}
{'id': '474', 'data_set_name': 'fnd6_newqeventv110_cicurrq', 'description': 'Comp Inc - Currency Trans Adj', 'description_cn': '-comp_inc_currency_trans_adj'}
{'id': '478', 'data_set_name': 'fnd6_newqeventv110_cipenq', 'description': 'Comp Inc - Minimum Pension Adj', 'description_cn': '-compIncMinPensionAdj'}
{'id': '512', 'data_set_name': 'fnd6_newqeventv110_gdwliaq', 'description': 'Impairment of Goodwill After-tax', 'description_cn': 'goodwill_ impairment_after_tax'}
{'id': '513', 'data_set_name': 'fnd6_newqeventv110_gdwlipq', 'description': 'Impairment of Goodwill Pretax', 'description_cn': 'goodwill impairment pretax'}
{'id': '517', 'data_set_name': 'fnd6_newqeventv110_glceaq', 'description': 'Gain/Loss on Sale (Core Earnings Adjusted) After-tax', 'description_cn': '税后核心 earnings 润亏'}
{'id': '543', 'data_set_name': 'fnd6_newqeventv110_lol2q', 'description': 'Liabilities Level 2 (Observable)', 'description_cn': 'Level_2_Liab_Observable'}
{'id': '546', 'data_set_name': 'fnd6_newqeventv110_lqpl1q', 'description': 'Liabilities Level 1 (Quoted Prices)', 'description_cn': 'Level_1_负债(报价价格)'}
{'id': '549', 'data_set_name': 'fnd6_newqeventv110_lul3q', 'description': 'Liabilities Level 3 (Unobservable)', 'description_cn': 'Level_3_Liability_Unobservable'}
{'id': '623', 'data_set_name': 'fnd6_newqeventv110_spcedpq', 'description': 'S&P Core Earnings EPS Diluted - Preliminary', 'description_cn': 'SP_Core_Earnings_EPS_Diluted_Preliminary'}
{'id': '624', 'data_set_name': 'fnd6_newqeventv110_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': 'SPCE earnings per share diluted'}
{'id': '625', 'data_set_name': 'fnd6_newqeventv110_spceeps12', 'description': 'S&P Core Earnings EPS Basic 12MM', 'description_cn': '标普核心 earnings 每股基本值_12M'}
{'id': '628', 'data_set_name': 'fnd6_newqeventv110_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings 每股基本值'}
{'id': '629', 'data_set_name': 'fnd6_newqeventv110_spcep12', 'description': 'S&P Core Earnings 12MM - Preliminary', 'description_cn': '标普核心 earnings 12个月 - 预liminary'}
{'id': '630', 'data_set_name': 'fnd6_newqeventv110_spcepd12', 'description': 'S&P Core Earnings 12MM EPS Diluted - Preliminary', 'description_cn': 'S&P核心 earnings_12个月稀释后每股盈亏平衡点_初步'}
{'id': '687', 'data_set_name': 'fnd6_newqv1300_cicurrq', 'description': 'Comp Inc - Currency Trans Adj', 'description_cn': '-comp_inc_currency_trans_adj'}
{'id': '688', 'data_set_name': 'fnd6_newqv1300_ciderglq', 'description': 'Comp Inc - Derivative Gains/Losses', 'description_cn': '-comp_inc_derivative_gains_losses'}
{'id': '690', 'data_set_name': 'fnd6_newqv1300_ciotherq', 'description': 'Comp Inc - Other Adj', 'description_cn': '-compIncOtherAdj'}
{'id': '691', 'data_set_name': 'fnd6_newqv1300_cipenq', 'description': 'Comp Inc - Minimum Pension Adj', 'description_cn': '-comp_inc_min_pension_adj'}
{'id': '704', 'data_set_name': 'fnd6_newqv1300_dilavq', 'description': 'Dilution Available - Excluding Extraordinary Items', 'description_cn': '稀释潜力(非 extraordinay 项目)'}
{'id': '737', 'data_set_name': 'fnd6_newqv1300_lol2q', 'description': 'Liabilities Level 2 (Observable)', 'description_cn': 'Level2 observable 负债'}
{'id': '740', 'data_set_name': 'fnd6_newqv1300_lqpl1q', 'description': 'Liabilities Level 1 (Quoted Prices)', 'description_cn': 'Level_1_负债价格水平'}
{'id': '743', 'data_set_name': 'fnd6_newqv1300_lul3q', 'description': 'Liabilities Level 3 (Unobservable)', 'description_cn': 'Level_3_Liability_Unobservable'}
{'id': '774', 'data_set_name': 'fnd6_newqv1300_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': '标准普尔核心 earnings 每股稀释后利润'}
{'id': '775', 'data_set_name': 'fnd6_newqv1300_spceepsp12', 'description': 'S&P Core 12MM EPS - Basic - Preliminary', 'description_cn': 'S&P_core_12MM_EPS_Basic_Preliminary'}
{'id': '777', 'data_set_name': 'fnd6_newqv1300_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings EPS 基本'}
{'id': '816', 'data_set_name': 'fnd6_oiadps', 'description': 'Operating Income after Depreciation', 'description_cn': '净利润_after折旧'}
{'id': '857', 'data_set_name': 'fnd6_rank', 'description': 'SP rank with the following meaning: // 0----invalid rank //1----A+//2----A//3----A-//4----B+//5----B//6----B-//7----C+//8----C//9----C-', 'description_cn': '期权等级://0----无效等级//1----A+//2----A//3----A-//4----B+//5----B//6----B-//7----C+//8----C//9----C-'}
{'id': '872', 'data_set_name': 'fnd6_spce', 'description': 'S&P Core Earnings', 'description_cn': '标准普尔核心 earnings'}
{'id': '958', 'data_set_name': 'sales_ps', 'description': 'Sales per Share (Quarterly)', 'description_cn': '每-share销售(季度)'}
{'id': '989', 'data_set_name': 'fscore_bfl_total', 'description': 'The final score M-Score is a weighted average of both the Pentagon surface score and the Pentagon acceleration score.', 'description_cn': '最终得分M-_score=五角大楼表面评分与五角加速评分加权平均值'}
{'id': '997', 'data_set_name': 'fscore_total', 'description': 'The final score M-Score is a weighted average of both the Pentagon surface score and the Pentagon acceleration score.', 'description_cn': '最终得分M-Score是pentagon表面分数和pentagon加速度分数的加权平均值。'}
{'id': '1000', 'data_set_name': 'multi_factor_acceleration_score_derivative', 'description': 'Change in the acceleration of multi-factor score compared to previous period.', 'description_cn': '多因子评分加速度变化 Compared_to_Previous_Period_Multi_Factor_Score_Acceleration_Change'}
{'id': '1005', 'data_set_name': 'beta_last_30_days_spy', 'description': 'Beta to SPY in 30 Days', 'description_cn': 'Beta_到SPY_30天'}
{'id': '1007', 'data_set_name': 'beta_last_60_days_spy', 'description': 'Beta to SPY in 60 Days', 'description_cn': 'SPDY_60D_Beta'}
{'id': '1008', 'data_set_name': 'beta_last_90_days_spy', 'description': 'Beta to SPY in 90 Days', 'description_cn': 'SPDY_90D_Beta'}
{'id': '1029', 'data_set_name': 'anl4_ads1detailafv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1033', 'data_set_name': 'anl4_ads1detailqfv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1106', 'data_set_name': 'anl4_basicdetaillt_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1110', 'data_set_name': 'anl4_basicdetailqfv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1114', 'data_set_name': 'anl4_basicdetailrec_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1120', 'data_set_name': 'anl4_baz1v110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1197', 'data_set_name': 'anl4_eaz1laf_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1201', 'data_set_name': 'anl4_eaz1lqfv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1205', 'data_set_name': 'anl4_eaz2lafv110_bk', 'description': 'Broker name (int)', 'description_cn': '经纪商名称(int)'}
{'id': '1209', 'data_set_name': 'anl4_eaz2lltv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1213', 'data_set_name': 'anl4_eaz2lqfv110_bk', 'description': 'Broker name (int)', 'description_cn': '经纪商名称(int)'}
{'id': '1217', 'data_set_name': 'anl4_eaz2lrec_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1292', 'data_set_name': 'anl4_netdebt_flag', 'description': 'Net debt - forecast type (revision/new/...)', 'description_cn': '净负债-预测类型(修正值/新值/....ImageAlign\n<|im_start|>user\nstrike price'}
{'id': '1584', 'data_set_name': 'min_reported_eps_guidance', 'description': 'Reported Earnings Per Share - Minimum guidance value for the annual period', 'description_cn': 'Reported Earnings Per Share - 年度期最低指导值'}
{'id': '1681', 'data_set_name': 'pv13_com_page_rank', 'description': 'the PageRank of competitors', 'description_cn': '竞争对手的PageRank值'}
{'id': '1682', 'data_set_name': 'pv13_com_rk_au', 'description': 'the HITS authority score of competitors', 'description_cn': '竞品 Hits 权重分'}
{'id': '1686', 'data_set_name': 'pv13_h2_min2_1k_sector', 'description': 'Grouping fields for top 1000', 'description_cn': '分组字段_top1000'}
{'id': '1693', 'data_set_name': 'pv13_h_min22_1000_sector', 'description': 'Grouping fields for top 1000', 'description_cn': '分组字段_top1000'}
{'id': '1694', 'data_set_name': 'pv13_h_min24_500_sector', 'description': 'Grouping fields for top 500', 'description_cn': '分组字段_top500'}
{'id': '1697', 'data_set_name': 'pv13_h_min2_focused_sector', 'description': 'Grouping fields for top 200', 'description_cn': '分组字段_top200'}
{'id': '1700', 'data_set_name': 'pv13_h_min52_1k_sector', 'description': 'Grouping fields for top 1000', 'description_cn': '分组字段_top1000'}
{'id': '1834', 'data_set_name': 'pv13_ustomergraphrank_page_rank', 'description': 'the PageRank of customers', 'description_cn': '客户PageRank'}
{'id': '1861', 'data_set_name': 'implied_volatility_call_60', 'description': 'At-the-money option-implied volatility for call Option for 60 days', 'description_cn': '看涨期权60天 atm 隐含波动率'}
{'id': '1887', 'data_set_name': 'implied_volatility_mean_skew_90', 'description': 'At-the-money option-implied volatility mean skew for 90 days', 'description_cn': '90天平价隐含波动率均值-skew'}
{'id': '1894', 'data_set_name': 'implied_volatility_put_270', 'description': 'At-the-money option-implied volatility for Put Option for 270 days', 'description_cn': '看跌期权270天 atm 默克尔波动率'}
{'id': '1909', 'data_set_name': 'news_atr14', 'description': '14-day Average True Range', 'description_cn': '14日平均真实波动范围'}
{'id': '1920', 'data_set_name': 'news_high_exc_stddev', 'description': '(EODHigh - TONLast)/StdDev, where StdDev is one standard deviation for the close price for 30 calendar days', 'description_cn': '(EOD高-最近交易价)/标准差_30日收盘价std'}
{'id': '1927', 'data_set_name': 'news_max_up_amt', 'description': 'The after the news high minus the price at the time of the news', 'description_cn': '新闻后 highs 减去 新闻时 price 的差值'}
{'id': '1938', 'data_set_name': 'news_mins_2_chg', 'description': 'The minimum of L or S above for 2-minute bucket', 'description_cn': '看涨期权或看跌期权执行价_above_2分钟_bucket盈亏平衡点'}
{'id': '1944', 'data_set_name': 'news_mins_4_chg', 'description': 'The minimum of L or S above for 4-minute bucket', 'description_cn': 'L或S的4分钟桶盈亏平衡点'}
{'id': '1945', 'data_set_name': 'news_mins_4_pct_dn', 'description': 'Number of minutes that elapsed before price went down 4 percentage points', 'description_cn': '价格下跌4个百分点前elapsed分钟数'}
{'id': '1946', 'data_set_name': 'news_mins_4_pct_up', 'description': 'Number of minutes that elapsed before price went up 4 percentage points', 'description_cn': '价格上漲4個百分點前 elapsed 分钟数'}
{'id': '1981', 'data_set_name': 'news_tot_ticks', 'description': 'Total number of ticks for the trading day', 'description_cn': '当日交易总Tick数'}
{'id': '2002', 'data_set_name': 'nws12_afterhsz_41rta', 'description': '14-day Average True Range', 'description_cn': '14天平均真实波动范围'}
{'id': '2003', 'data_set_name': 'nws12_afterhsz_4l', 'description': 'Number of minutes that elapsed before price went up 4 percentage points', 'description_cn': '价格上升4个百分点前elapsed分钟数'}
{'id': '2004', 'data_set_name': 'nws12_afterhsz_4p', 'description': 'The minimum of L or S above for 4-minute bucket', 'description_cn': 'L或S的4分钟桶盈亏平衡点最小值'}
{'id': '2005', 'data_set_name': 'nws12_afterhsz_4s', 'description': 'Number of minutes that elapsed before price went down 4 percentage points', 'description_cn': '跌幅至4个百分点所需分钟数'}
{'id': '2015', 'data_set_name': 'nws12_afterhsz_allticks', 'description': 'Total number of ticks for the trading day', 'description_cn': '当日交易总tick数'}
{'id': '2086', 'data_set_name': 'nws12_mainz_3p', 'description': 'The minimum of L or S above for 3-minute bucket', 'description_cn': '看涨期权或看跌期权执行价_above_3分钟_bucket_盈亏平衡点'}
{'id': '2088', 'data_set_name': 'nws12_mainz_41rta', 'description': '14-day Average True Range', 'description_cn': '14日平均真实波动范围'}
{'id': '2089', 'data_set_name': 'nws12_mainz_4l', 'description': 'Number of minutes that elapsed before price went up 4 percentage points', 'description_cn': '价格上涨4个百分点前elapsed分钟数'}
{'id': '2090', 'data_set_name': 'nws12_mainz_4p', 'description': 'The minimum of L or S above for 4 minute bucket', 'description_cn': 'L或S的4分钟桶盈亏平衡点'}
{'id': '2091', 'data_set_name': 'nws12_mainz_4s', 'description': 'Number of minutes that elapsed before price went down 4 percentage points', 'description_cn': '价格下跌4个百分点前所经历的分钟数'}
{'id': '2101', 'data_set_name': 'nws12_mainz_allticks', 'description': 'Total number of ticks for the trading day', 'description_cn': '当日交易总tick数'}
{'id': '2139', 'data_set_name': 'nws12_mainz_result_vs_index', 'description': '((EODClose - TONLast) / TONLast) - ((SPYClose - SPYLast) / SPYLast)', 'description_cn': '((收盘价_EODClose_ - 当日开盘价_TONLast) / 当日开盘价_TONLast) - ((SPY收盘价_SPYClose_ - SPY当日开盘价_SPYLast) / SPY当日开盘价_SPYLast)'}
{'id': '2153', 'data_set_name': 'nws12_prez_02p', 'description': 'The minimum of L or S above for 20-minute bucket', 'description_cn': '20分钟桶上限值(min_of_L_or_S)'}
{'id': '2169', 'data_set_name': 'nws12_prez_41rta', 'description': 'Fourteen-day Average True Range', 'description_cn': '14日真实范围均值'}
{'id': '2170', 'data_set_name': 'nws12_prez_4l', 'description': 'Number of minutes that elapsed before price went up 4 percentage points', 'description_cn': '价格上涨4个百分点前所经历的分钟数'}
{'id': '2171', 'data_set_name': 'nws12_prez_4p', 'description': 'The minimum of L or S above for 4-minute bucket', 'description_cn': 'L或S的4分钟桶盈亏平衡点'}
{'id': '2172', 'data_set_name': 'nws12_prez_4s', 'description': 'Number of minutes that elapsed before price went down 4 percentage points', 'description_cn': '价格下跌4个百分点前elapsed分钟数'}
{'id': '2194', 'data_set_name': 'nws12_prez_highexcstddev', 'description': '(EODHigh - TONLast)/StdDev, where StdDev is one standard deviation for the close price for 30 calendar days', 'description_cn': '(EOD高-当日最后价)/标准差_30天 Wrest-Day收盘价'}
{'id': '2230', 'data_set_name': 'top1000', 'description': '20140630', 'description_cn': '20140630'}
{'id': '2231', 'data_set_name': 'top200', 'description': '20140630', 'description_cn': '20140630'}
{'id': '2232', 'data_set_name': 'top3000', 'description': '20140630', 'description_cn': '20140630'}
{'id': '2233', 'data_set_name': 'top500', 'description': '20140630', 'description_cn': '20140630'}
{'id': '2234', 'data_set_name': 'topsp500', 'description': '20140630', 'description_cn': '20140630'}
{'id': '2248', 'data_set_name': 'nws18_sse', 'description': 'Sentiment of phrases impacting the company', 'description_cn': '公司情绪影响短语_sentiment'}
{'id': '2306', 'data_set_name': 'rp_nip_ratings', 'description': 'News impact projection of analyst ratings-related news', 'description_cn': '分析师评级相关新闻的/news_impact_projection'}
{'id': '2354', 'data_set_name': 'fn_comp_not_rec_a', 'description': 'Unrecognized cost of unvested share-based compensation awards.', 'description_cn': '未兑现股份薪酬 award 的 unrecognized cost'}
{'id': '2356', 'data_set_name': 'fn_comp_not_rec_stock_options_a', 'description': 'Unrecognized cost of unvested stock option awards.', 'description_cn': '未行权股票期权 unrecognized_cost_of_unvested_stock_options'}
{'id': '2357', 'data_set_name': 'fn_comp_not_rec_stock_options_q', 'description': 'Unrecognized cost of unvested stock option awards.', 'description_cn': '未行权股票期权 unrecognized_cost_of_unvested_stock_options'}
{'id': '2359', 'data_set_name': 'fn_comp_number_of_shares_authorized_q', 'description': 'The maximum number of shares (or other type of equity) originally approved (usually by shareholders and board of directors), net of any subsequent amendments and adjustments, for awards under the equity-based compensation plan. As stock or unit options and equity instruments other than options are awarded to participants, the shares or units remain authorized and become reserved for issuance under outstanding awards (not necessarily vested).', 'description_cn': '股票期权授权总数(净减去任何后续修正和调整)用于股权激励计划下的奖励。当股票或单位期权以及其他类型的股权工具(除期权外)授予参与者时,这些股份或单位仍被授权并预留用于未来奖励的发行(不一定立即 vest)。'}
{'id': '2393', 'data_set_name': 'fn_def_tax_assets_liab_net_q', 'description': 'Amount, after allocation of valuation allowances and deferred tax liability, of deferred tax asset attributable to deductible differences and carryforwards, without jurisdictional netting.', 'description_cn': '扣除减值准备和递延税负债后,attributable_to_deferred_tax_asset_amount'}
{'id': '2396', 'data_set_name': 'fn_def_tax_liab_a', 'description': 'Amount, after deferred tax asset, of deferred tax liability attributable to taxable differences without jurisdictional netting.', 'description_cn': '递延税负债(扣除递延税资产后),attributable_to_税务差异_without_地域抵消的盈亏平衡点'}
{'id': '2410', 'data_set_name': 'fn_entity_common_stock_shares_out_a', 'description': "Indicate number of shares or other units outstanding of each of registrant's classes of capital or common stock or other ownership interests, if and as stated on cover of related periodic report. Where multiple classes or units exist define each class/interest by adding class of stock items such as Common Class A [Member], Common Class B [Member] or Partnership Interest [Member] onto the Instrument [Domain] of the Entity Listings, Instrument.", 'description_cn': '标明每个注册类别资本或普通股票或其他所有权利益的已发行股份数量或其他单位数量,如相关定期报告封面上所示。如有多个类别或单位存在,则通过在实体列表Instrument[Domain]项下添加类似于Common Class A [Member]、Common Class B [Member]或Partnership Interest [Member]的分类来定义每个类别/利益。'}
{'id': '2411', 'data_set_name': 'fn_entity_common_stock_shares_out_q', 'description': "Indicate number of shares or other units outstanding of each of registrant's classes of capital or common stock or other ownership interests, if and as stated on cover of related periodic report. Where multiple classes or units exist define each class/interest by adding class of stock items such as Common Class A [Member], Common Class B [Member] or Partnership Interest [Member] onto the Instrument [Domain] of the Entity Listings, Instrument.", 'description_cn': '标明每个注册类别资本或普通股或其他所有权利益的发行在外量,如相关定期报告封面所示。如有多个类别或单位存在,请在实体列表Instrument[Domain]中通过添加如CommonClassA[Member]、CommonClassB[Member]或PartnershipInterest[Member]等类别/利益项来定义每个类别/利益。'}
{'id': '2436', 'data_set_name': 'fn_liab_fair_val_a', 'description': 'Liabilities Fair Value, Recurring, Total', 'description_cn': '看涨期权负债公允价值_ recurring_total'}
{'id': '2437', 'data_set_name': 'fn_liab_fair_val_l1_a', 'description': 'Liabilities Fair Value, Recurring, Level 1', 'description_cn': '看涨期权负债公允价值_ recurring_level_1'}
{'id': '2438', 'data_set_name': 'fn_liab_fair_val_l1_q', 'description': 'Liabilities Fair Value, Recurring, Level 1', 'description_cn': '看涨期权公允价值_ recurring_level_1'}
{'id': '2439', 'data_set_name': 'fn_liab_fair_val_l2_a', 'description': 'Liabilities Fair Value, Recurring, Level 2', 'description_cn': '看涨期权公允价值_ recurring_level_2'}
{'id': '2440', 'data_set_name': 'fn_liab_fair_val_l2_q', 'description': 'Liabilities Fair Value, Recurring, Level 2', 'description_cn': '看涨期权负债公允价值_ recurring_level_2'}
{'id': '2456', 'data_set_name': 'fn_op_lease_min_pay_due_in_4y_a', 'description': 'Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of 1 year due in the 4th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '所需最低租赁付款额_经营租赁_初始或剩余不可撤销租期超过1年且于最新财政年度后第4个财政年度到期的租赁_不包含采用滚动期间报告的中间及全年期间_从最新资产负债表日开始计算'}
{'id': '2468', 'data_set_name': 'fn_oth_income_loss_fx_transaction_and_tax_translation_adj_q', 'description': 'Amount after tax and reclassification adjustments of gain (loss) on foreign currency translation adjustments, foreign currency transactions designated and effective as economic hedges of a net investment in a foreign entity and intra-entity foreign currency transactions that are of a long-term-investment nature.', 'description_cn': '所得税及重分类后外币translation调整、外币交易指定并有效作为净投资经济套期和长期投资性质的内部外币交易产生的损益金额'}
{'id': '2501', 'data_set_name': 'fn_treasury_stock_shares_a', 'description': 'Number of common and preferred shares that were previously issued and that were repurchased by the issuing entity and held in treasury on the financial statement date. This stock has no voting rights and receives no dividends.', 'description_cn': 'treasury_repossession_shares_num'}
{'id': '2524', 'data_set_name': 'fnd2_a_fedstyitxrt', 'description': 'Effective Income Tax Rate Reconciliation - Federal Statutory Income Tax Rate %', 'description_cn': '有效所得税率 reconciliation - 国家法定所得税率 %'}
{'id': '2529', 'data_set_name': 'fnd2_a_flintasamt1expyfour', 'description': 'Amount of amortization expense for assets, excluding financial assets and goodwill, lacking physical substance with a finite life expected to be recognized during the 4th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '期权行权后4年内的摊销费用金额,不包括金融资产和商誉,且缺乏物理实质、预期有有限寿命的资产,在最近资产负债表日后滚动报告期间内不包括间歇期和年度期间的金额'}
{'id': '2533', 'data_set_name': 'fnd2_a_frtandfixturesg', 'description': 'Amount before accumulated depreciation of equipment commonly used in offices and stores that have no permanent connection to the structure of a building or utilities. Examples include, but are not limited to, desks, chairs, tables, and bookcases.', 'description_cn': '办公和 store 无固定连接于建筑结构或公用设施的常用设备折旧前金额。例如但不限于,桌椅、柜台及书架等。'}
{'id': '2543', 'data_set_name': 'fnd2_a_ltrmdmrepopliny5', 'description': 'Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the 5th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '长期债务应付金额, sinking fund要求,及其他可由持有者在固定或可确定价格及日期于第5个财政年度内赎回的其他证券,不包括采用滚动期间报告的中间和年度期段从最新资产负债表日期起的期间。'}
{'id': '2544', 'data_set_name': 'fnd2_a_ltrmdmrepoplinyfour', 'description': 'Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the 4th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '长期债务应付金额,沉没基金要求,及其他可于固定或确定价格及日期赎回的证券(成熟期为最新财政年度后第4个财政年度)'}
{'id': '2545', 'data_set_name': 'fnd2_a_ltrmdmrepoplinythree', 'description': 'Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the 3rd fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '长期债务应付金额_可赎回证券发行要求_持有人可在固定或可确定价格和日期赎回的其他证券_第4财年到期_不包括滚动期间'}
{'id': '2580', 'data_set_name': 'fnd2_dbplanepdfbnfpnext12m', 'description': 'Amount of benefits from a defined benefit plan expected to be paid in the next fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '下一会计年度预计支付的defined benefit计划收益金额(截至最近资产负债表日,滚动期间除外)'}
{'id': '2582', 'data_set_name': 'fnd2_dbplanepdfbnfpyfour', 'description': 'Amount of benefits from a defined benefit plan expected to be paid in the 4th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '预期在最新财政年度之后第4个财政年度支付的定义福利计划收益金额(不包括采用滚动期间报告方法时的中间和年度期间,从最近资产负债表日期起计算)'}
{'id': '2601', 'data_set_name': 'fnd2_itxreclstatelocalitxes', 'description': 'Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to state and local income tax expense (benefit).', 'description_cn': '差额所得税费用( benefit )与按国内联邦法定所得税率计算的预计所得税费用( benefit )金额(从持续经营业务税前利润中归属于州及地方政府所得税费用( benefit )部分)'}
{'id': '2613', 'data_set_name': 'fnd2_q_flintasamt1expyfour', 'description': 'Amount of amortization expense for assets, excluding financial assets and goodwill, lacking physical substance with a finite life expected to be recognized during the 4th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '期权行权后第4个财政年度内预期确认的无形资产摊销费用(不包括金融资产和商誉),且无物理形态、有限寿命资产的摊销费用'}
========================= 数据字段结束 =======================================

@ -0,0 +1,329 @@
任务指令
核心因子表达式:ts_corr(ts_backfill(fscore_momentum,66), ts_backfill(fscore_value,66),756)
核心逻辑:计算“基本面动量”(fscore_momentum,衡量公司基本面持续改善程度)与“基本面价值”(fscore_value,衡量公司基本面优质且估值偏低程度)这两个序列在756个交易日(约3年)滚动窗口内的相关系数。该因子不直接交易基本面本身,而是交易“市场对这两种投资风格的协同定价逻辑”——即捕捉两种风格是同向强化还是背离,并假设这种动态关系蕴含未来收益信息。
关键假设:
1. 风格协同性(相关性变化)具有预测能力
2. 使用的F-Score类基本面指标能有效识别公司质量与改善趋势
3. 66天财务数据向前填充(backfill)是合理的低频数据对齐方式
优化/设计目标(请重点考虑以下方向):
1. **参数优化**:尝试调整66天(填充窗口)和756天(相关窗口)的参数敏感性与经济逻辑合理性
2. **定义优化**:如何更精细定义“fscore_momentum”与“fscore_value”?例如,动量是否应侧重近期变化率?价值是否应结合估值指标?
3. **结构优化**:是否应引入其他元素(如波动率调整、行业中性化、结合短期动量)来增强因子稳健性?
4. **失效预防**:如何避免风格极端切换时因子的失效?是否应引入动态加权或条件开关?
5. **组合增强**:该因子与哪些其他类型因子(如流动性、情绪、微观结构)逻辑互补?
*=========================================================================================*
输出格式:
输出必须是且仅是纯文本。
每一行是一个完整、独立、语法正确的WebSim表达式。
严禁任何形式的解释、编号、标点包裹(如引号)、Markdown格式或额外文本。
===================== !!! 重点(输出方式) !!! =====================
现在,请严格遵守以上所有规则,开始生成可立即在WebSim中运行的复合因子表达式。
**输出格式**(一行一个表达式, 每个表达式中间需要添加一个空行, 只要表达式本身, 不要解释, 不需要序号, 也不要输出多余的东西):
表达式
表达式
表达式
...
表达式
=================================================================
重申:请确保所有表达式都使用WorldQuant WebSim平台函数,不要使用pandas、numpy或其他Python库函数。输出必须是一行有效的WQ表达式。
以下是我的账号有权限使用的操作符, 请严格按照操作符, 以及我提供的数据集, 进行生成,组合 20 个alpha:
以下是我的账号有权限使用的操作符, 请严格按照操作符, 进行生成,组合因子
========================= 操作符开始 =======================================注意: Operator: 后面的是操作符,
Description: 此字段后面的是操作符对应的描述或使用说明, Description字段后面的内容是使用说明, 不是操作符
特别注意!!!! 必须按照操作符字段Operator的使用说明生成 alphaOperator: abs(x)
Description: Absolute value of x
Operator: add(x, y, filter = false)
Description: Add all inputs (at least 2 inputs required). If filter = true, filter all input NaN to 0 before adding
Operator: densify(x)
Description: Converts a grouping field of many buckets into lesser number of only available buckets so as to make working with grouping fields computationally efficient
Operator: divide(x, y)
Description: x / y
Operator: inverse(x)
Description: 1 / x
Operator: log(x)
Description: Natural logarithm. For example: Log(high/low) uses natural logarithm of high/low ratio as stock weights.
Operator: max(x, y, ..)
Description: Maximum value of all inputs. At least 2 inputs are required
Operator: min(x, y ..)
Description: Minimum value of all inputs. At least 2 inputs are required
Operator: multiply(x ,y, ... , filter=false)
Description: Multiply all inputs. At least 2 inputs are required. Filter sets the NaN values to 1
Operator: power(x, y)
Description: x ^ y
Operator: reverse(x)
Description: - x
Operator: sign(x)
Description: if input > 0, return 1; if input < 0, return -1; if input = 0, return 0; if input = NaN, return NaN;
Operator: signed_power(x, y)
Description: x raised to the power of y such that final result preserves sign of x
Operator: sqrt(x)
Description: Square root of x
Operator: subtract(x, y, filter=false)
Description: x-y. If filter = true, filter all input NaN to 0 before subtracting
Operator: and(input1, input2)
Description: Logical AND operator, returns true if both operands are true and returns false otherwise
Operator: if_else(input1, input2, input 3)
Description: If input1 is true then return input2 else return input3.
Operator: input1 < input2
Description: If input1 < input2 return true, else return false
Operator: input1 <= input2
Description: Returns true if input1 <= input2, return false otherwise
Operator: input1 == input2
Description: Returns true if both inputs are same and returns false otherwise
Operator: input1 > input2
Description: Logic comparison operators to compares two inputs
Operator: input1 >= input2
Description: Returns true if input1 >= input2, return false otherwise
Operator: input1!= input2
Description: Returns true if both inputs are NOT the same and returns false otherwise
Operator: is_nan(input)
Description: If (input == NaN) return 1 else return 0
Operator: not(x)
Description: Returns the logical negation of x. If x is true (1), it returns false (0), and if input is false (0), it returns true (1).
Operator: or(input1, input2)
Description: Logical OR operator returns true if either or both inputs are true and returns false otherwise
Operator: days_from_last_change(x)
Description: Amount of days since last change of x
Operator: hump(x, hump = 0.01)
Description: Limits amount and magnitude of changes in input (thus reducing turnover)
Operator: kth_element(x, d, k)
Description: Returns K-th value of input by looking through lookback days. This operator can be used to backfill missing data if k=1
Operator: last_diff_value(x, d)
Description: Returns last x value not equal to current x value from last d days
Operator: ts_arg_max(x, d)
Description: Returns the relative index of the max value in the time series for the past d days. If the current day has the max value for the past d days, it returns 0. If previous day has the max value for the past d days, it returns 1
Operator: ts_arg_min(x, d)
Description: Returns the relative index of the min value in the time series for the past d days; If the current day has the min value for the past d days, it returns 0; If previous day has the min value for the past d days, it returns 1.
Operator: ts_av_diff(x, d)
Description: Returns x - tsmean(x, d), but deals with NaNs carefully. That is NaNs are ignored during mean computation
Operator: ts_backfill(x,lookback = d, k=1, ignore="NAN")
Description: Backfill is the process of replacing the NAN or 0 values by a meaningful value (i.e., a first non-NaN value)
Operator: ts_corr(x, y, d)
Description: Returns correlation of x and y for the past d days
Operator: ts_count_nans(x ,d)
Description: Returns the number of NaN values in x for the past d days
Operator: ts_covariance(y, x, d)
Description: Returns covariance of y and x for the past d days
Operator: ts_decay_linear(x, d, dense = false)
Description: Returns the linear decay on x for the past d days. Dense parameter=false means operator works in sparse mode and we treat NaN as 0. In dense mode we do not.
Operator: ts_delay(x, d)
Description: Returns x value d days ago
Operator: ts_delta(x, d)
Description: Returns x - ts_delay(x, d)
Operator: ts_mean(x, d)
Description: Returns average value of x for the past d days.
Operator: ts_product(x, d)
Description: Returns product of x for the past d days
Operator: ts_quantile(x,d, driver="gaussian" )
Description: It calculates ts_rank and apply to its value an inverse cumulative density function from driver distribution. Possible values of driver (optional ) are "gaussian", "uniform", "cauchy" distribution where "gaussian" is the default.
Operator: ts_rank(x, d, constant = 0)
Description: Rank the values of x for each instrument over the past d days, then return the rank of the current value + constant. If not specified, by default, constant = 0.
Operator: ts_regression(y, x, d, lag = 0, rettype = 0)
Description: Returns various parameters related to regression function
Operator: ts_scale(x, d, constant = 0)
Description: Returns (x - ts_min(x, d)) / (ts_max(x, d) - ts_min(x, d)) + constant. This operator is similar to scale down operator but acts in time series space
Operator: ts_std_dev(x, d)
Description: Returns standard deviation of x for the past d days
Operator: ts_step(1)
Description: Returns days' counter
Operator: ts_sum(x, d)
Description: Sum values of x for the past d days.
Operator: ts_zscore(x, d)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean: (x - tsmean(x,d)) / tsstddev(x,d). This operator may help reduce outliers and drawdown.
Operator: normalize(x, useStd = false, limit = 0.0)
Description: Calculates the mean value of all valid alpha values for a certain date, then subtracts that mean from each element
Operator: quantile(x, driver = gaussian, sigma = 1.0)
Description: Rank the raw vector, shift the ranked Alpha vector, apply distribution (gaussian, cauchy, uniform). If driver is uniform, it simply subtract each Alpha value with the mean of all Alpha values in the Alpha vector
Operator: rank(x, rate=2)
Description: Ranks the input among all the instruments and returns an equally distributed number between 0.0 and 1.0. For precise sort, use the rate as 0
Operator: scale(x, scale=1, longscale=1, shortscale=1)
Description: Scales input to booksize. We can also scale the long positions and short positions to separate scales by mentioning additional parameters to the operator
Operator: winsorize(x, std=4)
Description: Winsorizes x to make sure that all values in x are between the lower and upper limits, which are specified as multiple of std.
Operator: zscore(x)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean
Operator: vec_avg(x)
Description: Taking mean of the vector field x
Operator: vec_sum(x)
Description: Sum of vector field x
Operator: bucket(rank(x), range="0, 1, 0.1" or buckets = "2,5,6,7,10")
Description: Convert float values into indexes for user-specified buckets. Bucket is useful for creating group values, which can be passed to GROUP as input
Operator: trade_when(x, y, z)
Description: Used in order to change Alpha values only under a specified condition and to hold Alpha values in other cases. It also allows to close Alpha positions (assign NaN values) under a specified condition
Operator: group_backfill(x, group, d, std = 4.0)
Description: If a certain value for a certain date and instrument is NaN, from the set of same group instruments, calculate winsorized mean of all non-NaN values over last d days
Operator: group_mean(x, weight, group)
Description: All elements in group equals to the mean
Operator: group_neutralize(x, group)
Description: Neutralizes Alpha against groups. These groups can be subindustry, industry, sector, country or a constant
Operator: group_rank(x, group)
Description: Each elements in a group is assigned the corresponding rank in this group
Operator: group_scale(x, group)
Description: Normalizes the values in a group to be between 0 and 1. (x - groupmin) / (groupmax - groupmin)
Operator: group_zscore(x, group)
Description: Calculates group Z-score - numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean. zscore = (data - mean) / stddev of x for each instrument within its group.
========================= 操作符结束 =======================================
========================= 数据字段开始 =======================================注意: data_set_name: 后面的是数据字段(可以使用), description: 此字段后面的是数据字段对应的描述或使用说明(不能使用), description_cn字段后面的内容是中文使用说明(不能使用)
{'id': 'id', 'data_set_name': 'name', 'description': 'description', 'description_cn': 'description_cn'}
{'id': '1', 'data_set_name': 'call_breakeven_10', 'description': "Price at which a stock's call options with expiration 10 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在10天后到期的看涨期权基于最近bid/ask均价的盈亏平衡点价格'}
{'id': '2', 'data_set_name': 'call_breakeven_1080', 'description': "Price at which a stock's call options with expiration 1080 days in the future break even based on its recent bid/ask mean.", 'description_cn': '基于最近bid/ask均价,距今1080天后到期的股票看涨期权盈亏平衡点价格'}
{'id': '3', 'data_set_name': 'call_breakeven_120', 'description': "Price at which a stock's call options with expiration 120 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票距今120天到期的看涨期权盈亏平衡点价格基于最近bid/ask均价'}
{'id': '4', 'data_set_name': 'call_breakeven_150', 'description': "Price at which a stock's call options with expiration 150 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在150日后到期的看涨期权基于最近bid/ask均价的盈亏平衡点价格'}
{'id': '5', 'data_set_name': 'call_breakeven_180', 'description': "Price at which a stock's call options with expiration 180 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在距今180天到期的看涨期权盈亏平衡点价格基于最近bid/ask均价'}
{'id': '6', 'data_set_name': 'call_breakeven_20', 'description': "Price at which a stock's call options with expiration 20 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在20日后到期的看涨期权基于近期bid/ask均价的盈亏平衡点价格'}
{'id': '7', 'data_set_name': 'call_breakeven_270', 'description': "Price at which a stock's call options with expiration 270 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在270天后到期的看涨期权基于近期bid/ask平均价的盈亏平衡点价格'}
{'id': '8', 'data_set_name': 'call_breakeven_30', 'description': "Price at which a stock's call options with expiration 30 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在30天后到期的看涨期权基于近期bid/ask均价的盈亏平衡价格'}
{'id': '10', 'data_set_name': 'call_breakeven_60', 'description': "Price at which a stock's call options with expiration 60 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在60天后到期的看涨期权基于近期bid/ask均价的盈亏平衡点价格'}
{'id': '15', 'data_set_name': 'forward_price_120', 'description': 'Forward price at 120 days derived from a synthetic long option with payoff similar to long stock + option dynamics. Combination of long ATM call and short ATM put.', 'description_cn': '行权价格_120天_合成多头看涨期权_ATM看涨+看跌动态_long_ATM看涨_short_ATM看跌'}
{'id': '27', 'data_set_name': 'option_breakeven_120', 'description': "Price at which a stock's options with expiration 120 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在距今120天到期的期权基于最近 Bid/Ask平均价盈亏平衡点价格'}
{'id': '32', 'data_set_name': 'option_breakeven_30', 'description': "Price at which a stock's options with expiration 30 days in the future break even based on its recent bid/ask mean.", 'description_cn': '未来30天到期股票期权基于最近bid/ask均价的盈亏平衡点价格'}
{'id': '33', 'data_set_name': 'option_breakeven_360', 'description': "Price at which a stock's options with expiration 360 days in the future break even based on its recent bid/ask mean.", 'description_cn': '基于近期bid/ask平均价,在未来360天到期的股票期权盈亏平衡点价格'}
{'id': '35', 'data_set_name': 'option_breakeven_720', 'description': "Price at which a stock's options with expiration 720 days in the future break even based on its recent bid/ask mean.", 'description_cn': '基于最近的_bid_emean_盈亏平衡点_720天后到期的股票期权价格'}
{'id': '63', 'data_set_name': 'put_breakeven_10', 'description': "Price at which a stock's put options with expiration 10 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在未来10天到期的看跌期权基于近期 Bid/Ask 平均价的盈亏平衡点价格'}
{'id': '64', 'data_set_name': 'put_breakeven_1080', 'description': "Price at which a stock's put options with expiration 1080 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在未来1080天到期的看跌期权基于近期_bid_和问价均价的盈亏平衡点价格'}
{'id': '65', 'data_set_name': 'put_breakeven_120', 'description': "Price at which a stock's put options with expiration 120 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在距今120天到期的看跌期权盈亏平衡点价格基于最近bid/ask均价'}
{'id': '66', 'data_set_name': 'put_breakeven_150', 'description': "Price at which a stock's put options with expiration 150 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在150日后到期的看跌期权基于最近bid/ask平均价的盈亏平衡点价格'}
{'id': '67', 'data_set_name': 'put_breakeven_180', 'description': "Price at which a stock's put options with expiration 180 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在最近_bid_报价均值基础上,距今180天到期的看跌期权盈亏平衡点价格'}
{'id': '71', 'data_set_name': 'put_breakeven_360', 'description': "Price at which a stock's put options with expiration 360 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在最近 Bid/Ask 平均价下,距今360天到期的看跌期权盈亏平衡点价格'}
{'id': '73', 'data_set_name': 'put_breakeven_720', 'description': "Price at which a stock's put options with expiration 720 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在未来到期日为720天的看跌期权基于近期bid/ask均价的盈亏平衡点价格'}
{'id': '74', 'data_set_name': 'put_breakeven_90', 'description': "Price at which a stock's put options with expiration 90 days in the future break even based on its recent bid/ask mean.", 'description_cn': '股票在最近Bid/Ask平均价基础上,距离90天到期的看跌期权盈亏平衡点的价格'}
{'id': '98', 'data_set_name': 'fnd6_acdo', 'description': 'Current Assets of Discontinued Operations', 'description_cn': '已终止经营current资产'}
{'id': '113', 'data_set_name': 'fnd6_capxv', 'description': 'Capital Expend Property, Plant and Equipment Schd V', 'description_cn': '资本支出资产、 plant 和设备计划表 V'}
{'id': '119', 'data_set_name': 'fnd6_cicurr', 'description': 'Comp Inc - Currency Trans Adj', 'description_cn': '-comp_inc_currency_trans_adj'}
{'id': '123', 'data_set_name': 'fnd6_ciother', 'description': 'Comp. Inc. - Other Adj.', 'description_cn': '-comp_inc_other_adj_'}
{'id': '125', 'data_set_name': 'fnd6_cisecgl', 'description': 'Comp Inc - Securities Gains/Losses', 'description_cn': '-comp_inc_securities_gains_losses'}
{'id': '130', 'data_set_name': 'fnd6_cld4', 'description': 'Capitalized Leases - Due in 4th Year', 'description_cn': '融资租赁费-第4年到期'}
{'id': '201', 'data_set_name': 'fnd6_dd4', 'description': 'Debt Due in 4th Year', 'description_cn': '债务到期(第4年)'}
{'id': '240', 'data_set_name': 'fnd6_eventv110_gdwlieps12', 'description': 'Impairment of Goodwill Basic EPS Effect 12MM', 'description_cn': 'goodwill_impairment_basic_eps_effect_12m'}
{'id': '241', 'data_set_name': 'fnd6_eventv110_gdwliepsq', 'description': 'Impairment of Goodwill Basic EPS Effect', 'description_cn': 'goodwill impairment basic_eps_effect'}
{'id': '310', 'data_set_name': 'fnd6_lol2', 'description': 'Liabilities Level 2 (Observable)', 'description_cn': 'Level2 observable 负债'}
{'id': '312', 'data_set_name': 'fnd6_lqpl1', 'description': 'Liabilities Level 1 (Quoted Prices)', 'description_cn': 'Level_1_负债(报价价格)'}
{'id': '313', 'data_set_name': 'fnd6_lul3', 'description': 'Liabilities Level 3 (Unobservable)', 'description_cn': 'Level_3_Liability_Unobservable'}
{'id': '341', 'data_set_name': 'fnd6_mrc4', 'description': 'Rental Commitments - Minimum - 4th Year', 'description_cn': '租金承诺_最低_第4年'}
{'id': '413', 'data_set_name': 'fnd6_newa2v1300_oiadp', 'description': 'Operating Income After Depreciation', 'description_cn': '营业净利润 after depreciation 不变,无需翻译。请提供需要翻译的专业字段名。'}
{'id': '473', 'data_set_name': 'fnd6_newqeventv110_cibegniq', 'description': 'Comp Inc - Beginning Net Income', 'description_cn': 'comp_inc_beginning_net_income'}
{'id': '474', 'data_set_name': 'fnd6_newqeventv110_cicurrq', 'description': 'Comp Inc - Currency Trans Adj', 'description_cn': '-comp_inc_currency_trans_adj'}
{'id': '478', 'data_set_name': 'fnd6_newqeventv110_cipenq', 'description': 'Comp Inc - Minimum Pension Adj', 'description_cn': '-compIncMinPensionAdj'}
{'id': '512', 'data_set_name': 'fnd6_newqeventv110_gdwliaq', 'description': 'Impairment of Goodwill After-tax', 'description_cn': 'goodwill_ impairment_after_tax'}
{'id': '513', 'data_set_name': 'fnd6_newqeventv110_gdwlipq', 'description': 'Impairment of Goodwill Pretax', 'description_cn': 'goodwill impairment pretax'}
{'id': '517', 'data_set_name': 'fnd6_newqeventv110_glceaq', 'description': 'Gain/Loss on Sale (Core Earnings Adjusted) After-tax', 'description_cn': '税后核心 earnings 润亏'}
{'id': '543', 'data_set_name': 'fnd6_newqeventv110_lol2q', 'description': 'Liabilities Level 2 (Observable)', 'description_cn': 'Level_2_Liab_Observable'}
{'id': '546', 'data_set_name': 'fnd6_newqeventv110_lqpl1q', 'description': 'Liabilities Level 1 (Quoted Prices)', 'description_cn': 'Level_1_负债(报价价格)'}
{'id': '549', 'data_set_name': 'fnd6_newqeventv110_lul3q', 'description': 'Liabilities Level 3 (Unobservable)', 'description_cn': 'Level_3_Liability_Unobservable'}
{'id': '623', 'data_set_name': 'fnd6_newqeventv110_spcedpq', 'description': 'S&P Core Earnings EPS Diluted - Preliminary', 'description_cn': 'SP_Core_Earnings_EPS_Diluted_Preliminary'}
{'id': '624', 'data_set_name': 'fnd6_newqeventv110_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': 'SPCE earnings per share diluted'}
{'id': '625', 'data_set_name': 'fnd6_newqeventv110_spceeps12', 'description': 'S&P Core Earnings EPS Basic 12MM', 'description_cn': '标普核心 earnings 每股基本值_12M'}
{'id': '628', 'data_set_name': 'fnd6_newqeventv110_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings 每股基本值'}
{'id': '629', 'data_set_name': 'fnd6_newqeventv110_spcep12', 'description': 'S&P Core Earnings 12MM - Preliminary', 'description_cn': '标普核心 earnings 12个月 - 预liminary'}
{'id': '630', 'data_set_name': 'fnd6_newqeventv110_spcepd12', 'description': 'S&P Core Earnings 12MM EPS Diluted - Preliminary', 'description_cn': 'S&P核心 earnings_12个月稀释后每股盈亏平衡点_初步'}
{'id': '687', 'data_set_name': 'fnd6_newqv1300_cicurrq', 'description': 'Comp Inc - Currency Trans Adj', 'description_cn': '-comp_inc_currency_trans_adj'}
{'id': '688', 'data_set_name': 'fnd6_newqv1300_ciderglq', 'description': 'Comp Inc - Derivative Gains/Losses', 'description_cn': '-comp_inc_derivative_gains_losses'}
{'id': '690', 'data_set_name': 'fnd6_newqv1300_ciotherq', 'description': 'Comp Inc - Other Adj', 'description_cn': '-compIncOtherAdj'}
{'id': '691', 'data_set_name': 'fnd6_newqv1300_cipenq', 'description': 'Comp Inc - Minimum Pension Adj', 'description_cn': '-comp_inc_min_pension_adj'}
{'id': '704', 'data_set_name': 'fnd6_newqv1300_dilavq', 'description': 'Dilution Available - Excluding Extraordinary Items', 'description_cn': '稀释潜力(非 extraordinay 项目)'}
{'id': '737', 'data_set_name': 'fnd6_newqv1300_lol2q', 'description': 'Liabilities Level 2 (Observable)', 'description_cn': 'Level2 observable 负债'}
{'id': '740', 'data_set_name': 'fnd6_newqv1300_lqpl1q', 'description': 'Liabilities Level 1 (Quoted Prices)', 'description_cn': 'Level_1_负债价格水平'}
{'id': '743', 'data_set_name': 'fnd6_newqv1300_lul3q', 'description': 'Liabilities Level 3 (Unobservable)', 'description_cn': 'Level_3_Liability_Unobservable'}
{'id': '774', 'data_set_name': 'fnd6_newqv1300_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': '标准普尔核心 earnings 每股稀释后利润'}
{'id': '775', 'data_set_name': 'fnd6_newqv1300_spceepsp12', 'description': 'S&P Core 12MM EPS - Basic - Preliminary', 'description_cn': 'S&P_core_12MM_EPS_Basic_Preliminary'}
{'id': '777', 'data_set_name': 'fnd6_newqv1300_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings EPS 基本'}
{'id': '816', 'data_set_name': 'fnd6_oiadps', 'description': 'Operating Income after Depreciation', 'description_cn': '净利润_after折旧'}
{'id': '857', 'data_set_name': 'fnd6_rank', 'description': 'SP rank with the following meaning: // 0----invalid rank //1----A+//2----A//3----A-//4----B+//5----B//6----B-//7----C+//8----C//9----C-', 'description_cn': '期权等级://0----无效等级//1----A+//2----A//3----A-//4----B+//5----B//6----B-//7----C+//8----C//9----C-'}
{'id': '872', 'data_set_name': 'fnd6_spce', 'description': 'S&P Core Earnings', 'description_cn': '标准普尔核心 earnings'}
{'id': '958', 'data_set_name': 'sales_ps', 'description': 'Sales per Share (Quarterly)', 'description_cn': '每-share销售(季度)'}
{'id': '989', 'data_set_name': 'fscore_bfl_total', 'description': 'The final score M-Score is a weighted average of both the Pentagon surface score and the Pentagon acceleration score.', 'description_cn': '最终得分M-_score=五角大楼表面评分与五角加速评分加权平均值'}
{'id': '997', 'data_set_name': 'fscore_total', 'description': 'The final score M-Score is a weighted average of both the Pentagon surface score and the Pentagon acceleration score.', 'description_cn': '最终得分M-Score是pentagon表面分数和pentagon加速度分数的加权平均值。'}
{'id': '1000', 'data_set_name': 'multi_factor_acceleration_score_derivative', 'description': 'Change in the acceleration of multi-factor score compared to previous period.', 'description_cn': '多因子评分加速度变化 Compared_to_Previous_Period_Multi_Factor_Score_Acceleration_Change'}
{'id': '1005', 'data_set_name': 'beta_last_30_days_spy', 'description': 'Beta to SPY in 30 Days', 'description_cn': 'Beta_到SPY_30天'}
{'id': '1007', 'data_set_name': 'beta_last_60_days_spy', 'description': 'Beta to SPY in 60 Days', 'description_cn': 'SPDY_60D_Beta'}
{'id': '1008', 'data_set_name': 'beta_last_90_days_spy', 'description': 'Beta to SPY in 90 Days', 'description_cn': 'SPDY_90D_Beta'}
{'id': '1029', 'data_set_name': 'anl4_ads1detailafv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1033', 'data_set_name': 'anl4_ads1detailqfv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1106', 'data_set_name': 'anl4_basicdetaillt_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1110', 'data_set_name': 'anl4_basicdetailqfv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1114', 'data_set_name': 'anl4_basicdetailrec_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1120', 'data_set_name': 'anl4_baz1v110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1197', 'data_set_name': 'anl4_eaz1laf_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1201', 'data_set_name': 'anl4_eaz1lqfv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1205', 'data_set_name': 'anl4_eaz2lafv110_bk', 'description': 'Broker name (int)', 'description_cn': '经纪商名称(int)'}
{'id': '1209', 'data_set_name': 'anl4_eaz2lltv110_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1213', 'data_set_name': 'anl4_eaz2lqfv110_bk', 'description': 'Broker name (int)', 'description_cn': '经纪商名称(int)'}
{'id': '1217', 'data_set_name': 'anl4_eaz2lrec_bk', 'description': 'Broker name (int)', 'description_cn': '券商名称(int)'}
{'id': '1292', 'data_set_name': 'anl4_netdebt_flag', 'description': 'Net debt - forecast type (revision/new/...)', 'description_cn': '净负债-预测类型(修正值/新值/....ImageAlign\n<|im_start|>user\nstrike price'}
{'id': '1584', 'data_set_name': 'min_reported_eps_guidance', 'description': 'Reported Earnings Per Share - Minimum guidance value for the annual period', 'description_cn': 'Reported Earnings Per Share - 年度期最低指导值'}
{'id': '1681', 'data_set_name': 'pv13_com_page_rank', 'description': 'the PageRank of competitors', 'description_cn': '竞争对手的PageRank值'}
{'id': '1682', 'data_set_name': 'pv13_com_rk_au', 'description': 'the HITS authority score of competitors', 'description_cn': '竞品 Hits 权重分'}
{'id': '1686', 'data_set_name': 'pv13_h2_min2_1k_sector', 'description': 'Grouping fields for top 1000', 'description_cn': '分组字段_top1000'}
{'id': '1693', 'data_set_name': 'pv13_h_min22_1000_sector', 'description': 'Grouping fields for top 1000', 'description_cn': '分组字段_top1000'}
{'id': '1694', 'data_set_name': 'pv13_h_min24_500_sector', 'description': 'Grouping fields for top 500', 'description_cn': '分组字段_top500'}
{'id': '1697', 'data_set_name': 'pv13_h_min2_focused_sector', 'description': 'Grouping fields for top 200', 'description_cn': '分组字段_top200'}
{'id': '1700', 'data_set_name': 'pv13_h_min52_1k_sector', 'description': 'Grouping fields for top 1000', 'description_cn': '分组字段_top1000'}
{'id': '1834', 'data_set_name': 'pv13_ustomergraphrank_page_rank', 'description': 'the PageRank of customers', 'description_cn': '客户PageRank'}
{'id': '1861', 'data_set_name': 'implied_volatility_call_60', 'description': 'At-the-money option-implied volatility for call Option for 60 days', 'description_cn': '看涨期权60天 atm 隐含波动率'}
{'id': '1887', 'data_set_name': 'implied_volatility_mean_skew_90', 'description': 'At-the-money option-implied volatility mean skew for 90 days', 'description_cn': '90天平价隐含波动率均值-skew'}
{'id': '1894', 'data_set_name': 'implied_volatility_put_270', 'description': 'At-the-money option-implied volatility for Put Option for 270 days', 'description_cn': '看跌期权270天 atm 默克尔波动率'}
{'id': '1909', 'data_set_name': 'news_atr14', 'description': '14-day Average True Range', 'description_cn': '14日平均真实波动范围'}
{'id': '1920', 'data_set_name': 'news_high_exc_stddev', 'description': '(EODHigh - TONLast)/StdDev, where StdDev is one standard deviation for the close price for 30 calendar days', 'description_cn': '(EOD高-最近交易价)/标准差_30日收盘价std'}
{'id': '1927', 'data_set_name': 'news_max_up_amt', 'description': 'The after the news high minus the price at the time of the news', 'description_cn': '新闻后 highs 减去 新闻时 price 的差值'}
{'id': '1938', 'data_set_name': 'news_mins_2_chg', 'description': 'The minimum of L or S above for 2-minute bucket', 'description_cn': '看涨期权或看跌期权执行价_above_2分钟_bucket盈亏平衡点'}
{'id': '1944', 'data_set_name': 'news_mins_4_chg', 'description': 'The minimum of L or S above for 4-minute bucket', 'description_cn': 'L或S的4分钟桶盈亏平衡点'}
{'id': '1945', 'data_set_name': 'news_mins_4_pct_dn', 'description': 'Number of minutes that elapsed before price went down 4 percentage points', 'description_cn': '价格下跌4个百分点前elapsed分钟数'}
{'id': '1946', 'data_set_name': 'news_mins_4_pct_up', 'description': 'Number of minutes that elapsed before price went up 4 percentage points', 'description_cn': '价格上漲4個百分點前 elapsed 分钟数'}
{'id': '1981', 'data_set_name': 'news_tot_ticks', 'description': 'Total number of ticks for the trading day', 'description_cn': '当日交易总Tick数'}
{'id': '2002', 'data_set_name': 'nws12_afterhsz_41rta', 'description': '14-day Average True Range', 'description_cn': '14天平均真实波动范围'}
{'id': '2003', 'data_set_name': 'nws12_afterhsz_4l', 'description': 'Number of minutes that elapsed before price went up 4 percentage points', 'description_cn': '价格上升4个百分点前elapsed分钟数'}
{'id': '2004', 'data_set_name': 'nws12_afterhsz_4p', 'description': 'The minimum of L or S above for 4-minute bucket', 'description_cn': 'L或S的4分钟桶盈亏平衡点最小值'}
{'id': '2005', 'data_set_name': 'nws12_afterhsz_4s', 'description': 'Number of minutes that elapsed before price went down 4 percentage points', 'description_cn': '跌幅至4个百分点所需分钟数'}
{'id': '2015', 'data_set_name': 'nws12_afterhsz_allticks', 'description': 'Total number of ticks for the trading day', 'description_cn': '当日交易总tick数'}
{'id': '2086', 'data_set_name': 'nws12_mainz_3p', 'description': 'The minimum of L or S above for 3-minute bucket', 'description_cn': '看涨期权或看跌期权执行价_above_3分钟_bucket_盈亏平衡点'}
{'id': '2088', 'data_set_name': 'nws12_mainz_41rta', 'description': '14-day Average True Range', 'description_cn': '14日平均真实波动范围'}
{'id': '2089', 'data_set_name': 'nws12_mainz_4l', 'description': 'Number of minutes that elapsed before price went up 4 percentage points', 'description_cn': '价格上涨4个百分点前elapsed分钟数'}
{'id': '2090', 'data_set_name': 'nws12_mainz_4p', 'description': 'The minimum of L or S above for 4 minute bucket', 'description_cn': 'L或S的4分钟桶盈亏平衡点'}
{'id': '2091', 'data_set_name': 'nws12_mainz_4s', 'description': 'Number of minutes that elapsed before price went down 4 percentage points', 'description_cn': '价格下跌4个百分点前所经历的分钟数'}
{'id': '2101', 'data_set_name': 'nws12_mainz_allticks', 'description': 'Total number of ticks for the trading day', 'description_cn': '当日交易总tick数'}
{'id': '2139', 'data_set_name': 'nws12_mainz_result_vs_index', 'description': '((EODClose - TONLast) / TONLast) - ((SPYClose - SPYLast) / SPYLast)', 'description_cn': '((收盘价_EODClose_ - 当日开盘价_TONLast) / 当日开盘价_TONLast) - ((SPY收盘价_SPYClose_ - SPY当日开盘价_SPYLast) / SPY当日开盘价_SPYLast)'}
{'id': '2153', 'data_set_name': 'nws12_prez_02p', 'description': 'The minimum of L or S above for 20-minute bucket', 'description_cn': '20分钟桶上限值(min_of_L_or_S)'}
{'id': '2169', 'data_set_name': 'nws12_prez_41rta', 'description': 'Fourteen-day Average True Range', 'description_cn': '14日真实范围均值'}
{'id': '2170', 'data_set_name': 'nws12_prez_4l', 'description': 'Number of minutes that elapsed before price went up 4 percentage points', 'description_cn': '价格上涨4个百分点前所经历的分钟数'}
{'id': '2171', 'data_set_name': 'nws12_prez_4p', 'description': 'The minimum of L or S above for 4-minute bucket', 'description_cn': 'L或S的4分钟桶盈亏平衡点'}
{'id': '2172', 'data_set_name': 'nws12_prez_4s', 'description': 'Number of minutes that elapsed before price went down 4 percentage points', 'description_cn': '价格下跌4个百分点前elapsed分钟数'}
{'id': '2194', 'data_set_name': 'nws12_prez_highexcstddev', 'description': '(EODHigh - TONLast)/StdDev, where StdDev is one standard deviation for the close price for 30 calendar days', 'description_cn': '(EOD高-当日最后价)/标准差_30天 Wrest-Day收盘价'}
{'id': '2230', 'data_set_name': 'top1000', 'description': '20140630', 'description_cn': '20140630'}
{'id': '2231', 'data_set_name': 'top200', 'description': '20140630', 'description_cn': '20140630'}
{'id': '2232', 'data_set_name': 'top3000', 'description': '20140630', 'description_cn': '20140630'}
{'id': '2233', 'data_set_name': 'top500', 'description': '20140630', 'description_cn': '20140630'}
{'id': '2234', 'data_set_name': 'topsp500', 'description': '20140630', 'description_cn': '20140630'}
{'id': '2248', 'data_set_name': 'nws18_sse', 'description': 'Sentiment of phrases impacting the company', 'description_cn': '公司情绪影响短语_sentiment'}
{'id': '2306', 'data_set_name': 'rp_nip_ratings', 'description': 'News impact projection of analyst ratings-related news', 'description_cn': '分析师评级相关新闻的/news_impact_projection'}
{'id': '2354', 'data_set_name': 'fn_comp_not_rec_a', 'description': 'Unrecognized cost of unvested share-based compensation awards.', 'description_cn': '未兑现股份薪酬 award 的 unrecognized cost'}
{'id': '2356', 'data_set_name': 'fn_comp_not_rec_stock_options_a', 'description': 'Unrecognized cost of unvested stock option awards.', 'description_cn': '未行权股票期权 unrecognized_cost_of_unvested_stock_options'}
{'id': '2357', 'data_set_name': 'fn_comp_not_rec_stock_options_q', 'description': 'Unrecognized cost of unvested stock option awards.', 'description_cn': '未行权股票期权 unrecognized_cost_of_unvested_stock_options'}
{'id': '2359', 'data_set_name': 'fn_comp_number_of_shares_authorized_q', 'description': 'The maximum number of shares (or other type of equity) originally approved (usually by shareholders and board of directors), net of any subsequent amendments and adjustments, for awards under the equity-based compensation plan. As stock or unit options and equity instruments other than options are awarded to participants, the shares or units remain authorized and become reserved for issuance under outstanding awards (not necessarily vested).', 'description_cn': '股票期权授权总数(净减去任何后续修正和调整)用于股权激励计划下的奖励。当股票或单位期权以及其他类型的股权工具(除期权外)授予参与者时,这些股份或单位仍被授权并预留用于未来奖励的发行(不一定立即 vest)。'}
{'id': '2393', 'data_set_name': 'fn_def_tax_assets_liab_net_q', 'description': 'Amount, after allocation of valuation allowances and deferred tax liability, of deferred tax asset attributable to deductible differences and carryforwards, without jurisdictional netting.', 'description_cn': '扣除减值准备和递延税负债后,attributable_to_deferred_tax_asset_amount'}
{'id': '2396', 'data_set_name': 'fn_def_tax_liab_a', 'description': 'Amount, after deferred tax asset, of deferred tax liability attributable to taxable differences without jurisdictional netting.', 'description_cn': '递延税负债(扣除递延税资产后),attributable_to_税务差异_without_地域抵消的盈亏平衡点'}
{'id': '2410', 'data_set_name': 'fn_entity_common_stock_shares_out_a', 'description': "Indicate number of shares or other units outstanding of each of registrant's classes of capital or common stock or other ownership interests, if and as stated on cover of related periodic report. Where multiple classes or units exist define each class/interest by adding class of stock items such as Common Class A [Member], Common Class B [Member] or Partnership Interest [Member] onto the Instrument [Domain] of the Entity Listings, Instrument.", 'description_cn': '标明每个注册类别资本或普通股票或其他所有权利益的已发行股份数量或其他单位数量,如相关定期报告封面上所示。如有多个类别或单位存在,则通过在实体列表Instrument[Domain]项下添加类似于Common Class A [Member]、Common Class B [Member]或Partnership Interest [Member]的分类来定义每个类别/利益。'}
{'id': '2411', 'data_set_name': 'fn_entity_common_stock_shares_out_q', 'description': "Indicate number of shares or other units outstanding of each of registrant's classes of capital or common stock or other ownership interests, if and as stated on cover of related periodic report. Where multiple classes or units exist define each class/interest by adding class of stock items such as Common Class A [Member], Common Class B [Member] or Partnership Interest [Member] onto the Instrument [Domain] of the Entity Listings, Instrument.", 'description_cn': '标明每个注册类别资本或普通股或其他所有权利益的发行在外量,如相关定期报告封面所示。如有多个类别或单位存在,请在实体列表Instrument[Domain]中通过添加如CommonClassA[Member]、CommonClassB[Member]或PartnershipInterest[Member]等类别/利益项来定义每个类别/利益。'}
{'id': '2436', 'data_set_name': 'fn_liab_fair_val_a', 'description': 'Liabilities Fair Value, Recurring, Total', 'description_cn': '看涨期权负债公允价值_ recurring_total'}
{'id': '2437', 'data_set_name': 'fn_liab_fair_val_l1_a', 'description': 'Liabilities Fair Value, Recurring, Level 1', 'description_cn': '看涨期权负债公允价值_ recurring_level_1'}
{'id': '2438', 'data_set_name': 'fn_liab_fair_val_l1_q', 'description': 'Liabilities Fair Value, Recurring, Level 1', 'description_cn': '看涨期权公允价值_ recurring_level_1'}
{'id': '2439', 'data_set_name': 'fn_liab_fair_val_l2_a', 'description': 'Liabilities Fair Value, Recurring, Level 2', 'description_cn': '看涨期权公允价值_ recurring_level_2'}
{'id': '2440', 'data_set_name': 'fn_liab_fair_val_l2_q', 'description': 'Liabilities Fair Value, Recurring, Level 2', 'description_cn': '看涨期权负债公允价值_ recurring_level_2'}
{'id': '2456', 'data_set_name': 'fn_op_lease_min_pay_due_in_4y_a', 'description': 'Amount of required minimum rental payments for operating leases having an initial or remaining non-cancelable lease term in excess of 1 year due in the 4th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '所需最低租赁付款额_经营租赁_初始或剩余不可撤销租期超过1年且于最新财政年度后第4个财政年度到期的租赁_不包含采用滚动期间报告的中间及全年期间_从最新资产负债表日开始计算'}
{'id': '2468', 'data_set_name': 'fn_oth_income_loss_fx_transaction_and_tax_translation_adj_q', 'description': 'Amount after tax and reclassification adjustments of gain (loss) on foreign currency translation adjustments, foreign currency transactions designated and effective as economic hedges of a net investment in a foreign entity and intra-entity foreign currency transactions that are of a long-term-investment nature.', 'description_cn': '所得税及重分类后外币translation调整、外币交易指定并有效作为净投资经济套期和长期投资性质的内部外币交易产生的损益金额'}
{'id': '2501', 'data_set_name': 'fn_treasury_stock_shares_a', 'description': 'Number of common and preferred shares that were previously issued and that were repurchased by the issuing entity and held in treasury on the financial statement date. This stock has no voting rights and receives no dividends.', 'description_cn': 'treasury_repossession_shares_num'}
{'id': '2524', 'data_set_name': 'fnd2_a_fedstyitxrt', 'description': 'Effective Income Tax Rate Reconciliation - Federal Statutory Income Tax Rate %', 'description_cn': '有效所得税率 reconciliation - 国家法定所得税率 %'}
{'id': '2529', 'data_set_name': 'fnd2_a_flintasamt1expyfour', 'description': 'Amount of amortization expense for assets, excluding financial assets and goodwill, lacking physical substance with a finite life expected to be recognized during the 4th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '期权行权后4年内的摊销费用金额,不包括金融资产和商誉,且缺乏物理实质、预期有有限寿命的资产,在最近资产负债表日后滚动报告期间内不包括间歇期和年度期间的金额'}
{'id': '2533', 'data_set_name': 'fnd2_a_frtandfixturesg', 'description': 'Amount before accumulated depreciation of equipment commonly used in offices and stores that have no permanent connection to the structure of a building or utilities. Examples include, but are not limited to, desks, chairs, tables, and bookcases.', 'description_cn': '办公和 store 无固定连接于建筑结构或公用设施的常用设备折旧前金额。例如但不限于,桌椅、柜台及书架等。'}
{'id': '2543', 'data_set_name': 'fnd2_a_ltrmdmrepopliny5', 'description': 'Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the 5th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '长期债务应付金额, sinking fund要求,及其他可由持有者在固定或可确定价格及日期于第5个财政年度内赎回的其他证券,不包括采用滚动期间报告的中间和年度期段从最新资产负债表日期起的期间。'}
{'id': '2544', 'data_set_name': 'fnd2_a_ltrmdmrepoplinyfour', 'description': 'Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the 4th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '长期债务应付金额,沉没基金要求,及其他可于固定或确定价格及日期赎回的证券(成熟期为最新财政年度后第4个财政年度)'}
{'id': '2545', 'data_set_name': 'fnd2_a_ltrmdmrepoplinythree', 'description': 'Amount of long-term debt payable, sinking fund requirements, and other securities issued that are redeemable by holder at fixed or determinable prices and dates maturing in the 3rd fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '长期债务应付金额_可赎回证券发行要求_持有人可在固定或可确定价格和日期赎回的其他证券_第4财年到期_不包括滚动期间'}
{'id': '2580', 'data_set_name': 'fnd2_dbplanepdfbnfpnext12m', 'description': 'Amount of benefits from a defined benefit plan expected to be paid in the next fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '下一会计年度预计支付的defined benefit计划收益金额(截至最近资产负债表日,滚动期间除外)'}
{'id': '2582', 'data_set_name': 'fnd2_dbplanepdfbnfpyfour', 'description': 'Amount of benefits from a defined benefit plan expected to be paid in the 4th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '预期在最新财政年度之后第4个财政年度支付的定义福利计划收益金额(不包括采用滚动期间报告方法时的中间和年度期间,从最近资产负债表日期起计算)'}
{'id': '2601', 'data_set_name': 'fnd2_itxreclstatelocalitxes', 'description': 'Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to state and local income tax expense (benefit).', 'description_cn': '差额所得税费用( benefit )与按国内联邦法定所得税率计算的预计所得税费用( benefit )金额(从持续经营业务税前利润中归属于州及地方政府所得税费用( benefit )部分)'}
{'id': '2613', 'data_set_name': 'fnd2_q_flintasamt1expyfour', 'description': 'Amount of amortization expense for assets, excluding financial assets and goodwill, lacking physical substance with a finite life expected to be recognized during the 4th fiscal year following the latest fiscal year. Excludes interim and annual periods when interim periods are reported on a rolling approach, from latest balance sheet date.', 'description_cn': '期权行权后第4个财政年度内预期确认的无形资产摊销费用(不包括金融资产和商誉),且无物理形态、有限寿命资产的摊销费用'}
========================= 数据字段结束 =======================================

@ -0,0 +1,210 @@
任务指令
原始表达式:ts_sum(subtract(implied_volatility_call_120, implied_volatility_put_90), 10)
总体表现评估
优点:
夏普比率优秀:IS阶段2.35,OOS阶段3.79,表现强劲
适应度得分高:IS阶段3.47,远超1.0的基准线
换手率适中:0.1129,既不过低也不过高
回撤控制良好:IS阶段12.76%,OOS阶段仅5.93%
存在的问题
1. 集中度风险(主要问题)
CONCENTRATED_WEIGHT检查失败:2021-10-28日权重集中度达50%
这表明因子在某些时点对少数股票赋予过大权重,存在极端暴露风险
2. 子行业中性化效果不佳
LOW_SUB_UNIVERSE_SHARPE检查失败:子行业层面夏普仅0.69
说明中性化处理后,子行业内选股能力较弱
当前因子收益可能过度依赖行业间配置而非行业内选股
3. 因子逻辑分析
本质:看涨期权与看跌期权的隐含波动率差异
120和90可能是行权价百分比(如120%和90%的价外期权)
这是波动率偏斜(skew)的一种度量,通常反映市场情绪和尾部风险定价
潜在优化方向
处理集中度问题:
考虑对因子值进行winsorization或标准化处理
添加权重限制或非线性变换
改进中性化效果:
检查当前中性化方法是否充分
考虑添加其他风险中性化维度(市值、流动性等)
因子表达式优化:
考虑不同期限的期权隐含波动率
添加相对强度或排名变换
调整时间窗口长度(当前为10天)
考虑波动率差异的相对变化而非绝对值
风险控制:
添加极端值处理
考虑市场环境适应性调整
*=========================================================================================*
输出格式:
输出必须是且仅是纯文本。
每一行是一个完整、独立、语法正确的WebSim表达式。
严禁任何形式的解释、编号、标点包裹(如引号)、Markdown格式或额外文本。
===================== !!! 重点(输出方式) !!! =====================
现在,请严格遵守以上所有规则,开始生成可立即在WebSim中运行的复合因子表达式。
**输出格式**(一行一个表达式, 每个表达式中间需要添加一个空行, 只要表达式本身, 不要解释, 不需要序号, 也不要输出多余的东西):
表达式
表达式
表达式
...
表达式
=================================================================
重申:请确保所有表达式都使用WorldQuant WebSim平台函数,不要使用pandas、numpy或其他Python库函数。输出必须是一行有效的WQ表达式。
以下是我的账号有权限使用的操作符, 请严格按照操作符, 以及我提供的数据集, 进行生成,组合 20 个alpha:
以下是我的账号有权限使用的操作符, 请严格按照操作符, 进行生成,组合因子
========================= 操作符开始 =======================================注意: Operator: 后面的是操作符,
Description: 此字段后面的是操作符对应的描述或使用说明, Description字段后面的内容是使用说明, 不是操作符
特别注意!!!! 必须按照操作符字段Operator的使用说明生成 alphaOperator: abs(x)
Description: Absolute value of x
Operator: add(x, y, filter = false)
Description: Add all inputs (at least 2 inputs required). If filter = true, filter all input NaN to 0 before adding
Operator: densify(x)
Description: Converts a grouping field of many buckets into lesser number of only available buckets so as to make working with grouping fields computationally efficient
Operator: divide(x, y)
Description: x / y
Operator: inverse(x)
Description: 1 / x
Operator: log(x)
Description: Natural logarithm. For example: Log(high/low) uses natural logarithm of high/low ratio as stock weights.
Operator: max(x, y, ..)
Description: Maximum value of all inputs. At least 2 inputs are required
Operator: min(x, y ..)
Description: Minimum value of all inputs. At least 2 inputs are required
Operator: multiply(x ,y, ... , filter=false)
Description: Multiply all inputs. At least 2 inputs are required. Filter sets the NaN values to 1
Operator: power(x, y)
Description: x ^ y
Operator: reverse(x)
Description: - x
Operator: sign(x)
Description: if input > 0, return 1; if input < 0, return -1; if input = 0, return 0; if input = NaN, return NaN;
Operator: signed_power(x, y)
Description: x raised to the power of y such that final result preserves sign of x
Operator: sqrt(x)
Description: Square root of x
Operator: subtract(x, y, filter=false)
Description: x-y. If filter = true, filter all input NaN to 0 before subtracting
Operator: and(input1, input2)
Description: Logical AND operator, returns true if both operands are true and returns false otherwise
Operator: if_else(input1, input2, input 3)
Description: If input1 is true then return input2 else return input3.
Operator: input1 < input2
Description: If input1 < input2 return true, else return false
Operator: input1 <= input2
Description: Returns true if input1 <= input2, return false otherwise
Operator: input1 == input2
Description: Returns true if both inputs are same and returns false otherwise
Operator: input1 > input2
Description: Logic comparison operators to compares two inputs
Operator: input1 >= input2
Description: Returns true if input1 >= input2, return false otherwise
Operator: input1!= input2
Description: Returns true if both inputs are NOT the same and returns false otherwise
Operator: is_nan(input)
Description: If (input == NaN) return 1 else return 0
Operator: not(x)
Description: Returns the logical negation of x. If x is true (1), it returns false (0), and if input is false (0), it returns true (1).
Operator: or(input1, input2)
Description: Logical OR operator returns true if either or both inputs are true and returns false otherwise
Operator: days_from_last_change(x)
Description: Amount of days since last change of x
Operator: hump(x, hump = 0.01)
Description: Limits amount and magnitude of changes in input (thus reducing turnover)
Operator: kth_element(x, d, k)
Description: Returns K-th value of input by looking through lookback days. This operator can be used to backfill missing data if k=1
Operator: last_diff_value(x, d)
Description: Returns last x value not equal to current x value from last d days
Operator: ts_arg_max(x, d)
Description: Returns the relative index of the max value in the time series for the past d days. If the current day has the max value for the past d days, it returns 0. If previous day has the max value for the past d days, it returns 1
Operator: ts_arg_min(x, d)
Description: Returns the relative index of the min value in the time series for the past d days; If the current day has the min value for the past d days, it returns 0; If previous day has the min value for the past d days, it returns 1.
Operator: ts_av_diff(x, d)
Description: Returns x - tsmean(x, d), but deals with NaNs carefully. That is NaNs are ignored during mean computation
Operator: ts_backfill(x,lookback = d, k=1, ignore="NAN")
Description: Backfill is the process of replacing the NAN or 0 values by a meaningful value (i.e., a first non-NaN value)
Operator: ts_corr(x, y, d)
Description: Returns correlation of x and y for the past d days
Operator: ts_count_nans(x ,d)
Description: Returns the number of NaN values in x for the past d days
Operator: ts_covariance(y, x, d)
Description: Returns covariance of y and x for the past d days
Operator: ts_decay_linear(x, d, dense = false)
Description: Returns the linear decay on x for the past d days. Dense parameter=false means operator works in sparse mode and we treat NaN as 0. In dense mode we do not.
Operator: ts_delay(x, d)
Description: Returns x value d days ago
Operator: ts_delta(x, d)
Description: Returns x - ts_delay(x, d)
Operator: ts_mean(x, d)
Description: Returns average value of x for the past d days.
Operator: ts_product(x, d)
Description: Returns product of x for the past d days
Operator: ts_quantile(x,d, driver="gaussian" )
Description: It calculates ts_rank and apply to its value an inverse cumulative density function from driver distribution. Possible values of driver (optional ) are "gaussian", "uniform", "cauchy" distribution where "gaussian" is the default.
Operator: ts_rank(x, d, constant = 0)
Description: Rank the values of x for each instrument over the past d days, then return the rank of the current value + constant. If not specified, by default, constant = 0.
Operator: ts_regression(y, x, d, lag = 0, rettype = 0)
Description: Returns various parameters related to regression function
Operator: ts_scale(x, d, constant = 0)
Description: Returns (x - ts_min(x, d)) / (ts_max(x, d) - ts_min(x, d)) + constant. This operator is similar to scale down operator but acts in time series space
Operator: ts_std_dev(x, d)
Description: Returns standard deviation of x for the past d days
Operator: ts_step(1)
Description: Returns days' counter
Operator: ts_sum(x, d)
Description: Sum values of x for the past d days.
Operator: ts_zscore(x, d)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean: (x - tsmean(x,d)) / tsstddev(x,d). This operator may help reduce outliers and drawdown.
Operator: normalize(x, useStd = false, limit = 0.0)
Description: Calculates the mean value of all valid alpha values for a certain date, then subtracts that mean from each element
Operator: quantile(x, driver = gaussian, sigma = 1.0)
Description: Rank the raw vector, shift the ranked Alpha vector, apply distribution (gaussian, cauchy, uniform). If driver is uniform, it simply subtract each Alpha value with the mean of all Alpha values in the Alpha vector
Operator: rank(x, rate=2)
Description: Ranks the input among all the instruments and returns an equally distributed number between 0.0 and 1.0. For precise sort, use the rate as 0
Operator: scale(x, scale=1, longscale=1, shortscale=1)
Description: Scales input to booksize. We can also scale the long positions and short positions to separate scales by mentioning additional parameters to the operator
Operator: winsorize(x, std=4)
Description: Winsorizes x to make sure that all values in x are between the lower and upper limits, which are specified as multiple of std.
Operator: zscore(x)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean
Operator: vec_avg(x)
Description: Taking mean of the vector field x
Operator: vec_sum(x)
Description: Sum of vector field x
Operator: bucket(rank(x), range="0, 1, 0.1" or buckets = "2,5,6,7,10")
Description: Convert float values into indexes for user-specified buckets. Bucket is useful for creating group values, which can be passed to GROUP as input
Operator: trade_when(x, y, z)
Description: Used in order to change Alpha values only under a specified condition and to hold Alpha values in other cases. It also allows to close Alpha positions (assign NaN values) under a specified condition
Operator: group_backfill(x, group, d, std = 4.0)
Description: If a certain value for a certain date and instrument is NaN, from the set of same group instruments, calculate winsorized mean of all non-NaN values over last d days
Operator: group_mean(x, weight, group)
Description: All elements in group equals to the mean
Operator: group_neutralize(x, group)
Description: Neutralizes Alpha against groups. These groups can be subindustry, industry, sector, country or a constant
Operator: group_rank(x, group)
Description: Each elements in a group is assigned the corresponding rank in this group
Operator: group_scale(x, group)
Description: Normalizes the values in a group to be between 0 and 1. (x - groupmin) / (groupmax - groupmin)
Operator: group_zscore(x, group)
Description: Calculates group Z-score - numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean. zscore = (data - mean) / stddev of x for each instrument within its group.
========================= 操作符结束 =======================================
========================= 数据字段开始 =======================================
注意: data_set_name: 后面的是数据字段(可以使用), description: 此字段后面的是数据字段对应的描述或使用说明(不能使用), description_cn字段后面的内容是中文使用说明(不能使用)
{'id': '517', 'data_set_name': 'fnd6_newqeventv110_glceaq', 'description': 'Gain/Loss on Sale (Core Earnings Adjusted) After-tax', 'description_cn': '税后核心 earnings 润亏'}
{'id': '624', 'data_set_name': 'fnd6_newqeventv110_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': 'SPCE earnings per share diluted'}
{'id': '625', 'data_set_name': 'fnd6_newqeventv110_spceeps12', 'description': 'S&P Core Earnings EPS Basic 12MM', 'description_cn': '标普核心 earnings 每股基本值_12M'}
{'id': '628', 'data_set_name': 'fnd6_newqeventv110_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings 每股基本值'}
{'id': '629', 'data_set_name': 'fnd6_newqeventv110_spcep12', 'description': 'S&P Core Earnings 12MM - Preliminary', 'description_cn': '标普核心 earnings 12个月 - 预liminary'}
{'id': '630', 'data_set_name': 'fnd6_newqeventv110_spcepd12', 'description': 'S&P Core Earnings 12MM EPS Diluted - Preliminary', 'description_cn': 'S&P核心 earnings_12个月稀释后每股盈亏平衡点_初步'}
{'id': '774', 'data_set_name': 'fnd6_newqv1300_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': '标准普尔核心 earnings 每股稀释后利润'}
{'id': '777', 'data_set_name': 'fnd6_newqv1300_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings EPS 基本'}
{'id': '872', 'data_set_name': 'fnd6_spce', 'description': 'S&P Core Earnings', 'description_cn': '标准普尔核心 earnings'}
{'id': '1861', 'data_set_name': 'implied_volatility_call_60', 'description': 'At-the-money option-implied volatility for call Option for 60 days', 'description_cn': '看涨期权60天 atm 隐含波动率'}
{'id': '1887', 'data_set_name': 'implied_volatility_mean_skew_90', 'description': 'At-the-money option-implied volatility mean skew for 90 days', 'description_cn': '90天平价隐含波动率均值-skew'}
{'id': '1894', 'data_set_name': 'implied_volatility_put_270', 'description': 'At-the-money option-implied volatility for Put Option for 270 days', 'description_cn': '看跌期权270天 atm 默克尔波动率'}
{'id': '2248', 'data_set_name': 'nws18_sse', 'description': 'Sentiment of phrases impacting the company', 'description_cn': '公司情绪影响短语_sentiment'}
{'id': '2356', 'data_set_name': 'fn_comp_not_rec_stock_options_a', 'description': 'Unrecognized cost of unvested stock option awards.', 'description_cn': '未行权股票期权 unrecognized_cost_of_unvested_stock_options'}
{'id': '2357', 'data_set_name': 'fn_comp_not_rec_stock_options_q', 'description': 'Unrecognized cost of unvested stock option awards.', 'description_cn': '未行权股票期权 unrecognized_cost_of_unvested_stock_options'}
========================= 数据字段结束 =======================================

@ -0,0 +1,181 @@
任务指令
[[假设]]
毛利率结构分化蕴含行业竞争格局信息:毛利率持续高于行业均值但呈现收窄趋势的企业,往往面临竞争加剧或定价权削弱,这可能预示未来盈利增速放缓;反之,毛利率持续低于行业均值但呈现扩张趋势的企业,可能正通过效率提升或产品结构改善获得竞争优势,未来盈利存在上行潜力。
[[实施方案]]
使用基础数据“毛利”与“营业收入”计算毛利率(毛利/营业收入)。使用时序行业中性化算子(如“group_standardize_0”),在申万行业分类下,计算每只股票过去八个季度的毛利率相对于行业均值的标准分。再采用时序变化算子(如“ts_decay_linear”)捕捉该标准分在过去四个季度的变化斜率。斜率值为负(标准分下降)时赋予负阿尔法权重,斜率为正(标准分上升)时赋予正阿尔法权重。
[[阿尔法因子优化建议]]
该逻辑的核心在于“趋势”与“相对位置”的交互。建议引入横截面动量算子(如“rank”)对最终的斜率值进行再排序,以强化头部与尾部信号。同时,可考虑对营业收入增长率施加条件约束(例如,仅当营收增长率非负时信号生效),以避免因收缩业务导致毛利率被动提升的噪音干扰。
*=========================================================================================*
输出格式:
输出必须是且仅是纯文本。
每一行是一个完整、独立、语法正确的WebSim表达式。
严禁任何形式的解释、编号、标点包裹(如引号)、Markdown格式或额外文本。
===================== !!! 重点(输出方式) !!! =====================
现在,请严格遵守以上所有规则,开始生成可立即在WebSim中运行的复合因子表达式。
**输出格式**(一行一个表达式, 每个表达式中间需要添加一个空行, 只要表达式本身, 不要解释, 不需要序号, 也不要输出多余的东西):
表达式
表达式
表达式
...
表达式
=================================================================
重申:请确保所有表达式都使用WorldQuant WebSim平台函数,不要使用pandas、numpy或其他Python库函数。输出必须是一行有效的WQ表达式。
以下是我的账号有权限使用的操作符, 请严格按照操作符, 以及我提供的数据集, 进行生成,组合 10 个alpha:
以下是我的账号有权限使用的操作符, 请严格按照操作符, 进行生成,组合因子
========================= 操作符开始 =======================================注意: Operator: 后面的是操作符,
Description: 此字段后面的是操作符对应的描述或使用说明, Description字段后面的内容是使用说明, 不是操作符
特别注意!!!! 必须按照操作符字段Operator的使用说明生成 alphaOperator: abs(x)
Description: Absolute value of x
Operator: add(x, y, filter = false)
Description: Add all inputs (at least 2 inputs required). If filter = true, filter all input NaN to 0 before adding
Operator: densify(x)
Description: Converts a grouping field of many buckets into lesser number of only available buckets so as to make working with grouping fields computationally efficient
Operator: divide(x, y)
Description: x / y
Operator: inverse(x)
Description: 1 / x
Operator: log(x)
Description: Natural logarithm. For example: Log(high/low) uses natural logarithm of high/low ratio as stock weights.
Operator: max(x, y, ..)
Description: Maximum value of all inputs. At least 2 inputs are required
Operator: min(x, y ..)
Description: Minimum value of all inputs. At least 2 inputs are required
Operator: multiply(x ,y, ... , filter=false)
Description: Multiply all inputs. At least 2 inputs are required. Filter sets the NaN values to 1
Operator: power(x, y)
Description: x ^ y
Operator: reverse(x)
Description: - x
Operator: sign(x)
Description: if input > 0, return 1; if input < 0, return -1; if input = 0, return 0; if input = NaN, return NaN;
Operator: signed_power(x, y)
Description: x raised to the power of y such that final result preserves sign of x
Operator: sqrt(x)
Description: Square root of x
Operator: subtract(x, y, filter=false)
Description: x-y. If filter = true, filter all input NaN to 0 before subtracting
Operator: and(input1, input2)
Description: Logical AND operator, returns true if both operands are true and returns false otherwise
Operator: if_else(input1, input2, input 3)
Description: If input1 is true then return input2 else return input3.
Operator: input1 < input2
Description: If input1 < input2 return true, else return false
Operator: input1 <= input2
Description: Returns true if input1 <= input2, return false otherwise
Operator: input1 == input2
Description: Returns true if both inputs are same and returns false otherwise
Operator: input1 > input2
Description: Logic comparison operators to compares two inputs
Operator: input1 >= input2
Description: Returns true if input1 >= input2, return false otherwise
Operator: input1!= input2
Description: Returns true if both inputs are NOT the same and returns false otherwise
Operator: is_nan(input)
Description: If (input == NaN) return 1 else return 0
Operator: not(x)
Description: Returns the logical negation of x. If x is true (1), it returns false (0), and if input is false (0), it returns true (1).
Operator: or(input1, input2)
Description: Logical OR operator returns true if either or both inputs are true and returns false otherwise
Operator: days_from_last_change(x)
Description: Amount of days since last change of x
Operator: hump(x, hump = 0.01)
Description: Limits amount and magnitude of changes in input (thus reducing turnover)
Operator: kth_element(x, d, k)
Description: Returns K-th value of input by looking through lookback days. This operator can be used to backfill missing data if k=1
Operator: last_diff_value(x, d)
Description: Returns last x value not equal to current x value from last d days
Operator: ts_arg_max(x, d)
Description: Returns the relative index of the max value in the time series for the past d days. If the current day has the max value for the past d days, it returns 0. If previous day has the max value for the past d days, it returns 1
Operator: ts_arg_min(x, d)
Description: Returns the relative index of the min value in the time series for the past d days; If the current day has the min value for the past d days, it returns 0; If previous day has the min value for the past d days, it returns 1.
Operator: ts_av_diff(x, d)
Description: Returns x - tsmean(x, d), but deals with NaNs carefully. That is NaNs are ignored during mean computation
Operator: ts_backfill(x,lookback = d, k=1, ignore="NAN")
Description: Backfill is the process of replacing the NAN or 0 values by a meaningful value (i.e., a first non-NaN value)
Operator: ts_corr(x, y, d)
Description: Returns correlation of x and y for the past d days
Operator: ts_count_nans(x ,d)
Description: Returns the number of NaN values in x for the past d days
Operator: ts_covariance(y, x, d)
Description: Returns covariance of y and x for the past d days
Operator: ts_decay_linear(x, d, dense = false)
Description: Returns the linear decay on x for the past d days. Dense parameter=false means operator works in sparse mode and we treat NaN as 0. In dense mode we do not.
Operator: ts_delay(x, d)
Description: Returns x value d days ago
Operator: ts_delta(x, d)
Description: Returns x - ts_delay(x, d)
Operator: ts_mean(x, d)
Description: Returns average value of x for the past d days.
Operator: ts_product(x, d)
Description: Returns product of x for the past d days
Operator: ts_quantile(x,d, driver="gaussian" )
Description: It calculates ts_rank and apply to its value an inverse cumulative density function from driver distribution. Possible values of driver (optional ) are "gaussian", "uniform", "cauchy" distribution where "gaussian" is the default.
Operator: ts_rank(x, d, constant = 0)
Description: Rank the values of x for each instrument over the past d days, then return the rank of the current value + constant. If not specified, by default, constant = 0.
Operator: ts_regression(y, x, d, lag = 0, rettype = 0)
Description: Returns various parameters related to regression function
Operator: ts_scale(x, d, constant = 0)
Description: Returns (x - ts_min(x, d)) / (ts_max(x, d) - ts_min(x, d)) + constant. This operator is similar to scale down operator but acts in time series space
Operator: ts_std_dev(x, d)
Description: Returns standard deviation of x for the past d days
Operator: ts_step(1)
Description: Returns days' counter
Operator: ts_sum(x, d)
Description: Sum values of x for the past d days.
Operator: ts_zscore(x, d)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean: (x - tsmean(x,d)) / tsstddev(x,d). This operator may help reduce outliers and drawdown.
Operator: normalize(x, useStd = false, limit = 0.0)
Description: Calculates the mean value of all valid alpha values for a certain date, then subtracts that mean from each element
Operator: quantile(x, driver = gaussian, sigma = 1.0)
Description: Rank the raw vector, shift the ranked Alpha vector, apply distribution (gaussian, cauchy, uniform). If driver is uniform, it simply subtract each Alpha value with the mean of all Alpha values in the Alpha vector
Operator: rank(x, rate=2)
Description: Ranks the input among all the instruments and returns an equally distributed number between 0.0 and 1.0. For precise sort, use the rate as 0
Operator: scale(x, scale=1, longscale=1, shortscale=1)
Description: Scales input to booksize. We can also scale the long positions and short positions to separate scales by mentioning additional parameters to the operator
Operator: winsorize(x, std=4)
Description: Winsorizes x to make sure that all values in x are between the lower and upper limits, which are specified as multiple of std.
Operator: zscore(x)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean
Operator: vec_avg(x)
Description: Taking mean of the vector field x
Operator: vec_sum(x)
Description: Sum of vector field x
Operator: bucket(rank(x), range="0, 1, 0.1" or buckets = "2,5,6,7,10")
Description: Convert float values into indexes for user-specified buckets. Bucket is useful for creating group values, which can be passed to GROUP as input
Operator: trade_when(x, y, z)
Description: Used in order to change Alpha values only under a specified condition and to hold Alpha values in other cases. It also allows to close Alpha positions (assign NaN values) under a specified condition
Operator: group_backfill(x, group, d, std = 4.0)
Description: If a certain value for a certain date and instrument is NaN, from the set of same group instruments, calculate winsorized mean of all non-NaN values over last d days
Operator: group_mean(x, weight, group)
Description: All elements in group equals to the mean
Operator: group_neutralize(x, group)
Description: Neutralizes Alpha against groups. These groups can be subindustry, industry, sector, country or a constant
Operator: group_rank(x, group)
Description: Each elements in a group is assigned the corresponding rank in this group
Operator: group_scale(x, group)
Description: Normalizes the values in a group to be between 0 and 1. (x - groupmin) / (groupmax - groupmin)
Operator: group_zscore(x, group)
Description: Calculates group Z-score - numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean. zscore = (data - mean) / stddev of x for each instrument within its group.
========================= 操作符结束 =======================================
========================= 数据字段开始 =======================================注意: data_set_name: 后面的是数据字段(可以使用), description: 此字段后面的是数据字段对应的描述或使用说明(不能使用), description_cn字段后面的内容是中文使用说明(不能使用)
{'id': '98', 'data_set_name': 'fnd6_acdo', 'description': 'Current Assets of Discontinued Operations', 'description_cn': '已终止经营current资产'}
{'id': '473', 'data_set_name': 'fnd6_newqeventv110_cibegniq', 'description': 'Comp Inc - Beginning Net Income', 'description_cn': 'comp_inc_beginning_net_income'}
{'id': '517', 'data_set_name': 'fnd6_newqeventv110_glceaq', 'description': 'Gain/Loss on Sale (Core Earnings Adjusted) After-tax', 'description_cn': '税后核心 earnings 润亏'}
{'id': '624', 'data_set_name': 'fnd6_newqeventv110_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': 'SPCE earnings per share diluted'}
{'id': '625', 'data_set_name': 'fnd6_newqeventv110_spceeps12', 'description': 'S&P Core Earnings EPS Basic 12MM', 'description_cn': '标普核心 earnings 每股基本值_12M'}
{'id': '628', 'data_set_name': 'fnd6_newqeventv110_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings 每股基本值'}
{'id': '629', 'data_set_name': 'fnd6_newqeventv110_spcep12', 'description': 'S&P Core Earnings 12MM - Preliminary', 'description_cn': '标普核心 earnings 12个月 - 预liminary'}
{'id': '630', 'data_set_name': 'fnd6_newqeventv110_spcepd12', 'description': 'S&P Core Earnings 12MM EPS Diluted - Preliminary', 'description_cn': 'S&P核心 earnings_12个月稀释后每股盈亏平衡点_初步'}
{'id': '774', 'data_set_name': 'fnd6_newqv1300_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': '标准普尔核心 earnings 每股稀释后利润'}
{'id': '777', 'data_set_name': 'fnd6_newqv1300_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings EPS 基本'}
{'id': '872', 'data_set_name': 'fnd6_spce', 'description': 'S&P Core Earnings', 'description_cn': '标准普尔核心 earnings'}
{'id': '1000', 'data_set_name': 'multi_factor_acceleration_score_derivative', 'description': 'Change in the acceleration of multi-factor score compared to previous period.', 'description_cn': '多因子评分加速度变化 Compared_to_Previous_Period_Multi_Factor_Score_Acceleration_Change'}
{'id': '2393', 'data_set_name': 'fn_def_tax_assets_liab_net_q', 'description': 'Amount, after allocation of valuation allowances and deferred tax liability, of deferred tax asset attributable to deductible differences and carryforwards, without jurisdictional netting.', 'description_cn': '扣除减值准备和递延税负债后,attributable_to_deferred_tax_asset_amount'}
{'id': '2436', 'data_set_name': 'fn_liab_fair_val_a', 'description': 'Liabilities Fair Value, Recurring, Total', 'description_cn': '看涨期权负债公允价值_ recurring_total'}
========================= 数据字段结束 =======================================

@ -0,0 +1,181 @@
任务指令
[[假设]]
毛利率结构分化蕴含行业竞争格局信息:毛利率持续高于行业均值但呈现收窄趋势的企业,往往面临竞争加剧或定价权削弱,这可能预示未来盈利增速放缓;反之,毛利率持续低于行业均值但呈现扩张趋势的企业,可能正通过效率提升或产品结构改善获得竞争优势,未来盈利存在上行潜力。
[[实施方案]]
使用基础数据“毛利”与“营业收入”计算毛利率(毛利/营业收入)。使用时序行业中性化算子(如“group_standardize_0”),在申万行业分类下,计算每只股票过去八个季度的毛利率相对于行业均值的标准分。再采用时序变化算子(如“ts_decay_linear”)捕捉该标准分在过去四个季度的变化斜率。斜率值为负(标准分下降)时赋予负阿尔法权重,斜率为正(标准分上升)时赋予正阿尔法权重。
[[阿尔法因子优化建议]]
该逻辑的核心在于“趋势”与“相对位置”的交互。建议引入横截面动量算子(如“rank”)对最终的斜率值进行再排序,以强化头部与尾部信号。同时,可考虑对营业收入增长率施加条件约束(例如,仅当营收增长率非负时信号生效),以避免因收缩业务导致毛利率被动提升的噪音干扰。
*=========================================================================================*
输出格式:
输出必须是且仅是纯文本。
每一行是一个完整、独立、语法正确的WebSim表达式。
严禁任何形式的解释、编号、标点包裹(如引号)、Markdown格式或额外文本。
===================== !!! 重点(输出方式) !!! =====================
现在,请严格遵守以上所有规则,开始生成可立即在WebSim中运行的复合因子表达式。
**输出格式**(一行一个表达式, 每个表达式中间需要添加一个空行, 只要表达式本身, 不要解释, 不需要序号, 也不要输出多余的东西):
表达式
表达式
表达式
...
表达式
=================================================================
重申:请确保所有表达式都使用WorldQuant WebSim平台函数,不要使用pandas、numpy或其他Python库函数。输出必须是一行有效的WQ表达式。
以下是我的账号有权限使用的操作符, 请严格按照操作符, 以及我提供的数据集, 进行生成,组合 10 个alpha:
以下是我的账号有权限使用的操作符, 请严格按照操作符, 进行生成,组合因子
========================= 操作符开始 =======================================注意: Operator: 后面的是操作符,
Description: 此字段后面的是操作符对应的描述或使用说明, Description字段后面的内容是使用说明, 不是操作符
特别注意!!!! 必须按照操作符字段Operator的使用说明生成 alphaOperator: abs(x)
Description: Absolute value of x
Operator: add(x, y, filter = false)
Description: Add all inputs (at least 2 inputs required). If filter = true, filter all input NaN to 0 before adding
Operator: densify(x)
Description: Converts a grouping field of many buckets into lesser number of only available buckets so as to make working with grouping fields computationally efficient
Operator: divide(x, y)
Description: x / y
Operator: inverse(x)
Description: 1 / x
Operator: log(x)
Description: Natural logarithm. For example: Log(high/low) uses natural logarithm of high/low ratio as stock weights.
Operator: max(x, y, ..)
Description: Maximum value of all inputs. At least 2 inputs are required
Operator: min(x, y ..)
Description: Minimum value of all inputs. At least 2 inputs are required
Operator: multiply(x ,y, ... , filter=false)
Description: Multiply all inputs. At least 2 inputs are required. Filter sets the NaN values to 1
Operator: power(x, y)
Description: x ^ y
Operator: reverse(x)
Description: - x
Operator: sign(x)
Description: if input > 0, return 1; if input < 0, return -1; if input = 0, return 0; if input = NaN, return NaN;
Operator: signed_power(x, y)
Description: x raised to the power of y such that final result preserves sign of x
Operator: sqrt(x)
Description: Square root of x
Operator: subtract(x, y, filter=false)
Description: x-y. If filter = true, filter all input NaN to 0 before subtracting
Operator: and(input1, input2)
Description: Logical AND operator, returns true if both operands are true and returns false otherwise
Operator: if_else(input1, input2, input 3)
Description: If input1 is true then return input2 else return input3.
Operator: input1 < input2
Description: If input1 < input2 return true, else return false
Operator: input1 <= input2
Description: Returns true if input1 <= input2, return false otherwise
Operator: input1 == input2
Description: Returns true if both inputs are same and returns false otherwise
Operator: input1 > input2
Description: Logic comparison operators to compares two inputs
Operator: input1 >= input2
Description: Returns true if input1 >= input2, return false otherwise
Operator: input1!= input2
Description: Returns true if both inputs are NOT the same and returns false otherwise
Operator: is_nan(input)
Description: If (input == NaN) return 1 else return 0
Operator: not(x)
Description: Returns the logical negation of x. If x is true (1), it returns false (0), and if input is false (0), it returns true (1).
Operator: or(input1, input2)
Description: Logical OR operator returns true if either or both inputs are true and returns false otherwise
Operator: days_from_last_change(x)
Description: Amount of days since last change of x
Operator: hump(x, hump = 0.01)
Description: Limits amount and magnitude of changes in input (thus reducing turnover)
Operator: kth_element(x, d, k)
Description: Returns K-th value of input by looking through lookback days. This operator can be used to backfill missing data if k=1
Operator: last_diff_value(x, d)
Description: Returns last x value not equal to current x value from last d days
Operator: ts_arg_max(x, d)
Description: Returns the relative index of the max value in the time series for the past d days. If the current day has the max value for the past d days, it returns 0. If previous day has the max value for the past d days, it returns 1
Operator: ts_arg_min(x, d)
Description: Returns the relative index of the min value in the time series for the past d days; If the current day has the min value for the past d days, it returns 0; If previous day has the min value for the past d days, it returns 1.
Operator: ts_av_diff(x, d)
Description: Returns x - tsmean(x, d), but deals with NaNs carefully. That is NaNs are ignored during mean computation
Operator: ts_backfill(x,lookback = d, k=1, ignore="NAN")
Description: Backfill is the process of replacing the NAN or 0 values by a meaningful value (i.e., a first non-NaN value)
Operator: ts_corr(x, y, d)
Description: Returns correlation of x and y for the past d days
Operator: ts_count_nans(x ,d)
Description: Returns the number of NaN values in x for the past d days
Operator: ts_covariance(y, x, d)
Description: Returns covariance of y and x for the past d days
Operator: ts_decay_linear(x, d, dense = false)
Description: Returns the linear decay on x for the past d days. Dense parameter=false means operator works in sparse mode and we treat NaN as 0. In dense mode we do not.
Operator: ts_delay(x, d)
Description: Returns x value d days ago
Operator: ts_delta(x, d)
Description: Returns x - ts_delay(x, d)
Operator: ts_mean(x, d)
Description: Returns average value of x for the past d days.
Operator: ts_product(x, d)
Description: Returns product of x for the past d days
Operator: ts_quantile(x,d, driver="gaussian" )
Description: It calculates ts_rank and apply to its value an inverse cumulative density function from driver distribution. Possible values of driver (optional ) are "gaussian", "uniform", "cauchy" distribution where "gaussian" is the default.
Operator: ts_rank(x, d, constant = 0)
Description: Rank the values of x for each instrument over the past d days, then return the rank of the current value + constant. If not specified, by default, constant = 0.
Operator: ts_regression(y, x, d, lag = 0, rettype = 0)
Description: Returns various parameters related to regression function
Operator: ts_scale(x, d, constant = 0)
Description: Returns (x - ts_min(x, d)) / (ts_max(x, d) - ts_min(x, d)) + constant. This operator is similar to scale down operator but acts in time series space
Operator: ts_std_dev(x, d)
Description: Returns standard deviation of x for the past d days
Operator: ts_step(1)
Description: Returns days' counter
Operator: ts_sum(x, d)
Description: Sum values of x for the past d days.
Operator: ts_zscore(x, d)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean: (x - tsmean(x,d)) / tsstddev(x,d). This operator may help reduce outliers and drawdown.
Operator: normalize(x, useStd = false, limit = 0.0)
Description: Calculates the mean value of all valid alpha values for a certain date, then subtracts that mean from each element
Operator: quantile(x, driver = gaussian, sigma = 1.0)
Description: Rank the raw vector, shift the ranked Alpha vector, apply distribution (gaussian, cauchy, uniform). If driver is uniform, it simply subtract each Alpha value with the mean of all Alpha values in the Alpha vector
Operator: rank(x, rate=2)
Description: Ranks the input among all the instruments and returns an equally distributed number between 0.0 and 1.0. For precise sort, use the rate as 0
Operator: scale(x, scale=1, longscale=1, shortscale=1)
Description: Scales input to booksize. We can also scale the long positions and short positions to separate scales by mentioning additional parameters to the operator
Operator: winsorize(x, std=4)
Description: Winsorizes x to make sure that all values in x are between the lower and upper limits, which are specified as multiple of std.
Operator: zscore(x)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean
Operator: vec_avg(x)
Description: Taking mean of the vector field x
Operator: vec_sum(x)
Description: Sum of vector field x
Operator: bucket(rank(x), range="0, 1, 0.1" or buckets = "2,5,6,7,10")
Description: Convert float values into indexes for user-specified buckets. Bucket is useful for creating group values, which can be passed to GROUP as input
Operator: trade_when(x, y, z)
Description: Used in order to change Alpha values only under a specified condition and to hold Alpha values in other cases. It also allows to close Alpha positions (assign NaN values) under a specified condition
Operator: group_backfill(x, group, d, std = 4.0)
Description: If a certain value for a certain date and instrument is NaN, from the set of same group instruments, calculate winsorized mean of all non-NaN values over last d days
Operator: group_mean(x, weight, group)
Description: All elements in group equals to the mean
Operator: group_neutralize(x, group)
Description: Neutralizes Alpha against groups. These groups can be subindustry, industry, sector, country or a constant
Operator: group_rank(x, group)
Description: Each elements in a group is assigned the corresponding rank in this group
Operator: group_scale(x, group)
Description: Normalizes the values in a group to be between 0 and 1. (x - groupmin) / (groupmax - groupmin)
Operator: group_zscore(x, group)
Description: Calculates group Z-score - numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean. zscore = (data - mean) / stddev of x for each instrument within its group.
========================= 操作符结束 =======================================
========================= 数据字段开始 =======================================注意: data_set_name: 后面的是数据字段(可以使用), description: 此字段后面的是数据字段对应的描述或使用说明(不能使用), description_cn字段后面的内容是中文使用说明(不能使用)
{'id': '98', 'data_set_name': 'fnd6_acdo', 'description': 'Current Assets of Discontinued Operations', 'description_cn': '已终止经营current资产'}
{'id': '473', 'data_set_name': 'fnd6_newqeventv110_cibegniq', 'description': 'Comp Inc - Beginning Net Income', 'description_cn': 'comp_inc_beginning_net_income'}
{'id': '517', 'data_set_name': 'fnd6_newqeventv110_glceaq', 'description': 'Gain/Loss on Sale (Core Earnings Adjusted) After-tax', 'description_cn': '税后核心 earnings 润亏'}
{'id': '624', 'data_set_name': 'fnd6_newqeventv110_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': 'SPCE earnings per share diluted'}
{'id': '625', 'data_set_name': 'fnd6_newqeventv110_spceeps12', 'description': 'S&P Core Earnings EPS Basic 12MM', 'description_cn': '标普核心 earnings 每股基本值_12M'}
{'id': '628', 'data_set_name': 'fnd6_newqeventv110_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings 每股基本值'}
{'id': '629', 'data_set_name': 'fnd6_newqeventv110_spcep12', 'description': 'S&P Core Earnings 12MM - Preliminary', 'description_cn': '标普核心 earnings 12个月 - 预liminary'}
{'id': '630', 'data_set_name': 'fnd6_newqeventv110_spcepd12', 'description': 'S&P Core Earnings 12MM EPS Diluted - Preliminary', 'description_cn': 'S&P核心 earnings_12个月稀释后每股盈亏平衡点_初步'}
{'id': '774', 'data_set_name': 'fnd6_newqv1300_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': '标准普尔核心 earnings 每股稀释后利润'}
{'id': '777', 'data_set_name': 'fnd6_newqv1300_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings EPS 基本'}
{'id': '872', 'data_set_name': 'fnd6_spce', 'description': 'S&P Core Earnings', 'description_cn': '标准普尔核心 earnings'}
{'id': '1000', 'data_set_name': 'multi_factor_acceleration_score_derivative', 'description': 'Change in the acceleration of multi-factor score compared to previous period.', 'description_cn': '多因子评分加速度变化 Compared_to_Previous_Period_Multi_Factor_Score_Acceleration_Change'}
{'id': '2393', 'data_set_name': 'fn_def_tax_assets_liab_net_q', 'description': 'Amount, after allocation of valuation allowances and deferred tax liability, of deferred tax asset attributable to deductible differences and carryforwards, without jurisdictional netting.', 'description_cn': '扣除减值准备和递延税负债后,attributable_to_deferred_tax_asset_amount'}
{'id': '2436', 'data_set_name': 'fn_liab_fair_val_a', 'description': 'Liabilities Fair Value, Recurring, Total', 'description_cn': '看涨期权负债公允价值_ recurring_total'}
========================= 数据字段结束 =======================================

@ -0,0 +1,181 @@
任务指令
[[假设]]
毛利率结构分化蕴含行业竞争格局信息:毛利率持续高于行业均值但呈现收窄趋势的企业,往往面临竞争加剧或定价权削弱,这可能预示未来盈利增速放缓;反之,毛利率持续低于行业均值但呈现扩张趋势的企业,可能正通过效率提升或产品结构改善获得竞争优势,未来盈利存在上行潜力。
[[实施方案]]
使用基础数据“毛利”与“营业收入”计算毛利率(毛利/营业收入)。使用时序行业中性化算子(如“group_standardize_0”),在申万行业分类下,计算每只股票过去八个季度的毛利率相对于行业均值的标准分。再采用时序变化算子(如“ts_decay_linear”)捕捉该标准分在过去四个季度的变化斜率。斜率值为负(标准分下降)时赋予负阿尔法权重,斜率为正(标准分上升)时赋予正阿尔法权重。
[[阿尔法因子优化建议]]
该逻辑的核心在于“趋势”与“相对位置”的交互。建议引入横截面动量算子(如“rank”)对最终的斜率值进行再排序,以强化头部与尾部信号。同时,可考虑对营业收入增长率施加条件约束(例如,仅当营收增长率非负时信号生效),以避免因收缩业务导致毛利率被动提升的噪音干扰。
*=========================================================================================*
输出格式:
输出必须是且仅是纯文本。
每一行是一个完整、独立、语法正确的WebSim表达式。
严禁任何形式的解释、编号、标点包裹(如引号)、Markdown格式或额外文本。
===================== !!! 重点(输出方式) !!! =====================
现在,请严格遵守以上所有规则,开始生成可立即在WebSim中运行的复合因子表达式。
**输出格式**(一行一个表达式, 每个表达式中间需要添加一个空行, 只要表达式本身, 不需要赋值, 不要解释, 不需要序号, 也不要输出多余的东西):
表达式
表达式
表达式
...
表达式
=================================================================
重申:请确保所有表达式都使用WorldQuant WebSim平台函数,不要使用pandas、numpy或其他Python库函数。输出必须是一行有效的WQ表达式。
以下是我的账号有权限使用的操作符, 请严格按照操作符, 以及我提供的数据集, 进行生成,组合 10 个alpha:
以下是我的账号有权限使用的操作符, 请严格按照操作符, 进行生成,组合因子
========================= 操作符开始 =======================================注意: Operator: 后面的是操作符,
Description: 此字段后面的是操作符对应的描述或使用说明, Description字段后面的内容是使用说明, 不是操作符
特别注意!!!! 必须按照操作符字段Operator的使用说明生成 alphaOperator: abs(x)
Description: Absolute value of x
Operator: add(x, y, filter = false)
Description: Add all inputs (at least 2 inputs required). If filter = true, filter all input NaN to 0 before adding
Operator: densify(x)
Description: Converts a grouping field of many buckets into lesser number of only available buckets so as to make working with grouping fields computationally efficient
Operator: divide(x, y)
Description: x / y
Operator: inverse(x)
Description: 1 / x
Operator: log(x)
Description: Natural logarithm. For example: Log(high/low) uses natural logarithm of high/low ratio as stock weights.
Operator: max(x, y, ..)
Description: Maximum value of all inputs. At least 2 inputs are required
Operator: min(x, y ..)
Description: Minimum value of all inputs. At least 2 inputs are required
Operator: multiply(x ,y, ... , filter=false)
Description: Multiply all inputs. At least 2 inputs are required. Filter sets the NaN values to 1
Operator: power(x, y)
Description: x ^ y
Operator: reverse(x)
Description: - x
Operator: sign(x)
Description: if input > 0, return 1; if input < 0, return -1; if input = 0, return 0; if input = NaN, return NaN;
Operator: signed_power(x, y)
Description: x raised to the power of y such that final result preserves sign of x
Operator: sqrt(x)
Description: Square root of x
Operator: subtract(x, y, filter=false)
Description: x-y. If filter = true, filter all input NaN to 0 before subtracting
Operator: and(input1, input2)
Description: Logical AND operator, returns true if both operands are true and returns false otherwise
Operator: if_else(input1, input2, input 3)
Description: If input1 is true then return input2 else return input3.
Operator: input1 < input2
Description: If input1 < input2 return true, else return false
Operator: input1 <= input2
Description: Returns true if input1 <= input2, return false otherwise
Operator: input1 == input2
Description: Returns true if both inputs are same and returns false otherwise
Operator: input1 > input2
Description: Logic comparison operators to compares two inputs
Operator: input1 >= input2
Description: Returns true if input1 >= input2, return false otherwise
Operator: input1!= input2
Description: Returns true if both inputs are NOT the same and returns false otherwise
Operator: is_nan(input)
Description: If (input == NaN) return 1 else return 0
Operator: not(x)
Description: Returns the logical negation of x. If x is true (1), it returns false (0), and if input is false (0), it returns true (1).
Operator: or(input1, input2)
Description: Logical OR operator returns true if either or both inputs are true and returns false otherwise
Operator: days_from_last_change(x)
Description: Amount of days since last change of x
Operator: hump(x, hump = 0.01)
Description: Limits amount and magnitude of changes in input (thus reducing turnover)
Operator: kth_element(x, d, k)
Description: Returns K-th value of input by looking through lookback days. This operator can be used to backfill missing data if k=1
Operator: last_diff_value(x, d)
Description: Returns last x value not equal to current x value from last d days
Operator: ts_arg_max(x, d)
Description: Returns the relative index of the max value in the time series for the past d days. If the current day has the max value for the past d days, it returns 0. If previous day has the max value for the past d days, it returns 1
Operator: ts_arg_min(x, d)
Description: Returns the relative index of the min value in the time series for the past d days; If the current day has the min value for the past d days, it returns 0; If previous day has the min value for the past d days, it returns 1.
Operator: ts_av_diff(x, d)
Description: Returns x - tsmean(x, d), but deals with NaNs carefully. That is NaNs are ignored during mean computation
Operator: ts_backfill(x,lookback = d, k=1, ignore="NAN")
Description: Backfill is the process of replacing the NAN or 0 values by a meaningful value (i.e., a first non-NaN value)
Operator: ts_corr(x, y, d)
Description: Returns correlation of x and y for the past d days
Operator: ts_count_nans(x ,d)
Description: Returns the number of NaN values in x for the past d days
Operator: ts_covariance(y, x, d)
Description: Returns covariance of y and x for the past d days
Operator: ts_decay_linear(x, d, dense = false)
Description: Returns the linear decay on x for the past d days. Dense parameter=false means operator works in sparse mode and we treat NaN as 0. In dense mode we do not.
Operator: ts_delay(x, d)
Description: Returns x value d days ago
Operator: ts_delta(x, d)
Description: Returns x - ts_delay(x, d)
Operator: ts_mean(x, d)
Description: Returns average value of x for the past d days.
Operator: ts_product(x, d)
Description: Returns product of x for the past d days
Operator: ts_quantile(x,d, driver="gaussian" )
Description: It calculates ts_rank and apply to its value an inverse cumulative density function from driver distribution. Possible values of driver (optional ) are "gaussian", "uniform", "cauchy" distribution where "gaussian" is the default.
Operator: ts_rank(x, d, constant = 0)
Description: Rank the values of x for each instrument over the past d days, then return the rank of the current value + constant. If not specified, by default, constant = 0.
Operator: ts_regression(y, x, d, lag = 0, rettype = 0)
Description: Returns various parameters related to regression function
Operator: ts_scale(x, d, constant = 0)
Description: Returns (x - ts_min(x, d)) / (ts_max(x, d) - ts_min(x, d)) + constant. This operator is similar to scale down operator but acts in time series space
Operator: ts_std_dev(x, d)
Description: Returns standard deviation of x for the past d days
Operator: ts_step(1)
Description: Returns days' counter
Operator: ts_sum(x, d)
Description: Sum values of x for the past d days.
Operator: ts_zscore(x, d)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean: (x - tsmean(x,d)) / tsstddev(x,d). This operator may help reduce outliers and drawdown.
Operator: normalize(x, useStd = false, limit = 0.0)
Description: Calculates the mean value of all valid alpha values for a certain date, then subtracts that mean from each element
Operator: quantile(x, driver = gaussian, sigma = 1.0)
Description: Rank the raw vector, shift the ranked Alpha vector, apply distribution (gaussian, cauchy, uniform). If driver is uniform, it simply subtract each Alpha value with the mean of all Alpha values in the Alpha vector
Operator: rank(x, rate=2)
Description: Ranks the input among all the instruments and returns an equally distributed number between 0.0 and 1.0. For precise sort, use the rate as 0
Operator: scale(x, scale=1, longscale=1, shortscale=1)
Description: Scales input to booksize. We can also scale the long positions and short positions to separate scales by mentioning additional parameters to the operator
Operator: winsorize(x, std=4)
Description: Winsorizes x to make sure that all values in x are between the lower and upper limits, which are specified as multiple of std.
Operator: zscore(x)
Description: Z-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean
Operator: vec_avg(x)
Description: Taking mean of the vector field x
Operator: vec_sum(x)
Description: Sum of vector field x
Operator: bucket(rank(x), range="0, 1, 0.1" or buckets = "2,5,6,7,10")
Description: Convert float values into indexes for user-specified buckets. Bucket is useful for creating group values, which can be passed to GROUP as input
Operator: trade_when(x, y, z)
Description: Used in order to change Alpha values only under a specified condition and to hold Alpha values in other cases. It also allows to close Alpha positions (assign NaN values) under a specified condition
Operator: group_backfill(x, group, d, std = 4.0)
Description: If a certain value for a certain date and instrument is NaN, from the set of same group instruments, calculate winsorized mean of all non-NaN values over last d days
Operator: group_mean(x, weight, group)
Description: All elements in group equals to the mean
Operator: group_neutralize(x, group)
Description: Neutralizes Alpha against groups. These groups can be subindustry, industry, sector, country or a constant
Operator: group_rank(x, group)
Description: Each elements in a group is assigned the corresponding rank in this group
Operator: group_scale(x, group)
Description: Normalizes the values in a group to be between 0 and 1. (x - groupmin) / (groupmax - groupmin)
Operator: group_zscore(x, group)
Description: Calculates group Z-score - numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean. zscore = (data - mean) / stddev of x for each instrument within its group.
========================= 操作符结束 =======================================
========================= 数据字段开始 =======================================注意: data_set_name: 后面的是数据字段(可以使用), description: 此字段后面的是数据字段对应的描述或使用说明(不能使用), description_cn字段后面的内容是中文使用说明(不能使用)
{'id': '98', 'data_set_name': 'fnd6_acdo', 'description': 'Current Assets of Discontinued Operations', 'description_cn': '已终止经营current资产'}
{'id': '473', 'data_set_name': 'fnd6_newqeventv110_cibegniq', 'description': 'Comp Inc - Beginning Net Income', 'description_cn': 'comp_inc_beginning_net_income'}
{'id': '517', 'data_set_name': 'fnd6_newqeventv110_glceaq', 'description': 'Gain/Loss on Sale (Core Earnings Adjusted) After-tax', 'description_cn': '税后核心 earnings 润亏'}
{'id': '624', 'data_set_name': 'fnd6_newqeventv110_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': 'SPCE earnings per share diluted'}
{'id': '625', 'data_set_name': 'fnd6_newqeventv110_spceeps12', 'description': 'S&P Core Earnings EPS Basic 12MM', 'description_cn': '标普核心 earnings 每股基本值_12M'}
{'id': '628', 'data_set_name': 'fnd6_newqeventv110_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings 每股基本值'}
{'id': '629', 'data_set_name': 'fnd6_newqeventv110_spcep12', 'description': 'S&P Core Earnings 12MM - Preliminary', 'description_cn': '标普核心 earnings 12个月 - 预liminary'}
{'id': '630', 'data_set_name': 'fnd6_newqeventv110_spcepd12', 'description': 'S&P Core Earnings 12MM EPS Diluted - Preliminary', 'description_cn': 'S&P核心 earnings_12个月稀释后每股盈亏平衡点_初步'}
{'id': '774', 'data_set_name': 'fnd6_newqv1300_spcedq', 'description': 'S&P Core Earnings EPS Diluted', 'description_cn': '标准普尔核心 earnings 每股稀释后利润'}
{'id': '777', 'data_set_name': 'fnd6_newqv1300_spceepsq', 'description': 'S&P Core Earnings EPS Basic', 'description_cn': '标普核心 earnings EPS 基本'}
{'id': '872', 'data_set_name': 'fnd6_spce', 'description': 'S&P Core Earnings', 'description_cn': '标准普尔核心 earnings'}
{'id': '1000', 'data_set_name': 'multi_factor_acceleration_score_derivative', 'description': 'Change in the acceleration of multi-factor score compared to previous period.', 'description_cn': '多因子评分加速度变化 Compared_to_Previous_Period_Multi_Factor_Score_Acceleration_Change'}
{'id': '2393', 'data_set_name': 'fn_def_tax_assets_liab_net_q', 'description': 'Amount, after allocation of valuation allowances and deferred tax liability, of deferred tax asset attributable to deductible differences and carryforwards, without jurisdictional netting.', 'description_cn': '扣除减值准备和递延税负债后,attributable_to_deferred_tax_asset_amount'}
{'id': '2436', 'data_set_name': 'fn_liab_fair_val_a', 'description': 'Liabilities Fair Value, Recurring, Total', 'description_cn': '看涨期权负债公允价值_ recurring_total'}
========================= 数据字段结束 =======================================

@ -1,125 +1,13 @@
任务指令 任务指令
【策略类型】优化因子 [[假设]]
multiply(ts_rank(divide(ts_backfill(fnd6_drc, 252), assets), 126), subtract(group_rank(divide(ts_backfill(fnd6_drc, 252), assets), sector), 0.5)) 毛利率结构分化蕴含行业竞争格局信息:毛利率持续高于行业均值但呈现收窄趋势的企业,往往面临竞争加剧或定价权削弱,这可能预示未来盈利增速放缓;反之,毛利率持续低于行业均值但呈现扩张趋势的企业,可能正通过效率提升或产品结构改善获得竞争优势,未来盈利存在上行潜力。
【当前情况】
[[实施方案]]
使用基础数据“毛利”与“营业收入”计算毛利率(毛利/营业收入)。使用时序行业中性化算子(如“group_standardize_0”),在申万行业分类下,计算每只股票过去八个季度的毛利率相对于行业均值的标准分。再采用时序变化算子(如“ts_decay_linear”)捕捉该标准分在过去四个季度的变化斜率。斜率值为负(标准分下降)时赋予负阿尔法权重,斜率为正(标准分上升)时赋予正阿尔法权重。
[[阿尔法因子优化建议]]
该逻辑的核心在于“趋势”与“相对位置”的交互。建议引入横截面动量算子(如“rank”)对最终的斜率值进行再排序,以强化头部与尾部信号。同时,可考虑对营业收入增长率施加条件约束(例如,仅当营收增长率非负时信号生效),以避免因收缩业务导致毛利率被动提升的噪音干扰。
{
"id": "88qMa31V",
"type": "REGULAR",
"author": "YC93384",
"settings": {
"instrumentType": "EQUITY",
"region": "USA",
"universe": "TOP3000",
"delay": 1,
"decay": 0,
"neutralization": "INDUSTRY",
"truncation": 0.08,
"pasteurization": "ON",
"unitHandling": "VERIFY",
"nanHandling": "OFF",
"maxTrade": "OFF",
"language": "FASTEXPR",
"visualization": false,
"startDate": "2018-01-20",
"endDate": "2023-01-20"
},
"regular": {
"code": "multiply(ts_rank(divide(ts_backfill(fnd6_drc, 252), assets), 126), subtract(group_rank(divide(ts_backfill(fnd6_drc, 252), assets), sector), 0.5))",
"description": null,
"operatorCount": 8
},
"dateCreated": "2025-12-25T03:16:45-05:00",
"dateSubmitted": null,
"dateModified": "2025-12-25T03:16:45-05:00",
"name": null,
"favorite": false,
"hidden": false,
"color": null,
"category": null,
"tags": [],
"classifications": [
{
"id": "DATA_USAGE:SINGLE_DATA_SET",
"name": "Single Data Set Alpha"
}
],
"grade": "INFERIOR",
"stage": "IS",
"status": "UNSUBMITTED",
"is": {
"pnl": 2429129,
"bookSize": 20000000,
"longCount": 966,
"shortCount": 1435,
"turnover": 0.028,
"returns": 0.0491,
"drawdown": 0.0485,
"margin": 0.003504,
"sharpe": 1.36,
"fitness": 0.85,
"startDate": "2018-01-20",
"checks": [
{
"name": "LOW_SHARPE",
"result": "PASS",
"limit": 1.25,
"value": 1.36
},
{
"name": "LOW_FITNESS",
"result": "FAIL",
"limit": 1.0,
"value": 0.85
},
{
"name": "LOW_TURNOVER",
"result": "PASS",
"limit": 0.01,
"value": 0.028
},
{
"name": "HIGH_TURNOVER",
"result": "PASS",
"limit": 0.7,
"value": 0.028
},
{
"name": "CONCENTRATED_WEIGHT",
"result": "PASS"
},
{
"name": "LOW_SUB_UNIVERSE_SHARPE",
"result": "PASS",
"limit": 0.59,
"value": 0.68
},
{
"name": "SELF_CORRELATION",
"result": "PENDING"
},
{
"name": "MATCHES_COMPETITION",
"result": "PASS",
"competitions": [
{
"id": "challenge",
"name": "Challenge"
}
]
}
]
},
"os": null,
"train": null,
"test": null,
"prod": null,
"competitions": null,
"themes": null,
"pyramids": null,
"pyramidThemes": null,
"team": null
}
*=========================================================================================* *=========================================================================================*
@ -130,7 +18,7 @@ multiply(ts_rank(divide(ts_backfill(fnd6_drc, 252), assets), 126), subtract(grou
===================== !!! 重点(输出方式) !!! ===================== ===================== !!! 重点(输出方式) !!! =====================
现在,请严格遵守以上所有规则,开始生成可立即在WebSim中运行的复合因子表达式。 现在,请严格遵守以上所有规则,开始生成可立即在WebSim中运行的复合因子表达式。
**输出格式**(一行一个表达式, 每个表达式中间需要添加一个空行, 只要表达式本身, 不要解释, 不需要序号, 也不要输出多余的东西): **输出格式**(一行一个表达式, 每个表达式中间需要添加一个空行, 只要表达式本身, 不需要赋值, 不要解释, 不需要序号, 也不要输出多余的东西):
表达式 表达式

@ -0,0 +1,21 @@
[[假设]]
毛利率结构分化蕴含行业竞争格局信息:毛利率持续高于行业均值但呈现收窄趋势的企业,往往面临竞争加剧或定价权削弱,这可能预示未来盈利增速放缓;反之,毛利率持续低于行业均值但呈现扩张趋势的企业,可能正通过效率提升或产品结构改善获得竞争优势,未来盈利存在上行潜力。
[[实施方案]]
使用基础数据“毛利”与“营业收入”计算毛利率(毛利/营业收入)。使用时序行业中性化算子(如“group_standardize_0”),在申万行业分类下,计算每只股票过去八个季度的毛利率相对于行业均值的标准分。再采用时序变化算子(如“ts_decay_linear”)捕捉该标准分在过去四个季度的变化斜率。斜率值为负(标准分下降)时赋予负阿尔法权重,斜率为正(标准分上升)时赋予正阿尔法权重。
[[阿尔法因子优化建议]]
该逻辑的核心在于“趋势”与“相对位置”的交互。建议引入横截面动量算子(如“rank”)对最终的斜率值进行再排序,以强化头部与尾部信号。同时,可考虑对营业收入增长率施加条件约束(例如,仅当营收增长率非负时信号生效),以避免因收缩业务导致毛利率被动提升的噪音干扰。
【数据特点】
指标数据采用EAV结构存储:
- name字段:存储指标名称
- value字段:存储具体数值
- 需要通过模糊匹配name字段查找相关指标
- 需要英文字段名
【输出要求】
1. 格式:纯Python列表,不含任何其他内容
2. 内容:字段名的模糊匹配关键词,输出基础的词根, 禁止使用类似111_222_333, 只一个keyword, 我用模糊搜索就行了
3. 范围:涵盖核心指标及相关辅助指标
4. 禁止:不写完整策略代码,不写SQL,不加注释,不写示例
Loading…
Cancel
Save