You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AlphaGenerator/prepare_prompt/alpha_prompt.txt

154 lines
6.5 KiB

研究因子名称
盈利质量溢价因子
假设
高质量的盈利通常表现为持续性、可预测性和较低的应计成分,这类公司往往具备更强的经营现金流支撑和更低的财务操纵风险。根据行为金融学中的“代表性启发”偏差,市场投资者容易过度关注账面利润而忽视盈利构成的质量,导致高质量盈利公司被系统性低估,从而在中长期产生超额收益。
实施方案
基于财报数据,构建一个综合盈利质量指标:首先计算应计利润占总利润的比例(应计比率),再结合经营性现金流与净利润的比值、盈利波动率以及资产周转稳定性等维度进行标准化加权,最终形成横截面上的排序因子。该因子值越高,代表公司盈利质量越好,预期未来收益越高。
*=========================================================================================*
输出格式:
输出必须是且仅是纯文本。
每一行是一个完整、独立、语法正确的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) - 求和归约