Files
AlphaGenerator/prepare_prompt/alpha_prompt.txt
T
2026-01-31 23:30:40 +08:00

156 lines
7.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
研究因子名称
基金季报超预期一致动量
假设
基金经理的管理能力不仅体现在其历史业绩的持续性上,更反映在对上市公司未来盈利的预判和先导性布局上。当一只基金在季度报告中,其重仓股组合的整体未来盈利预期(如下季度一致预期EPS的调整幅度)显著优于市场平均水平时,这表明该基金经理的选股能力获得了专业卖方分析师的即时验证,其持仓组合蕴含着未被市场完全定价的积极信息。这种基于机构专业判断形成的“超预期共识”将产生持续的动量效应,因为信息的消化和资金的跟进需要时间,使得具备该特征的基金在未来一段时间内有望继续跑赢。
实施方案
在每季度基金报告(季报/年报)披露后,提取其公布的前十大重仓股及其持仓权重。对于每只重仓股,计算其在基金报告截止日之后(如下一月)的卖方一致预期EPS(未来12个月)的月度环比调整百分比。然后,以持仓市值为权重,加权计算该基金重仓股组合的整体预期调整幅度。将此加权调整幅度与全市场所有股票的平均预期调整幅度(或基准指数成分股的平均值)进行比较,得到“超预期幅度”因子值。最终,根据该因子值对所有基金进行排序,构建多空组合或用于截面收益预测。
*=========================================================================================*
输出格式:
输出必须是且仅是纯文本。
每一行是一个完整、独立、语法正确的WebSim表达式。
严禁任何形式的解释、编号、标点包裹(如引号)、Markdown格式或额外文本。
===================== !!! 重点(输出方式) !!! =====================
现在,请严格遵守以上所有规则,开始生成可立即在WebSim中运行的复合因子表达式。
不要自行假设, 你需要用到的操作符 和 数据集, 必须从我提供给你的里面查找, 并严格按照里面的使用方法进行组合
**输出格式**(一行一个表达式, 每个表达式中间需要添加一个空行, 只要表达式本身, 不需要赋值, 不要解释, 不需要序号, 也不要输出多余的东西):
表达式
表达式
表达式
...
表达式
=================================================================
重申:请确保所有表达式都使用WorldQuant WebSim平台函数,不要使用pandas、numpy或其他Python库函数。输出必须是一行有效的WQ表达式。
以下是我的账号有权限使用的操作符, 请严格按照操作符, 以及我提供的数据集, 进行生成,组合 50 个 alpha:
不要自行假设, 你需要用到的操作符 和 数据集, 必须从我提供给你的里面查找, 并严格按照里面的使用方法进行组合
!! 数据集使用要求尽量分散, 不要重复使用
!! 数据集使用要求尽量分散, 不要重复使用
=================================================================
**操作符汇总
**算术运算符 (Arithmetic):
abs(x) - 绝对值
add(x, y, filter=false) - 加法 (x + y)
densify(x) - 分组字段稠密化
divide(x, y) - 除法 (x / y)
inverse(x) - 倒数 (1/x)
log(x) - 自然对数
max(x, y, ..) - 最大值
min(x, y, ..) - 最小值
multiply(x, y, filter=false) - 乘法 (x * y)
power(x, y) - 幂运算 (x^y)
reverse(x) - 取反 (-x)
sign(x) - 符号函数
signed_power(x, y) - 保留符号的幂运算
sqrt(x) - 平方根
subtract(x, y, filter=false) - 减法 (x - y)
to_nan(x, value=0, reverse=false) - 值与NaN转换
**逻辑运算符 (Logical):
and(input1, input2) - 逻辑与
if_else(input1, input2, input3) - 条件判断
input1 < input2 - 小于比较
input1 <= input2 - 小于等于
input1 == input2 - 等于比较
input1 > input2 - 大于比较
input1 >= input2 - 大于等于
input1 != input2 - 不等于
is_nan(input) - 是否为NaN
not(x) - 逻辑非
or(input1, input2) - 逻辑或
**时间序列运算符 (Time Series):
days_from_last_change(x) - 上次变化天数
hump(x, hump=0.01) - 限制变化幅度
jump_decay(x, d, sensitivity=0.5, force=0.1) - 跳跃衰减
kth_element(x, d, k) - 第K个值
last_diff_value(x, d) - 最后一个不同值
ts_arg_max(x, d) - 最大值相对索引
ts_arg_min(x, d) - 最小值相对索引
ts_av_diff(x, d) - 与均值的差
ts_backfill(x, lookback=d, k=1, ignore="NAN") - 回填
ts_corr(x, y, d) - 时间序列相关性
ts_count_nans(x, d) - NaN计数
ts_covariance(y, x, d) - 协方差
ts_decay_linear(x, d, dense=false) - 线性衰减
ts_delay(x, d) - 延迟值
ts_delta(x, d) - 差值 (x - 延迟值)
ts_max(x, d) - 时间序列最大值
ts_mean(x, d) - 时间序列均值
ts_min(x, d) - 时间序列最小值
ts_product(x, d) - 时间序列乘积
ts_quantile(x, d, driver="gaussian") - 分位数
ts_rank(x, d, constant=0) - 时间序列排名
ts_regression(y, x, d, lag=0, rettype=0) - 回归分析
ts_scale(x, d, constant=0) - 时间序列缩放
ts_std_dev(x, d) - 时间序列标准差
ts_step(1) - 天数计数器
ts_sum(x, d) - 时间序列求和
ts_target_tvr_decay(x, lambda_min=0, lambda_max=1, target_tvr=0.1) - 目标换手率衰减
ts_target_tvr_delta_limit(x, y, lambda_min=0, lambda_max=1, target_tvr=0.1) - 目标换手率差值限制
ts_zscore(x, d) - 时间序列Z分数
**横截面运算符 (Cross Sectional):
normalize(x, useStd=false, limit=0.0) - 标准化
quantile(x, driver=gaussian, sigma=1.0) - 分位数转换
rank(x, rate=2) - 排名
scale(x, scale=1, longscale=1, shortscale=1) - 缩放
scale_down(x, constant=0) - 按比例缩放
vector_neut(x, y) - 向量中性化
winsorize(x, std=4) - 缩尾处理
zscore(x) - Z分数
**向量运算符 (Vector):
vec_avg(x) - 向量均值
vec_max(x) - 向量最大值
vec_min(x) - 向量最小值
vec_sum(x) - 向量求和
**变换运算符 (Transformational):
bucket(rank(x), range="0,1,0.1" or buckets="2,5,6,7,10") - 分桶
generate_stats(alpha) - 生成统计量
trade_when(x, y, z) - 条件交易
**分组运算符 (Group):
combo_a(alpha, nlength=250, mode='algo1') - 组合Alpha
group_backfill(x, group, d, std=4.0) - 分组回填
group_cartesian_product(g1, g2) - 笛卡尔积分组
group_max(x, group) - 分组最大值
group_mean(x, weight, group) - 分组均值
group_min(x, group) - 分组最小值
group_neutralize(x, group) - 分组中性化
group_rank(x, group) - 分组排名
group_scale(x, group) - 分组缩放
group_zscore(x, group) - 分组Z分数
**特殊运算符 (Special):
in - 包含判断
self_corr(input) - 自相关性
universe_size - 宇宙大小
**归约运算符 (Reduce):
reduce_avg(input, threshold=0) - 平均值归约
reduce_choose(input, nth, ignoreNan=true) - 选择归约
reduce_count(input, threshold) - 计数归约
reduce_ir(input) - IR归约
reduce_kurtosis(input) - 峰度归约
reduce_max(input) - 最大值归约
reduce_min(input) - 最小值归约
reduce_norm(input) - 范数归约
reduce_percentage(input, percentage=0.5) - 百分比归约
reduce_powersum(input, constant=2, precise=false) - 幂和归约
reduce_range(input) - 范围归约
reduce_skewness(input) - 偏度归约
reduce_stddev(input, threshold=0) - 标准差归约
reduce_sum(input) - 求和归约