任务指令
研究动机
当前市场对科技成长股的估值普遍依赖研发投入总量，但未能有效区分研发支出的质量差异。研发支出资本化率（资本化研发支出/总研发支出）反映了公司管理层对研发成果转化能力的内部评估——较高的资本化率通常意味着公司拥有更可商业化的技术创新管线，而过度费用化可能暗示研发项目风险较高或管理保守。我们认为，市场系统性低估了高资本化率公司的创新质量溢价。
[[假设]]
研发支出资本化率持续提升的公司，其研发项目正逐步接近商业化阶段，未来盈利能见度改善。这类公司在业绩释放周期中容易产生正向预期差，股价存在上行潜力；反之，资本化率下降则预示研发进展受阻，可能面临估值调整。
[[实施方案]]
使用财务报表中的"资本化研发支出"与"费用化研发支出"字段，构建滚动四个季度的资本化率（资本化研发支出/（资本化研发支出+费用化研发支出））。通过ts_delta()算子计算该比率在过去8个季度的变化斜率，对斜率显著为正的股票赋予正向权重，斜率为负则赋予负向权重。
[[实施优化建议]]
不同行业研发周期差异巨大（如生物制药vs软件开发），建议先按行业分组计算资本化率的历史中位数，再识别个股相对行业趋势的偏离度，以消除行业特性干扰。
供应链集中度突变预警因子
研究逻辑
上市公司对单一供应商或客户的依赖度变化往往领先于基本面波动。当公司突然披露新增主要供应商/客户（集中度提升），可能预示供应链重塑或业务转型，伴随经营不确定性上升；而集中度下降通常反映供应链多元化取得进展，抗风险能力增强。市场对这类结构性变化的定价常存在滞后。
[[假设]]
前五大供应商采购集中度在近两个财报期突然跃升（超过历史波动阈值）的公司，短期面临供应链磨合风险，盈利波动性可能加剧，股价易受负面冲击；集中度稳步下降的公司则经营稳健性改善，具备相对防御价值。
[[实施方案]]
基于"前五大供应商采购占比"字段，使用ts_breakout()算子检测近8个季度序列中的统计显著突变点。对向上突破阈值（如集中度增幅>15%）的股票做空，对向下突破或持续下降的股票做多。
[[阿尔法因子优化建议]]
引入上下游行业联动调整：若集中度突变方向与上游行业景气度背离（例如集中度上升但供应商行业盈利能力下滑），则放大信号强度；反之则衰减信号。可通过行业收益率相关性矩阵实现加权。
ESG争议事件的舆论衰减因子
核心思路
ESG争议事件对股价的冲击存在"舆论衰减效应"：媒体关注度随时间指数下降，但企业实质性整改行动往往滞后于舆论周期。市场通常高估短期情绪冲击，却低估长期治理改善带来的价值修复。通过量化舆论衰减速度与公司响应行动的错配，可捕捉预期差机会。
[[假设]]
ESG争议事件曝光后，若公司快速采取实质性整改行动（如高管变更、制度修订），但媒体关注度仍处于高位，则股价超跌反弹概率较高；若舆论已自然衰减而公司无实际行动，则潜在风险仍未释放，股价可能持续承压。
[[实施方案]]
整合新闻情感数据（负面ESG报道数量）、公告数据（公司整改行动关键词抓取）与股价波动率。构建二维指标：①舆论衰减速度（过去30天负面新闻量的指数移动平均衰减斜率）；②公司响应强度（整改公告数量与内容深度评分）。在舆论衰减快而响应强度高的象限做多，在舆论未衰减且响应弱的象限做空。
[[阿尔法因子优化建议]]
加入社交媒体数据作为舆论衰减的领先指标：Twitter/股吧讨论热度衰减通常早于主流媒体。采用时间序列交叉验证，赋予社交平台数据更高的衰减系数权重。
机构调研信息扩散不对称因子
创新视角
机构调研活动蕴含未完全公开的基本面信息，但其信息扩散存在路径依赖：大型基金往往率先获取细节，中小投资者滞后。调研频次变化率与后续财报超预期程度存在相关性，且此关系在流动性较差的股票中更为显著。
[[假设]]
上市公司接待机构调研频次在财报静默期前突然放大（较历史均值增长>2标准差），而同期卖方评级未明显上调，往往预示未公开的积极信息正在机构间扩散，股价在财报前存在上行惯性；反之调研频次萎缩但评级维持，则可能暗示信息平淡。
[[实施方案]]
使用"机构调研次数"字段，计算月度调研频次的z-score标准化值，结合"卖方评级调整"字段构建信息扩散差指标：调研z-score - 评级调整z-score（评级上调取正值）。对该差值较大的股票做多，差值较小或为负的做空。
[[阿尔法因子优化建议]]
按股票流动性分层处理：对日均成交额后30%的股票，赋予该因子更高权重；对高流动性股票加入衰减系数，降低其信号强度（因信息扩散效率已较高）。
*=========================================================================================*
输出格式：
输出必须是且仅是纯文本。
每一行是一个完整、独立、语法正确的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': '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': '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': '1292', 'data_set_name': 'anl4_netdebt_flag', 'description': 'Net debt - forecast type (revision/new/...)', 'description_cn': '净负债-预测类型(修正值/新值/....ImageAlign\n<|im_start|>user\nstrike price'}
{'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': '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': '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': '2144', 'data_set_name': 'nws12_mainz_tonhigh', 'description': 'Highest price reached during the session before the time of news', 'description_cn': '新闻发布时间前交易session中最高价'}
{'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': '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': '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': '2436', 'data_set_name': 'fn_liab_fair_val_a', 'description': 'Liabilities Fair Value, Recurring, Total', 'description_cn': '看涨期权负债公允价值_ recurring_total'}
{'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': '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 无固定连接于建筑结构或公用设施的常用设备折旧前金额。例如但不限于，桌椅、柜台及书架等。'}
========================= 数据字段结束 =======================================

以上数据字段和操作符, 按照Description说明组合, 但是每一个 alpha 组合的使用的数据字段和操作符不要过于集中, 在符合语法的情况下, 多尝试不同的组合