From b8c5517c389db743f4886790d28aca5fcab08c23 Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 9 Jan 2026 18:05:03 +0800 Subject: [PATCH] ++ --- main.py | 12 +- .../01/09/manual_prompt_20260109174802.txt | 204 ++++++++++++++++++ prepare_prompt/alpha_prompt.txt | 13 +- prepare_prompt/keys_text.txt | 17 +- 手动处理每天alpha.txt | 58 +++++ 5 files changed, 286 insertions(+), 18 deletions(-) create mode 100644 manual_prompt/2026/01/09/manual_prompt_20260109174802.txt diff --git a/main.py b/main.py index 5bd53fa..90ad1c7 100644 --- a/main.py +++ b/main.py @@ -49,7 +49,7 @@ def process_text(text): if should_include: results.append(tl.lower()) - results = [item for item in results if item != '"'] + results = [item for item in results if item != '"' and len(item) > 2] if results: return list(set(results)) @@ -254,8 +254,8 @@ def prepare_prompt(data_sets): # 读取操作符 prompt += "\n\n以下是我的账号有权限使用的操作符, 请严格按照操作符, 进行生成,组合因子\n\n" - prompt += "========================= 操作符开始 =======================================" - prompt += "注意: Operator: 后面的是操作符,\nDescription: 此字段后面的是操作符对应的描述或使用说明, Description字段后面的内容是使用说明, 不是操作符\n" + prompt += "========================= 操作符开始 =======================================\n" + prompt += "注意: Operator: 后面的是操作符(是可以使用的),\nDescription: 此字段后面的是操作符对应的描述或使用说明(禁止使用, 仅供参考), Description字段后面的内容是使用说明, 不是操作符\n" prompt += "特别注意!!!! 必须按照操作符字段Operator的使用说明生成 alpha" operator_prompt_path = os.path.join(PREPARE_PROMPT, "operator.txt") operator = read_operator(operator_prompt_path) @@ -299,9 +299,9 @@ def main(): # # 如果需要手动在页面段模型, 使用提示词, 打开这个, 将生成的提示词存到本地 manual_prompt(prompt) - for model in MODELS: - # 如果需要使用模型, 打开这个 - call_ai(prompt, model) + # for model in MODELS: + # # 如果需要使用模型, 打开这个 + # call_ai(prompt, model) if __name__ == "__main__": diff --git a/manual_prompt/2026/01/09/manual_prompt_20260109174802.txt b/manual_prompt/2026/01/09/manual_prompt_20260109174802.txt new file mode 100644 index 0000000..edc2db5 --- /dev/null +++ b/manual_prompt/2026/01/09/manual_prompt_20260109174802.txt @@ -0,0 +1,204 @@ +任务指令 +Receivables Quality Premium Factor +Hypothesis +Receivables quality (rather than mere scale) is a core reflection of an enterprise's operational resilience and bargaining power. High-quality receivables—characterized by short collection cycles, low bad debt rates, and a reasonable proportion of receivables from major customers—indicate strong certainty in cash flow collection, low operational risks, and significant bargaining power over downstream customers. Such companies are more likely to achieve stable profit growth and obtain long-term valuation premiums, warranting long positions. Conversely, companies with poor receivables quality face potential risks of cash flow pressure and increased impairment losses, resulting in weak performance certainty, and short positions should be established. +Implementation Plan +Construct a "composite receivables quality indicator" integrating three core dimensions: receivables turnover days, allowance for bad debts ratio, and the proportion of receivables from the top five customers. Standardize data of each dimension through time-series standardization processing, and generate a comprehensive quality score using the weighted scoring method (weights are set based on the sensitivity of each dimension to cash flow). Utilize time-series trend operators to analyze the variation trajectory of quality scores over the past four quarters, assign positive weights to companies with scores consistently at a high level and steadily improving, and negative weights to those with scores persistently low or rapidly declining. Meanwhile, eliminate the interference of industry scale differences on the indicator through standardization processing. +Alpha Factor Optimization Suggestions +Introduce customer credit rating data as a moderating variable; appropriately increase the weight of receivables quality scores for companies whose downstream customers are mostly high-credit entities to enhance factor effectiveness. 2. Dynamically adjust the weights of each dimension according to industry characteristics (e.g., focusing on turnover days in the retail industry and bad debt rates in the manufacturing industry) to replace the unified weighting model and improve industry adaptability. 3. Incorporate cash flow verification operators; strengthen signal weights when there is positive resonance between receivables quality scores and operating cash flow net growth rate, and weaken signals when there is a divergence, so as to reduce misjudgment risks of a single indicator. +*=========================================================================================* +输出格式: +输出必须是且仅是纯文本。 +每一行是一个完整、独立、语法正确的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字段后面的内容是中文使用说明(不能使用) + +{'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.'} +{'data_set_name': '可以使用:fnd6_capxv', 'description': '不可使用,仅供参考:Capital Expend Property, Plant and Equipment Schd V'} +{'data_set_name': '可以使用:fnd6_ciother', 'description': '不可使用,仅供参考:Comp. Inc. - Other Adj.'} +{'data_set_name': '可以使用:fnd6_cisecgl', 'description': '不可使用,仅供参考:Comp Inc - Securities Gains/Losses'} +{'data_set_name': '可以使用:fnd6_eventv110_gdwlieps12', 'description': '不可使用,仅供参考:Impairment of Goodwill Basic EPS Effect 12MM'} +{'data_set_name': '可以使用:fnd6_eventv110_gdwliepsq', 'description': '不可使用,仅供参考:Impairment of Goodwill Basic EPS Effect'} +{'data_set_name': '可以使用:fnd6_newqeventv110_cibegniq', 'description': '不可使用,仅供参考:Comp Inc - Beginning Net Income'} +{'data_set_name': '可以使用:fnd6_newqeventv110_gdwliaq', 'description': '不可使用,仅供参考:Impairment of Goodwill After-tax'} +{'data_set_name': '可以使用:fnd6_newqeventv110_gdwlipq', 'description': '不可使用,仅供参考:Impairment of Goodwill Pretax'} +{'data_set_name': '可以使用:fnd6_newqeventv110_spcedq', 'description': '不可使用,仅供参考:S&P Core Earnings EPS Diluted'} +{'data_set_name': '可以使用:fnd6_newqv1300_ciderglq', 'description': '不可使用,仅供参考:Comp Inc - Derivative Gains/Losses'} +{'data_set_name': '可以使用:fnd6_newqv1300_ciotherq', 'description': '不可使用,仅供参考:Comp Inc - Other Adj'} +{'data_set_name': '可以使用:fnd6_newqv1300_spceepsp12', 'description': '不可使用,仅供参考:S&P Core 12MM EPS - Basic - Preliminary'} +{'data_set_name': '可以使用:sales_ps', 'description': '不可使用,仅供参考:Sales per Share (Quarterly)'} +{'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.'} +{'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.'} +{'data_set_name': '可以使用:multi_factor_acceleration_score_derivative', 'description': '不可使用,仅供参考:Change in the acceleration of multi-factor score compared to previous period.'} +{'data_set_name': '可以使用:min_reported_eps_guidance', 'description': '不可使用,仅供参考:Reported Earnings Per Share - Minimum guidance value for the annual period'} +{'data_set_name': '可以使用:pv13_h2_min2_1k_sector', 'description': '不可使用,仅供参考:Grouping fields for top 1000'} +{'data_set_name': '可以使用:pv13_h_min22_1000_sector', 'description': '不可使用,仅供参考:Grouping fields for top 1000'} +{'data_set_name': '可以使用:pv13_h_min24_500_sector', 'description': '不可使用,仅供参考:Grouping fields for top 500'} +{'data_set_name': '可以使用:pv13_h_min2_focused_sector', 'description': '不可使用,仅供参考:Grouping fields for top 200'} +{'data_set_name': '可以使用:pv13_h_min52_1k_sector', 'description': '不可使用,仅供参考:Grouping fields for top 1000'} +{'data_set_name': '可以使用:news_max_up_amt', 'description': '不可使用,仅供参考:The after the news high minus the price at the time of the news'} +{'data_set_name': '可以使用:nws18_sse', 'description': '不可使用,仅供参考:Sentiment of phrases impacting the company'} +{'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.'} +{'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.'} +{'data_set_name': '可以使用:fn_liab_fair_val_l1_a', 'description': '不可使用,仅供参考:Liabilities Fair Value, Recurring, Level 1'} +{'data_set_name': '可以使用:fn_liab_fair_val_l1_q', 'description': '不可使用,仅供参考:Liabilities Fair Value, Recurring, Level 1'} +{'data_set_name': '可以使用:fn_liab_fair_val_l2_a', 'description': '不可使用,仅供参考:Liabilities Fair Value, Recurring, Level 2'} +{'data_set_name': '可以使用:fn_liab_fair_val_l2_q', 'description': '不可使用,仅供参考:Liabilities Fair Value, Recurring, Level 2'} +{'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.'} +{'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说明组合, 但是每一个 alpha 组合的使用的数据字段和操作符不要过于集中, 在符合语法的情况下, 多尝试不同的组合 \ No newline at end of file diff --git a/prepare_prompt/alpha_prompt.txt b/prepare_prompt/alpha_prompt.txt index 8c57d00..01dfffe 100644 --- a/prepare_prompt/alpha_prompt.txt +++ b/prepare_prompt/alpha_prompt.txt @@ -1,14 +1,17 @@ 任务指令 -Residual Value Fluctuation Arbitrage Factor +Receivables Quality Premium Factor Hypothesis -In capital-intensive industries utilizing operating leases (e.g., airlines, retail, industrial equipment), fluctuations in the estimated residual value of leased assets reflect market divergence regarding the assets' long-term worth. An upward, out-of-expectations revision in the residual value estimate disclosed in financial reports signals increased optimism from management or appraisers concerning the asset's economic life, technological obsolescence risk, or secondary market liquidity. This optimism may precede an actual improvement in the asset's realizable value or a reduction in discounting costs, serving as a potential positive signal. Conversely, a downward, unexpected revision may foreshadow potential asset impairment and future cash flow erosion. -Implementation -Construct a "Residual Value Revision Intensity" metric using data from financial statement notes related to "Lease Liabilities," specifically the present value of future minimum lease payments and the estimated residual value of leased assets. The calculation is: (Current Period Disclosed Residual Value Estimate - Prior Period Estimate) / Total Carrying Value of Leased Assets. Employ a time-series breakout detection operator (e.g., ts_breakout or residual analysis) to identify anomalous adjustment points where the estimate deviates from its historical trend. For companies identified with a positive anomalous adjustment, gradually establish a long position after a defined lag period (e.g., 1-3 months) following the disclosure. For those with a negative anomalous adjustment, establish a short position. Use a time-series backfill operator to ensure data continuity. +Receivables quality (rather than mere scale) is a core reflection of an enterprise's operational resilience and bargaining power. High-quality receivables—characterized by short collection cycles, low bad debt rates, and a reasonable proportion of receivables from major customers—indicate strong certainty in cash flow collection, low operational risks, and significant bargaining power over downstream customers. Such companies are more likely to achieve stable profit growth and obtain long-term valuation premiums, warranting long positions. Conversely, companies with poor receivables quality face potential risks of cash flow pressure and increased impairment losses, resulting in weak performance certainty, and short positions should be established. + +Implementation Plan + +Construct a "composite receivables quality indicator" integrating three core dimensions: receivables turnover days, allowance for bad debts ratio, and the proportion of receivables from the top five customers. Standardize data of each dimension through time-series standardization processing, and generate a comprehensive quality score using the weighted scoring method (weights are set based on the sensitivity of each dimension to cash flow). Utilize time-series trend operators to analyze the variation trajectory of quality scores over the past four quarters, assign positive weights to companies with scores consistently at a high level and steadily improving, and negative weights to those with scores persistently low or rapidly declining. Meanwhile, eliminate the interference of industry scale differences on the indicator through standardization processing. Alpha Factor Optimization Suggestions -The efficacy of this factor is likely highly dependent on asset characteristics. It is recommended to introduce asset-segmentation grouping: for instance, group leased assets by type (aircraft, vessels, retail storefronts, IT equipment) and compute the cross-sectional percentile of the Residual Value Revision Intensity within each group. Additionally, overlay industry capacity utilization or secondary asset transaction price momentum as confirming signals. Enhance the factor weight when a residual value upward revision coincides with improving activity in the corresponding asset's secondary market. Conversely, attenuate the signal when these metrics diverge. + +Introduce customer credit rating data as a moderating variable; appropriately increase the weight of receivables quality scores for companies whose downstream customers are mostly high-credit entities to enhance factor effectiveness. 2. Dynamically adjust the weights of each dimension according to industry characteristics (e.g., focusing on turnover days in the retail industry and bad debt rates in the manufacturing industry) to replace the unified weighting model and improve industry adaptability. 3. Incorporate cash flow verification operators; strengthen signal weights when there is positive resonance between receivables quality scores and operating cash flow net growth rate, and weaken signals when there is a divergence, so as to reduce misjudgment risks of a single indicator. *=========================================================================================* diff --git a/prepare_prompt/keys_text.txt b/prepare_prompt/keys_text.txt index 314d6f2..1629b4c 100644 --- a/prepare_prompt/keys_text.txt +++ b/prepare_prompt/keys_text.txt @@ -1,10 +1,13 @@ -**Residual Value Fluctuation Arbitrage Factor** +Receivables Quality Premium Factor -**Hypothesis** -In capital-intensive industries utilizing operating leases (e.g., airlines, retail, industrial equipment), fluctuations in the estimated residual value of leased assets reflect market divergence regarding the assets' long-term worth. An upward, out-of-expectations revision in the residual value estimate disclosed in financial reports signals increased optimism from management or appraisers concerning the asset's economic life, technological obsolescence risk, or secondary market liquidity. This optimism may precede an actual improvement in the asset's realizable value or a reduction in discounting costs, serving as a potential positive signal. Conversely, a downward, unexpected revision may foreshadow potential asset impairment and future cash flow erosion. +Hypothesis -**Implementation** -Construct a "Residual Value Revision Intensity" metric using data from financial statement notes related to "Lease Liabilities," specifically the present value of future minimum lease payments and the estimated residual value of leased assets. The calculation is: (Current Period Disclosed Residual Value Estimate - Prior Period Estimate) / Total Carrying Value of Leased Assets. Employ a time-series breakout detection operator (e.g., `ts_breakout` or residual analysis) to identify anomalous adjustment points where the estimate deviates from its historical trend. For companies identified with a positive anomalous adjustment, gradually establish a long position after a defined lag period (e.g., 1-3 months) following the disclosure. For those with a negative anomalous adjustment, establish a short position. Use a time-series backfill operator to ensure data continuity. +Receivables quality (rather than mere scale) is a core reflection of an enterprise's operational resilience and bargaining power. High-quality receivables—characterized by short collection cycles, low bad debt rates, and a reasonable proportion of receivables from major customers—indicate strong certainty in cash flow collection, low operational risks, and significant bargaining power over downstream customers. Such companies are more likely to achieve stable profit growth and obtain long-term valuation premiums, warranting long positions. Conversely, companies with poor receivables quality face potential risks of cash flow pressure and increased impairment losses, resulting in weak performance certainty, and short positions should be established. -**Alpha Factor Optimization Suggestions** -The efficacy of this factor is likely highly dependent on asset characteristics. It is recommended to introduce **asset-segmentation grouping**: for instance, group leased assets by type (aircraft, vessels, retail storefronts, IT equipment) and compute the cross-sectional percentile of the Residual Value Revision Intensity within each group. Additionally, overlay **industry capacity utilization** or **secondary asset transaction price momentum** as confirming signals. Enhance the factor weight when a residual value upward revision coincides with improving activity in the corresponding asset's secondary market. Conversely, attenuate the signal when these metrics diverge. \ No newline at end of file +Implementation Plan + +Construct a "composite receivables quality indicator" integrating three core dimensions: receivables turnover days, allowance for bad debts ratio, and the proportion of receivables from the top five customers. Standardize data of each dimension through time-series standardization processing, and generate a comprehensive quality score using the weighted scoring method (weights are set based on the sensitivity of each dimension to cash flow). Utilize time-series trend operators to analyze the variation trajectory of quality scores over the past four quarters, assign positive weights to companies with scores consistently at a high level and steadily improving, and negative weights to those with scores persistently low or rapidly declining. Meanwhile, eliminate the interference of industry scale differences on the indicator through standardization processing. + +Alpha Factor Optimization Suggestions + +1. Introduce customer credit rating data as a moderating variable; appropriately increase the weight of receivables quality scores for companies whose downstream customers are mostly high-credit entities to enhance factor effectiveness. 2. Dynamically adjust the weights of each dimension according to industry characteristics (e.g., focusing on turnover days in the retail industry and bad debt rates in the manufacturing industry) to replace the unified weighting model and improve industry adaptability. 3. Incorporate cash flow verification operators; strengthen signal weights when there is positive resonance between receivables quality scores and operating cash flow net growth rate, and weaken signals when there is a divergence, so as to reduce misjudgment risks of a single indicator. diff --git a/手动处理每天alpha.txt b/手动处理每天alpha.txt index e69de29..dcf29c2 100644 --- a/手动处理每天alpha.txt +++ b/手动处理每天alpha.txt @@ -0,0 +1,58 @@ +ts_decay_linear(multiply(ts_delta(fscore_bfl_total,20),sign(subtract(nws18_sse,ts_quantile(nws18_sse,30)))),60) +normalize(winsorize(group_neutralize(divide(fnd6_capxv,ts_sum(fnd6_ciother,15)),pv13_h2_min2_1k_sector),2)) +rank(multiply(sqrt(abs(ts_av_diff(fnd6_newqeventv110_cibegniq,30))),reverse(fn_def_tax_assets_liab_net_q))) +if_else(nws18_sse>ts_mean(nws18_sse,40),ts_rank(fscore_total,35),reverse(ts_rank(fnd6_newqv1300_ciotherq,45))) +group_scale(multiply(abs(ts_delta(sales_ps,10)),sign(ts_corr(fscore_bfl_total,sales_ps,60))),pv13_h_min24_500_sector) +zscore(add(ts_zscore(fnd6_eventv110_gdwliepsq,40),reverse(divide(fn_liab_fair_val_l1_q,ts_mean(fn_liab_fair_val_l2_q,30))))) +ts_mean(multiply(hump(ts_delta(fscore_total,25),0.02),group_rank(nws18_sse,pv13_h_min52_1k_sector)),40) +subtract(ts_zscore(fnd6_newqv1300_spceepsp12,60),winsorize(multiply(fn_treasury_stock_shares_a,news_max_up_amt),3)) +multiply(signed_power(ts_av_diff(fnd6_cisecgl,20),1.5),group_neutralize(sign(nws18_sse),pv13_h_min22_1000_sector)) +scale(if_else(sales_ps>ts_quantile(sales_ps,45),ts_decay_linear(fscore_bfl_total,50),reverse(fscore_total)),2) +ts_rank(add(divide(fnd6_newqeventv110_gdwliaq,ts_mean(fnd6_newqeventv110_gdwlipq,25)),abs(nws18_sse)),60) +normalize(group_neutralize(multiply(ts_delta(fn_def_tax_liab_a,15),sign(subtract(sales_ps,ts_min(sales_ps,25)))),pv13_h_min2_focused_sector)) +winsorize(multiply(ts_covariance(fscore_total,nws18_sse,35),sqrt(abs(ts_std_dev(fnd6_capxv,20)))),2) +reverse(ts_zscore(divide(ts_sum(fnd6_newqv1300_ciderglq,30),fscore_bfl_total),90)) +group_rank(multiply(add(ts_mean(sales_ps,35),fn_liab_fair_val_l2_q),sign(ts_delta(nws18_sse,15))),pv13_h2_min2_1k_sector) +multiply(ts_backfill(ts_av_diff(fnd6_eventv110_gdwlieps12,25),20),hump(sign(sales_ps),0.01)) +zscore(subtract(group_neutralize(fscore_total,pv13_h_min24_500_sector),divide(news_max_up_amt,ts_mean(news_max_up_amt,30)))) +ts_decay_linear(if_else(fn_liab_fair_val_l1_a>ts_quantile(fn_liab_fair_val_l1_a,30),sales_ps,reverse(fnd6_ciother)),70) +rank(winsorize(add(ts_corr(sales_ps,fscore_bfl_total,75),group_rank(fnd6_newqeventv110_spcedq,pv13_h_min52_1k_sector)),3)) +reverse(ts_zscore(fnd6_capxv, 252)) + +ts_delta(group_rank(zscore(fnd6_capxv), pv13_h_min2_focused_sector), 21) + +group_neutralize(ts_scale(rank(forward_price_120), 63), pv13_h_min22_1000_sector) + +if_else(fnd6_newqv1300_ciderglq > fnd6_newqeventv110_cibegniq, reverse(rank(sales_ps)), zscore(fnd6_newqv1300_ciotherq)) + +ts_backfill(group_zscore(log(abs(fnd6_eventv110_gdwliepsq)), pv13_h_min24_500_sector), 22) + +multiply(sign(fnd6_newqeventv110_spcedq), fnd6_newqv1300_spceepsp12) + +subtract(rank(fn_liab_fair_val_l1_q), rank(fn_liab_fair_val_l2_q)) + +divide(min_reported_eps_guidance, fnd6_cisecgl) + +group_scale(multi_factor_acceleration_score_derivative, pv13_h_min52_1k_sector) + +group_backfill(fn_op_lease_min_pay_due_in_2y_a, pv13_h2_min2_1k_sector, 42) + +add(fscore_bfl_total, fscore_total) + +if_else(fn_treasury_stock_shares_a > 0, news_max_up_amt, nws18_sse) + +power(zscore(log(abs(fnd6_newqeventv110_gdwlipq))), 0.5) + +winsorize(fnd6_newqeventv110_gdwliaq) + +signed_power(fnd6_eventv110_gdwlieps12, 2) + +is_nan(fnd6_newqv1300_ciotherq) + +kth_element(fn_def_tax_liab_a, 126, 3) + +normalize(fnd6_capxv) + +days_from_last_change(quantile(fn_liab_fair_val_l1_a, "gaussian")) + +vec_avg(bucket(rank(forward_price_120), range="0, 1, 0.2")) \ No newline at end of file