main
jack 1 month ago
parent 2d265949d7
commit ce31f5e6ff
  1. 11
      main.py
  2. 2
      prepare_prompt/alpha_prompt.txt
  3. 2
      prepare_prompt/keys_text.txt

@ -20,8 +20,9 @@ SELECT_DATA_SET_QTY = 30
SILICONFLOW_API_KEY = "sk-pvdiisdowmuwkrpnxsrlhxaovicqibmlljwrwwvbbdjaitdl" SILICONFLOW_API_KEY = "sk-pvdiisdowmuwkrpnxsrlhxaovicqibmlljwrwwvbbdjaitdl"
SILICONFLOW_BASE_URL = "https://api.siliconflow.cn/v1" SILICONFLOW_BASE_URL = "https://api.siliconflow.cn/v1"
MODELS = [ MODELS = [
'deepseek-ai/DeepSeek-V3.2-Exp', 'Pro/deepseek-ai/DeepSeek-V3.1-Terminus',
'Qwen/Qwen3-VL-235B-A22B-Instruct', # 'deepseek-ai/DeepSeek-V3.2-Exp',
# 'Qwen/Qwen3-VL-235B-A22B-Instruct',
# 'MiniMaxAI/MiniMax-M2', # 'MiniMaxAI/MiniMax-M2',
# 'zai-org/GLM-4.6', # 'zai-org/GLM-4.6',
# 'inclusionAI/Ring-flash-2.0', # 'inclusionAI/Ring-flash-2.0',
@ -182,7 +183,7 @@ def get_user_info():
url = "https://api.siliconflow.cn/v1/user/info" url = "https://api.siliconflow.cn/v1/user/info"
response = httpx.get(url, headers=headers) response = httpx.get(url, headers=headers)
data = response.json()['data'] data = response.json()['data']
balance = data['balance'] balance = data['totalBalance']
print(f"余额: {balance}") print(f"余额: {balance}")
return float(balance) return float(balance)
@ -239,13 +240,15 @@ def prepare_prompt(data_sets):
prompt += operator prompt += operator
prompt += "\n========================= 操作符结束 =======================================\n\n" prompt += "\n========================= 操作符结束 =======================================\n\n"
prompt += "========================= 数据字段开始 =======================================" prompt += "========================= 数据字段开始 =======================================\n"
prompt += "注意: data_set_name: 后面的是数据字段(可以使用), description: 此字段后面的是数据字段对应的描述或使用说明(不能使用), description_cn字段后面的内容是中文使用说明(不能使用)\n\n" prompt += "注意: data_set_name: 后面的是数据字段(可以使用), description: 此字段后面的是数据字段对应的描述或使用说明(不能使用), description_cn字段后面的内容是中文使用说明(不能使用)\n\n"
for data_set in data_sets: for data_set in data_sets:
prompt += str(data_set) + '\n' prompt += str(data_set) + '\n'
prompt += "========================= 数据字段结束 =======================================\n\n" prompt += "========================= 数据字段结束 =======================================\n\n"
prompt += "以上数据字段和操作符, 按照Description说明组合, 但是每一个 alpha 组合的使用的数据字段和操作符不要过于集中, 在符合语法的情况下, 多尝试不同的组合"
return prompt return prompt

@ -32,4 +32,4 @@
================================================================= =================================================================
重申:请确保所有表达式都使用WorldQuant WebSim平台函数,不要使用pandas、numpy或其他Python库函数。输出必须是一行有效的WQ表达式。 重申:请确保所有表达式都使用WorldQuant WebSim平台函数,不要使用pandas、numpy或其他Python库函数。输出必须是一行有效的WQ表达式。
以下是我的账号有权限使用的操作符, 请严格按照操作符, 以及我提供的数据集, 进行生成,组合 10 个alpha: 以下是我的账号有权限使用的操作符, 请严格按照操作符, 以及我提供的数据集, 进行生成,组合 20 个alpha:

@ -1 +1 @@
["deferred_revenue","revenue","drc","unearned_revenue","contract_liability","assets","total_assets","equity","book_value","market_cap","revenue_growth","sales","current_assets","current_liabilities","liabilities","net_income","operating_income","earnings","fnd","balance_sheet","income_statement","cash_flow","financial","ratio","size","scale","capitalization"] ['customer', 'graph', 'rank', 'hub', 'pv', 'ts', 'mean', 'score', 'weight', 'connection', 'partner', 'business', 'network']
Loading…
Cancel
Save