尾部风险溢价因子 假设 在市场极端下跌期间,投资者往往因恐慌情绪而过度抛售高尾部风险资产,导致这些资产价格被暂时低估;而在市场恢复平稳后,此类资产会因风险补偿机制获得超额收益。因此,过去经历显著尾部损失的股票在未来短期内可能具备正向预期收益。 实施方案 基于个股日收益率序列,滚动计算其在过去N个交易日(如60日)中低于VaR阈值(如5%分位数)的极端负收益的平均值或条件VaR(Expected Shortfall),构建尾部风险指标;对全市场股票按该指标升序排序,做多尾部风险最高(即历史极端损失最严重)的十分之一组合,做空最低的十分之一组合,形成多空因子收益序列。 Tail Risk Premium Factor Hypothesis During periods of extreme market downturns, investors often panic and excessively sell assets with high tail risk, temporarily depressing their prices. As market conditions normalize, these assets tend to earn excess returns as compensation for bearing tail risk. Consequently, stocks that have experienced significant tail losses in the recent past may exhibit positive expected returns over the short term. Implementation Using daily stock return series, compute a rolling tail risk metric—such as the average of returns below the 5th percentile VaR threshold or the Expected Shortfall—over the past N trading days (e.g., 60 days). Rank all tradable stocks by this metric in ascending order, construct a long-short portfolio by going long the top decile (highest historical tail losses) and short the bottom decile, and record the resulting factor return series. *=========================================================================================* 输出格式: 输出必须是且仅是纯文本。 每一行是一个完整、独立、语法正确的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) - 求和归约